Skip to contentSkip to conversation

riscv: dts: starfive: add Milkv Mars board device tree

PATCH Superseded Jisheng Zhang 4 participants 8 messages Dec 2, 2023 – Jan 10, 2024

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover 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

patch1 adds 'cpus' label
patch2 adds "milkv,mars" board dt-binding
patch3 adds the devicetree file describing the currently supported features:
Namely PMIC, UART, I2C, GPIO, SD card, QSPI Flash, eMMC and Ethernet.

Since v1:
- add two new patches which add "cpus" label and board dt-binding
- adopt Krzysztof's suggestions, thanks

Hi Conor,

I see you have sent a patch which moves the timebase-frequency property to soc dtsi, but this series doesn't rebase on that. I can update it once your patch is merged.

Thanks

Jisheng Zhang (3):
riscv: dts: starfive: add 'cpus' label to jh7110 and jh7100 soc dtsi
dt-bindings: riscv: starfive: add Milkv Mars board
riscv: dts: starfive: add Milkv Mars board device tree

 .../devicetree/bindings/riscv/starfive.yaml   |   1 +
 arch/riscv/boot/dts/starfive/Makefile         |   1 +
 arch/riscv/boot/dts/starfive/jh7100.dtsi      |   2 +-
 .../boot/dts/starfive/jh7110-milkv-mars.dts   | 637 ++++++++++++++++++
 arch/riscv/boot/dts/starfive/jh7110.dtsi      |   2 +-
 5 files changed, 641 insertions(+), 2 deletions(-)
 create mode 100644 arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
Signature · 1 line
2.42.0
#1 lore raw

PATCH v2 1/3 riscv: dts: starfive: add 'cpus' label to jh7110 and jh7100 soc dtsi

Add the 'cpus' label so that we can reference it in board dts files.

---
 arch/riscv/boot/dts/starfive/jh7100.dtsi | 2 +-
 arch/riscv/boot/dts/starfive/jh7110.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/starfive/jh7100.dtsi +1 -1
