Skip to content

riscv: dts: sophgo: Add Milk-V Duo 256M board support

Chen-Yu Yeh linux-devicetree linux-riscv lkml sophgo 5 versions – Applied

Status from this message: Applied to dt/riscv, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 1 replyApplied
  2. v43 patches 1 replySuperseded
  3. v33 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches4 repliesSuperseded
v12 patches0 repliesSuperseded

Changes in v5 from the cover letter

- Fix the coprocessor RTOS reserved region in the board dts. v4 carried over the address from the 64M Duo (0x83f40000/0xc0000), which sits at the top of 64MB and is wrong for this board. The vendor device tree passed by the bootloader declares memory as <0x80000000 0x0fe00000>, i.e. the firmware keeps the top 2MB of the 256MB DRAM for the RTOS, so the region is 0x8fe00000/0x200000. This matches cv1812h-huashan-pi, which has the same amount of DRAM. Verified on hardware:

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/3dt-bindings: soc: sophgo: add Milk-V Duo 256M boardDocumentation/devicetree/bindings/soc/sophgo/sophgo.yaml+4 -00 replies
2/3riscv: dts: sophgo: cv180x: Add PWR_GPIO controllerarch/riscv/boot/dts/sophgo/cv180x.dtsi+18 -00 replies
3/3riscv: dts: sophgo: Add Milk-V Duo 256M board supportarch/riscv/boot/dts/sophgo/Makefile arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts+122 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchConor Dooley
1/3A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/3] riscv: dts: sophgo: Add Milk-V Duo 256M board support

The Milk-V Duo 256M is a small form factor development board based on the Sophgo SG2002 SoC.

This series adds the board binding, the PWR_GPIO controller node for the CV180x/CV181x family, and the board device tree with support for the UART console, SD/MMC, USB host and the onboard blue status LED.

Tested on actual Milk-V Duo 256M hardware: verified boot to shell, SD card rootfs mount, USB host (root hub detected) and the heartbeat LED, both via the default heartbeat trigger and manual sysfs control.

A U-Boot series adding support for the same board [0] refers to this series as the canonical device tree, and intends to switch to the upstream kernel DT once this lands.

[0] https://lore.kernel.org/u-boot/[email protected]/

Changes since v4:
- Fix the coprocessor RTOS reserved region in the board dts. v4 carried over the address from the 64M Duo (0x83f40000/0xc0000), which sits at the top of 64MB and is wrong for this board. The vendor device tree passed by the bootloader declares memory as <0x80000000 0x0fe00000>, i.e. the firmware keeps the top 2MB of the 256MB DRAM for the RTOS, so the region is 0x8fe00000/0x200000. This matches cv1812h-huashan-pi, which has the same amount of DRAM. Verified on hardware:

OF: reserved mem: 0x000000008fe00000..0x000000008fffffff (2048 KiB)
nomap non-reusable region@8fe00000

(Reported by sashiko-bot)

Changes since v3:
- Move the pwr_gpio node in cv180x.dtsi to follow unit-address ordering, placing it between usb@4340000 and rtc@5025000 (Inochi Amaoto)

Changes since v2:
- Add the PWR_GPIO (porte) controller node to cv180x.dtsi as a new patch, instead of dropping the LED node (Inochi Amaoto)
- Restore the gpio-leds node for the onboard blue status LED
- Add my copyright to the new board dts
- Drop the unrelated Makefile trailing-newline change

Changes since v1:
- Removed the leds node because &porte was not supported in cv180x.dtsi (reworked in v3)
- Retained the &usb node because it is already defined in cv180x.dtsi

Chen-Yu Yeh (3):
dt-bindings: soc: sophgo: add Milk-V Duo 256M board
riscv: dts: sophgo: cv180x: Add PWR_GPIO controller
riscv: dts: sophgo: Add Milk-V Duo 256M board support

 .../bindings/soc/sophgo/sophgo.yaml           |   4 +
 arch/riscv/boot/dts/sophgo/Makefile           |   1 +
 arch/riscv/boot/dts/sophgo/cv180x.dtsi        |  18 +++
 .../boot/dts/sophgo/sg2002-milkv-duo256m.dts  | 121 ++++++++++++++++++
 4 files changed, 144 insertions(+)
 create mode 100644 arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
Signature · 1 line
2.43.0