Loading...
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright (C) 2021 StarFive Technology Co., Ltd.
4 * Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk>
5 */
6
7/dts-v1/;
8#include "jh7100.dtsi"
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/leds/common.h>
11#include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h>
12
13/ {
14 aliases {
15 mmc0 = &sdio0;
16 mmc1 = &sdio1;
17 serial0 = &uart3;
18 };
19
20 chosen {
21 stdout-path = "serial0:115200n8";
22 };
23
24 cpus {
25 timebase-frequency = <6250000>;
26 };
27
28 memory@80000000 {
29 device_type = "memory";
30 reg = <0x0 0x80000000 0x2 0x0>;
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led-ack {
37 gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
38 color = <LED_COLOR_ID_GREEN>;
39 function = LED_FUNCTION_HEARTBEAT;
40 linux,default-trigger = "heartbeat";
41 label = "ack";
42 };
43 };
44
45 reserved-memory {
46 #address-cells = <2>;
47 #size-cells = <2>;
48 ranges;
49
50 dma-reserved@fa000000 {
51 reg = <0x0 0xfa000000 0x0 0x1000000>;
52 no-map;
53 };
54
55 linux,dma@107a000000 {
56 compatible = "shared-dma-pool";
57 reg = <0x10 0x7a000000 0x0 0x1000000>;
58 no-map;
59 linux,dma-default;
60 };
61 };
62
63 soc {
64 dma-ranges = <0x00 0x80000000 0x00 0x80000000 0x00 0x7a000000>,
65 <0x00 0xfa000000 0x10 0x7a000000 0x00 0x01000000>,
66 <0x00 0xfb000000 0x00 0xfb000000 0x07 0x85000000>;
67 };
68
69 wifi_pwrseq: wifi-pwrseq {
70 compatible = "mmc-pwrseq-simple";
71 reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
72 };
73};
74
75&gpio {
76 i2c0_pins: i2c0-0 {
77 i2c-pins {
78 pinmux = <GPIOMUX(62, GPO_LOW,
79 GPO_I2C0_PAD_SCK_OEN,
80 GPI_I2C0_PAD_SCK_IN)>,
81 <GPIOMUX(61, GPO_LOW,
82 GPO_I2C0_PAD_SDA_OEN,
83 GPI_I2C0_PAD_SDA_IN)>;
84 bias-disable; /* external pull-up */
85 input-enable;
86 input-schmitt-enable;
87 };
88 };
89
90 i2c1_pins: i2c1-0 {
91 i2c-pins {
92 pinmux = <GPIOMUX(47, GPO_LOW,
93 GPO_I2C1_PAD_SCK_OEN,
94 GPI_I2C1_PAD_SCK_IN)>,
95 <GPIOMUX(48, GPO_LOW,
96 GPO_I2C1_PAD_SDA_OEN,
97 GPI_I2C1_PAD_SDA_IN)>;
98 bias-pull-up;
99 input-enable;
100 input-schmitt-enable;
101 };
102 };
103
104 i2c2_pins: i2c2-0 {
105 i2c-pins {
106 pinmux = <GPIOMUX(60, GPO_LOW,
107 GPO_I2C2_PAD_SCK_OEN,
108 GPI_I2C2_PAD_SCK_IN)>,
109 <GPIOMUX(59, GPO_LOW,
110 GPO_I2C2_PAD_SDA_OEN,
111 GPI_I2C2_PAD_SDA_IN)>;
112 bias-disable; /* external pull-up */
113 input-enable;
114 input-schmitt-enable;
115 };
116 };
117
118 sdio0_pins: sdio0-0 {
119 clk-pins {
120 pinmux = <GPIOMUX(54, GPO_SDIO0_PAD_CCLK_OUT,
121 GPO_ENABLE, GPI_NONE)>;
122 bias-disable;
123 input-disable;
124 input-schmitt-disable;
125 };
126 sdio-pins {
127 pinmux = <GPIOMUX(55, GPO_LOW, GPO_DISABLE,
128 GPI_SDIO0_PAD_CARD_DETECT_N)>,
129 <GPIOMUX(53,
130 GPO_SDIO0_PAD_CCMD_OUT,
131 GPO_SDIO0_PAD_CCMD_OEN,
132 GPI_SDIO0_PAD_CCMD_IN)>,
133 <GPIOMUX(49,
134 GPO_SDIO0_PAD_CDATA_OUT_BIT0,
135 GPO_SDIO0_PAD_CDATA_OEN_BIT0,
136 GPI_SDIO0_PAD_CDATA_IN_BIT0)>,
137 <GPIOMUX(50,
138 GPO_SDIO0_PAD_CDATA_OUT_BIT1,
139 GPO_SDIO0_PAD_CDATA_OEN_BIT1,
140 GPI_SDIO0_PAD_CDATA_IN_BIT1)>,
141 <GPIOMUX(51,
142 GPO_SDIO0_PAD_CDATA_OUT_BIT2,
143 GPO_SDIO0_PAD_CDATA_OEN_BIT2,
144 GPI_SDIO0_PAD_CDATA_IN_BIT2)>,
145 <GPIOMUX(52,
146 GPO_SDIO0_PAD_CDATA_OUT_BIT3,
147 GPO_SDIO0_PAD_CDATA_OEN_BIT3,
148 GPI_SDIO0_PAD_CDATA_IN_BIT3)>;
149 bias-pull-up;
150 input-enable;
151 input-schmitt-enable;
152 };
153 };
154
155 sdio1_pins: sdio1-0 {
156 clk-pins {
157 pinmux = <GPIOMUX(33, GPO_SDIO1_PAD_CCLK_OUT,
158 GPO_ENABLE, GPI_NONE)>;
159 bias-disable;
160 input-disable;
161 input-schmitt-disable;
162 };
163 sdio-pins {
164 pinmux = <GPIOMUX(29,
165 GPO_SDIO1_PAD_CCMD_OUT,
166 GPO_SDIO1_PAD_CCMD_OEN,
167 GPI_SDIO1_PAD_CCMD_IN)>,
168 <GPIOMUX(36,
169 GPO_SDIO1_PAD_CDATA_OUT_BIT0,
170 GPO_SDIO1_PAD_CDATA_OEN_BIT0,
171 GPI_SDIO1_PAD_CDATA_IN_BIT0)>,
172 <GPIOMUX(30,
173 GPO_SDIO1_PAD_CDATA_OUT_BIT1,
174 GPO_SDIO1_PAD_CDATA_OEN_BIT1,
175 GPI_SDIO1_PAD_CDATA_IN_BIT1)>,
176 <GPIOMUX(34,
177 GPO_SDIO1_PAD_CDATA_OUT_BIT2,
178 GPO_SDIO1_PAD_CDATA_OEN_BIT2,
179 GPI_SDIO1_PAD_CDATA_IN_BIT2)>,
180 <GPIOMUX(31,
181 GPO_SDIO1_PAD_CDATA_OUT_BIT3,
182 GPO_SDIO1_PAD_CDATA_OEN_BIT3,
183 GPI_SDIO1_PAD_CDATA_IN_BIT3)>;
184 bias-pull-up;
185 input-enable;
186 input-schmitt-enable;
187 };
188 };
189
190 uart3_pins: uart3-0 {
191 rx-pins {
192 pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
193 GPI_UART3_PAD_SIN)>;
194 bias-pull-up;
195 drive-strength = <14>;
196 input-enable;
197 input-schmitt-enable;
198 slew-rate = <0>;
199 };
200 tx-pins {
201 pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
202 GPO_ENABLE, GPI_NONE)>;
203 bias-disable;
204 drive-strength = <35>;
205 input-disable;
206 input-schmitt-disable;
207 slew-rate = <0>;
208 };
209 };
210};
211
212&i2c0 {
213 clock-frequency = <100000>;
214 i2c-sda-hold-time-ns = <300>;
215 i2c-sda-falling-time-ns = <500>;
216 i2c-scl-falling-time-ns = <500>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&i2c0_pins>;
219 status = "okay";
220
221 pmic@5e {
222 compatible = "ti,tps65086";
223 reg = <0x5e>;
224 gpio-controller;
225 #gpio-cells = <2>;
226
227 regulators {
228 };
229 };
230};
231
232&i2c1 {
233 clock-frequency = <400000>;
234 i2c-sda-hold-time-ns = <300>;
235 i2c-sda-falling-time-ns = <100>;
236 i2c-scl-falling-time-ns = <100>;
237 pinctrl-names = "default";
238 pinctrl-0 = <&i2c1_pins>;
239 status = "okay";
240};
241
242&i2c2 {
243 clock-frequency = <100000>;
244 i2c-sda-hold-time-ns = <300>;
245 i2c-sda-falling-time-ns = <500>;
246 i2c-scl-falling-time-ns = <500>;
247 pinctrl-names = "default";
248 pinctrl-0 = <&i2c2_pins>;
249 status = "okay";
250};
251
252&osc_sys {
253 clock-frequency = <25000000>;
254};
255
256&osc_aud {
257 clock-frequency = <27000000>;
258};
259
260&sdio0 {
261 broken-cd;
262 bus-width = <4>;
263 cap-sd-highspeed;
264 pinctrl-names = "default";
265 pinctrl-0 = <&sdio0_pins>;
266 status = "okay";
267};
268
269&sdio1 {
270 #address-cells = <1>;
271 #size-cells = <0>;
272 bus-width = <4>;
273 cap-sd-highspeed;
274 cap-sdio-irq;
275 cap-power-off-card;
276 mmc-pwrseq = <&wifi_pwrseq>;
277 non-removable;
278 pinctrl-names = "default";
279 pinctrl-0 = <&sdio1_pins>;
280 status = "okay";
281
282 wifi@1 {
283 compatible = "brcm,bcm4329-fmac";
284 reg = <1>;
285 };
286};
287
288&uart3 {
289 pinctrl-names = "default";
290 pinctrl-0 = <&uart3_pins>;
291 status = "okay";
292};
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright (C) 2021 StarFive Technology Co., Ltd.
4 * Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk>
5 */
6
7/dts-v1/;
8#include "jh7100.dtsi"
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/leds/common.h>
11#include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h>
12
13/ {
14 aliases {
15 mmc0 = &sdio0;
16 mmc1 = &sdio1;
17 serial0 = &uart3;
18 };
19
20 chosen {
21 stdout-path = "serial0:115200n8";
22 };
23
24 cpus {
25 timebase-frequency = <6250000>;
26 };
27
28 memory@80000000 {
29 device_type = "memory";
30 reg = <0x0 0x80000000 0x2 0x0>;
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led-ack {
37 gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
38 color = <LED_COLOR_ID_GREEN>;
39 function = LED_FUNCTION_HEARTBEAT;
40 linux,default-trigger = "heartbeat";
41 label = "ack";
42 };
43 };
44
45 reserved-memory {
46 #address-cells = <2>;
47 #size-cells = <2>;
48 ranges;
49
50 dma-reserved@fa000000 {
51 reg = <0x0 0xfa000000 0x0 0x1000000>;
52 no-map;
53 };
54
55 linux,dma@107a000000 {
56 compatible = "shared-dma-pool";
57 reg = <0x10 0x7a000000 0x0 0x1000000>;
58 no-map;
59 linux,dma-default;
60 };
61 };
62
63 soc {
64 dma-ranges = <0x00 0x80000000 0x00 0x80000000 0x00 0x7a000000>,
65 <0x00 0xfa000000 0x10 0x7a000000 0x00 0x01000000>,
66 <0x00 0xfb000000 0x00 0xfb000000 0x07 0x85000000>;
67 };
68
69 wifi_pwrseq: wifi-pwrseq {
70 compatible = "mmc-pwrseq-simple";
71 reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
72 };
73};
74
75&gmac {
76 pinctrl-names = "default";
77 pinctrl-0 = <&gmac_pins>;
78 phy-mode = "rgmii-id";
79 status = "okay";
80
81 mdio: mdio {
82 #address-cells = <1>;
83 #size-cells = <0>;
84 compatible = "snps,dwmac-mdio";
85 };
86};
87
88&gpio {
89 gmac_pins: gmac-0 {
90 gtxclk-pins {
91 pins = <PAD_FUNC_SHARE(115)>;
92 bias-pull-up;
93 drive-strength = <35>;
94 input-enable;
95 input-schmitt-enable;
96 slew-rate = <0>;
97 };
98 miitxclk-pins {
99 pins = <PAD_FUNC_SHARE(116)>;
100 bias-pull-up;
101 drive-strength = <14>;
102 input-enable;
103 input-schmitt-disable;
104 slew-rate = <0>;
105 };
106 tx-pins {
107 pins = <PAD_FUNC_SHARE(117)>,
108 <PAD_FUNC_SHARE(119)>,
109 <PAD_FUNC_SHARE(120)>,
110 <PAD_FUNC_SHARE(121)>,
111 <PAD_FUNC_SHARE(122)>,
112 <PAD_FUNC_SHARE(123)>,
113 <PAD_FUNC_SHARE(124)>,
114 <PAD_FUNC_SHARE(125)>,
115 <PAD_FUNC_SHARE(126)>;
116 bias-pull-up;
117 drive-strength = <35>;
118 input-disable;
119 input-schmitt-disable;
120 slew-rate = <0>;
121 };
122 rxclk-pins {
123 pins = <PAD_FUNC_SHARE(127)>;
124 bias-pull-up;
125 drive-strength = <14>;
126 input-enable;
127 input-schmitt-disable;
128 slew-rate = <6>;
129 };
130 rxer-pins {
131 pins = <PAD_FUNC_SHARE(129)>;
132 bias-pull-up;
133 drive-strength = <14>;
134 input-enable;
135 input-schmitt-disable;
136 slew-rate = <0>;
137 };
138 rx-pins {
139 pins = <PAD_FUNC_SHARE(128)>,
140 <PAD_FUNC_SHARE(130)>,
141 <PAD_FUNC_SHARE(131)>,
142 <PAD_FUNC_SHARE(132)>,
143 <PAD_FUNC_SHARE(133)>,
144 <PAD_FUNC_SHARE(134)>,
145 <PAD_FUNC_SHARE(135)>,
146 <PAD_FUNC_SHARE(136)>,
147 <PAD_FUNC_SHARE(137)>,
148 <PAD_FUNC_SHARE(138)>,
149 <PAD_FUNC_SHARE(139)>,
150 <PAD_FUNC_SHARE(140)>,
151 <PAD_FUNC_SHARE(141)>;
152 bias-pull-up;
153 drive-strength = <14>;
154 input-enable;
155 input-schmitt-enable;
156 slew-rate = <0>;
157 };
158 };
159
160 i2c0_pins: i2c0-0 {
161 i2c-pins {
162 pinmux = <GPIOMUX(62, GPO_LOW,
163 GPO_I2C0_PAD_SCK_OEN,
164 GPI_I2C0_PAD_SCK_IN)>,
165 <GPIOMUX(61, GPO_LOW,
166 GPO_I2C0_PAD_SDA_OEN,
167 GPI_I2C0_PAD_SDA_IN)>;
168 bias-disable; /* external pull-up */
169 input-enable;
170 input-schmitt-enable;
171 };
172 };
173
174 i2c1_pins: i2c1-0 {
175 i2c-pins {
176 pinmux = <GPIOMUX(47, GPO_LOW,
177 GPO_I2C1_PAD_SCK_OEN,
178 GPI_I2C1_PAD_SCK_IN)>,
179 <GPIOMUX(48, GPO_LOW,
180 GPO_I2C1_PAD_SDA_OEN,
181 GPI_I2C1_PAD_SDA_IN)>;
182 bias-pull-up;
183 input-enable;
184 input-schmitt-enable;
185 };
186 };
187
188 i2c2_pins: i2c2-0 {
189 i2c-pins {
190 pinmux = <GPIOMUX(60, GPO_LOW,
191 GPO_I2C2_PAD_SCK_OEN,
192 GPI_I2C2_PAD_SCK_IN)>,
193 <GPIOMUX(59, GPO_LOW,
194 GPO_I2C2_PAD_SDA_OEN,
195 GPI_I2C2_PAD_SDA_IN)>;
196 bias-disable; /* external pull-up */
197 input-enable;
198 input-schmitt-enable;
199 };
200 };
201
202 pwm_pins: pwm-0 {
203 pwm-pins {
204 pinmux = <GPIOMUX(7,
205 GPO_PWM_PAD_OUT_BIT0,
206 GPO_PWM_PAD_OE_N_BIT0,
207 GPI_NONE)>,
208 <GPIOMUX(5,
209 GPO_PWM_PAD_OUT_BIT1,
210 GPO_PWM_PAD_OE_N_BIT1,
211 GPI_NONE)>;
212 bias-disable;
213 drive-strength = <35>;
214 input-disable;
215 input-schmitt-disable;
216 slew-rate = <0>;
217 };
218 };
219
220 sdio0_pins: sdio0-0 {
221 clk-pins {
222 pinmux = <GPIOMUX(54, GPO_SDIO0_PAD_CCLK_OUT,
223 GPO_ENABLE, GPI_NONE)>;
224 bias-disable;
225 input-disable;
226 input-schmitt-disable;
227 };
228 sdio-pins {
229 pinmux = <GPIOMUX(55, GPO_LOW, GPO_DISABLE,
230 GPI_SDIO0_PAD_CARD_DETECT_N)>,
231 <GPIOMUX(53,
232 GPO_SDIO0_PAD_CCMD_OUT,
233 GPO_SDIO0_PAD_CCMD_OEN,
234 GPI_SDIO0_PAD_CCMD_IN)>,
235 <GPIOMUX(49,
236 GPO_SDIO0_PAD_CDATA_OUT_BIT0,
237 GPO_SDIO0_PAD_CDATA_OEN_BIT0,
238 GPI_SDIO0_PAD_CDATA_IN_BIT0)>,
239 <GPIOMUX(50,
240 GPO_SDIO0_PAD_CDATA_OUT_BIT1,
241 GPO_SDIO0_PAD_CDATA_OEN_BIT1,
242 GPI_SDIO0_PAD_CDATA_IN_BIT1)>,
243 <GPIOMUX(51,
244 GPO_SDIO0_PAD_CDATA_OUT_BIT2,
245 GPO_SDIO0_PAD_CDATA_OEN_BIT2,
246 GPI_SDIO0_PAD_CDATA_IN_BIT2)>,
247 <GPIOMUX(52,
248 GPO_SDIO0_PAD_CDATA_OUT_BIT3,
249 GPO_SDIO0_PAD_CDATA_OEN_BIT3,
250 GPI_SDIO0_PAD_CDATA_IN_BIT3)>;
251 bias-pull-up;
252 input-enable;
253 input-schmitt-enable;
254 };
255 };
256
257 sdio1_pins: sdio1-0 {
258 clk-pins {
259 pinmux = <GPIOMUX(33, GPO_SDIO1_PAD_CCLK_OUT,
260 GPO_ENABLE, GPI_NONE)>;
261 bias-disable;
262 input-disable;
263 input-schmitt-disable;
264 };
265 sdio-pins {
266 pinmux = <GPIOMUX(29,
267 GPO_SDIO1_PAD_CCMD_OUT,
268 GPO_SDIO1_PAD_CCMD_OEN,
269 GPI_SDIO1_PAD_CCMD_IN)>,
270 <GPIOMUX(36,
271 GPO_SDIO1_PAD_CDATA_OUT_BIT0,
272 GPO_SDIO1_PAD_CDATA_OEN_BIT0,
273 GPI_SDIO1_PAD_CDATA_IN_BIT0)>,
274 <GPIOMUX(30,
275 GPO_SDIO1_PAD_CDATA_OUT_BIT1,
276 GPO_SDIO1_PAD_CDATA_OEN_BIT1,
277 GPI_SDIO1_PAD_CDATA_IN_BIT1)>,
278 <GPIOMUX(34,
279 GPO_SDIO1_PAD_CDATA_OUT_BIT2,
280 GPO_SDIO1_PAD_CDATA_OEN_BIT2,
281 GPI_SDIO1_PAD_CDATA_IN_BIT2)>,
282 <GPIOMUX(31,
283 GPO_SDIO1_PAD_CDATA_OUT_BIT3,
284 GPO_SDIO1_PAD_CDATA_OEN_BIT3,
285 GPI_SDIO1_PAD_CDATA_IN_BIT3)>;
286 bias-pull-up;
287 input-enable;
288 input-schmitt-enable;
289 };
290 };
291
292 uart3_pins: uart3-0 {
293 rx-pins {
294 pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
295 GPI_UART3_PAD_SIN)>;
296 bias-pull-up;
297 drive-strength = <14>;
298 input-enable;
299 input-schmitt-enable;
300 slew-rate = <0>;
301 };
302 tx-pins {
303 pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
304 GPO_ENABLE, GPI_NONE)>;
305 bias-disable;
306 drive-strength = <35>;
307 input-disable;
308 input-schmitt-disable;
309 slew-rate = <0>;
310 };
311 };
312};
313
314&i2c0 {
315 clock-frequency = <100000>;
316 i2c-sda-hold-time-ns = <300>;
317 i2c-sda-falling-time-ns = <500>;
318 i2c-scl-falling-time-ns = <500>;
319 pinctrl-names = "default";
320 pinctrl-0 = <&i2c0_pins>;
321 status = "okay";
322
323 pmic@5e {
324 compatible = "ti,tps65086";
325 reg = <0x5e>;
326 gpio-controller;
327 #gpio-cells = <2>;
328
329 regulators {
330 };
331 };
332};
333
334&i2c1 {
335 clock-frequency = <400000>;
336 i2c-sda-hold-time-ns = <300>;
337 i2c-sda-falling-time-ns = <100>;
338 i2c-scl-falling-time-ns = <100>;
339 pinctrl-names = "default";
340 pinctrl-0 = <&i2c1_pins>;
341 status = "okay";
342};
343
344&i2c2 {
345 clock-frequency = <100000>;
346 i2c-sda-hold-time-ns = <300>;
347 i2c-sda-falling-time-ns = <500>;
348 i2c-scl-falling-time-ns = <500>;
349 pinctrl-names = "default";
350 pinctrl-0 = <&i2c2_pins>;
351 status = "okay";
352};
353
354&osc_sys {
355 clock-frequency = <25000000>;
356};
357
358&osc_aud {
359 clock-frequency = <27000000>;
360};
361
362&pwm {
363 pinctrl-names = "default";
364 pinctrl-0 = <&pwm_pins>;
365 status = "okay";
366};
367
368&sdio0 {
369 broken-cd;
370 bus-width = <4>;
371 cap-sd-highspeed;
372 pinctrl-names = "default";
373 pinctrl-0 = <&sdio0_pins>;
374 status = "okay";
375};
376
377&sdio1 {
378 #address-cells = <1>;
379 #size-cells = <0>;
380 bus-width = <4>;
381 cap-sd-highspeed;
382 cap-sdio-irq;
383 cap-power-off-card;
384 mmc-pwrseq = <&wifi_pwrseq>;
385 non-removable;
386 pinctrl-names = "default";
387 pinctrl-0 = <&sdio1_pins>;
388 status = "okay";
389
390 wifi@1 {
391 compatible = "brcm,bcm4329-fmac";
392 reg = <1>;
393 };
394};
395
396&uart3 {
397 pinctrl-names = "default";
398 pinctrl-0 = <&uart3_pins>;
399 status = "okay";
400};