2022-12-20 01:21:42

by Hal Feng

[permalink] [raw]
Subject: [PATCH v3 0/7] Basic device tree support for StarFive JH7110 RISC-V SoC

This patch series adds basic device tree support for StarFive JH7110 SoC.
This patch series depends on series [1] and [2]. You can simply get or
review the patches at the link [3].

[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://github.com/hal-feng/linux/commits/visionfive2-minimal

Changes since v2:
- Rebased on tag v6.1.
- Dropped patch 8 because it was merged.
Patch 1:
- Made the links into "Link:" tags. (by Conor)
- Corrected the board name to "VisionFive 2" instead of
"VisionFive V2" and added compatibles for version A and
version B of VisionFive 2. (by Emil)
Patch 4:
- Used "sifive,ccache0" compatible string to match. (by Conor)
Patch 5:
- Dropped "select SIFIVE_CCACHE" in config SOC_STARFIVE. (by Conor)
- Dropped "starfive,jh7110-ccache" compatible in
drivers/soc/sifive/sifive_ccache.c.
Patch 6:
- Removed all "clock-frequency = <0>". (by Conor)
- Sorted the nodes after their addresses. (by Emil)
- Renamed "clk_rtc" to "rtc_osc".
- Added "sifive,ccache0" compatible in the cache-controller node.
- Renamed "JH7110_SYSCLK_APB_BUS_FUNC" to "JH7110_SYSCLK_APB_BUS" and
renamed "apb_bus_func" to "apb_bus".
Renamed "JH7110_SYSCLK_IOMUX" to "JH7110_SYSCLK_IOMUX_APB".
Renamed "JH7110_SYSRST_IOMUX" to "JH7110_SYSRST_IOMUX_APB".
Renamed "JH7110_AONRST_AON_IOMUX" to "JH7110_AONRST_IOMUX".
- Removed "reg-names" in gpio nodes.
Patch 7:
- Corrected the board name to "VisionFive 2" instead of "VisionFive V2".
- Renamed jh7110-starfive-visionfive-v2.dts to
jh7110-starfive-visionfive-2.dtsi.
- Added dts for VisionFive 2 version A and version B boards.
- In the chosen node, deleted "linux,initrd-start" and "linux,initrd-end"
and changed the value of "stdout-path" to "serial0:115200n8".
- Changed the bias of uart0 "rx-pins" to
"bias-disable; /* external pull-up */".
- Renamed "clk_rtc" to "rtc_osc".
- Moved the gpio node behind the uart0 node.

v2: https://lore.kernel.org/all/[email protected]/

Changes since v1:
- Rebased on tag v6.1-rc5.
- Added blank line in patch 1. (by Krzysztof)
- Rebased patch 4 and 6 on the newest code. (by Conor)
- Dropped patch 5. (by Conor)
- Removed the quirk of JH7100 in patch 6, considering this patch series
should only add support for JH7110.
- For patch 27, added Co-developed-by tag for Jianlong and me. Renamed
cpu labels to "S76_0", "U74_*" instead of "cpu*" following the style
of jh7100.dtsi. Moved all "clock-frequency" properties to the board dts.
Rewrote clock-controller nodes and deleted reset-controller nodes for
using auxiliary bus. Rewrote gpio nodes following generic pinctrl
bindings. Removed the redundant second reset entry of uart nodes.
- For patch 28, added Co-developed-by tag for Jianlong and me. Added a
chosen node. Removed reserved-memory node. Added fixed frequency clock
nodes for overriding the "clock-frequency" properties. Rewrote the gpio
nodes following generic pinctrl bindings.
- Dropped patch 30. (by Conor)
- Reworded the commit messages.

v1: https://lore.kernel.org/all/[email protected]/

Emil Renner Berthing (7):
dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board
dt-bindings: timer: Add StarFive JH7110 clint
dt-bindings: interrupt-controller: Add StarFive JH7110 plic
dt-bindings: sifive,ccache0: Support StarFive JH7110 SoC
soc: sifive: ccache: Add StarFive JH7110 support
riscv: dts: starfive: Add initial StarFive JH7110 device tree
riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device
tree

.../sifive,plic-1.0.0.yaml | 1 +
.../bindings/riscv/sifive,ccache0.yaml | 9 +-
.../devicetree/bindings/riscv/starfive.yaml | 6 +
.../bindings/timer/sifive,clint.yaml | 1 +
arch/riscv/boot/dts/starfive/Makefile | 1 +
.../jh7110-starfive-visionfive-2-va.dts | 13 +
.../jh7110-starfive-visionfive-2-vb.dts | 13 +
.../jh7110-starfive-visionfive-2.dtsi | 111 +++++
arch/riscv/boot/dts/starfive/jh7110.dtsi | 411 ++++++++++++++++++
drivers/soc/Makefile | 2 +-
drivers/soc/sifive/Kconfig | 2 +-
11 files changed, 567 insertions(+), 3 deletions(-)
create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
create mode 100644 arch/riscv/boot/dts/starfive/jh7110.dtsi


base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
prerequisite-patch-id: 4dc515731ce237184553c1606ffb3afaeb51c3d8
prerequisite-patch-id: 09c98554df52d17ba5fd604125f8cdd62cbe80d1
prerequisite-patch-id: a798370d170dc2bcc79ed86f741c21c1e6d87c78
prerequisite-patch-id: bd9fd8b5cb2376dc7a5e08e1a1fbb969cf475926
prerequisite-patch-id: c57ebb83bc43ccd2a8366ff166eb499da1e1d2cf
prerequisite-patch-id: a1673a9e9f19d6fab5a51abb721e54e36636f067
prerequisite-patch-id: 94860423c7acc9025249d4bb36652a585bd0a797
prerequisite-patch-id: b5084253283929d9a6d0e66c350400c7c85d034d
prerequisite-patch-id: 6e369dbe9dca2785e4ea7d0b80e525e227a90a6e
prerequisite-patch-id: e08806183c152714c563f3a21c6d7b2f539c4d6e
prerequisite-patch-id: 79db8036abdc48fd36da227652ec62627a6b548b
prerequisite-patch-id: 06971b8e6bddc0e87e63bfdb0ce8bfb653bd73aa
prerequisite-patch-id: 16309a0e23811a2c55d2e56886de3e8eccc51554
prerequisite-patch-id: bf4f7ab0b6cfa90b6e49e66c7d75ed2eaaebbe78
prerequisite-patch-id: 38468d532e87867990055d3320679f18c5f52278
prerequisite-patch-id: 4710f2ac22dca0bdd9ff5d744d2c37cab3c74515
--
2.38.1


2022-12-20 01:22:54

by Hal Feng

[permalink] [raw]
Subject: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

From: Emil Renner Berthing <[email protected]>

Add a minimal device tree for StarFive JH7110 VisionFive 2 board
which has version A and version B. Support booting and basic
clock/reset/pinctrl/uart drivers.

Signed-off-by: Emil Renner Berthing <[email protected]>
Co-developed-by: Jianlong Huang <[email protected]>
Signed-off-by: Jianlong Huang <[email protected]>
Co-developed-by: Hal Feng <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
---
arch/riscv/boot/dts/starfive/Makefile | 1 +
.../jh7110-starfive-visionfive-2-va.dts | 13 ++
.../jh7110-starfive-visionfive-2-vb.dts | 13 ++
.../jh7110-starfive-visionfive-2.dtsi | 111 ++++++++++++++++++
4 files changed, 138 insertions(+)
create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi

diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
index 0ea1bc15ab30..79e925a4a227 100644
--- a/arch/riscv/boot/dts/starfive/Makefile
+++ b/arch/riscv/boot/dts/starfive/Makefile
@@ -1,2 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
+dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
new file mode 100644
index 000000000000..188d3fddbe88
--- /dev/null
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2022 StarFive Technology Co., Ltd.
+ * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
+ */
+
+/dts-v1/;
+#include "jh7110-starfive-visionfive-2.dtsi"
+
+/ {
+ model = "StarFive VisionFive 2 VA";
+ compatible = "starfive,visionfive-2-va", "starfive,jh7110";
+};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
new file mode 100644
index 000000000000..f75c10536f84
--- /dev/null
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2022 StarFive Technology Co., Ltd.
+ * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
+ */
+
+/dts-v1/;
+#include "jh7110-starfive-visionfive-2.dtsi"
+
+/ {
+ model = "StarFive VisionFive 2 VB";
+ compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
+};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
new file mode 100644
index 000000000000..c60280b89c73
--- /dev/null
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2022 StarFive Technology Co., Ltd.
+ * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
+ */
+
+/dts-v1/;
+#include "jh7110.dtsi"
+#include "jh7110-pinfunc.h"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ cpus {
+ timebase-frequency = <4000000>;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x0 0x40000000 0x1 0x0>;
+ };
+
+ gpio-restart {
+ compatible = "gpio-restart";
+ gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
+ priority = <224>;
+ };
+};
+
+&osc {
+ clock-frequency = <24000000>;
+};
+
+&rtc_osc {
+ clock-frequency = <32768>;
+};
+
+&gmac0_rmii_refin {
+ clock-frequency = <50000000>;
+};
+
+&gmac0_rgmii_rxin {
+ clock-frequency = <125000000>;
+};
+
+&gmac1_rmii_refin {
+ clock-frequency = <50000000>;
+};
+
+&gmac1_rgmii_rxin {
+ clock-frequency = <125000000>;
+};
+
+&i2stx_bclk_ext {
+ clock-frequency = <12288000>;
+};
+
+&i2stx_lrck_ext {
+ clock-frequency = <192000>;
+};
+
+&i2srx_bclk_ext {
+ clock-frequency = <12288000>;
+};
+
+&i2srx_lrck_ext {
+ clock-frequency = <192000>;
+};
+
+&tdm_ext {
+ clock-frequency = <49152000>;
+};
+
+&mclk_ext {
+ clock-frequency = <12288000>;
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+ status = "okay";
+};
+
+&gpio {
+ uart0_pins: uart0-0 {
+ tx-pins {
+ pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX, GPOEN_ENABLE, GPI_NONE)>;
+ bias-disable;
+ drive-strength = <12>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+
+ rx-pins {
+ pinmux = <GPIOMUX(6, GPOUT_LOW, GPOEN_DISABLE, GPI_SYS_UART0_RX)>;
+ bias-disable; /* external pull-up */
+ drive-strength = <2>;
+ input-enable;
+ input-schmitt-enable;
+ slew-rate = <0>;
+ };
+ };
+};
--
2.38.1

