* [PATCH 0/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1/v2
@ 2026-11-22 13:33 Han Gao via B4 Relay
2026-11-22 13:33 ` [PATCH 1/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1 Han Gao via B4 Relay
2026-11-22 13:33 ` [PATCH 2/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2 Han Gao via B4 Relay
0 siblings, 2 replies; 5+ messages in thread
From: Han Gao via B4 Relay @ 2026-11-22 13:33 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Chen Wang,
Inochi Amaoto
Cc: Han Gao, devicetree, sophgo, linux-riscv, linux-kernel, Han Gao
Both SG2042 EVB boards have a PT7C4307 RTC on I2C0, same as the
Milk-V Pioneer. Enable it on both.
Datasheet: https://datasheet.octopart.com/PT7C4307WE-Diodes-Inc.-datasheet-180988416.pdf
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
Han Gao (2):
riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1
riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 21 +++++++++++++++++++++
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts | 21 +++++++++++++++++++++
2 files changed, 42 insertions(+)
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261122-sg2042-evb-rtc-8b6b2b5f785e
Best regards,
--
Han Gao <gaohan@iscas.ac.cn>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1
2026-11-22 13:33 [PATCH 0/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1/v2 Han Gao via B4 Relay
@ 2026-11-22 13:33 ` Han Gao via B4 Relay
2026-11-23 8:40 ` Chen Wang
2026-11-22 13:33 ` [PATCH 2/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2 Han Gao via B4 Relay
1 sibling, 1 reply; 5+ messages in thread
From: Han Gao via B4 Relay @ 2026-11-22 13:33 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Chen Wang,
Inochi Amaoto
Cc: Han Gao, devicetree, sophgo, linux-riscv, linux-kernel, Han Gao
From: Han Gao <gaohan@iscas.ac.cn>
The SG2042 EVB v1 has a PT7C4307 RTC at 0x68 on I2C0. Enable I2C0
and add the RTC node.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts b/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
index 9f403e564694eae14913f6ab23080a6333df15ae..6ddb16eabc48a51f457449d245d63a3840b2fdef 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
@@ -136,6 +136,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";
@@ -201,6 +212,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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1
2026-11-22 13:33 ` [PATCH 1/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1 Han Gao via B4 Relay
@ 2026-11-23 8:40 ` Chen Wang
0 siblings, 0 replies; 5+ messages in thread
From: Chen Wang @ 2026-11-23 8:40 UTC (permalink / raw)
To: gaohan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Inochi Amaoto
Cc: Han Gao, devicetree, sophgo, linux-riscv, linux-kernel
On 11/22/2026 9:33 PM, Han Gao via B4 Relay wrote:
> From: Han Gao <gaohan@iscas.ac.cn>
>
> The SG2042 EVB v1 has a PT7C4307 RTC at 0x68 on I2C0. Enable I2C0
> and add the RTC node.
>
> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Reviewed-by: Chen Wang <chen.wang@linux.dev>
Thanks.
> ---
> arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts b/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
> index 9f403e564694eae14913f6ab23080a6333df15ae..6ddb16eabc48a51f457449d245d63a3840b2fdef 100644
> --- a/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
> +++ b/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
> @@ -136,6 +136,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";
> @@ -201,6 +212,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)>,
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2
2026-11-22 13:33 [PATCH 0/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1/v2 Han Gao via B4 Relay
2026-11-22 13:33 ` [PATCH 1/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1 Han Gao via B4 Relay
@ 2026-11-22 13:33 ` Han Gao via B4 Relay
2026-11-23 8:41 ` Chen Wang
1 sibling, 1 reply; 5+ messages in thread
From: Han Gao via B4 Relay @ 2026-11-22 13:33 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Chen Wang,
Inochi Amaoto
Cc: Han Gao, devicetree, sophgo, linux-riscv, linux-kernel, Han Gao
From: Han Gao <gaohan@iscas.ac.cn>
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@iscas.ac.cn>
---
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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2
2026-11-22 13:33 ` [PATCH 2/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2 Han Gao via B4 Relay
@ 2026-11-23 8:41 ` Chen Wang
0 siblings, 0 replies; 5+ messages in thread
From: Chen Wang @ 2026-11-23 8:41 UTC (permalink / raw)
To: gaohan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Inochi Amaoto
Cc: Han Gao, devicetree, sophgo, linux-riscv, linux-kernel
On 11/22/2026 9:33 PM, Han Gao via B4 Relay wrote:
> From: Han Gao <gaohan@iscas.ac.cn>
>
> 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@iscas.ac.cn>
Reviewed-by: Chen Wang <chen.wang@linux.dev>
Thanks.
> ---
> 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)>,
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-23 8:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22 13:33 [PATCH 0/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1/v2 Han Gao via B4 Relay
2026-11-22 13:33 ` [PATCH 1/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v1 Han Gao via B4 Relay
2026-11-23 8:40 ` Chen Wang
2026-11-22 13:33 ` [PATCH 2/2] riscv: dts: sophgo: Enable the RTC on SG2042 EVB v2 Han Gao via B4 Relay
2026-11-23 8:41 ` Chen Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®