Re: [PATCH v3 2/5] arm64: dts: sophgo: add initial Milk-V Duo S board support

Michael Opdenacker <[email protected]>
Newsgroups dev.linux.lists.sophgo,org.infradead.lists.linux-riscv,org.kernel.vger.linux-devicetree
Organization Root Commit
Message-ID <[email protected]>
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 <[email protected]>
> ---
>   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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.