]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: dts: sophgo: enable hardware clock (RTC) on the Milk-V Pioneer
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 7 Jan 2026 11:29:22 +0000 (06:29 -0500)
committerInochi Amaoto <inochiama@gmail.com>
Thu, 15 Jan 2026 00:33:43 +0000 (08:33 +0800)
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>
arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts

index 54d8386bf9c0ff84e63c3827d9ef88ad61edc201..ecf8c1e290792c3a27651040eae3c603741cd0c7 100644 (file)
        status = "okay";
 };
 
+&i2c0 {
+       pinctrl-0 = <&i2c0_cfg>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       rtc: rtc@68 {
+               compatible = "dallas,ds1307";
+               reg = <0x68>;
+       };
+};
+
 &i2c1 {
        pinctrl-0 = <&i2c1_cfg>;
        pinctrl-names = "default";
                };
        };
 
+       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)>,