2022-12-20 21:40:17

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Tue, Dec 20, 2022 at 09:12:47AM +0800, Hal Feng wrote:
> From: Emil Renner Berthing <[email protected]>
>
> Add a minimal device tree for StarFive JH7110 VisionFive 2 board
> which has version A and version B. Support booting and basic
> clock/reset/pinctrl/uart drivers.
>
> Signed-off-by: Emil Renner Berthing <[email protected]>
> Co-developed-by: Jianlong Huang <[email protected]>
> Signed-off-by: Jianlong Huang <[email protected]>
> Co-developed-by: Hal Feng <[email protected]>
> Signed-off-by: Hal Feng <[email protected]>
> ---
> arch/riscv/boot/dts/starfive/Makefile | 1 +
> .../jh7110-starfive-visionfive-2-va.dts | 13 ++
> .../jh7110-starfive-visionfive-2-vb.dts | 13 ++
> .../jh7110-starfive-visionfive-2.dtsi | 111 ++++++++++++++++++
> 4 files changed, 138 insertions(+)
> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
>
> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> index 0ea1bc15ab30..79e925a4a227 100644
> --- a/arch/riscv/boot/dts/starfive/Makefile
> +++ b/arch/riscv/boot/dts/starfive/Makefile
> @@ -1,2 +1,3 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
> +dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb

Could you rebase on top of v6.2-rc1 when you submit your next version
squash this in please (unless Emil hates it):
diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
index c38a9ade7f48..b3744420253a 100644
--- a/arch/riscv/boot/dts/starfive/Makefile
+++ b/arch/riscv/boot/dts/starfive/Makefile
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
-dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb
+dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
+dtb-$(CONFIG_SOC_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
+dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb
+dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-vb.dtb

I'd rather have more, but easier to read lines than long ones.

> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> new file mode 100644
> index 000000000000..c60280b89c73
> --- /dev/null
> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> @@ -0,0 +1,111 @@
> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> +/*
> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> + */
> +
> +/dts-v1/;
> +#include "jh7110.dtsi"
> +#include "jh7110-pinfunc.h"
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> + aliases {
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + cpus {
> + timebase-frequency = <4000000>;
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + reg = <0x0 0x40000000 0x1 0x0>;

Is this a good idea when you have SKUs with 2, 4 & 8 GiB of DDR?

Anyways, I can't review this as I've got neither board nor
documentation, so with the above stuff sorted out:
Acked-by: Conor Dooley <[email protected]>
I'll not apply it until the clock binding header is in my tree.

Thanks,
Conor.


Attachments:
(No filename) (3.67 kB)
signature.asc (235.00 B)
Download all attachments

2022-12-23 04:01:19

by Hal Feng

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Tue, 20 Dec 2022 21:26:07 +0000, Conor Dooley wrote:
> On Tue, Dec 20, 2022 at 09:12:47AM +0800, Hal Feng wrote:
> > From: Emil Renner Berthing <[email protected]>
> >
> > Add a minimal device tree for StarFive JH7110 VisionFive 2 board
> > which has version A and version B. Support booting and basic
> > clock/reset/pinctrl/uart drivers.
> >
> > Signed-off-by: Emil Renner Berthing <[email protected]>
> > Co-developed-by: Jianlong Huang <[email protected]>
> > Signed-off-by: Jianlong Huang <[email protected]>
> > Co-developed-by: Hal Feng <[email protected]>
> > Signed-off-by: Hal Feng <[email protected]>
> > ---
> > arch/riscv/boot/dts/starfive/Makefile | 1 +
> > .../jh7110-starfive-visionfive-2-va.dts | 13 ++
> > .../jh7110-starfive-visionfive-2-vb.dts | 13 ++
> > .../jh7110-starfive-visionfive-2.dtsi | 111 ++++++++++++++++++
> > 4 files changed, 138 insertions(+)
> > create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> > create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> > create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> >
> > diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> > index 0ea1bc15ab30..79e925a4a227 100644
> > --- a/arch/riscv/boot/dts/starfive/Makefile
> > +++ b/arch/riscv/boot/dts/starfive/Makefile
> > @@ -1,2 +1,3 @@
> > # SPDX-License-Identifier: GPL-2.0
> > dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
> > +dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb
>
> Could you rebase on top of v6.2-rc1 when you submit your next version

Sure.

> squash this in please (unless Emil hates it):
> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> index c38a9ade7f48..b3744420253a 100644
> --- a/arch/riscv/boot/dts/starfive/Makefile
> +++ b/arch/riscv/boot/dts/starfive/Makefile
> @@ -1,3 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0
> -dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
> -dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb
> +dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
> +dtb-$(CONFIG_SOC_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
> +dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb
> +dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-vb.dtb
>
> I'd rather have more, but easier to read lines than long ones.

I'm fine with this change. If no objection, I will modify it.

Best regards,
Hal

>
> > diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> > new file mode 100644
> > index 000000000000..c60280b89c73
> > --- /dev/null
> > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> > @@ -0,0 +1,111 @@
> > +// SPDX-License-Identifier: GPL-2.0 OR MIT
> > +/*
> > + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> > + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> > + */
> > +
> > +/dts-v1/;
> > +#include "jh7110.dtsi"
> > +#include "jh7110-pinfunc.h"
> > +#include <dt-bindings/gpio/gpio.h>
> > +
> > +/ {
> > + aliases {
> > + serial0 = &uart0;
> > + };
> > +
> > + chosen {
> > + stdout-path = "serial0:115200n8";
> > + };
> > +
> > + cpus {
> > + timebase-frequency = <4000000>;
> > + };
> > +
> > + memory@40000000 {
> > + device_type = "memory";
> > + reg = <0x0 0x40000000 0x1 0x0>;
>
> Is this a good idea when you have SKUs with 2, 4 & 8 GiB of DDR?

The VisionFive 2 board only has 4GB version and 8GB version now. Before
linux startup, we will change this property in dtb through u-boot to
make sure the board can boot up with the correct memory size.

Best regards,
Hal

>
> Anyways, I can't review this as I've got neither board nor
> documentation, so with the above stuff sorted out:
> Acked-by: Conor Dooley <[email protected]>
> I'll not apply it until the clock binding header is in my tree.

2022-12-26 23:33:14

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Basic device tree support for StarFive JH7110 RISC-V SoC

On Tue, Dec 20, 2022 at 09:12:40AM +0800, Hal Feng wrote:
> This patch series adds basic device tree support for StarFive JH7110 SoC.
> This patch series depends on series [1] and [2]. You can simply get or
> review the patches at the link [3].
> Emil Renner Berthing (7):
> dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board

I've applied this one to riscv-dt-for-next
https://git.kernel.org/conor/c/97b7ed072784

> dt-bindings: timer: Add StarFive JH7110 clint
> dt-bindings: interrupt-controller: Add StarFive JH7110 plic

> dt-bindings: sifive,ccache0: Support StarFive JH7110 SoC
> soc: sifive: ccache: Add StarFive JH7110 support

And these two to riscv-soc-for-next
https://git.kernel.org/conor/c/1caf002efa22
https://git.kernel.org/conor/c/6635e91648ce

> riscv: dts: starfive: Add initial StarFive JH7110 device tree
> riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device
> tree

The rest I can take with maintainer Acks alongside the DT, or they can
go via subsystem trees.
The DT is waiting for the clock/reset & pinctrl binding headers anyway,
so IDC which it is.

Thanks,
Conor.


Attachments:
(No filename) (1.15 kB)
signature.asc (235.00 B)
Download all attachments

2022-12-27 08:35:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Basic device tree support for StarFive JH7110 RISC-V SoC

On 27/12/2022 00:01, Conor Dooley wrote:
> On Tue, Dec 20, 2022 at 09:12:40AM +0800, Hal Feng wrote:
> The DT is waiting for the clock/reset & pinctrl binding headers anyway,

Which were sent with build warnings/errors...

Best regards,
Krzysztof

2022-12-27 14:43:58

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 0/7] Basic device tree support for StarFive JH7110 RISC-V SoC

On Tue, Dec 27, 2022 at 08:58:01AM +0100, Krzysztof Kozlowski wrote:
> On 27/12/2022 00:01, Conor Dooley wrote:
> > On Tue, Dec 20, 2022 at 09:12:40AM +0800, Hal Feng wrote:
> > The DT is waiting for the clock/reset & pinctrl binding headers anyway,
>
> Which were sent with build warnings/errors...

Yah, DW chief - I'm not in a rush. Figure it'll take a few more
iterations.

Errors/warnings aside, responding to the clock series again is in my
todo list, not convinced by the clock binding itself.


Attachments:
(No filename) (516.00 B)
signature.asc (235.00 B)
Download all attachments

2022-12-28 23:05:22

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Fri, Dec 23, 2022 at 11:12:34AM +0800, Hal Feng wrote:
> On Tue, 20 Dec 2022 21:26:07 +0000, Conor Dooley wrote:
> > On Tue, Dec 20, 2022 at 09:12:47AM +0800, Hal Feng wrote:
> > > From: Emil Renner Berthing <[email protected]>
> > >
> > > Add a minimal device tree for StarFive JH7110 VisionFive 2 board
> > > which has version A and version B. Support booting and basic
> > > clock/reset/pinctrl/uart drivers.
> > >
> > > Signed-off-by: Emil Renner Berthing <[email protected]>
> > > Co-developed-by: Jianlong Huang <[email protected]>
> > > Signed-off-by: Jianlong Huang <[email protected]>
> > > Co-developed-by: Hal Feng <[email protected]>
> > > Signed-off-by: Hal Feng <[email protected]>
> > > ---

> > > diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> > > new file mode 100644
> > > index 000000000000..c60280b89c73
> > > --- /dev/null
> > > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> > > @@ -0,0 +1,111 @@
> > > +// SPDX-License-Identifier: GPL-2.0 OR MIT
> > > +/*
> > > + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> > > + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> > > + */
> > > +
> > > +/dts-v1/;
> > > +#include "jh7110.dtsi"
> > > +#include "jh7110-pinfunc.h"
> > > +#include <dt-bindings/gpio/gpio.h>
> > > +
> > > +/ {
> > > + aliases {
> > > + serial0 = &uart0;
> > > + };
> > > +
> > > + chosen {
> > > + stdout-path = "serial0:115200n8";
> > > + };
> > > +
> > > + cpus {
> > > + timebase-frequency = <4000000>;
> > > + };
> > > +
> > > + memory@40000000 {
> > > + device_type = "memory";
> > > + reg = <0x0 0x40000000 0x1 0x0>;
> >
> > Is this a good idea when you have SKUs with 2, 4 & 8 GiB of DDR?
>
> The VisionFive 2 board only has 4GB version and 8GB version now. Before
> linux startup, we will change this property in dtb through u-boot to
> make sure the board can boot up with the correct memory size.

Ah I see. Thanks.


Attachments:
(No filename) (2.07 kB)
signature.asc (235.00 B)
Download all attachments

2023-01-10 18:25:34

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Tue, Dec 20, 2022 at 09:12:47AM +0800, Hal Feng wrote:

> + aliases {
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };

So I think this is wrong, and the stdout-path should be uart3 instead.
Per the QSG [0], GPIO5/6 are the suggested UART Tx/Rx to use.
This appears to map to uart3 rather than uart0.
FWIW, uart3 is also the stdout-path for the v1, see:
arch/riscv/boot/dts/starfive/jh7100-common.dtsi

At least, that change is what I needed to do in order to use the
JH7110_VisionFive2_upstream branch, AFAICT matches what you've got in
this series.

Thanks,
Conor.

0 - https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf


Attachments:
(No filename) (706.00 B)
signature.asc (235.00 B)
Download all attachments

2023-01-18 23:56:53

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Tue, Jan 10, 2023 at 05:59:09PM +0000, Conor Dooley wrote:
> On Tue, Dec 20, 2022 at 09:12:47AM +0800, Hal Feng wrote:
>
> > + aliases {
> > + serial0 = &uart0;
> > + };
> > +
> > + chosen {
> > + stdout-path = "serial0:115200n8";
> > + };
>
> So I think this is wrong, and the stdout-path should be uart3 instead.
> Per the QSG [0], GPIO5/6 are the suggested UART Tx/Rx to use.
> This appears to map to uart3 rather than uart0.
> FWIW, uart3 is also the stdout-path for the v1, see:
> arch/riscv/boot/dts/starfive/jh7100-common.dtsi
>
> At least, that change is what I needed to do in order to use the
> JH7110_VisionFive2_upstream branch, AFAICT matches what you've got in
> this series.

I went and re-tried things again today, but with the clk & pinctrl series
from the ML instead of that branch.
I'd gone and used that branch instead of the patches, as there were some
build issues with the pinctrl driver from the patches.
I fixed the build issues in the pinctrl driver and now uart0 works.

Looking at it again, it makes sense for uart0 to be serial0, given
there's pinconf stuff being done in this DT for pins 5 & 6 for uart0.

Perhaps by using that branch, I was using some older drivers etc given
it seems to mostly contain commits dating from November?
I'm still a bit confused about the whole thing, given I tried out a
whole load of branches to get something booting with ethernet support
that day!

Since this seems to work with the fixed pinctrl driver, I don't think
you need to change anything here.

Apologies for the noise!
Conor.


Attachments:
(No filename) (1.56 kB)
signature.asc (235.00 B)
Download all attachments

2023-02-14 09:54:23

by Emil Renner Berthing

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Tue, 20 Dec 2022 at 02:12, Hal Feng <[email protected]> wrote:
>
> From: Emil Renner Berthing <[email protected]>
>
> Add a minimal device tree for StarFive JH7110 VisionFive 2 board
> which has version A and version B. Support booting and basic
> clock/reset/pinctrl/uart drivers.
>
> Signed-off-by: Emil Renner Berthing <[email protected]>
> Co-developed-by: Jianlong Huang <[email protected]>
> Signed-off-by: Jianlong Huang <[email protected]>
> Co-developed-by: Hal Feng <[email protected]>
> Signed-off-by: Hal Feng <[email protected]>
> ---
> arch/riscv/boot/dts/starfive/Makefile | 1 +
> .../jh7110-starfive-visionfive-2-va.dts | 13 ++
> .../jh7110-starfive-visionfive-2-vb.dts | 13 ++
> .../jh7110-starfive-visionfive-2.dtsi | 111 ++++++++++++++++++
> 4 files changed, 138 insertions(+)
> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
>
> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> index 0ea1bc15ab30..79e925a4a227 100644
> --- a/arch/riscv/boot/dts/starfive/Makefile
> +++ b/arch/riscv/boot/dts/starfive/Makefile
> @@ -1,2 +1,3 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
> +dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> new file mode 100644
> index 000000000000..188d3fddbe88
> --- /dev/null
> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> +/*
> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> + */
> +
> +/dts-v1/;
> +#include "jh7110-starfive-visionfive-2.dtsi"
> +
> +/ {
> + model = "StarFive VisionFive 2 VA";
> + compatible = "starfive,visionfive-2-va", "starfive,jh7110";
> +};
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> new file mode 100644
> index 000000000000..f75c10536f84
> --- /dev/null
> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> +/*
> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> + */
> +
> +/dts-v1/;
> +#include "jh7110-starfive-visionfive-2.dtsi"
> +
> +/ {
> + model = "StarFive VisionFive 2 VB";
> + compatible = "starfive,visionfive-2-vb", "starfive,jh7110";

Hi Hal,

I just want to double check, is "VisionFive 2 VA" / "visoinfive-2-va"
and "VisionFive 2 VB" / "visionfive-2-vb" really what you want? I
still think having these names match what is printed on the silkscreen
makes it a lot easier for everybody. Even your own releases calls the
boards "v1.2A" and "v1.3B":
https://github.com/starfive-tech/VisionFive2/releases/

So I'd suggest
model = "StarFive VisionFive 2 v1.3B";
compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";

I haven't seen these "VA" and "VB" anywhere else, so if you don't want
the version numbers and can promise that there will be no incompatible
future revisions of the boards then maybe just drop the "V". Eg.
model = "StarFive VisionFive 2 B";
compatible = "starfive,visionfive-2-b", "starfive,jh7110";

/Emil

> +};
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> new file mode 100644
> index 000000000000..c60280b89c73
> --- /dev/null
> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> @@ -0,0 +1,111 @@
> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> +/*
> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> + */
> +
> +/dts-v1/;
> +#include "jh7110.dtsi"
> +#include "jh7110-pinfunc.h"
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> + aliases {
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + cpus {
> + timebase-frequency = <4000000>;
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + reg = <0x0 0x40000000 0x1 0x0>;
> + };
> +
> + gpio-restart {
> + compatible = "gpio-restart";
> + gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
> + priority = <224>;
> + };
> +};
> +
> +&osc {
> + clock-frequency = <24000000>;
> +};
> +
> +&rtc_osc {
> + clock-frequency = <32768>;
> +};
> +
> +&gmac0_rmii_refin {
> + clock-frequency = <50000000>;
> +};
> +
> +&gmac0_rgmii_rxin {
> + clock-frequency = <125000000>;
> +};
> +
> +&gmac1_rmii_refin {
> + clock-frequency = <50000000>;
> +};
> +
> +&gmac1_rgmii_rxin {
> + clock-frequency = <125000000>;
> +};
> +
> +&i2stx_bclk_ext {
> + clock-frequency = <12288000>;
> +};
> +
> +&i2stx_lrck_ext {
> + clock-frequency = <192000>;
> +};
> +
> +&i2srx_bclk_ext {
> + clock-frequency = <12288000>;
> +};
> +
> +&i2srx_lrck_ext {
> + clock-frequency = <192000>;
> +};
> +
> +&tdm_ext {
> + clock-frequency = <49152000>;
> +};
> +
> +&mclk_ext {
> + clock-frequency = <12288000>;
> +};
> +
> +&uart0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_pins>;
> + status = "okay";
> +};
> +
> +&gpio {
> + uart0_pins: uart0-0 {
> + tx-pins {
> + pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX, GPOEN_ENABLE, GPI_NONE)>;
> + bias-disable;
> + drive-strength = <12>;
> + input-disable;
> + input-schmitt-disable;
> + slew-rate = <0>;
> + };
> +
> + rx-pins {
> + pinmux = <GPIOMUX(6, GPOUT_LOW, GPOEN_DISABLE, GPI_SYS_UART0_RX)>;
> + bias-disable; /* external pull-up */
> + drive-strength = <2>;
> + input-enable;
> + input-schmitt-enable;
> + slew-rate = <0>;
> + };
> + };
> +};
> --
> 2.38.1
>

2023-02-15 14:04:03

by Hal Feng

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On 2/14/2023 5:53 PM, Emil Renner Berthing wrote:
> On Tue, 20 Dec 2022 at 02:12, Hal Feng <[email protected]> wrote:
>>
>> From: Emil Renner Berthing <[email protected]>
>>
>> Add a minimal device tree for StarFive JH7110 VisionFive 2 board
>> which has version A and version B. Support booting and basic
>> clock/reset/pinctrl/uart drivers.
>>
>> Signed-off-by: Emil Renner Berthing <[email protected]>
>> Co-developed-by: Jianlong Huang <[email protected]>
>> Signed-off-by: Jianlong Huang <[email protected]>
>> Co-developed-by: Hal Feng <[email protected]>
>> Signed-off-by: Hal Feng <[email protected]>
>> ---
>> arch/riscv/boot/dts/starfive/Makefile | 1 +
>> .../jh7110-starfive-visionfive-2-va.dts | 13 ++
>> .../jh7110-starfive-visionfive-2-vb.dts | 13 ++
>> .../jh7110-starfive-visionfive-2.dtsi | 111 ++++++++++++++++++
>> 4 files changed, 138 insertions(+)
>> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
>> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
>> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
>>
>> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
>> index 0ea1bc15ab30..79e925a4a227 100644
>> --- a/arch/riscv/boot/dts/starfive/Makefile
>> +++ b/arch/riscv/boot/dts/starfive/Makefile
>> @@ -1,2 +1,3 @@
>> # SPDX-License-Identifier: GPL-2.0
>> dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
>> +dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb
>> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
>> new file mode 100644
>> index 000000000000..188d3fddbe88
>> --- /dev/null
>> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
>> @@ -0,0 +1,13 @@
>> +// SPDX-License-Identifier: GPL-2.0 OR MIT
>> +/*
>> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
>> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
>> + */
>> +
>> +/dts-v1/;
>> +#include "jh7110-starfive-visionfive-2.dtsi"
>> +
>> +/ {
>> + model = "StarFive VisionFive 2 VA";
>> + compatible = "starfive,visionfive-2-va", "starfive,jh7110";
>> +};
>> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
>> new file mode 100644
>> index 000000000000..f75c10536f84
>> --- /dev/null
>> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
>> @@ -0,0 +1,13 @@
>> +// SPDX-License-Identifier: GPL-2.0 OR MIT
>> +/*
>> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
>> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
>> + */
>> +
>> +/dts-v1/;
>> +#include "jh7110-starfive-visionfive-2.dtsi"
>> +
>> +/ {
>> + model = "StarFive VisionFive 2 VB";
>> + compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
>
> Hi Hal,
>
> I just want to double check, is "VisionFive 2 VA" / "visoinfive-2-va"
> and "VisionFive 2 VB" / "visionfive-2-vb" really what you want? I
> still think having these names match what is printed on the silkscreen
> makes it a lot easier for everybody. Even your own releases calls the
> boards "v1.2A" and "v1.3B":
> https://github.com/starfive-tech/VisionFive2/releases/
>
> So I'd suggest
> model = "StarFive VisionFive 2 v1.3B";
> compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
>
> I haven't seen these "VA" and "VB" anywhere else, so if you don't want
> the version numbers and can promise that there will be no incompatible
> future revisions of the boards then maybe just drop the "V". Eg.
> model = "StarFive VisionFive 2 B";
> compatible = "starfive,visionfive-2-b", "starfive,jh7110";

The version A board has reached the end of life. As far as I know, the
version B board will not update also unless there are some important
requirements and StarFive decides to update. Furthermore, it's too late
to change the compatible as patch 1 was already accepted. Will it be
easier to read if I modify it as below?

model = "StarFive VisionFive 2 vB";
compatible = "starfive,visionfive-2-vb", "starfive,jh7110";

Best regards,
Hal

2023-02-16 09:27:42

by Emil Renner Berthing

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Wed, 15 Feb 2023 at 15:04, Hal Feng <[email protected]> wrote:
>
> On 2/14/2023 5:53 PM, Emil Renner Berthing wrote:
> > On Tue, 20 Dec 2022 at 02:12, Hal Feng <[email protected]> wrote:
> >>
> >> From: Emil Renner Berthing <[email protected]>
> >>
> >> Add a minimal device tree for StarFive JH7110 VisionFive 2 board
> >> which has version A and version B. Support booting and basic
> >> clock/reset/pinctrl/uart drivers.
> >>
> >> Signed-off-by: Emil Renner Berthing <[email protected]>
> >> Co-developed-by: Jianlong Huang <[email protected]>
> >> Signed-off-by: Jianlong Huang <[email protected]>
> >> Co-developed-by: Hal Feng <[email protected]>
> >> Signed-off-by: Hal Feng <[email protected]>
> >> ---
> >> arch/riscv/boot/dts/starfive/Makefile | 1 +
> >> .../jh7110-starfive-visionfive-2-va.dts | 13 ++
> >> .../jh7110-starfive-visionfive-2-vb.dts | 13 ++
> >> .../jh7110-starfive-visionfive-2.dtsi | 111 ++++++++++++++++++
> >> 4 files changed, 138 insertions(+)
> >> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> >> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> >> create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> >>
> >> diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile
> >> index 0ea1bc15ab30..79e925a4a227 100644
> >> --- a/arch/riscv/boot/dts/starfive/Makefile
> >> +++ b/arch/riscv/boot/dts/starfive/Makefile
> >> @@ -1,2 +1,3 @@
> >> # SPDX-License-Identifier: GPL-2.0
> >> dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
> >> +dtb-$(CONFIG_SOC_STARFIVE) += jh7110-starfive-visionfive-2-va.dtb jh7110-starfive-visionfive-2-vb.dtb
> >> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> >> new file mode 100644
> >> index 000000000000..188d3fddbe88
> >> --- /dev/null
> >> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-va.dts
> >> @@ -0,0 +1,13 @@
> >> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> >> +/*
> >> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> >> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> >> + */
> >> +
> >> +/dts-v1/;
> >> +#include "jh7110-starfive-visionfive-2.dtsi"
> >> +
> >> +/ {
> >> + model = "StarFive VisionFive 2 VA";
> >> + compatible = "starfive,visionfive-2-va", "starfive,jh7110";
> >> +};
> >> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> >> new file mode 100644
> >> index 000000000000..f75c10536f84
> >> --- /dev/null
> >> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-vb.dts
> >> @@ -0,0 +1,13 @@
> >> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> >> +/*
> >> + * Copyright (C) 2022 StarFive Technology Co., Ltd.
> >> + * Copyright (C) 2022 Emil Renner Berthing <[email protected]>
> >> + */
> >> +
> >> +/dts-v1/;
> >> +#include "jh7110-starfive-visionfive-2.dtsi"
> >> +
> >> +/ {
> >> + model = "StarFive VisionFive 2 VB";
> >> + compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
> >
> > Hi Hal,
> >
> > I just want to double check, is "VisionFive 2 VA" / "visoinfive-2-va"
> > and "VisionFive 2 VB" / "visionfive-2-vb" really what you want? I
> > still think having these names match what is printed on the silkscreen
> > makes it a lot easier for everybody. Even your own releases calls the
> > boards "v1.2A" and "v1.3B":
> > https://github.com/starfive-tech/VisionFive2/releases/
> >
> > So I'd suggest
> > model = "StarFive VisionFive 2 v1.3B";
> > compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
> >
> > I haven't seen these "VA" and "VB" anywhere else, so if you don't want
> > the version numbers and can promise that there will be no incompatible
> > future revisions of the boards then maybe just drop the "V". Eg.
> > model = "StarFive VisionFive 2 B";
> > compatible = "starfive,visionfive-2-b", "starfive,jh7110";
>
> The version A board has reached the end of life. As far as I know, the
> version B board will not update also unless there are some important
> requirements and StarFive decides to update. Furthermore, it's too late
> to change the compatible as patch 1 was already accepted. Will it be
> easier to read if I modify it as below?
>
> model = "StarFive VisionFive 2 vB";
> compatible = "starfive,visionfive-2-vb", "starfive,jh7110";

Oh, that's sad that the kernel will now end up calling the boards
something that's used nowhere else, even by StarFive :/
But yeah, I guess vA and vB are a little easier to read.

> Best regards,
> Hal

2023-02-16 09:51:12

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Thu, Feb 16, 2023 at 10:27:17AM +0100, Emil Renner Berthing wrote:
> On Wed, 15 Feb 2023 at 15:04, Hal Feng <[email protected]> wrote:
> > On 2/14/2023 5:53 PM, Emil Renner Berthing wrote:
> > > On Tue, 20 Dec 2022 at 02:12, Hal Feng <[email protected]> wrote:

> > >> + model = "StarFive VisionFive 2 VB";
> > >> + compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
> > >
> > > Hi Hal,
> > >
> > > I just want to double check, is "VisionFive 2 VA" / "visoinfive-2-va"
> > > and "VisionFive 2 VB" / "visionfive-2-vb" really what you want? I
> > > still think having these names match what is printed on the silkscreen
> > > makes it a lot easier for everybody. Even your own releases calls the
> > > boards "v1.2A" and "v1.3B":
> > > https://github.com/starfive-tech/VisionFive2/releases/
> > >
> > > So I'd suggest
> > > model = "StarFive VisionFive 2 v1.3B";
> > > compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
> > >
> > > I haven't seen these "VA" and "VB" anywhere else, so if you don't want
> > > the version numbers and can promise that there will be no incompatible
> > > future revisions of the boards then maybe just drop the "V". Eg.
> > > model = "StarFive VisionFive 2 B";
> > > compatible = "starfive,visionfive-2-b", "starfive,jh7110";
> >
> > The version A board has reached the end of life. As far as I know, the
> > version B board will not update also unless there are some important
> > requirements and StarFive decides to update. Furthermore, it's too late
> > to change the compatible as patch 1 was already accepted. Will it be
> > easier to read if I modify it as below?
> >
> > model = "StarFive VisionFive 2 vB";
> > compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
>
> Oh, that's sad that the kernel will now end up calling the boards
> something that's used nowhere else, even by StarFive :/
> But yeah, I guess vA and vB are a little easier to read.

Nothing has been released with that name so AFAIU we can change it
still. If you sort it out today/tomorrow I'll try get it to Arnd before
the merge window opens...

I might've jumped the gun a bit here, I thought that it'd been changed
to what you (Emil) had suggested.


Attachments:
(No filename) (2.18 kB)
signature.asc (228.00 B)
Download all attachments

2023-02-16 10:09:48

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Thu, Feb 16, 2023 at 09:50:37AM +0000, Conor Dooley wrote:
> On Thu, Feb 16, 2023 at 10:27:17AM +0100, Emil Renner Berthing wrote:
> > On Wed, 15 Feb 2023 at 15:04, Hal Feng <[email protected]> wrote:
> > > On 2/14/2023 5:53 PM, Emil Renner Berthing wrote:
> > > > On Tue, 20 Dec 2022 at 02:12, Hal Feng <[email protected]> wrote:
>
> > > >> + model = "StarFive VisionFive 2 VB";
> > > >> + compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
> > > >
> > > > Hi Hal,
> > > >
> > > > I just want to double check, is "VisionFive 2 VA" / "visoinfive-2-va"
> > > > and "VisionFive 2 VB" / "visionfive-2-vb" really what you want? I
> > > > still think having these names match what is printed on the silkscreen
> > > > makes it a lot easier for everybody. Even your own releases calls the
> > > > boards "v1.2A" and "v1.3B":
> > > > https://github.com/starfive-tech/VisionFive2/releases/
> > > >
> > > > So I'd suggest
> > > > model = "StarFive VisionFive 2 v1.3B";
> > > > compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
> > > >
> > > > I haven't seen these "VA" and "VB" anywhere else, so if you don't want
> > > > the version numbers and can promise that there will be no incompatible
> > > > future revisions of the boards then maybe just drop the "V". Eg.
> > > > model = "StarFive VisionFive 2 B";
> > > > compatible = "starfive,visionfive-2-b", "starfive,jh7110";
> > >
> > > The version A board has reached the end of life. As far as I know, the
> > > version B board will not update also unless there are some important
> > > requirements and StarFive decides to update. Furthermore, it's too late
> > > to change the compatible as patch 1 was already accepted. Will it be
> > > easier to read if I modify it as below?
> > >
> > > model = "StarFive VisionFive 2 vB";
> > > compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
> >
> > Oh, that's sad that the kernel will now end up calling the boards
> > something that's used nowhere else, even by StarFive :/
> > But yeah, I guess vA and vB are a little easier to read.
>
> Nothing has been released with that name so AFAIU we can change it
> still. If you sort it out today/tomorrow I'll try get it to Arnd before
> the merge window opens...
>
> I might've jumped the gun a bit here, I thought that it'd been changed
> to what you (Emil) had suggested.

?

-- >8 --
From 4d44e8a83716d1caa314f25a95bd21ac8904909e Mon Sep 17 00:00:00 2001
From: Conor Dooley <[email protected]>
Date: Thu, 16 Feb 2023 09:58:22 +0000
Subject: [PATCH] dt-bindings: riscv: correct starfive visionfive 2 compatibles

Using "va" and "vb" doesn't match what's written on the board, or the
communications from StarFive.
Switching to using the silkscreened version number will ease confusion &
the risk of another spin of the board containing a "conflicting" version
identifier.

Suggested-by: Emil Renner Berthing <[email protected]>
Fixes: 97b7ed072784 ("dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board")
Signed-off-by: Conor Dooley <[email protected]>
---
Documentation/devicetree/bindings/riscv/starfive.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/riscv/starfive.yaml b/Documentation/devicetree/bindings/riscv/starfive.yaml
index 60c7c03fcdce..cc4d92f0a1bf 100644
--- a/Documentation/devicetree/bindings/riscv/starfive.yaml
+++ b/Documentation/devicetree/bindings/riscv/starfive.yaml
@@ -26,8 +26,8 @@ properties:

- items:
- enum:
- - starfive,visionfive-2-va
- - starfive,visionfive-2-vb
+ - starfive,visionfive-2-v1.2a
+ - starfive,visionfive-2-v1.3b
- const: starfive,jh7110

additionalProperties: true
--
2.39.0



Attachments:
(No filename) (3.75 kB)
signature.asc (228.00 B)
Download all attachments

2023-02-16 10:32:59

by Emil Renner Berthing

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Thu, 16 Feb 2023 at 11:09, Conor Dooley <[email protected]> wrote:
>
> On Thu, Feb 16, 2023 at 09:50:37AM +0000, Conor Dooley wrote:
> > On Thu, Feb 16, 2023 at 10:27:17AM +0100, Emil Renner Berthing wrote:
> > > On Wed, 15 Feb 2023 at 15:04, Hal Feng <[email protected]> wrote:
> > > > On 2/14/2023 5:53 PM, Emil Renner Berthing wrote:
> > > > > On Tue, 20 Dec 2022 at 02:12, Hal Feng <[email protected]> wrote:
> >
> > > > >> + model = "StarFive VisionFive 2 VB";
> > > > >> + compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
> > > > >
> > > > > Hi Hal,
> > > > >
> > > > > I just want to double check, is "VisionFive 2 VA" / "visoinfive-2-va"
> > > > > and "VisionFive 2 VB" / "visionfive-2-vb" really what you want? I
> > > > > still think having these names match what is printed on the silkscreen
> > > > > makes it a lot easier for everybody. Even your own releases calls the
> > > > > boards "v1.2A" and "v1.3B":
> > > > > https://github.com/starfive-tech/VisionFive2/releases/
> > > > >
> > > > > So I'd suggest
> > > > > model = "StarFive VisionFive 2 v1.3B";
> > > > > compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
> > > > >
> > > > > I haven't seen these "VA" and "VB" anywhere else, so if you don't want
> > > > > the version numbers and can promise that there will be no incompatible
> > > > > future revisions of the boards then maybe just drop the "V". Eg.
> > > > > model = "StarFive VisionFive 2 B";
> > > > > compatible = "starfive,visionfive-2-b", "starfive,jh7110";
> > > >
> > > > The version A board has reached the end of life. As far as I know, the
> > > > version B board will not update also unless there are some important
> > > > requirements and StarFive decides to update. Furthermore, it's too late
> > > > to change the compatible as patch 1 was already accepted. Will it be
> > > > easier to read if I modify it as below?
> > > >
> > > > model = "StarFive VisionFive 2 vB";
> > > > compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
> > >
> > > Oh, that's sad that the kernel will now end up calling the boards
> > > something that's used nowhere else, even by StarFive :/
> > > But yeah, I guess vA and vB are a little easier to read.
> >
> > Nothing has been released with that name so AFAIU we can change it
> > still. If you sort it out today/tomorrow I'll try get it to Arnd before
> > the merge window opens...
> >
> > I might've jumped the gun a bit here, I thought that it'd been changed
> > to what you (Emil) had suggested.

No, I'm sorry for being late here. The below definitely looks better to me.

Hal, would you be fine with this change?

/Emil

>
> -- >8 --
> From 4d44e8a83716d1caa314f25a95bd21ac8904909e Mon Sep 17 00:00:00 2001
> From: Conor Dooley <[email protected]>
> Date: Thu, 16 Feb 2023 09:58:22 +0000
> Subject: [PATCH] dt-bindings: riscv: correct starfive visionfive 2 compatibles
>
> Using "va" and "vb" doesn't match what's written on the board, or the
> communications from StarFive.
> Switching to using the silkscreened version number will ease confusion &
> the risk of another spin of the board containing a "conflicting" version
> identifier.
>
> Suggested-by: Emil Renner Berthing <[email protected]>
> Fixes: 97b7ed072784 ("dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board")
> Signed-off-by: Conor Dooley <[email protected]>
> ---
> Documentation/devicetree/bindings/riscv/starfive.yaml | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/riscv/starfive.yaml b/Documentation/devicetree/bindings/riscv/starfive.yaml
> index 60c7c03fcdce..cc4d92f0a1bf 100644
> --- a/Documentation/devicetree/bindings/riscv/starfive.yaml
> +++ b/Documentation/devicetree/bindings/riscv/starfive.yaml
> @@ -26,8 +26,8 @@ properties:
>
> - items:
> - enum:
> - - starfive,visionfive-2-va
> - - starfive,visionfive-2-vb
> + - starfive,visionfive-2-v1.2a
> + - starfive,visionfive-2-v1.3b
> - const: starfive,jh7110
>
> additionalProperties: true
> --
> 2.39.0
>
>

2023-02-16 12:27:59

by Hal Feng

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Thu, 16 Feb 2023 11:32:31 +0100, Emil Renner Berthing wrote:
> On Thu, 16 Feb 2023 at 11:09, Conor Dooley <[email protected]> wrote:
>>
>> On Thu, Feb 16, 2023 at 09:50:37AM +0000, Conor Dooley wrote:
>> > On Thu, Feb 16, 2023 at 10:27:17AM +0100, Emil Renner Berthing wrote:
>> > > On Wed, 15 Feb 2023 at 15:04, Hal Feng <[email protected]> wrote:
>> > > > On 2/14/2023 5:53 PM, Emil Renner Berthing wrote:
>> > > > > On Tue, 20 Dec 2022 at 02:12, Hal Feng <[email protected]> wrote:
>> >
>> > > > >> + model = "StarFive VisionFive 2 VB";
>> > > > >> + compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
>> > > > >
>> > > > > Hi Hal,
>> > > > >
>> > > > > I just want to double check, is "VisionFive 2 VA" / "visoinfive-2-va"
>> > > > > and "VisionFive 2 VB" / "visionfive-2-vb" really what you want? I
>> > > > > still think having these names match what is printed on the silkscreen
>> > > > > makes it a lot easier for everybody. Even your own releases calls the
>> > > > > boards "v1.2A" and "v1.3B":
>> > > > > https://github.com/starfive-tech/VisionFive2/releases/
>> > > > >
>> > > > > So I'd suggest
>> > > > > model = "StarFive VisionFive 2 v1.3B";
>> > > > > compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
>> > > > >
>> > > > > I haven't seen these "VA" and "VB" anywhere else, so if you don't want
>> > > > > the version numbers and can promise that there will be no incompatible
>> > > > > future revisions of the boards then maybe just drop the "V". Eg.
>> > > > > model = "StarFive VisionFive 2 B";
>> > > > > compatible = "starfive,visionfive-2-b", "starfive,jh7110";
>> > > >
>> > > > The version A board has reached the end of life. As far as I know, the
>> > > > version B board will not update also unless there are some important
>> > > > requirements and StarFive decides to update. Furthermore, it's too late
>> > > > to change the compatible as patch 1 was already accepted. Will it be
>> > > > easier to read if I modify it as below?
>> > > >
>> > > > model = "StarFive VisionFive 2 vB";
>> > > > compatible = "starfive,visionfive-2-vb", "starfive,jh7110";
>> > >
>> > > Oh, that's sad that the kernel will now end up calling the boards
>> > > something that's used nowhere else, even by StarFive :/
>> > > But yeah, I guess vA and vB are a little easier to read.
>> >
>> > Nothing has been released with that name so AFAIU we can change it
>> > still. If you sort it out today/tomorrow I'll try get it to Arnd before
>> > the merge window opens...
>> >
>> > I might've jumped the gun a bit here, I thought that it'd been changed
>> > to what you (Emil) had suggested.
>
> No, I'm sorry for being late here. The below definitely looks better to me.
>
> Hal, would you be fine with this change?

I'm fine with this. It will be more exact. Thanks.

Best regards,
Hal

>
>>
>> -- >8 --
>> From 4d44e8a83716d1caa314f25a95bd21ac8904909e Mon Sep 17 00:00:00 2001
>> From: Conor Dooley <[email protected]>
>> Date: Thu, 16 Feb 2023 09:58:22 +0000
>> Subject: [PATCH] dt-bindings: riscv: correct starfive visionfive 2 compatibles
>>
>> Using "va" and "vb" doesn't match what's written on the board, or the
>> communications from StarFive.
>> Switching to using the silkscreened version number will ease confusion &
>> the risk of another spin of the board containing a "conflicting" version
>> identifier.
>>
>> Suggested-by: Emil Renner Berthing <[email protected]>
>> Fixes: 97b7ed072784 ("dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board")
>> Signed-off-by: Conor Dooley <[email protected]>
>> ---
>> Documentation/devicetree/bindings/riscv/starfive.yaml | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/riscv/starfive.yaml b/Documentation/devicetree/bindings/riscv/starfive.yaml
>> index 60c7c03fcdce..cc4d92f0a1bf 100644
>> --- a/Documentation/devicetree/bindings/riscv/starfive.yaml
>> +++ b/Documentation/devicetree/bindings/riscv/starfive.yaml
>> @@ -26,8 +26,8 @@ properties:
>>
>> - items:
>> - enum:
>> - - starfive,visionfive-2-va
>> - - starfive,visionfive-2-vb
>> + - starfive,visionfive-2-v1.2a
>> + - starfive,visionfive-2-v1.3b
>> - const: starfive,jh7110
>>
>> additionalProperties: true
>> --
>> 2.39.0
>>
>>


2023-02-16 13:02:45

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v3 7/7] riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree

On Thu, Feb 16, 2023 at 08:27:42PM +0800, Hal Feng wrote:
> On Thu, 16 Feb 2023 11:32:31 +0100, Emil Renner Berthing wrote:
> > On Thu, 16 Feb 2023 at 11:09, Conor Dooley <[email protected]> wrote:

> >
> > No, I'm sorry for being late here. The below definitely looks better to me.
> >
> > Hal, would you be fine with this change?
>
> I'm fine with this. It will be more exact. Thanks.

I'll convert these both to Acked-by & send this as a real patch then.
Thanks!

> >> -- >8 --
> >> From 4d44e8a83716d1caa314f25a95bd21ac8904909e Mon Sep 17 00:00:00 2001
> >> From: Conor Dooley <[email protected]>
> >> Date: Thu, 16 Feb 2023 09:58:22 +0000
> >> Subject: [PATCH] dt-bindings: riscv: correct starfive visionfive 2 compatibles
> >>
> >> Using "va" and "vb" doesn't match what's written on the board, or the
> >> communications from StarFive.
> >> Switching to using the silkscreened version number will ease confusion &
> >> the risk of another spin of the board containing a "conflicting" version
> >> identifier.
> >>
> >> Suggested-by: Emil Renner Berthing <[email protected]>
> >> Fixes: 97b7ed072784 ("dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board")
> >> Signed-off-by: Conor Dooley <[email protected]>
> >> ---
> >> Documentation/devicetree/bindings/riscv/starfive.yaml | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/riscv/starfive.yaml b/Documentation/devicetree/bindings/riscv/starfive.yaml
> >> index 60c7c03fcdce..cc4d92f0a1bf 100644
> >> --- a/Documentation/devicetree/bindings/riscv/starfive.yaml
> >> +++ b/Documentation/devicetree/bindings/riscv/starfive.yaml
> >> @@ -26,8 +26,8 @@ properties:
> >>
> >> - items:
> >> - enum:
> >> - - starfive,visionfive-2-va
> >> - - starfive,visionfive-2-vb
> >> + - starfive,visionfive-2-v1.2a
> >> + - starfive,visionfive-2-v1.3b
> >> - const: starfive,jh7110
> >>
> >> additionalProperties: true
> >> --
> >> 2.39.0
> >>
> >>
>
>


Attachments:
(No filename) (2.06 kB)
signature.asc (228.00 B)
Download all attachments