index e68cafe7545f..e6959f2d4f1e 100644
@@ -13,7 +13,7 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	cpus {
+	cpus: cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
arch/riscv/boot/dts/starfive/jh7110.dtsi +1 -1
index 45213cdf50dc..5a6ff90685e5 100644
@@ -15,7 +15,7 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
-	cpus {
+	cpus: cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
Signature · 1 line
2.42.0
#2 lore raw

PATCH v2 2/3 dt-bindings: riscv: starfive: add Milkv Mars board

In reply to Jisheng Zhang

Add device tree bindings for the Milkv Mars board which is equipped with StarFive JH7110 SoC.

---
 Documentation/devicetree/bindings/riscv/starfive.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/starfive.yaml +1 -0
index cc4d92f0a1bf..b672f8521949 100644
@@ -26,6 +26,7 @@ properties:
 
       - items:
           - enum:
+              - milkv,mars
               - starfive,visionfive-2-v1.2a
               - starfive,visionfive-2-v1.3b
           - const: starfive,jh7110
Signature · 1 line
2.42.0
#4 lore raw

PATCH v2 3/3 riscv: dts: starfive: add Milkv Mars board device tree

In reply to 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 CSI

Add the devicetree file describing the currently supported features, namely PMIC, UART, I2C, GPIO, SD card, QSPI Flash, eMMC and Ethernet.

---
 arch/riscv/boot/dts/starfive/Makefile         |   1 +
 .../boot/dts/starfive/jh7110-milkv-mars.dts   | 637 ++++++++++++++++++
 2 files changed, 638 insertions(+)
 create mode 100644 arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
arch/riscv/boot/dts/starfive/Makefile +1 -0
index 0141504c0f5c..2fa0cd7f31c3 100644
@@ -8,5 +8,6 @@ DTC_FLAGS_jh7110-starfive-visionfive-2-v1.3b := -@
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
 
+dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-milkv-mars.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb
 dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts new file +637 -0

637 lines not on this page · raw message

Signature · 1 line
2.42.0
#5 lore raw
In reply to Jisheng Zhang
Quoted 28 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 CSI

patch1 adds 'cpus' label
patch2 adds "milkv,mars" board dt-binding
patch3 adds the devicetree file describing the currently supported features:
Namely PMIC, UART, I2C, GPIO, SD card, QSPI Flash, eMMC and Ethernet.

Since v1:
- add two new patches which add "cpus" label and board dt-binding
- adopt Krzysztof's suggestions, thanks

Quoted 5 lines

Hi Conor,

I see you have sent a patch which moves the timebase-frequency property to soc dtsi, but this series doesn't rebase on that. I can update it once your patch is merged.

Hi Jisheng,

Thanks for working on this! On the JH7110 the mtime derives almost directly from the external oscillator like this:

osc (24MHz) -> rtc_toggle (div 6) -> mtime (4MHz)

So to me it makes sense to define the timebase-frequency in the same file as the frequency of the external oscillator.

In general it looks good, but if you do

diff -Naur jh7110-{starfive-visionfive-2.dtsi,milkv-mars.dts}

you'll see that those two files are almost identical. Even external clock speeds and all the pin configuration are the same. I'd strongly prefer to have all that factored out in a common .dtsi so fixes don't get out of sync.

/Emil

maintainer
#6 lore raw
Quoted 45 lines · Emil Renner Berthing
Quoted 28 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 CSI

patch1 adds 'cpus' label
patch2 adds "milkv,mars" board dt-binding
patch3 adds the devicetree file describing the currently supported features:
Namely PMIC, UART, I2C, GPIO, SD card, QSPI Flash, eMMC and Ethernet.

Since v1:
- add two new patches which add "cpus" label and board dt-binding
- adopt Krzysztof's suggestions, thanks

Quoted 5 lines

Hi Conor,

I see you have sent a patch which moves the timebase-frequency property to soc dtsi, but this series doesn't rebase on that. I can update it once your patch is merged.

Hi Jisheng,

Thanks for working on this! On the JH7110 the mtime derives almost directly from the external oscillator like this:

osc (24MHz) -> rtc_toggle (div 6) -> mtime (4MHz)

So to me it makes sense to define the timebase-frequency in the same file as the frequency of the external oscillator.

Quoted 7 lines

In general it looks good, but if you do

diff -Naur jh7110-{starfive-visionfive-2.dtsi,milkv-mars.dts}

you'll see that those two files are almost identical. Even external clock speeds and all the pin configuration are the same. I'd strongly prefer to have all that factored out in a common .dtsi so fixes don't get out of sync.

I'm gonna mark this as changes requested on patchwork because of this comment. LMK if you don't think this is worth another version Emil.

Cheers,
Conor.

#7 lore raw
Quoted 48 lines · Conor Dooley
Quoted 47 lines · Emil Renner Berthing
Quoted 28 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 CSI

patch1 adds 'cpus' label
patch2 adds "milkv,mars" board dt-binding
patch3 adds the devicetree file describing the currently supported features:
Namely PMIC, UART, I2C, GPIO, SD card, QSPI Flash, eMMC and Ethernet.

Since v1:
- add two new patches which add "cpus" label and board dt-binding
- adopt Krzysztof's suggestions, thanks

Quoted 5 lines

Hi Conor,

I see you have sent a patch which moves the timebase-frequency property to soc dtsi, but this series doesn't rebase on that. I can update it once your patch is merged.

Hi Jisheng,

Thanks for working on this! On the JH7110 the mtime derives almost directly from the external oscillator like this:

osc (24MHz) -> rtc_toggle (div 6) -> mtime (4MHz)

So to me it makes sense to define the timebase-frequency in the same file as the frequency of the external oscillator.

In general it looks good, but if you do

Quoted 8 lines
Quoted 5 lines

diff -Naur jh7110-{starfive-visionfive-2.dtsi,milkv-mars.dts}

you'll see that those two files are almost identical. Even external clock speeds and all the pin configuration are the same. I'd strongly prefer to have all that factored out in a common .dtsi so fixes don't get out of sync.

I'm gonna mark this as changes requested on patchwork because of this comment. LMK if you don't think this is worth another version Emil.

Yeah a new version is needed. And I think it's a bit late for this window, so the new version will be out once v6.8-rc1 is out.

Thanks