1 From 76bc84c399f11c7d6a37fe68cbd5f182e4c18369 Mon Sep 17 00:00:00 2001
2 From: Emil Renner Berthing <kernel@esmil.dk>
3 Date: Sat, 1 Apr 2023 19:19:33 +0800
4 Subject: [PATCH 023/122] riscv: dts: starfive: Add StarFive JH7110 VisionFive
7 Add a minimal device tree for StarFive JH7110 VisionFive 2 board
8 which has version A and version B. Support booting and basic
9 clock/reset/pinctrl/uart drivers.
11 Tested-by: Tommaso Merciai <tomm.merciai@gmail.com>
12 Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
13 Acked-by: Conor Dooley <conor.dooley@microchip.com>
14 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
15 Co-developed-by: Jianlong Huang <jianlong.huang@starfivetech.com>
16 Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
17 Co-developed-by: Hal Feng <hal.feng@starfivetech.com>
18 Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
19 Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
20 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
22 arch/riscv/boot/dts/starfive/Makefile | 6 +-
23 .../jh7110-starfive-visionfive-2-v1.2a.dts | 13 ++
24 .../jh7110-starfive-visionfive-2-v1.3b.dts | 13 ++
25 .../jh7110-starfive-visionfive-2.dtsi | 215 ++++++++++++++++++
26 4 files changed, 246 insertions(+), 1 deletion(-)
27 create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.2a.dts
28 create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dts
29 create mode 100644 arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
31 --- a/arch/riscv/boot/dts/starfive/Makefile
32 +++ b/arch/riscv/boot/dts/starfive/Makefile
34 # SPDX-License-Identifier: GPL-2.0
35 -dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
36 +dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
37 +dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
39 +dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb
40 +dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb
42 +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.2a.dts
44 +// SPDX-License-Identifier: GPL-2.0 OR MIT
46 + * Copyright (C) 2022 StarFive Technology Co., Ltd.
47 + * Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk>
51 +#include "jh7110-starfive-visionfive-2.dtsi"
54 + model = "StarFive VisionFive 2 v1.2A";
55 + compatible = "starfive,visionfive-2-v1.2a", "starfive,jh7110";
58 +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dts
60 +// SPDX-License-Identifier: GPL-2.0 OR MIT
62 + * Copyright (C) 2022 StarFive Technology Co., Ltd.
63 + * Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk>
67 +#include "jh7110-starfive-visionfive-2.dtsi"
70 + model = "StarFive VisionFive 2 v1.3B";
71 + compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
74 +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
76 +// SPDX-License-Identifier: GPL-2.0 OR MIT
78 + * Copyright (C) 2022 StarFive Technology Co., Ltd.
79 + * Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk>
83 +#include "jh7110.dtsi"
84 +#include "jh7110-pinfunc.h"
85 +#include <dt-bindings/gpio/gpio.h>
97 + stdout-path = "serial0:115200n8";
101 + timebase-frequency = <4000000>;
105 + device_type = "memory";
106 + reg = <0x0 0x40000000 0x1 0x0>;
110 + compatible = "gpio-restart";
111 + gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>;
117 + clock-frequency = <125000000>;
121 + clock-frequency = <50000000>;
125 + clock-frequency = <125000000>;
129 + clock-frequency = <50000000>;
133 + clock-frequency = <12288000>;
137 + clock-frequency = <192000>;
141 + clock-frequency = <12288000>;
145 + clock-frequency = <192000>;
149 + clock-frequency = <12288000>;
153 + clock-frequency = <24000000>;
157 + clock-frequency = <32768>;
161 + clock-frequency = <49152000>;
165 + clock-frequency = <100000>;
166 + i2c-sda-hold-time-ns = <300>;
167 + i2c-sda-falling-time-ns = <510>;
168 + i2c-scl-falling-time-ns = <510>;
169 + pinctrl-names = "default";
170 + pinctrl-0 = <&i2c0_pins>;
175 + clock-frequency = <100000>;
176 + i2c-sda-hold-time-ns = <300>;
177 + i2c-sda-falling-time-ns = <510>;
178 + i2c-scl-falling-time-ns = <510>;
179 + pinctrl-names = "default";
180 + pinctrl-0 = <&i2c2_pins>;
185 + clock-frequency = <100000>;
186 + i2c-sda-hold-time-ns = <300>;
187 + i2c-sda-falling-time-ns = <510>;
188 + i2c-scl-falling-time-ns = <510>;
189 + pinctrl-names = "default";
190 + pinctrl-0 = <&i2c5_pins>;
195 + clock-frequency = <100000>;
196 + i2c-sda-hold-time-ns = <300>;
197 + i2c-sda-falling-time-ns = <510>;
198 + i2c-scl-falling-time-ns = <510>;
199 + pinctrl-names = "default";
200 + pinctrl-0 = <&i2c6_pins>;
205 + i2c0_pins: i2c0-0 {
207 + pinmux = <GPIOMUX(57, GPOUT_LOW,
208 + GPOEN_SYS_I2C0_CLK,
209 + GPI_SYS_I2C0_CLK)>,
210 + <GPIOMUX(58, GPOUT_LOW,
211 + GPOEN_SYS_I2C0_DATA,
212 + GPI_SYS_I2C0_DATA)>;
213 + bias-disable; /* external pull-up */
215 + input-schmitt-enable;
219 + i2c2_pins: i2c2-0 {
221 + pinmux = <GPIOMUX(3, GPOUT_LOW,
222 + GPOEN_SYS_I2C2_CLK,
223 + GPI_SYS_I2C2_CLK)>,
224 + <GPIOMUX(2, GPOUT_LOW,
225 + GPOEN_SYS_I2C2_DATA,
226 + GPI_SYS_I2C2_DATA)>;
227 + bias-disable; /* external pull-up */
229 + input-schmitt-enable;
233 + i2c5_pins: i2c5-0 {
235 + pinmux = <GPIOMUX(19, GPOUT_LOW,
236 + GPOEN_SYS_I2C5_CLK,
237 + GPI_SYS_I2C5_CLK)>,
238 + <GPIOMUX(20, GPOUT_LOW,
239 + GPOEN_SYS_I2C5_DATA,
240 + GPI_SYS_I2C5_DATA)>;
241 + bias-disable; /* external pull-up */
243 + input-schmitt-enable;
247 + i2c6_pins: i2c6-0 {
249 + pinmux = <GPIOMUX(16, GPOUT_LOW,
250 + GPOEN_SYS_I2C6_CLK,
251 + GPI_SYS_I2C6_CLK)>,
252 + <GPIOMUX(17, GPOUT_LOW,
253 + GPOEN_SYS_I2C6_DATA,
254 + GPI_SYS_I2C6_DATA)>;
255 + bias-disable; /* external pull-up */
257 + input-schmitt-enable;
261 + uart0_pins: uart0-0 {
263 + pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX,
267 + drive-strength = <12>;
269 + input-schmitt-disable;
274 + pinmux = <GPIOMUX(6, GPOUT_LOW,
276 + GPI_SYS_UART0_RX)>;
277 + bias-disable; /* external pull-up */
278 + drive-strength = <2>;
280 + input-schmitt-enable;
287 + pinctrl-names = "default";
288 + pinctrl-0 = <&uart0_pins>;