Skip to content

Commit 9e81c52

Browse files
orlitzkyinochisa
authored andcommitted
riscv: dts: sophgo: enable hardware clock (RTC) on the Milk-V Pioneer
These boards have a working hardware clock if you put a CR-1220 battery in them. We enable it using information from a 6.1.x vendor kernel. Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Signed-off-by: Michael Orlitzky <michael@orlitzky.com> Link: https://lore.kernel.org/r/20260107112922.20013-2-michael@orlitzky.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <unicorn_wang@outlook.com> Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
1 parent 03ea867 commit 9e81c52

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@
5252
status = "okay";
5353
};
5454

55+
&i2c0 {
56+
pinctrl-0 = <&i2c0_cfg>;
57+
pinctrl-names = "default";
58+
status = "okay";
59+
60+
rtc: rtc@68 {
61+
compatible = "dallas,ds1307";
62+
reg = <0x68>;
63+
};
64+
};
65+
5566
&i2c1 {
5667
pinctrl-0 = <&i2c1_cfg>;
5768
pinctrl-names = "default";
@@ -89,6 +100,16 @@
89100
};
90101
};
91102

103+
i2c0_cfg: i2c0-cfg {
104+
i2c0-pins {
105+
pinmux = <PINMUX(PIN_IIC0_SDA, 0)>,
106+
<PINMUX(PIN_IIC0_SCL, 0)>;
107+
bias-pull-up;
108+
drive-strength-microamp = <26800>;
109+
input-schmitt-enable;
110+
};
111+
};
112+
92113
i2c1_cfg: i2c1-cfg {
93114
i2c1-pins {
94115
pinmux = <PINMUX(PIN_IIC1_SDA, 0)>,

0 commit comments

Comments
 (0)