blob: 115c14c0a3c68c44be5c2ed1dc772c5d1496910b [file] [log] [blame]
Heiko Stuebner97fa7842020-06-05 12:06:40 +02001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
4 */
5
6/dts-v1/;
7#include "rk3399-puma.dtsi"
8
9/ {
10 model = "Theobroma Systems RK3399-Q7 SoM";
11 compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399";
12
Peter Robinson822556a2021-07-22 16:20:42 +010013 aliases {
14 mmc1 = &sdmmc;
15 };
16
Heiko Stuebner97fa7842020-06-05 12:06:40 +020017 chosen {
18 stdout-path = "serial0:115200n8";
19 };
20
21 leds {
Peter Robinson822556a2021-07-22 16:20:42 +010022 pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
Heiko Stuebner97fa7842020-06-05 12:06:40 +020023
Peter Robinson822556a2021-07-22 16:20:42 +010024 sd_card_led: led-1 {
Heiko Stuebner97fa7842020-06-05 12:06:40 +020025 label = "sd_card_led";
26 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
27 linux,default-trigger = "mmc0";
28 };
29 };
30
31 i2s0-sound {
32 compatible = "simple-audio-card";
33 simple-audio-card,format = "i2s";
34 simple-audio-card,name = "Haikou,I2S-codec";
35 simple-audio-card,mclk-fs = <512>;
36
37 simple-audio-card,codec {
38 clocks = <&sgtl5000_clk>;
39 sound-dai = <&sgtl5000>;
40 };
41
42 simple-audio-card,cpu {
43 bitclock-master;
44 frame-master;
45 sound-dai = <&i2s0>;
46 };
47 };
48
49 sgtl5000_clk: sgtl5000-oscillator {
50 compatible = "fixed-clock";
51 #clock-cells = <0>;
Quentin Schulzccaa55f2022-11-15 15:46:23 +010052 clock-frequency = <24576000>;
Heiko Stuebner97fa7842020-06-05 12:06:40 +020053 };
54
55 dc_12v: dc-12v {
56 compatible = "regulator-fixed";
57 regulator-name = "dc_12v";
58 regulator-always-on;
59 regulator-boot-on;
60 regulator-min-microvolt = <12000000>;
61 regulator-max-microvolt = <12000000>;
62 };
63
64 vcc3v3_baseboard: vcc3v3-baseboard {
65 compatible = "regulator-fixed";
66 regulator-name = "vcc3v3_baseboard";
67 regulator-always-on;
68 regulator-boot-on;
69 regulator-min-microvolt = <3300000>;
70 regulator-max-microvolt = <3300000>;
71 vin-supply = <&dc_12v>;
72 };
73
74 vcc5v0_baseboard: vcc5v0-baseboard {
75 compatible = "regulator-fixed";
76 regulator-name = "vcc5v0_baseboard";
77 regulator-always-on;
78 regulator-boot-on;
79 regulator-min-microvolt = <5000000>;
80 regulator-max-microvolt = <5000000>;
81 vin-supply = <&dc_12v>;
82 };
83
84 vcc5v0_otg: vcc5v0-otg-regulator {
85 compatible = "regulator-fixed";
86 enable-active-high;
87 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
88 pinctrl-names = "default";
89 pinctrl-0 = <&otg_vbus_drv>;
90 regulator-name = "vcc5v0_otg";
91 regulator-always-on;
92 };
93
94 vdda_codec: vdda-codec {
95 compatible = "regulator-fixed";
96 regulator-name = "vdda_codec";
97 regulator-boot-on;
98 regulator-min-microvolt = <3300000>;
99 regulator-max-microvolt = <3300000>;
100 vin-supply = <&vcc5v0_baseboard>;
101 };
102
103 vddd_codec: vddd-codec {
104 compatible = "regulator-fixed";
105 regulator-name = "vddd_codec";
106 regulator-boot-on;
107 regulator-min-microvolt = <1600000>;
108 regulator-max-microvolt = <1600000>;
109 vin-supply = <&vcc5v0_baseboard>;
110 };
111};
112
113&hdmi {
114 ddc-i2c-bus = <&i2c3>;
115 status = "okay";
116};
117
118&i2c1 {
119 status = "okay";
120 clock-frequency = <400000>;
121};
122
123&i2c2 {
124 status = "okay";
125 clock-frequency = <400000>;
126};
127
128&i2c3 {
129 i2c-scl-rising-time-ns = <450>;
130 i2c-scl-falling-time-ns = <15>;
131 status = "okay";
132};
133
134&i2c4 {
135 status = "okay";
136 clock-frequency = <400000>;
137
138 sgtl5000: codec@a {
139 compatible = "fsl,sgtl5000";
140 reg = <0x0a>;
141 clocks = <&sgtl5000_clk>;
142 #sound-dai-cells = <0>;
143 VDDA-supply = <&vdda_codec>;
144 VDDIO-supply = <&vdda_codec>;
145 VDDD-supply = <&vddd_codec>;
146 status = "okay";
147 };
148};
149
150&i2c6 {
151 status = "okay";
152 clock-frequency = <400000>;
153};
154
155&pcie_phy {
156 status = "okay";
157};
158
159&pcie0 {
160 ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
161 num-lanes = <4>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&pcie_clkreqn_cpm>;
164 status = "okay";
165};
166
167&pinctrl {
168 pinctrl-names = "default";
169 pinctrl-0 = <&haikou_pin_hog>;
170
171 hog {
172 haikou_pin_hog: haikou-pin-hog {
173 rockchip,pins =
174 /* LID_BTN */
175 <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
176 /* BATLOW# */
177 <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
178 /* SLP_BTN# */
179 <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
180 /* BIOS_DISABLE# */
181 <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
182 };
183 };
184
185 leds {
Peter Robinson822556a2021-07-22 16:20:42 +0100186 sd_card_led_pin: sd-card-led-pin {
Heiko Stuebner97fa7842020-06-05 12:06:40 +0200187 rockchip,pins =
188 <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
189 };
190 };
191
192 usb2 {
193 otg_vbus_drv: otg-vbus-drv {
194 rockchip,pins =
195 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
196 };
197 };
198};
199
200&pwm0 {
201 status = "okay";
202};
203
204&sdmmc {
205 bus-width = <4>;
206 cap-mmc-highspeed;
207 cap-sd-highspeed;
208 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
209 disable-wp;
Quentin Schulzccaa55f2022-11-15 15:46:23 +0100210 max-frequency = <40000000>;
Heiko Stuebner97fa7842020-06-05 12:06:40 +0200211 pinctrl-names = "default";
212 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
213 vmmc-supply = <&vcc3v3_baseboard>;
214 status = "okay";
215};
216
217&spi5 {
218 status = "okay";
219};
220
221&tcphy0 {
222 status = "okay";
223};
224
225&u2phy0 {
226 status = "okay";
227};
228
229&usbdrd3_0 {
230 status = "okay";
231};
232
233&usbdrd_dwc3_0 {
234 dr_mode = "otg";
Quentin Schulzccaa55f2022-11-15 15:46:23 +0100235 extcon = <&extcon_usb3>;
Heiko Stuebner97fa7842020-06-05 12:06:40 +0200236 status = "okay";
237};
238
239&u2phy0_host {
240 phy-supply = <&vcc5v0_otg>;
241 status = "okay";
242};
243
244&uart0 {
245 pinctrl-names = "default";
246 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
247 status = "okay";
248};
249
250&uart2 {
251 status = "okay";
252};
253
254&usb_host0_ehci {
255 status = "okay";
256};
257
258&usb_host0_ohci {
259 status = "okay";
260};
261
262&vopb {
263 status = "okay";
264};
265
266&vopb_mmu {
267 status = "okay";
268};
269
270&vopl {
271 status = "okay";
272};
273
274&vopl_mmu {
275 status = "okay";
276};