blob: f2c6bec9298815f2c6c76df15d37c8de2889eb84 [file] [log] [blame]
Yanhong Wang5efc9342023-03-29 11:42:23 +08001// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright (C) 2022 StarFive Technology Co., Ltd.
4 */
5
6/dts-v1/;
7
8#include "jh7110.dtsi"
9#include <dt-bindings/pinctrl/pinctrl-starfive-jh7110.h>
Mason Huo23dfd812023-07-25 17:46:50 +080010#include <dt-bindings/gpio/gpio.h>
Yanhong Wang5efc9342023-03-29 11:42:23 +080011/ {
12 aliases {
13 serial0 = &uart0;
14 spi0 = &qspi;
15 mmc0 = &mmc0;
16 mmc1 = &mmc1;
17 i2c0 = &i2c0;
18 i2c2 = &i2c2;
19 i2c5 = &i2c5;
20 i2c6 = &i2c6;
Yanhong Wang7f63bd92023-06-15 17:36:44 +080021 ethernet0 = &gmac0;
22 ethernet1 = &gmac1;
Yanhong Wang5efc9342023-03-29 11:42:23 +080023 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 };
28
29 cpus {
30 timebase-frequency = <4000000>;
31 };
32
33 memory@40000000 {
34 device_type = "memory";
35 reg = <0x0 0x40000000 0x2 0x0>;
36 };
Jaehoon Chung9adf6962023-10-31 17:24:38 +090037
38 gpio-restart {
39 compatible = "gpio-restart";
40 gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>;
41 };
Yanhong Wang5efc9342023-03-29 11:42:23 +080042};
43
44&osc {
45 clock-frequency = <24000000>;
46};
47
48&rtc_osc {
49 clock-frequency = <32768>;
50};
51
52&gmac0_rmii_refin {
53 clock-frequency = <50000000>;
54};
55
56&gmac0_rgmii_rxin {
57 clock-frequency = <125000000>;
58};
59
60&gmac1_rmii_refin {
61 clock-frequency = <50000000>;
62};
63
64&gmac1_rgmii_rxin {
65 clock-frequency = <125000000>;
66};
67
68&i2stx_bclk_ext {
69 clock-frequency = <12288000>;
70};
71
72&i2stx_lrck_ext {
73 clock-frequency = <192000>;
74};
75
76&i2srx_bclk_ext {
77 clock-frequency = <12288000>;
78};
79
80&i2srx_lrck_ext {
81 clock-frequency = <192000>;
82};
83
84&tdm_ext {
85 clock-frequency = <49152000>;
86};
87
88&mclk_ext {
89 clock-frequency = <12288000>;
90};
91
92&uart0 {
93 reg-offset = <0>;
94 current-speed = <115200>;
95 clock-frequency = <24000000>;
96 pinctrl-names = "default";
97 pinctrl-0 = <&uart0_pins>;
98 status = "okay";
99};
100
101&i2c0 {
102 clock-frequency = <100000>;
103 i2c-sda-hold-time-ns = <300>;
104 i2c-sda-falling-time-ns = <510>;
105 i2c-scl-falling-time-ns = <510>;
106 pinctrl-names = "default";
107 pinctrl-0 = <&i2c0_pins>;
108 status = "okay";
109};
110
111&i2c2 {
112 clock-frequency = <100000>;
113 i2c-sda-hold-time-ns = <300>;
114 i2c-sda-falling-time-ns = <510>;
115 i2c-scl-falling-time-ns = <510>;
116 pinctrl-names = "default";
117 pinctrl-0 = <&i2c2_pins>;
118 status = "okay";
119};
120
121&i2c5 {
122 clock-frequency = <100000>;
123 i2c-sda-hold-time-ns = <300>;
124 i2c-sda-falling-time-ns = <510>;
125 i2c-scl-falling-time-ns = <510>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&i2c5_pins>;
128 status = "okay";
Yanhong Wangd4269422023-06-15 17:36:49 +0800129
Nam Caocf44e5c2024-01-29 09:43:09 +0100130 pmic@36 {
131 compatible = "x-powers,axp15060";
132 reg = <0x36>;
133 };
134
Yanhong Wangd4269422023-06-15 17:36:49 +0800135 eeprom@50 {
136 compatible = "atmel,24c04";
137 reg = <0x50>;
138 pagesize = <16>;
139 };
Yanhong Wang5efc9342023-03-29 11:42:23 +0800140};
141
142&i2c6 {
143 clock-frequency = <100000>;
144 i2c-sda-hold-time-ns = <300>;
145 i2c-sda-falling-time-ns = <510>;
146 i2c-scl-falling-time-ns = <510>;
147 pinctrl-names = "default";
148 pinctrl-0 = <&i2c6_pins>;
149 status = "okay";
150};
151
152&sysgpio {
153 status = "okay";
154 uart0_pins: uart0-0 {
155 tx-pins {
156 pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX,
157 GPOEN_ENABLE,
158 GPI_NONE)>;
159 bias-disable;
160 drive-strength = <12>;
161 input-disable;
162 input-schmitt-disable;
163 slew-rate = <0>;
164 };
165
166 rx-pins {
167 pinmux = <GPIOMUX(6, GPOUT_LOW,
168 GPOEN_DISABLE,
169 GPI_SYS_UART0_RX)>;
170 bias-disable; /* external pull-up */
171 drive-strength = <2>;
172 input-enable;
173 input-schmitt-enable;
174 slew-rate = <0>;
175 };
176 };
177
178 i2c0_pins: i2c0-0 {
179 i2c-pins {
180 pinmux = <GPIOMUX(57, GPOUT_LOW,
181 GPOEN_SYS_I2C0_CLK,
182 GPI_SYS_I2C0_CLK)>,
183 <GPIOMUX(58, GPOUT_LOW,
184 GPOEN_SYS_I2C0_DATA,
185 GPI_SYS_I2C0_DATA)>;
186 bias-disable; /* external pull-up */
187 input-enable;
188 input-schmitt-enable;
189 };
190 };
191
192 i2c2_pins: i2c2-0 {
193 i2c-pins {
194 pinmux = <GPIOMUX(3, GPOUT_LOW,
195 GPOEN_SYS_I2C2_CLK,
196 GPI_SYS_I2C2_CLK)>,
197 <GPIOMUX(2, GPOUT_LOW,
198 GPOEN_SYS_I2C2_DATA,
199 GPI_SYS_I2C2_DATA)>;
200 bias-disable; /* external pull-up */
201 input-enable;
202 input-schmitt-enable;
203 };
204 };
205
206 i2c5_pins: i2c5-0 {
207 i2c-pins {
208 pinmux = <GPIOMUX(19, GPOUT_LOW,
209 GPOEN_SYS_I2C5_CLK,
210 GPI_SYS_I2C5_CLK)>,
211 <GPIOMUX(20, GPOUT_LOW,
212 GPOEN_SYS_I2C5_DATA,
213 GPI_SYS_I2C5_DATA)>;
214 bias-disable; /* external pull-up */
215 input-enable;
216 input-schmitt-enable;
217 };
218 };
219
220 i2c6_pins: i2c6-0 {
221 i2c-pins {
222 pinmux = <GPIOMUX(16, GPOUT_LOW,
223 GPOEN_SYS_I2C6_CLK,
224 GPI_SYS_I2C6_CLK)>,
225 <GPIOMUX(17, GPOUT_LOW,
226 GPOEN_SYS_I2C6_DATA,
227 GPI_SYS_I2C6_DATA)>;
228 bias-disable; /* external pull-up */
229 input-enable;
230 input-schmitt-enable;
231 };
232 };
233
234 mmc0_pins: mmc0-pins {
235 mmc0-pins-rest {
236 pinmux = <GPIOMUX(62, GPOUT_SYS_SDIO0_RST,
237 GPOEN_ENABLE, GPI_NONE)>;
238 bias-pull-up;
239 drive-strength = <12>;
240 input-disable;
241 input-schmitt-disable;
242 slew-rate = <0>;
243 };
244 };
245
246 mmc1_pins: mmc1-pins {
247 mmc1-pins0 {
248 pinmux = <GPIOMUX(10, GPOUT_SYS_SDIO1_CLK,
249 GPOEN_ENABLE, GPI_NONE)>;
250 bias-pull-up;
251 drive-strength = <12>;
252 input-disable;
253 input-schmitt-disable;
254 slew-rate = <0>;
255 };
256
257 mmc1-pins1 {
258 pinmux = <GPIOMUX(9, GPOUT_SYS_SDIO1_CMD,
259 GPOEN_SYS_SDIO1_CMD, GPI_SYS_SDIO1_CMD)>,
260 <GPIOMUX(11, GPOUT_SYS_SDIO1_DATA0,
261 GPOEN_SYS_SDIO1_DATA0, GPI_SYS_SDIO1_DATA0)>,
262 <GPIOMUX(12, GPOUT_SYS_SDIO1_DATA1,
263 GPOEN_SYS_SDIO1_DATA1, GPI_SYS_SDIO1_DATA1)>,
264 <GPIOMUX(7, GPOUT_SYS_SDIO1_DATA2,
265 GPOEN_SYS_SDIO1_DATA2, GPI_SYS_SDIO1_DATA2)>,
266 <GPIOMUX(8, GPOUT_SYS_SDIO1_DATA3,
267 GPOEN_SYS_SDIO1_DATA3, GPI_SYS_SDIO1_DATA3)>;
268 bias-pull-up;
269 drive-strength = <12>;
270 input-enable;
271 input-schmitt-enable;
272 slew-rate = <0>;
273 };
274 };
275};
276
277&mmc0 {
278 compatible = "snps,dw-mshc";
279 max-frequency = <100000000>;
280 bus-width = <8>;
281 pinctrl-names = "default";
282 pinctrl-0 = <&mmc0_pins>;
283 cap-mmc-highspeed;
284 mmc-ddr-1_8v;
285 mmc-hs200-1_8v;
286 non-removable;
287 cap-mmc-hw-reset;
288 post-power-on-delay-ms = <200>;
289 status = "okay";
290
291};
292
293&mmc1 {
294 compatible = "snps,dw-mshc";
295 max-frequency = <100000000>;
296 bus-width = <4>;
297 pinctrl-names = "default";
298 pinctrl-0 = <&mmc1_pins>;
299 no-sdio;
300 no-mmc;
301 broken-cd;
302 cap-sd-highspeed;
303 post-power-on-delay-ms = <200>;
304 status = "okay";
305};
306
307&qspi {
308 spi-max-frequency = <250000000>;
309 status = "okay";
310
311 nor-flash@0 {
312 compatible = "jedec,spi-nor";
313 reg=<0>;
314 spi-max-frequency = <100000000>;
315 cdns,tshsl-ns = <1>;
316 cdns,tsd2d-ns = <1>;
317 cdns,tchsh-ns = <1>;
318 cdns,tslch-ns = <1>;
319 };
320};
321
Mason Huo23dfd812023-07-25 17:46:50 +0800322&pcie0 {
323 reset-gpios = <&sysgpio 26 GPIO_ACTIVE_LOW>;
Minda Chen021faf72023-08-07 16:53:36 +0800324 status = "okay";
Mason Huo23dfd812023-07-25 17:46:50 +0800325};
326
327&pcie1 {
328 reset-gpios = <&sysgpio 28 GPIO_ACTIVE_LOW>;
329 status = "okay";
330};
331
Yanhong Wang5efc9342023-03-29 11:42:23 +0800332&syscrg {
333 assigned-clocks = <&syscrg JH7110_SYSCLK_CPU_ROOT>,
334 <&syscrg JH7110_SYSCLK_BUS_ROOT>,
335 <&syscrg JH7110_SYSCLK_PERH_ROOT>,
336 <&syscrg JH7110_SYSCLK_QSPI_REF>;
Xingyu Wu1345c9e2023-07-07 18:50:09 +0800337 assigned-clock-parents = <&pllclk JH7110_SYSCLK_PLL0_OUT>,
338 <&pllclk JH7110_SYSCLK_PLL2_OUT>,
339 <&pllclk JH7110_SYSCLK_PLL2_OUT>,
Yanhong Wang5efc9342023-03-29 11:42:23 +0800340 <&syscrg JH7110_SYSCLK_QSPI_REF_SRC>;
341 assigned-clock-rates = <0>, <0>, <0>, <0>;
342};
343
344&aoncrg {
345 assigned-clocks = <&aoncrg JH7110_AONCLK_APB_FUNC>;
346 assigned-clock-parents = <&osc>;
347 assigned-clock-rates = <0>;
348};
Yanhong Wang7f63bd92023-06-15 17:36:44 +0800349
350&gmac0 {
351 phy-handle = <&phy0>;
352 phy-mode = "rgmii-id";
353 status = "okay";
354
355 mdio {
356 #address-cells = <1>;
357 #size-cells = <0>;
358 compatible = "snps,dwmac-mdio";
359
360 phy0: ethernet-phy@0 {
361 reg = <0>;
362 };
363 };
364};
365
366&gmac1 {
367 phy-handle = <&phy1>;
368 phy-mode = "rgmii-id";
369 status = "okay";
370
371 mdio {
372 #address-cells = <1>;
373 #size-cells = <0>;
374 compatible = "snps,dwmac-mdio";
375
376 phy1: ethernet-phy@1 {
377 reg = <0>;
378 };
379 };
380};