* [PATCH v3 1/5] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
2025-10-29 0:10 [PATCH v3 0/5] Add initial Milk-V Duo S board support Joshua Milas
@ 2025-10-29 0:10 ` Joshua Milas
2025-10-29 5:58 ` Krzysztof Kozlowski
2025-10-29 0:10 ` [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support Joshua Milas
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Joshua Milas @ 2025-10-29 0:10 UTC (permalink / raw)
To: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi
Cc: josh.milas, devicetree, sophgo, linux-riscv
Document the compatible strings for the Milk-V Duo S board [1]
which uses the SOPHGO SG2000 SoC [2].
Link: https://milkv.io/duo-s [1]
Link: https://en.sophgo.com/sophon-u/product/introduce/sg200x.html [2]
Signed-off-by: Joshua Milas <josh.milas@gmail.com>
---
Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml
index 1c502618de51f..0b6fbab48b743 100644
--- a/Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml
+++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo.yaml
@@ -31,6 +31,10 @@ properties:
- milkv,duo-module-01-evb
- const: milkv,duo-module-01
- const: sophgo,sg2000
+ - items:
+ - enum:
+ - milkv,duo-s
+ - const: sophgo,sg2000
- items:
- enum:
- sipeed,licheerv-nano-b
--
2.51.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 1/5] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
2025-10-29 0:10 ` [PATCH v3 1/5] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles Joshua Milas
@ 2025-10-29 5:58 ` Krzysztof Kozlowski
2026-03-16 12:37 ` Joshua Milas
0 siblings, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2025-10-29 5:58 UTC (permalink / raw)
To: Joshua Milas
Cc: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi, devicetree, sophgo, linux-riscv
On Tue, Oct 28, 2025 at 08:10:48PM -0400, Joshua Milas wrote:
> Document the compatible strings for the Milk-V Duo S board [1]
> which uses the SOPHGO SG2000 SoC [2].
>
> Link: https://milkv.io/duo-s [1]
> Link: https://en.sophgo.com/sophon-u/product/introduce/sg200x.html [2]
Drop second link, not relevant. You are not adding new SoC here, are
you?
>
> Signed-off-by: Joshua Milas <josh.milas@gmail.com>
> ---
No changes against v2? You received comments, didn't you?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 1/5] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
2025-10-29 5:58 ` Krzysztof Kozlowski
@ 2026-03-16 12:37 ` Joshua Milas
2026-03-16 12:54 ` Krzysztof Kozlowski
0 siblings, 1 reply; 13+ messages in thread
From: Joshua Milas @ 2026-03-16 12:37 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi, devicetree, sophgo, linux-riscv
Hi Krzysztof,
Apologies for missing the change, I got ahead of myself.
I updated my changelog for an upcoming v4 patch.
> How did you resolve previous comments on bindings? Nothing mentioned
> here.
Which issues specifically? i2c issues were resolved by updating the
.config for drivers. I have yet to resolve the spi issues.
Have a good day,
- Joshua Milas
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 1/5] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles
2026-03-16 12:37 ` Joshua Milas
@ 2026-03-16 12:54 ` Krzysztof Kozlowski
0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-16 12:54 UTC (permalink / raw)
To: Joshua Milas
Cc: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi, devicetree, sophgo, linux-riscv
On 16/03/2026 13:37, Joshua Milas wrote:
> Hi Krzysztof,
>
> Apologies for missing the change, I got ahead of myself.
> I updated my changelog for an upcoming v4 patch.
>
>> How did you resolve previous comments on bindings? Nothing mentioned
>> here.
>
> Which issues specifically? i2c issues were resolved by updating the
> .config for drivers. I have yet to resolve the spi issues.
Each issue you received comment on. You received review and asking now
to repeat is basically asking us to do same work twice which wastes our
time.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support
2025-10-29 0:10 [PATCH v3 0/5] Add initial Milk-V Duo S board support Joshua Milas
2025-10-29 0:10 ` [PATCH v3 1/5] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles Joshua Milas
@ 2025-10-29 0:10 ` Joshua Milas
2025-10-29 12:35 ` Michael Opdenacker
2025-10-29 0:10 ` [PATCH v3 3/5] dt-bindings: soc: sophgo: add sg2000 plic and clint documentation Joshua Milas
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Joshua Milas @ 2025-10-29 0:10 UTC (permalink / raw)
To: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi
Cc: josh.milas, devicetree, sophgo, linux-riscv
Adds initial arm64 support for the Milk-V Duo S board
[1] making it possible to boot Linux to the command line.
Link: https://milkv.io/duo-s [1]
Signed-off-by: Joshua Milas <josh.milas@gmail.com>
---
arch/arm64/boot/dts/sophgo/Makefile | 1 +
.../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 80 +++++++++++++++++++
2 files changed, 81 insertions(+)
create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
diff --git a/arch/arm64/boot/dts/sophgo/Makefile b/arch/arm64/boot/dts/sophgo/Makefile
index 94f52cd7d994b..68aace728223a 100644
--- a/arch/arm64/boot/dts/sophgo/Makefile
+++ b/arch/arm64/boot/dts/sophgo/Makefile
@@ -1,2 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-module-01-evb.dtb
+dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
diff --git a/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts b/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
new file mode 100644
index 0000000000000..174c194e1301d
--- /dev/null
+++ b/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "sg2000.dtsi"
+
+/ {
+ model = "Milk-V Duo S";
+ compatible = "milkv,duo-s", "sophgo,sg2000";
+
+ aliases {
+ i2c4 = &i2c4;
+ mmc0 = &sdhci0;
+ serial0 = &uart0;
+ spi3 = &spi3;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&osc {
+ clock-frequency = <25000000>;
+};
+
+&dmac {
+ status = "okay";
+};
+
+&emmc {
+ bus-width = <4>;
+ no-1-8-v;
+ cap-mmc-hw-reset;
+ no-sd;
+ no-sdio;
+ non-removable;
+ status = "okay";
+};
+
+&gmac0 {
+ status = "okay";
+};
+
+&i2c4 {
+ status = "okay";
+};
+
+&mdio {
+ status = "okay";
+};
+
+&saradc {
+ status = "okay";
+};
+
+&sdhci0 {
+ bus-width = <4>;
+ no-1-8-v;
+ disable-wp;
+ status = "okay";
+};
+
+&sdhci1 {
+ bus-width = <4>;
+ cap-sdio-irq;
+ no-mmc;
+ no-sd;
+ non-removable;
+ status = "okay";
+};
+
+&spi3 {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
--
2.51.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support
2025-10-29 0:10 ` [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support Joshua Milas
@ 2025-10-29 12:35 ` Michael Opdenacker
2025-10-29 14:41 ` Michael Opdenacker
0 siblings, 1 reply; 13+ messages in thread
From: Michael Opdenacker @ 2025-10-29 12:35 UTC (permalink / raw)
To: Joshua Milas, tglx, robh, krzk+dt, conor+dt, unicorn_wang,
inochiama, paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi
Cc: michael.opdenacker, devicetree, sophgo, linux-riscv
Hi Joshua
Many thanks for this update! I'd love to have this board supported in
mainline, and when this happens, I'll add it to Yocto's meta-riscv layer
to make it easy to use.
On 10/29/25 01:10, Joshua Milas wrote:
> Adds initial arm64 support for the Milk-V Duo S board
> [1] making it possible to boot Linux to the command line.
>
> Link: https://milkv.io/duo-s [1]
>
> Signed-off-by: Joshua Milas <josh.milas@gmail.com>
> ---
> arch/arm64/boot/dts/sophgo/Makefile | 1 +
> .../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 80 +++++++++++++++++++
> 2 files changed, 81 insertions(+)
> create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
>
> diff --git a/arch/arm64/boot/dts/sophgo/Makefile b/arch/arm64/boot/dts/sophgo/Makefile
> index 94f52cd7d994b..68aace728223a 100644
> --- a/arch/arm64/boot/dts/sophgo/Makefile
> +++ b/arch/arm64/boot/dts/sophgo/Makefile
> @@ -1,2 +1,3 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-module-01-evb.dtb
> +dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
> diff --git a/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts b/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
> new file mode 100644
> index 0000000000000..174c194e1301d
> --- /dev/null
> +++ b/arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-s.dts
> @@ -0,0 +1,80 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +
> +/dts-v1/;
> +
> +#include "sg2000.dtsi"
> +
> +/ {
> + model = "Milk-V Duo S";
> + compatible = "milkv,duo-s", "sophgo,sg2000";
> +
> + aliases {
> + i2c4 = &i2c4;
> + mmc0 = &sdhci0;
> + serial0 = &uart0;
> + spi3 = &spi3;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +};
> +
> +&osc {
> + clock-frequency = <25000000>;
> +};
> +
> +&dmac {
> + status = "okay";
> +};
> +
> +&emmc {
> + bus-width = <4>;
> + no-1-8-v;
> + cap-mmc-hw-reset;
> + no-sd;
> + no-sdio;
> + non-removable;
> + status = "okay";
> +};
> +
> +&gmac0 {
> + status = "okay";
> +};
> +
> +&i2c4 {
> + status = "okay";
> +};
> +
> +&mdio {
> + status = "okay";
> +};
> +
> +&saradc {
> + status = "okay";
> +};
> +
> +&sdhci0 {
> + bus-width = <4>;
> + no-1-8-v;
> + disable-wp;
> + status = "okay";
> +};
> +
> +&sdhci1 {
> + bus-width = <4>;
> + cap-sdio-irq;
> + no-mmc;
> + no-sd;
> + non-removable;
> + status = "okay";
> +};
> +
> +&spi3 {
> + status = "okay";
> +};
> +
> +&uart0 {
> + status = "okay";
> +};
> +
I managed to boot the board and run tests:
Tested successfully:
* uart0: boot console
* mmc0 (sdhci0?): root filesystem
Issues
*
eth0:
ifconfig eth0 172.24.0.2
[ 48.893725] stmmaceth 4070000.ethernet eth0: Register
MEM_TYPE_PAGE_POOL RxQ-0
[ 48.903077] stmmaceth 4070000.ethernet eth0: cannot attach to PHY
(error: -ENODEV)
ifconfig: SIOCSIFFLAGS: No such device
I believe I have all drivers enabled though...
* emmc:
[ 2.730194] mmc2: Failed to initialize a non-removable card
[ 2.764843] mmc1: Failed to initialize a non-removable card
I tested with a board that has an eMMC
* i2c4: detected by "i2cdetect -l"
but no devices found by "i2cdetect -r 4"
I tried both pins 3/4 and pins 50/48, with two different devices
connected to the bus.
Which pins did you use? I could check the SoC pin muxing, but your
answer will save me time :D
Would you mind sharing your defconfig file ("make savedefconfig") via a
private message or through a link (to avoid sending the entire file to
the list)?
Thanks again
Cheers
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support
2025-10-29 12:35 ` Michael Opdenacker
@ 2025-10-29 14:41 ` Michael Opdenacker
2026-03-16 12:38 ` Joshua Milas
0 siblings, 1 reply; 13+ messages in thread
From: Michael Opdenacker @ 2025-10-29 14:41 UTC (permalink / raw)
To: Joshua Milas, tglx, robh, krzk+dt, conor+dt, unicorn_wang,
inochiama, paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi
Cc: michael.opdenacker, devicetree, sophgo, linux-riscv
Greetings,
On 10/29/25 13:35, Michael Opdenacker wrote:
>
> I managed to boot the board and run tests:
>
> Tested successfully:
>
> * uart0: boot console
> * mmc0 (sdhci0?): root filesystem
>
> Issues
...
I realize I replied to the arm64 part of the thread, but indeed I ran my
tests on riscv.
Michael.
--
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support
2025-10-29 14:41 ` Michael Opdenacker
@ 2026-03-16 12:38 ` Joshua Milas
0 siblings, 0 replies; 13+ messages in thread
From: Joshua Milas @ 2026-03-16 12:38 UTC (permalink / raw)
To: Michael Opdenacker
Cc: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi, devicetree, sophgo, linux-riscv
Hi Michael,
Not sure what is going on with your eth or i2c as I donyt see those errors,
let me try testing the riscv side as I have been running most of my tests
on the arm64 side and have not run the riscv tests in a bit.
I used pins 3/5 for i2c4 using `i2cdetect -y -a -r 4`. It seems the docs
might have SDA and SCL reversed, unless my i2c test device has it
backwards I have SCL connected to pin 3 and SDA connected to pin 5.
I am using an SD card variant and have not touched emmc myself.
Take care,
- Joshua Milas
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 3/5] dt-bindings: soc: sophgo: add sg2000 plic and clint documentation
2025-10-29 0:10 [PATCH v3 0/5] Add initial Milk-V Duo S board support Joshua Milas
2025-10-29 0:10 ` [PATCH v3 1/5] dt-bindings: soc: sophgo: add Milk-V Duo S board compatibles Joshua Milas
2025-10-29 0:10 ` [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support Joshua Milas
@ 2025-10-29 0:10 ` Joshua Milas
2025-10-29 0:10 ` [PATCH v3 4/5] riscv64: dts: sophgo: add SG2000 dtsi Joshua Milas
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Joshua Milas @ 2025-10-29 0:10 UTC (permalink / raw)
To: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi
Cc: josh.milas, devicetree, sophgo, linux-riscv
Document the compatible strings for the sg2000 [1] interrupt
controller and timer.
Link: https://en.sophgo.com/sophon-u/product/introduce/sg200x.html [1]
Signed-off-by: Joshua Milas <josh.milas@gmail.com>
---
.../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 +
Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 +
2 files changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
index 5b827bc243011..122d622d20a57 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
@@ -69,6 +69,7 @@ properties:
- allwinner,sun20i-d1-plic
- sophgo,cv1800b-plic
- sophgo,cv1812h-plic
+ - sophgo,sg2000-plic
- sophgo,sg2002-plic
- sophgo,sg2042-plic
- sophgo,sg2044-plic
diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
index d85a1a088b35d..42cbfb4d46a17 100644
--- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml
+++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
@@ -48,6 +48,7 @@ properties:
- allwinner,sun20i-d1-clint
- sophgo,cv1800b-clint
- sophgo,cv1812h-clint
+ - sophgo,sg2000-clint
- sophgo,sg2002-clint
- thead,th1520-clint
- const: thead,c900-clint
--
2.51.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v3 4/5] riscv64: dts: sophgo: add SG2000 dtsi
2025-10-29 0:10 [PATCH v3 0/5] Add initial Milk-V Duo S board support Joshua Milas
` (2 preceding siblings ...)
2025-10-29 0:10 ` [PATCH v3 3/5] dt-bindings: soc: sophgo: add sg2000 plic and clint documentation Joshua Milas
@ 2025-10-29 0:10 ` Joshua Milas
2025-10-29 0:10 ` [PATCH v3 5/5] riscv64: dts: sophgo: add initial Milk-V Duo S board support Joshua Milas
2025-10-29 5:57 ` [PATCH v3 0/5] Add " Krzysztof Kozlowski
5 siblings, 0 replies; 13+ messages in thread
From: Joshua Milas @ 2025-10-29 0:10 UTC (permalink / raw)
To: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi
Cc: josh.milas, devicetree, sophgo, linux-riscv
Adds sg2000.dtsi on the RISCV side.
Signed-off-by: Joshua Milas <josh.milas@gmail.com>
---
arch/riscv/boot/dts/sophgo/sg2000.dtsi | 53 ++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 arch/riscv/boot/dts/sophgo/sg2000.dtsi
diff --git a/arch/riscv/boot/dts/sophgo/sg2000.dtsi b/arch/riscv/boot/dts/sophgo/sg2000.dtsi
new file mode 100644
index 0000000000000..412adacc00576
--- /dev/null
+++ b/arch/riscv/boot/dts/sophgo/sg2000.dtsi
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+#define SOC_PERIPHERAL_IRQ(nr) ((nr) + 16)
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/pinctrl-sg2000.h>
+#include "cv180x-cpus.dtsi"
+#include "cv180x.dtsi"
+#include "cv181x.dtsi"
+
+/ {
+ compatible = "sophgo,sg2000";
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x10000000>;
+ };
+
+ soc {
+ interrupt-parent = <&plic>;
+ dma-noncoherent;
+
+ pinctrl: pinctrl@3001000 {
+ compatible = "sophgo,sg2000-pinctrl";
+ reg = <0x03001000 0x1000>,
+ <0x05027000 0x1000>;
+ reg-names = "sys", "rtc";
+ };
+
+ clk: clock-controller@3002000 {
+ compatible = "sophgo,sg2000-clk";
+ reg = <0x03002000 0x1000>;
+ clocks = <&osc>;
+ #clock-cells = <1>;
+ };
+
+ plic: interrupt-controller@70000000 {
+ compatible = "sophgo,sg2000-plic", "thead,c900-plic";
+ reg = <0x70000000 0x4000000>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ riscv,ndev = <101>;
+ };
+
+ clint: timer@74000000 {
+ compatible = "sophgo,sg2000-clint", "thead,c900-clint";
+ reg = <0x74000000 0x10000>;
+ interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
+ };
+ };
+};
--
2.51.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v3 5/5] riscv64: dts: sophgo: add initial Milk-V Duo S board support
2025-10-29 0:10 [PATCH v3 0/5] Add initial Milk-V Duo S board support Joshua Milas
` (3 preceding siblings ...)
2025-10-29 0:10 ` [PATCH v3 4/5] riscv64: dts: sophgo: add SG2000 dtsi Joshua Milas
@ 2025-10-29 0:10 ` Joshua Milas
2025-10-29 5:57 ` [PATCH v3 0/5] Add " Krzysztof Kozlowski
5 siblings, 0 replies; 13+ messages in thread
From: Joshua Milas @ 2025-10-29 0:10 UTC (permalink / raw)
To: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi
Cc: josh.milas, devicetree, sophgo, linux-riscv
This adds initial riscv support for the Milk-V Duo S board
[1] making it possible to boot Linux to the command line.
Link: https://milkv.io/duo-s [1]
Signed-off-by: Joshua Milas <josh.milas@gmail.com>
---
arch/riscv/boot/dts/sophgo/Makefile | 1 +
.../boot/dts/sophgo/sg2000-milkv-duo-s.dts | 80 +++++++++++++++++++
2 files changed, 81 insertions(+)
create mode 100644 arch/riscv/boot/dts/sophgo/sg2000-milkv-duo-s.dts
diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
index 6f65526d4193b..58cc6b70d8de4 100644
--- a/arch/riscv/boot/dts/sophgo/Makefile
+++ b/arch/riscv/boot/dts/sophgo/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
+dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v1.dtb
diff --git a/arch/riscv/boot/dts/sophgo/sg2000-milkv-duo-s.dts b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duo-s.dts
new file mode 100644
index 0000000000000..174c194e1301d
--- /dev/null
+++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duo-s.dts
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "sg2000.dtsi"
+
+/ {
+ model = "Milk-V Duo S";
+ compatible = "milkv,duo-s", "sophgo,sg2000";
+
+ aliases {
+ i2c4 = &i2c4;
+ mmc0 = &sdhci0;
+ serial0 = &uart0;
+ spi3 = &spi3;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&osc {
+ clock-frequency = <25000000>;
+};
+
+&dmac {
+ status = "okay";
+};
+
+&emmc {
+ bus-width = <4>;
+ no-1-8-v;
+ cap-mmc-hw-reset;
+ no-sd;
+ no-sdio;
+ non-removable;
+ status = "okay";
+};
+
+&gmac0 {
+ status = "okay";
+};
+
+&i2c4 {
+ status = "okay";
+};
+
+&mdio {
+ status = "okay";
+};
+
+&saradc {
+ status = "okay";
+};
+
+&sdhci0 {
+ bus-width = <4>;
+ no-1-8-v;
+ disable-wp;
+ status = "okay";
+};
+
+&sdhci1 {
+ bus-width = <4>;
+ cap-sdio-irq;
+ no-mmc;
+ no-sd;
+ non-removable;
+ status = "okay";
+};
+
+&spi3 {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
--
2.51.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 0/5] Add initial Milk-V Duo S board support
2025-10-29 0:10 [PATCH v3 0/5] Add initial Milk-V Duo S board support Joshua Milas
` (4 preceding siblings ...)
2025-10-29 0:10 ` [PATCH v3 5/5] riscv64: dts: sophgo: add initial Milk-V Duo S board support Joshua Milas
@ 2025-10-29 5:57 ` Krzysztof Kozlowski
5 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2025-10-29 5:57 UTC (permalink / raw)
To: Joshua Milas
Cc: tglx, robh, krzk+dt, conor+dt, unicorn_wang, inochiama,
paul.walmsley, samuel.holland, palmer, aou, alex,
alexander.sverdlin, rabenda.cn, thomas.bonnefille, chao.wei,
liujingqi, devicetree, sophgo, linux-riscv
On Tue, Oct 28, 2025 at 08:10:47PM -0400, Joshua Milas wrote:
> This adds an initial device tree for the Milk-V Duo S board
> with support for reading from the SD card and network over
> Ethernet. This is continued work from Michael Opdenacker's
> v6 series [1] on the ARM64 and RISCV side. It has been
> tested with ARM64 and RISCV64 to boot from an SD card, have
> networking, and read I2C slave devices over i2c4.
>
> v3
> - Added sg2000 interrupt controller and timer to documentation
> - Added sg2000.dtsi for RISCV and moved DTS over to use it
> - remove devices from DTS's to match what is available in the
> default pinmux config. spi0-2, i2c0-3, uart1-4
> - Added i2c4 and spi3 aliases
How did you resolve previous comments on bindings? Nothing mentioned
here.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 13+ messages in thread