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