Initial device tree support for StarFive JHB100 SoC
Subsystems (6)
v3 cover Initial device tree support for StarFive JHB100 SoC
StarFive JHB100 SoC consists of 4 RISC-V low power Cores (Dubhe-70). It also features various interfaces such as I2C, SPI, CAN, USB, MMC, Uart, etc.
This patch series introduces initial SoC DTSI support for the StarFive JHB100 SoC. The relevant dt-binding documentation has been updated accordingly. Below is the list of IP blocks added in the initial SoC DTSI.
- StarFive Dubhe-70 CPU
- PMU
- PLIC
- CLINT
- UART
- INTC
changes since v2:
- Add a new patch 4
patch 5:
- Remove the 'riscv,isa' property.
- Add 'starfive,jhb100-uart' to the UART node.
- Update bus node name.
- Remove the interrupts-extended property in riscv,pmu
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
Changhuang Liang (1):
dt-bindings: serial: snps-dw-apb-uart: Add StarFive JHB100 UART
compatible
Ji Sheng Teoh (1):
dt-bindings: riscv: Add StarFive Dubhe-70 compatibles
Ley Foon Tan (3):
dt-bindings: interrupt-controller: Add StarFive JHB100 plic
dt-bindings: riscv: Add StarFive JHB100 SoC
riscv: dts: starfive: jhb100: Add JHB100 base DT
.../sifive,plic-1.0.0.yaml | 1 + .../devicetree/bindings/riscv/cpus.yaml | 1 + .../devicetree/bindings/riscv/starfive.yaml | 5 + .../bindings/serial/snps-dw-apb-uart.yaml | 1 + MAINTAINERS | 6 + arch/riscv/boot/dts/starfive/Makefile | 2 + arch/riscv/boot/dts/starfive/jhb100-evb1.dts | 32 ++ arch/riscv/boot/dts/starfive/jhb100.dtsi | 331 ++++++++++++++++++ 8 files changed, 379 insertions(+) create mode 100644 arch/riscv/boot/dts/starfive/jhb100-evb1.dts create mode 100644 arch/riscv/boot/dts/starfive/jhb100.dtsi
--
2.25.1
PATCH v3 1/5 dt-bindings: riscv: Add StarFive Dubhe-70 compatibles
From: Ji Sheng Teoh <[email protected]>
Add new compatible string for Dubhe-70.
Dubhe-70 is a low power RISC-V cpu core from StarFive Technology.
--- Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/cpus.yaml +1 -0
@@ -63,6 +63,7 @@ properties: - sifive,u74-mc - spacemit,x100 - spacemit,x60 + - starfive,dubhe-70 - thead,c906 - thead,c908 - thead,c910
Signature · 1 line
2.25.1
PATCH v3 2/5 dt-bindings: interrupt-controller: Add StarFive JHB100 plic
In reply to Changhuang LiangFrom: Ley Foon Tan <[email protected]>
Add compatible string for StarFive JHB100 plic.
--- .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +1 -0
@@ -66,6 +66,7 @@ properties: - spacemit,k1-plic - starfive,jh7100-plic - starfive,jh7110-plic + - starfive,jhb100-plic - tenstorrent,blackhole-plic - const: sifive,plic-1.0.0 - items:
Signature · 1 line
2.25.1
Re: [PATCH v3 2/5] dt-bindings: interrupt-controller: Add StarFive JHB100 plic
Quoted 4 lines · Changhuang Liang
From: Ley Foon Tan <[email protected]>
Add compatible string for StarFive JHB100 plic.
Quoted 8 lines
Signed-off-by Ley Foon Tan <[email protected]>Signed-off-by Changhuang Liang <[email protected]>Acked-by Conor Dooley <[email protected]>Reviewed-by Hal Feng <[email protected]>--- .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+)
Applied, thanks!
PATCH v3 3/5 dt-bindings: riscv: Add StarFive JHB100 SoC
In reply to Changhuang LiangFrom: Ley Foon Tan <[email protected]>
Add device tree bindings for the StarFive JHB100 RISC-V SoC.
--- Documentation/devicetree/bindings/riscv/starfive.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/riscv/starfive.yaml +5 -0
@@ -43,6 +43,11 @@ properties: - const: starfive,jh7110s - const: starfive,jh7110 + - items: + - enum: + - starfive,jhb100-evb1 + - const: starfive,jhb100 + additionalProperties: true ...
Signature · 1 line
2.25.1
PATCH v3 4/5 dt-bindings: serial: snps-dw-apb-uart: Add StarFive JHB100 UART compatible
In reply to Changhuang LiangAdd "starfive,jhb100-uart" compatible string, with "snps,dw-apb-uart" as the fallback.
--- Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +1 -0
@@ -79,6 +79,7 @@ properties: - starfive,jh7100-hsuart - starfive,jh7100-uart - starfive,jh7110-uart + - starfive,jhb100-uart - ultrarisc,dp1000-uart - const: snps,dw-apb-uart - const: snps,dw-apb-uart
Signature · 1 line
2.25.1
[email protected]
AI reviewRe: [PATCH v3 4/5] dt-bindings: serial: snps-dw-apb-uart: Add StarFive JHB100 UART compatible
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Missing Compatible String in Conditional Block --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing Compatible String in Conditional Block
--
--- Patch [4]: [PATCH v3 4/5] dt-bindings: serial: snps-dw-apb-uart: Add StarFive JHB100 UART compatible --- commit 58551d4cd9febd373c92800fceea07e37197bb0a
Author: Changhuang Liang <[email protected]>
dt-bindings: serial: snps-dw-apb-uart: Add StarFive JHB100 UART compatible
Add "starfive,jhb100-uart" compatible string, with "snps,dw-apb-uart" as the fallback.
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml properties: · line 81
Quoted 9 lines
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +1
-0@@ -78,6 +78,7 @@ properties: - starfive,jh7100-hsuart - starfive,jh7100-uart - starfive,jh7110-uart + - starfive,jhb100-uart
[Severity: Medium]
Does the starfive,jhb100-uart hardware also require 2 resets like the jh7110-uart?
If so, should it be added to the conditional block earlier in this file? Without it, device trees specifying 2 resets for jhb100-uart will fail schema validation because they will fall into the else block which limits resets to a maxItems of 1:
allOf:
[ ... ]
- if:
properties:
compatible:
contains:
const: starfive,jh7110-uart
then:
properties:
resets:
minItems: 2
else:
properties:
resets:
maxItems: 1Quoted 2 lines
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +0
-0- ultrarisc,dp1000-uart - const: snps,dw-apb-uart
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
Re: [PATCH v3 4/5] dt-bindings: serial: snps-dw-apb-uart: Add StarFive JHB100 UART compatible
In reply to Changhuang Liangpw-bot: not-applicable
PATCH v3 5/5 riscv: dts: starfive: jhb100: Add JHB100 base DT
In reply to Changhuang LiangFrom: Ley Foon Tan <[email protected]>
Add JHB100 base dtsi and dts. Consist of 4 Dubhe-70 cores, CLINT, PLIC, PMU, UART, INTC and 1GB DDR.
--- MAINTAINERS | 6 + arch/riscv/boot/dts/starfive/Makefile | 2 + arch/riscv/boot/dts/starfive/jhb100-evb1.dts | 32 ++ arch/riscv/boot/dts/starfive/jhb100.dtsi | 331 +++++++++++++++++++ 4 files changed, 371 insertions(+) create mode 100644 arch/riscv/boot/dts/starfive/jhb100-evb1.dts create mode 100644 arch/riscv/boot/dts/starfive/jhb100.dtsi
MAINTAINERS +6 -0
@@ -26069,6 +26069,12 @@ F: Documentation/devicetree/bindings/phy/starfive,jh7110-usb-phy.yaml F: drivers/phy/starfive/phy-jh7110-pcie.c F: drivers/phy/starfive/phy-jh7110-usb.c +STARFIVE JHB100 DEVICETREES +M: Changhuang Liang <[email protected]> +L: [email protected] +S: Supported +F: arch/riscv/boot/dts/starfive/jhb100* + STARFIVE JHB100 EXTERNAL INTERRUPT CONTROLLER DRIVER M: Changhuang Liang <[email protected]> S: Supported
arch/riscv/boot/dts/starfive/Makefile +2 -0
@@ -18,3 +18,5 @@ dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-lite.dtb dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-lite-emmc.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) += jhb100-evb1.dtb
arch/riscv/boot/dts/starfive/jhb100-evb1.dts new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (c) 2024-2026 StarFive Technology Co., Ltd. + */ + +#include "jhb100.dtsi" + +/ { + model = "StarFive JHB100 EVB-1"; + compatible = "starfive,jhb100-evb1", "starfive,jhb100"; + + aliases { + serial6 = &uart6; + }; + + chosen { + stdout-path = "serial6:115200n8"; + }; + + cpus { + timebase-frequency = <5000000>; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0x0 0x40000000 0x0 0x40000000>; /* 1GB */ + }; +}; + +&uart6 { + status = "okay"; +};
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +331 -0
331 lines not on this page · raw message
Signature · 1 line
2.25.1
[email protected]
AI reviewRe: [PATCH v3 5/5] riscv: dts: starfive: jhb100: Add JHB100 base DT
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Overlapping child address ranges in the `dma-ranges` property of `bus_nioc`. - [Medium] Incorrect…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Overlapping child address ranges in the dma-ranges property of bus_nioc.
- [Medium] Incorrect variant bitmask for PMU Event ID 34 in riscv,raw-event-to-mhpmcounters. --
--- Patch [5]: [PATCH v3 5/5] riscv: dts: starfive: jhb100: Add JHB100 base DT --- commit 6747fd56a0417ce034668e51d45ea97227861dc1
Author: Ley Foon Tan <[email protected]>
riscv: dts: starfive: jhb100: Add JHB100 base DT
This commit adds the base device tree sources for the StarFive JHB100 SoC and the corresponding EVB-1 board. It introduces support for 4 Dubhe-70 cores, along with basic peripherals including PMU, CLINT, PLIC, and UART.
Quoted 6 lines
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +0
-0@@ -0,0 +1,331 @@
[ ... ]
Quoted 2 lines
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +2
-0+ pmu { + compatible = "riscv,pmu";
[ ... ]
arch/riscv/boot/dts/starfive/jhb100.dtsi line 262
Quoted 4 lines
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +4
-0+ riscv,raw-event-to-mhpmcounters = + <0x00 0x00 0xFFFFFFFF 0xFFFFFFE0 0x00007FF8>, /* Event ID 1-31 */ + <0x00 0x20 0xFFFFFFFF 0xFFFFFFFE 0x00007FF8>, /* Event ID 32-33 */ + <0x00 0x22 0xFFFFFFFF 0xFFFFFF22 0x00007FF8>; /* Event ID 34 */
[Severity: Medium]
Is the variant mask 0xFFFFFF22 correct for Event ID 34?
This mask appears to allow several bits (7, 6, 4, 3, 2, and 0) to vary, which could cause other hardware PMU events to incorrectly match this rule and route to the counters designated for Event 34.
Quoted 1 line
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +1
-0+ };
[ ... ]
arch/riscv/boot/dts/starfive/jhb100.dtsi line 307
Quoted 7 lines
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +7
-0+ bus_nioc: bus { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + dma-noncoherent; + dma-ranges = <0x4 0x00000000 0x0 0x40000000 0x2 0x0>, + <0x4 0x00000000 0x4 0x00000000 0x2 0x0>;
[Severity: High]
Does this dma-ranges property incorrectly define overlapping child addresses?
Both entries define the exact same child DMA address space (<0x4 0x00000000> with a size of <0x2 0x0>).
When parsed, standard OF translation matches the first entry, which entirely shadows the second entry and could make its parent physical memory range unreachable for DMA from this bus.
Quoted 1 line
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +1
-0+ ranges;
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
Conor Dooley
maintainerRe: [PATCH v3 5/5] riscv: dts: starfive: jhb100: Add JHB100 base DT
In reply to Changhuang Liangarch/riscv/boot/dts/starfive/jhb100.dtsi line 269
Quoted 6 lines · Changhuang Liang
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +6
-0+ + clk_uart: clock-uart { + compatible = "fixed-clock"; /* Initial clock handler for UART */ + #clock-cells = <0>; + clock-frequency = <25000000>; + };
I can pick this series up on a provisional basis for you to work on top of, but I won't be sending a PR for anything that contains temporary fixed clocks.
Cheers,
Conor.
Re: [PATCH v3 5/5] riscv: dts: starfive: jhb100: Add JHB100 base DT
Hi, Conor
Thanks for the review.
Quoted 10 lines · Changhuang Liang
arch/riscv/boot/dts/starfive/jhb100.dtsi line 269
Quoted 6 lines
arch/riscv/boot/dts/starfive/jhb100.dtsi new file +6
-0+ + clk_uart: clock-uart { + compatible = "fixed-clock"; /* Initial clock handler for UART */ + #clock-cells = <0>; + clock-frequency = <25000000>; + };I can pick this series up on a provisional basis for you to work on top of, but I won't be sending a PR for anything that contains temporary fixed clocks.
That's great.
Once my other two series are also ready:
Add basic clocks and resets for JHB100 SoC
Add StarFive JHB100 syscon modules
I can squash these three device tree into a single patch and send it out, so there won't be any temporarily used clk_uart and PLL nodes.
Best Regards,
Changhuang
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv