riscv: dts: starfive: add Milkv Mars board device tree
Subsystems (3)
PATCH 1/1 riscv: dts: starfive: add Milkv Mars board device tree
The Milkv Mars is a development board based on the Starfive JH7110 SoC. The board features:
- JH7110 SoC
- 1/2/4/8 GiB LPDDR4 DRAM
- AXP15060 PMIC
- 40 pin GPIO header
- 3x USB 3.0 host port
- 1x USB 2.0 host port
- 1x M.2 E-Key
- 1x eMMC slot
- 1x MicroSD slot
- 1x QSPI Flash
- 1x 1Gbps Ethernet port
- 1x HDMI port
- 1x 2-lane DSI and 1x 4-lane DSI
- 1x 2-lane CSI
Add the devicetree file describing the currently supported features, namely PMIC, UART, SD card, QSPI Flash, eMMC and Ethernet.
--- arch/riscv/boot/dts/starfive/Makefile | 2 + .../boot/dts/starfive/jh7110-milkv-mars.dts | 634 ++++++++++++++++++ 2 files changed, 636 insertions(+) create mode 100644 arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
arch/riscv/boot/dts/starfive/Makefile +2 -0
@@ -10,3 +10,5 @@ dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb + +dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-milkv-mars.dtb
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +634 -0
634 lines not on this page · raw message
Signature · 1 line
2.42.0
Quoted 59 lines · Jisheng Zhang
The Milkv Mars is a development board based on the Starfive JH7110 SoC. The board features:
- JH7110 SoC
- 1/2/4/8 GiB LPDDR4 DRAM
- AXP15060 PMIC
- 40 pin GPIO header
- 3x USB 3.0 host port
- 1x USB 2.0 host port
- 1x M.2 E-Key
- 1x eMMC slot
- 1x MicroSD slot
- 1x QSPI Flash
- 1x 1Gbps Ethernet port
- 1x HDMI port
- 1x 2-lane DSI and 1x 4-lane DSI
- 1x 2-lane CSIAdd the devicetree file describing the currently supported features, namely PMIC, UART, SD card, QSPI Flash, eMMC and Ethernet.
Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/boot/dts/starfive/Makefile | 2 + .../boot/dts/starfive/jh7110-milkv-mars.dts | 634 ++++++++++++++++++ 2 files changed, 636 insertions(+) create mode 100644 arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dtsarch/riscv/boot/dts/starfive/Makefile +2
-0@@ -10,3 +10,5 @@ dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb + +dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-milkv-mars.dtbarch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +15
-0@@ -0,0 +1,634 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2022 StarFive Technology Co., Ltd. + * Copyright (C) 2022 Emil Renner Berthing <[email protected]> + * Copyright (C) 2023 Jisheng Zhang <[email protected]> + */ + +/dts-v1/; +#include "jh7110.dtsi" +#include "jh7110-pinfunc.h" +#include <dt-bindings/gpio/gpio.h> + +/ { + aliases { + ethernet0 = &gmac0;
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts line 25
Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +10
-0+ ethernet1 = &gmac1; + i2c0 = &i2c0; + i2c2 = &i2c2; + i2c5 = &i2c5; + i2c6 = &i2c6; + mmc0 = &mmc0; + mmc1 = &mmc1; + serial0 = &uart0; + }; +
You miss board compatible and bindings.
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts line 30
Quoted 5 lines
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +5
-0+ chosen { + stdout-path = "serial0:115200n8"; + }; + + cpus {
Board should not bring new CPU nodes. Override by label instead.
Quoted 5 lines
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +5
-0+ timebase-frequency = <4000000>; + }; + + memory@40000000 { + device_type = "memory";
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts line 45
Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +10
-0+ reg = <0x0 0x40000000 0x1 0x0>; + }; + + gpio-restart { + compatible = "gpio-restart"; + gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>; + priority = <224>; + }; + + pwmdac_codec: pwmdac-codec {
audio-codec
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts line 50
Quoted 5 lines
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +5
-0+ compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; + + sound-pwmdac {
sound
Best regards,
Krzysztof
Conor Dooley
maintainerQuoted 8 lines · Krzysztof Kozlowski
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts line 30
Quoted 1 line · Jisheng Zhang
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +1
-0+ cpus {Board should not bring new CPU nodes. Override by label instead.
Review
Quoted 2 lines
(quoted diff) +2
-0+ timebase-frequency = <4000000>; + };
This particular one is widespread, but I am not sure why it is being set on the board level in any of the individual cases. On the platforms where I do know where the frequency for this comes from it is set by the SoC, not the board and so should really be fixed by moving this into $soc.dtsi. I suspect the same is true for the jh7110 and timebase-frequency is not a board-level setting and probably needs the same treatment. Those with more insight into how the clocks on the jh7110 are routed can hopefully advise us here.