From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4D3F1A5B8A for ; Wed, 14 Oct 2026 00:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791938150; cv=none; b=iKOwkoolbPWmlnY5b31QU39KLEFWv7mtkT9gmwDjZ50yMSwcvAWvc0vxgLJnJHbh/X048M0v8T0HdVro/Ui4CaNwxLaxu0EpATFtHQ3sF/bNo+ZnINAbD526c2iJ+eTTxtEuinCMjsh66RP57U2tqjMot2gBIywjGWcOtCixDL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791938150; c=relaxed/simple; bh=b4gq6g1PmafbonBhTXkrQ58KOfN1rO/0cHgI2tmQK48=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ue4fS4xG/RvsQYm6xj/vg8FzPhZKJXPsqeQyFpRRrcnFIi5l3iKTNnJfoAsZsxoNrAfFinacnAGohX9CMaLp6e0tS7PjCHZ01ZcMcaTuymqRudIwf6fgXVQm8X+pszzHdzitQcKQ0ekrEoBzb5iULocbNVxUXS5Ih2xiIQelKtE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=g2UFrK5P; arc=none smtp.client-ip=209.85.217.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="g2UFrK5P" Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-7cbc729b88fso598038137.3 for ; Tue, 13 Oct 2026 17:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1791938147; x=1792542947; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=fETuRtPje6LTC2rIz2bJlcHYx0+4RuHZEXBtVbxeG+A=; b=g2UFrK5POGBJ5qP33Kz+Ikt1qq1KmgeInJypKsquEK3KKjLvO6vUIwRIXnmyXwO6+k TFmiadha0fvm5H1kxQtUuiywDsLffrZ5GN1EFwWoiSFfsPFmxorS67mNQw90LDHwTL58 p53u8/w1U8YFoNfRDUb4JpQC1sqyZUtfsnHxq3ar3e1DHTSr3xHiWgznIIJ1WhhgFtxn 29cB3Cj/F59ekJivh+5b09fDMzlRZWSua4YD0bJTBm9/qdM9hleEA5PEK4SMmLZEK28R S/yBvOo1RF7tZcGNg5tuj4A21z/B9tCoSr9kiKtana1y698R0XWkK9TVsrqgomWbgmRT Zshg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791938147; x=1792542947; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=fETuRtPje6LTC2rIz2bJlcHYx0+4RuHZEXBtVbxeG+A=; b=cx8J7K8mEStWGgG0uyJApVN1D6ulExU97d12BsIdeh+h+3n5MZBtTom8mQXEj1gSOv uSdYU6+n46YKMoNEozuC2rDYC32JLbdlHKUxWP+TuhTGCoQ7AbKskig93nSidVCHq0om JsP9qWz2iHyAi27h1YJ0uO7afj6IEFORjKNvR4o/RpbcD83CP6Bx6lMIMMazfNiFKIiz eZgZKrsjhicl2RpxeHzOSwfFcn3a226f6ncudv09WPrmkzSV9g70AZGeDw2i1vWUpCzX lqfgKA/jV/JRCNtvMeFoIZ5hE1AIxAY2FOTxxTUZLF6Y+s4k68POzS7B6gkpq3lOWyBf mI3w== X-Forwarded-Encrypted: i=1; AKwUvBwJrRmce/iW/PZQ2IZQ8aTe03X2hYT+rGuk1+Ht7ujKXjqRswzV5yc3yyFeuiZjptv80DYty6U=@lists.linux.dev X-Gm-Message-State: AFq9FYIVoIoGO75Sme5sc+IqnMTUmgQGUt4jKhRoB/B2OOT1zJQ6RCrK Gqu+MVvxwkuOJtscHG7GcVdoONFDPKNaMKnR+d4DPItQRG0q1mLv6Pdk4wjfD62jzyM= X-Gm-Gg: AYBFou34NdPgbvc8BpZ8BDT8mY7+dkZObaxdDVmCAZhJmbu/k3N9PvL2qCL2/6hFHUm EYt84wL6f2DKbAHSRQ1C9kWoScFG5LKT/ID3IZBK/ChUu+XzBXVEkxbnsIWltCfnKFxBmWuDrUl jZgTez8rW0dMAPCQgWCFjouJDc+R8FKSY22FWP0KYHq2GFYDH1zWRAvP46TICFUcLlMrkR10m+L wCXaCtAjqqUY4Qb1tvN5vXjyfyx7dDH547iEJkvHo3D3zAQiSSDz/FWVPpfVhqMcW/ucNdAzsWc GNDqcCysAR7VbGSDzJGqajZ+Q6s8F75J4OvSI9W4n0LmQ7XFSBtZjkKThmcXhBWwSOAHEG4EYPE FC2kRPKTiWG7mYVY2dKFrIbFqPY18bs8ZM++3M6W4HHfcUCuvfi0B6tdVmR/FMX/3U3a1I0Svl7 dFLcfzelY631P0VBN6KDx7gcKB6cdjL6yH84YowxQLulPG9/FwzumcN4wp3sFIGpTivKEphGELn z3v6rVzNy6sCwYlgnbsQ3qiJBJmjwtXaRL/ZihlmhI= X-Received: by 2002:a05:6102:5121:b0:7c3:6466:3155 with SMTP id ada2fe7eead31-7cb375fcf5cmr3438386137.33.1791938147238; Tue, 13 Oct 2026 17:35:47 -0700 (PDT) Received: from hiagonb ([2804:14c:4c5:8bf0::33ca]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-7cbbd178e4csm4108537137.2.2026.10.13.17.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2026 17:35:46 -0700 (PDT) Date: Tue, 13 Oct 2026 21:35:40 -0300 From: Hiago De Franco To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: Chen-Yu Yeh , Andrei Lalaev , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, sophgo@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: dts: sophgo: add cv1800b ethernet support overlay Message-ID: References: <20261001-milkv-duo-eth-overlay-v1-1-78bc1454f35b@baylibre.com> Precedence: bulk X-Mailing-List: sophgo@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261001-milkv-duo-eth-overlay-v1-1-78bc1454f35b@baylibre.com> Hi Inochi Amaoto, Just a friendly ping about this patch. Not sure if it was picked up by you already. Thanks! On Thu, Oct 01, 2026 at 04:38:30PM -0300, Hiago De Franco wrote: > The CV1800B SoC has a DWMAC controller connected to an internal 10/100 > Ethernet PHY. Both the MAC (gmac0) and the MDIO multiplexer used to > reach the internal PHY are already described in cv180x.dtsi, but are > disabled by default. > > Enable gmac0 and the MDIO multiplexer to make ethernet work. > > Tested on a Milk-V Duo (CV1800B) with its IO base board. The link comes > up at 100Mbps/Full and the interface gets an address via DHCP. > > This can not be enabled by default as others may want to use the same > pins as GPIO, that is the reason an overlay is being used. > > Signed-off-by: Hiago De Franco > --- > Hi, > > This is a continuation of patch [1]. The same patch was sent before [2], > and an overlay was suggested, altought it was not sent. Therefore I am > sending this overlay now. > > U-Boot logs: > > milkv_duo# setenv fdtoverlay_addr_r 0x82480000 > milkv_duo# boot > ** Booting bootflow 'mmc@4310000.bootdev.part_1' with extlinux > 1: Poky (Yocto Project Reference Distro) > Retrieving file: /Image.gz > append: root=/dev/mmcblk0p2 ro rootwait console=ttyS0,115200 earlycon=sbi > Retrieving file: /cv1800b-milkv-duo.dtb > Retrieving file: /cv1800b-milkv-duo-eth.dtbo > Uncompressing Kernel Image to 0 > \## Flattened Device Tree blob at 82200000 > Booting using the fdt blob at 0x82200000 > Working FDT set to 82200000 > Loading Device Tree to 0000000083560000, end 0000000083568fff ... OK > Working FDT set to 83560000 > > Kernel logs: > > root@milkv-duo:~# ip a > 1: lo: mtu 65536 qdisc noqueue qlen 1000 > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > inet 127.0.0.1/8 scope host lo > valid_lft forever preferred_lft forever > 2: eth0: mtu 1500 qdisc mq qlen 1000 > link/ether 22:9c:5e:8d:3b:0c brd ff:ff:ff:ff:ff:ff > inet 192.168.0.124/24 brd 192.168.0.255 scope global eth0 > valid_lft forever preferred_lft forever > root@milkv-duo:~# dmesg | grep stmmaceth > [ 0.580448] stmmaceth 4070000.ethernet: IRQ eth_wake_irq not found > [ 0.587750] stmmaceth 4070000.ethernet: IRQ sfty not found > [ 0.594165] stmmaceth 4070000.ethernet: Hash table entries set to unexpected value 0 > [ 0.604856] stmmaceth 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37 > [ 0.612359] stmmaceth 4070000.ethernet: DWMAC1000 > [ 0.617641] stmmaceth 4070000.ethernet: DMA HW capability register supported > [ 0.625189] stmmaceth 4070000.ethernet: Active PHY interface: RMII (4) > [ 0.632191] stmmaceth 4070000.ethernet: RX Checksum Offload Engine supported > [ 0.639720] stmmaceth 4070000.ethernet: COE Type 2 > [ 0.644915] stmmaceth 4070000.ethernet: TX Checksum insertion supported > [ 0.651995] stmmaceth 4070000.ethernet: Normal descriptors > [ 0.657911] stmmaceth 4070000.ethernet: Ring mode enabled > [ 0.663737] stmmaceth 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer > [ 0.671939] stmmaceth 4070000.ethernet: device MAC address 22:9c:5e:8d:3b:0c > [ 13.104870] stmmaceth 4070000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 > [ 13.125037] stmmaceth 4070000.ethernet eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] (irq=POLL) > [ 13.172421] stmmaceth 4070000.ethernet eth0: No Safety Features support found > [ 13.203664] stmmaceth 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported > [ 13.229963] stmmaceth 4070000.ethernet eth0: configuring for phy/internal link mode > [ 15.278278] stmmaceth 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx > > [1] https://lore.kernel.org/sophgo/20260930-milkv-duo-ethernet-v1-1-428ff137f5d3@baylibre.com/ > [2] https://lore.kernel.org/sophgo/20260803163323.74414-1-chenyou910331@gmail.com/ > --- > arch/riscv/boot/dts/sophgo/Makefile | 3 +++ > arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso | 17 +++++++++++++++++ > 2 files changed, 20 insertions(+) > > diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile > index d5c80d4ff005..adea990ad912 100644 > --- a/arch/riscv/boot/dts/sophgo/Makefile > +++ b/arch/riscv/boot/dts/sophgo/Makefile > @@ -1,5 +1,8 @@ > # SPDX-License-Identifier: GPL-2.0 > dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb > +cv1800b-milkv-duo-eth-dtbs := cv1800b-milkv-duo.dtb cv1800b-milkv-duo-eth.dtbo > +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtb > +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo-eth.dtbo > 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 > diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso > new file mode 100644 > index 000000000000..52c85b4e0155 > --- /dev/null > +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo-eth.dtso > @@ -0,0 +1,17 @@ > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > +/* > + * Enable ethernet support on Milk-V Duo (CV1800B). > + * > + * Copyright (c) 2026, Hiago De Franco > + */ > + > +/dts-v1/; > +/plugin/; > + > +&gmac0 { > + status = "okay"; > +}; > + > +&mdio { > + status = "okay"; > +}; > > --- > base-commit: d24e8ac715de2e16a53c144005b1863660a5fbea > change-id: 20261001-milkv-duo-eth-overlay-cf7738449a40 > > Best regards, > -- > Hiago > Best regards, -- Hiago