Switch Milk-V Duo and LicheeRV Nano to the upstream CV1800B and
SG2002 devicetrees.

Add the SoC-specific clock compatible strings used by the upstream
devicetrees, and extend the existing SDHCI driver to support SG2002.
Enable hardware system reset on LicheeRV Nano. Keep Ethernet and SPI NOR
support enabled for Milk-V Duo through U-Boot-specific overrides.

Remove the unused local CV18xx devicetrees and the legacy
"sophgo,cv1800-clk" compatible string from the clock driver.

Tested on Milk-V Duo:
- U-Boot boots using the upstream control FDT
- serial console works
- MMC is detected and can read the SD card
- Ethernet is probed and DHCP/TFTP work
- SPI NOR is detected
- Linux boots via TFTP with Image, initramfs and DTB

Tested on Sipeed LicheeRV Nano B:
- U-Boot boots using the upstream control FDT
- serial console works
- MMC is detected and usable
- hardware system reset works

Build-tested with the riscv64-linux-gnu cross compiler:
- milkv_duo_defconfig
- sipeed_licheerv_nano_defconfig

Signed-off-by: Zhuxu Ran <[email protected]>
---
Changes in v3:
- Restore the CV1800B SPIF node in the Milk-V Duo U-Boot override
- Link to v2: 
https://patch.msgid.link/[email protected]

Changes in v2:
- Expand the upstream devicetree conversion to LicheeRV Nano
- Add SG2002 clock and MMC compatible strings
- Enable hardware system reset on LicheeRV Nano
- Remove the legacy clock compatible string after converting all users
- Move the Milk-V Duo Ethernet description above the gmac0 node
- Link to v1: 
https://patch.msgid.link/[email protected]

To: [email protected]
To: Yao Zi <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Zhuxu Ran <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Hiago De Franco <[email protected]>
Cc: Thomas Bonnefille <[email protected]>
Cc: Kongyang Liu <[email protected]>
Cc: Tim Ouyang <[email protected]>
Cc: Leo Liang <[email protected]>
Cc: Andreas Schwab <[email protected]>
Cc: Guodong Xu <[email protected]>
Cc: Stefan Roese <[email protected]>

---
Zhuxu Ran (7):
      clk: sophgo: cv1800b: Add SoC-specific compatible strings
      mmc: cv1800b: Add SG2002 compatible string
      riscv: licheerv_nano: Enable hardware system reset
      riscv: milkv_duo: Use upstream devicetree
      riscv: licheerv_nano: Use upstream devicetree
      riscv: dts: sophgo: Drop local CV18xx devicetrees
      clk: sophgo: cv1800b: Drop legacy compatible string

 arch/riscv/dts/Makefile                      |   2 -
 arch/riscv/dts/cv1800b-milkv-duo-u-boot.dtsi |  36 +++++
 arch/riscv/dts/cv1800b-milkv-duo.dts         |  64 --------
 arch/riscv/dts/cv1800b.dtsi                  |  22 ---
 arch/riscv/dts/cv18xx.dtsi                   | 232 ---------------------------
 arch/riscv/dts/sg2002-licheerv-nano-b.dts    |  45 ------
 arch/riscv/dts/sg2002.dtsi                   |  34 ----
 board/sophgo/licheerv_nano/board.c           |   9 ++
 board/sophgo/milkv_duo/MAINTAINERS           |   1 +
 configs/milkv_duo_defconfig                  |   3 +-
 configs/sipeed_licheerv_nano_defconfig       |   4 +-
 drivers/clk/sophgo/clk-cv1800b.c             |   3 +-
 drivers/mmc/cv1800b_sdhci.c                  |   1 +
 13 files changed, 53 insertions(+), 403 deletions(-)
---
base-commit: baa64b2f892890f00a377eac4a3e685472bb56b5
change-id: 20260702-milkv-duo-upstream-dts-b54aed41fc61

Best regards,
--  
Zhuxu Ran <[email protected]>

Reply via email to