blob: f6f15946579ebfc32925256e2569535be5a48f89 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// 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"
Tom Rini93743d22024-04-01 09:08:13 -04008#include <dt-bindings/input/input.h>
Tom Rini53633a82024-02-29 12:33:36 -05009
10/ {
11 model = "Theobroma Systems RK3399-Q7 SoM";
12 compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399";
13
14 aliases {
15 mmc1 = &sdmmc;
16 };
17
18 chosen {
19 stdout-path = "serial0:115200n8";
20 };
21
Tom Rini93743d22024-04-01 09:08:13 -040022 gpio-keys {
23 compatible = "gpio-keys";
24 pinctrl-0 = <&haikou_keys_pin>;
25 pinctrl-names = "default";
26
27 button-batlow-n {
28 gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
29 label = "BATLOW#";
30 linux,code = <KEY_BATTERY>;
31 };
32
33 button-slp-btn-n {
34 gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
35 label = "SLP_BTN#";
36 linux,code = <KEY_SLEEP>;
37 };
38
39 button-wake-n {
40 gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>;
41 label = "WAKE#";
42 linux,code = <KEY_WAKEUP>;
43 wakeup-source;
44 };
45
46 switch-lid-btn-n {
47 gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
48 label = "LID_BTN#";
49 linux,code = <SW_LID>;
50 linux,input-type = <EV_SW>;
51 };
52 };
53
Tom Rini53633a82024-02-29 12:33:36 -050054 leds {
55 pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
56
57 sd_card_led: led-1 {
58 label = "sd_card_led";
59 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
60 linux,default-trigger = "mmc0";
61 };
62 };
63
64 i2s0-sound {
65 compatible = "simple-audio-card";
66 simple-audio-card,format = "i2s";
67 simple-audio-card,name = "Haikou,I2S-codec";
68 simple-audio-card,mclk-fs = <512>;
69
70 simple-audio-card,codec {
71 clocks = <&sgtl5000_clk>;
72 sound-dai = <&sgtl5000>;
73 };
74
75 simple-audio-card,cpu {
76 bitclock-master;
77 frame-master;
78 sound-dai = <&i2s0>;
79 };
80 };
81
82 sgtl5000_clk: sgtl5000-oscillator {
83 compatible = "fixed-clock";
84 #clock-cells = <0>;
85 clock-frequency = <24576000>;
86 };
87
88 dc_12v: dc-12v {
89 compatible = "regulator-fixed";
90 regulator-name = "dc_12v";
91 regulator-always-on;
92 regulator-boot-on;
93 regulator-min-microvolt = <12000000>;
94 regulator-max-microvolt = <12000000>;
95 };
96
97 vcc3v3_baseboard: vcc3v3-baseboard {
98 compatible = "regulator-fixed";
99 regulator-name = "vcc3v3_baseboard";
100 regulator-always-on;
101 regulator-boot-on;
102 regulator-min-microvolt = <3300000>;
103 regulator-max-microvolt = <3300000>;
104 vin-supply = <&dc_12v>;
105 };
106
107 vcc5v0_baseboard: vcc5v0-baseboard {
108 compatible = "regulator-fixed";
109 regulator-name = "vcc5v0_baseboard";
110 regulator-always-on;
111 regulator-boot-on;
112 regulator-min-microvolt = <5000000>;
113 regulator-max-microvolt = <5000000>;
114 vin-supply = <&dc_12v>;
115 };
116
117 vcc5v0_otg: vcc5v0-otg-regulator {
118 compatible = "regulator-fixed";
119 enable-active-high;
120 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
121 pinctrl-names = "default";
122 pinctrl-0 = <&otg_vbus_drv>;
123 regulator-name = "vcc5v0_otg";
124 regulator-always-on;
125 };
126
127 vdda_codec: vdda-codec {
128 compatible = "regulator-fixed";
129 regulator-name = "vdda_codec";
130 regulator-boot-on;
131 regulator-min-microvolt = <3300000>;
132 regulator-max-microvolt = <3300000>;
133 vin-supply = <&vcc5v0_baseboard>;
134 };
135
136 vddd_codec: vddd-codec {
137 compatible = "regulator-fixed";
138 regulator-name = "vddd_codec";
139 regulator-boot-on;
140 regulator-min-microvolt = <1600000>;
141 regulator-max-microvolt = <1600000>;
142 vin-supply = <&vcc5v0_baseboard>;
143 };
144};
145
146&hdmi {
147 ddc-i2c-bus = <&i2c3>;
148 status = "okay";
149};
150
151&i2c1 {
152 status = "okay";
153 clock-frequency = <400000>;
154};
155
156&i2c2 {
157 status = "okay";
158 clock-frequency = <400000>;
159};
160
161&i2c3 {
162 i2c-scl-rising-time-ns = <450>;
163 i2c-scl-falling-time-ns = <15>;
164 status = "okay";
165};
166
167&i2c4 {
168 status = "okay";
169 clock-frequency = <400000>;
170
171 sgtl5000: codec@a {
172 compatible = "fsl,sgtl5000";
173 reg = <0x0a>;
174 clocks = <&sgtl5000_clk>;
175 #sound-dai-cells = <0>;
176 VDDA-supply = <&vdda_codec>;
177 VDDIO-supply = <&vdda_codec>;
178 VDDD-supply = <&vddd_codec>;
179 status = "okay";
180 };
181};
182
183&i2c6 {
184 status = "okay";
185 clock-frequency = <400000>;
186};
187
188&pcie_phy {
189 status = "okay";
190};
191
192&pcie0 {
193 ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
194 num-lanes = <4>;
195 pinctrl-names = "default";
196 pinctrl-0 = <&pcie_clkreqn_cpm>;
Tom Rini6bb92fc2024-05-20 09:54:58 -0600197 vpcie3v3-supply = <&vcc3v3_baseboard>;
198 vpcie12v-supply = <&dc_12v>;
Tom Rini53633a82024-02-29 12:33:36 -0500199 status = "okay";
200};
201
202&pinctrl {
Tom Rini93743d22024-04-01 09:08:13 -0400203 buttons {
204 haikou_keys_pin: haikou-keys-pin {
Tom Rini53633a82024-02-29 12:33:36 -0500205 rockchip,pins =
206 /* LID_BTN */
207 <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
208 /* BATLOW# */
209 <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
210 /* SLP_BTN# */
211 <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
Tom Rini93743d22024-04-01 09:08:13 -0400212 /* WAKE# */
Tom Rini53633a82024-02-29 12:33:36 -0500213 <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
214 };
215 };
216
217 leds {
218 sd_card_led_pin: sd-card-led-pin {
219 rockchip,pins =
220 <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
221 };
222 };
223
224 usb2 {
225 otg_vbus_drv: otg-vbus-drv {
226 rockchip,pins =
227 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
228 };
229 };
230};
231
232&pwm0 {
233 status = "okay";
234};
235
236&sdmmc {
237 bus-width = <4>;
238 cap-mmc-highspeed;
239 cap-sd-highspeed;
240 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
241 disable-wp;
242 max-frequency = <40000000>;
243 pinctrl-names = "default";
244 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
245 vmmc-supply = <&vcc3v3_baseboard>;
246 status = "okay";
247};
248
249&spi5 {
250 status = "okay";
251};
252
253&tcphy0 {
254 status = "okay";
255};
256
257&u2phy0 {
258 status = "okay";
259};
260
261&usbdrd3_0 {
262 status = "okay";
263};
264
265&usbdrd_dwc3_0 {
266 dr_mode = "otg";
267 extcon = <&extcon_usb3>;
268 status = "okay";
269};
270
271&u2phy0_host {
272 phy-supply = <&vcc5v0_otg>;
273 status = "okay";
274};
275
276&uart0 {
277 pinctrl-names = "default";
Tom Rini6bb92fc2024-05-20 09:54:58 -0600278 pinctrl-0 = <&uart0_xfer>;
Tom Rini53633a82024-02-29 12:33:36 -0500279 status = "okay";
280};
281
282&uart2 {
Tom Rini6bb92fc2024-05-20 09:54:58 -0600283 rts-gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_HIGH>;
Tom Rini53633a82024-02-29 12:33:36 -0500284 status = "okay";
285};
286
287&usb_host0_ehci {
288 status = "okay";
289};
290
291&usb_host0_ohci {
292 status = "okay";
293};
294
295&vopb {
296 status = "okay";
297};
298
299&vopb_mmu {
300 status = "okay";
301};
302
303&vopl {
304 status = "okay";
305};
306
307&vopl_mmu {
308 status = "okay";
309};