[PATCH 2/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2
From: Han Gao via B4 Relay
Date: Sun Nov 22 2026 - 08:34:23 EST
From: Han Gao <gaohan@xxxxxxxxxxx>
The SG2042 EVB v2 has a PT7C4307 RTC at 0x68 on I2C0. Enable I2C0
and add the RTC node.
Signed-off-by: Han Gao <gaohan@xxxxxxxxxxx>
---
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts b/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
index d8c5814f22581076e6b5114f762d4fd090681b80..0dcc53b519971396a5ce734108ea0386fb186726 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
@@ -124,6 +124,17 @@ &emmc {
status = "okay";
};
+&i2c0 {
+ pinctrl-0 = <&i2c0_cfg>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ rtc@68 {
+ compatible = "dallas,ds1307";
+ reg = <0x68>;
+ };
+};
+
&i2c1 {
pinctrl-0 = <&i2c1_cfg>;
pinctrl-names = "default";
@@ -189,6 +200,16 @@ sdhci-emmc-rst-pwr-pins {
};
};
+ i2c0_cfg: i2c0-cfg {
+ i2c0-pins {
+ pinmux = <PINMUX(PIN_IIC0_SDA, 0)>,
+ <PINMUX(PIN_IIC0_SCL, 0)>;
+ bias-pull-up;
+ drive-strength-microamp = <26800>;
+ input-schmitt-enable;
+ };
+ };
+
i2c1_cfg: i2c1-cfg {
i2c1-pins {
pinmux = <PINMUX(PIN_IIC1_SDA, 0)>,
--
2.47.3