1 From 2101233d71b74e33de33e4cc292c6a8cf5da9d42 Mon Sep 17 00:00:00 2001
2 From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
3 Date: Tue, 18 Oct 2022 00:05:41 +0300
4 Subject: [PATCH 025/122] riscv: dts: starfive: Add common DT for JH7100 based
7 In preparation for adding initial device tree support for the StarFive
8 VisionFive board, which is similar with BeagleV Starlight, move most
9 of the content from jh7100-beaglev-starlight.dts to a new file, to be
10 shared between the two boards.
12 Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
13 Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
14 Reviewed-by: Matthias Brugger <mbrugger@suse.com>
15 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
17 .../dts/starfive/jh7100-beaglev-starlight.dts | 153 +----------------
18 .../boot/dts/starfive/jh7100-common.dtsi | 161 ++++++++++++++++++
19 2 files changed, 162 insertions(+), 152 deletions(-)
20 create mode 100644 arch/riscv/boot/dts/starfive/jh7100-common.dtsi
22 --- a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
23 +++ b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
28 -#include "jh7100.dtsi"
29 -#include <dt-bindings/gpio/gpio.h>
30 -#include <dt-bindings/leds/common.h>
31 -#include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h>
32 +#include "jh7100-common.dtsi"
35 model = "BeagleV Starlight Beta";
36 compatible = "beagle,beaglev-starlight-jh7100-r0", "starfive,jh7100";
43 - stdout-path = "serial0:115200n8";
47 - timebase-frequency = <6250000>;
51 - device_type = "memory";
52 - reg = <0x0 0x80000000 0x2 0x0>;
56 - compatible = "gpio-leds";
59 - gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
60 - color = <LED_COLOR_ID_GREEN>;
61 - function = LED_FUNCTION_HEARTBEAT;
62 - linux,default-trigger = "heartbeat";
71 - pinmux = <GPIOMUX(62, GPO_LOW,
72 - GPO_I2C0_PAD_SCK_OEN,
73 - GPI_I2C0_PAD_SCK_IN)>,
74 - <GPIOMUX(61, GPO_LOW,
75 - GPO_I2C0_PAD_SDA_OEN,
76 - GPI_I2C0_PAD_SDA_IN)>;
77 - bias-disable; /* external pull-up */
79 - input-schmitt-enable;
85 - pinmux = <GPIOMUX(47, GPO_LOW,
86 - GPO_I2C1_PAD_SCK_OEN,
87 - GPI_I2C1_PAD_SCK_IN)>,
88 - <GPIOMUX(48, GPO_LOW,
89 - GPO_I2C1_PAD_SDA_OEN,
90 - GPI_I2C1_PAD_SDA_IN)>;
93 - input-schmitt-enable;
99 - pinmux = <GPIOMUX(60, GPO_LOW,
100 - GPO_I2C2_PAD_SCK_OEN,
101 - GPI_I2C2_PAD_SCK_IN)>,
102 - <GPIOMUX(59, GPO_LOW,
103 - GPO_I2C2_PAD_SDA_OEN,
104 - GPI_I2C2_PAD_SDA_IN)>;
105 - bias-disable; /* external pull-up */
107 - input-schmitt-enable;
111 - uart3_pins: uart3-0 {
113 - pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
114 - GPI_UART3_PAD_SIN)>;
116 - drive-strength = <14>;
118 - input-schmitt-enable;
122 - pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
123 - GPO_ENABLE, GPI_NONE)>;
125 - drive-strength = <35>;
127 - input-schmitt-disable;
134 - clock-frequency = <100000>;
135 - i2c-sda-hold-time-ns = <300>;
136 - i2c-sda-falling-time-ns = <500>;
137 - i2c-scl-falling-time-ns = <500>;
138 - pinctrl-names = "default";
139 - pinctrl-0 = <&i2c0_pins>;
143 - compatible = "ti,tps65086";
154 - clock-frequency = <400000>;
155 - i2c-sda-hold-time-ns = <300>;
156 - i2c-sda-falling-time-ns = <100>;
157 - i2c-scl-falling-time-ns = <100>;
158 - pinctrl-names = "default";
159 - pinctrl-0 = <&i2c1_pins>;
164 - clock-frequency = <100000>;
165 - i2c-sda-hold-time-ns = <300>;
166 - i2c-sda-falling-time-ns = <500>;
167 - i2c-scl-falling-time-ns = <500>;
168 - pinctrl-names = "default";
169 - pinctrl-0 = <&i2c2_pins>;
174 - clock-frequency = <25000000>;
178 - clock-frequency = <27000000>;
182 - pinctrl-names = "default";
183 - pinctrl-0 = <&uart3_pins>;
187 +++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
189 +// SPDX-License-Identifier: GPL-2.0 OR MIT
191 + * Copyright (C) 2021 StarFive Technology Co., Ltd.
192 + * Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk>
196 +#include "jh7100.dtsi"
197 +#include <dt-bindings/gpio/gpio.h>
198 +#include <dt-bindings/leds/common.h>
199 +#include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h>
207 + stdout-path = "serial0:115200n8";
211 + timebase-frequency = <6250000>;
215 + device_type = "memory";
216 + reg = <0x0 0x80000000 0x2 0x0>;
220 + compatible = "gpio-leds";
223 + gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
224 + color = <LED_COLOR_ID_GREEN>;
225 + function = LED_FUNCTION_HEARTBEAT;
226 + linux,default-trigger = "heartbeat";
233 + i2c0_pins: i2c0-0 {
235 + pinmux = <GPIOMUX(62, GPO_LOW,
236 + GPO_I2C0_PAD_SCK_OEN,
237 + GPI_I2C0_PAD_SCK_IN)>,
238 + <GPIOMUX(61, GPO_LOW,
239 + GPO_I2C0_PAD_SDA_OEN,
240 + GPI_I2C0_PAD_SDA_IN)>;
241 + bias-disable; /* external pull-up */
243 + input-schmitt-enable;
247 + i2c1_pins: i2c1-0 {
249 + pinmux = <GPIOMUX(47, GPO_LOW,
250 + GPO_I2C1_PAD_SCK_OEN,
251 + GPI_I2C1_PAD_SCK_IN)>,
252 + <GPIOMUX(48, GPO_LOW,
253 + GPO_I2C1_PAD_SDA_OEN,
254 + GPI_I2C1_PAD_SDA_IN)>;
257 + input-schmitt-enable;
261 + i2c2_pins: i2c2-0 {
263 + pinmux = <GPIOMUX(60, GPO_LOW,
264 + GPO_I2C2_PAD_SCK_OEN,
265 + GPI_I2C2_PAD_SCK_IN)>,
266 + <GPIOMUX(59, GPO_LOW,
267 + GPO_I2C2_PAD_SDA_OEN,
268 + GPI_I2C2_PAD_SDA_IN)>;
269 + bias-disable; /* external pull-up */
271 + input-schmitt-enable;
275 + uart3_pins: uart3-0 {
277 + pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
278 + GPI_UART3_PAD_SIN)>;
280 + drive-strength = <14>;
282 + input-schmitt-enable;
286 + pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
287 + GPO_ENABLE, GPI_NONE)>;
289 + drive-strength = <35>;
291 + input-schmitt-disable;
298 + clock-frequency = <100000>;
299 + i2c-sda-hold-time-ns = <300>;
300 + i2c-sda-falling-time-ns = <500>;
301 + i2c-scl-falling-time-ns = <500>;
302 + pinctrl-names = "default";
303 + pinctrl-0 = <&i2c0_pins>;
307 + compatible = "ti,tps65086";
318 + clock-frequency = <400000>;
319 + i2c-sda-hold-time-ns = <300>;
320 + i2c-sda-falling-time-ns = <100>;
321 + i2c-scl-falling-time-ns = <100>;
322 + pinctrl-names = "default";
323 + pinctrl-0 = <&i2c1_pins>;
328 + clock-frequency = <100000>;
329 + i2c-sda-hold-time-ns = <300>;
330 + i2c-sda-falling-time-ns = <500>;
331 + i2c-scl-falling-time-ns = <500>;
332 + pinctrl-names = "default";
333 + pinctrl-0 = <&i2c2_pins>;
338 + clock-frequency = <25000000>;
342 + clock-frequency = <27000000>;
346 + pinctrl-names = "default";
347 + pinctrl-0 = <&uart3_pins>;