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