Merge tag 'efi-urgent-for-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / rockchip / rk3399-puma-haikou.dts
1 // 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
13         aliases {
14                 mmc1 = &sdmmc;
15         };
16
17         chosen {
18                 stdout-path = "serial0:115200n8";
19         };
20
21         leds {
22                 pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
23
24                 sd_card_led: led-1 {
25                         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>;
52                         clock-frequency  = <24576000>;
53         };
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 {
186                 sd_card_led_pin: sd-card-led-pin {
187                         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;
210         max-frequency = <150000000>;
211         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";
235         status = "okay";
236 };
237
238 &u2phy0_host {
239         phy-supply = <&vcc5v0_otg>;
240         status = "okay";
241 };
242
243 &uart0 {
244         pinctrl-names = "default";
245         pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
246         status = "okay";
247 };
248
249 &uart2 {
250         status = "okay";
251 };
252
253 &usb_host0_ehci {
254         status = "okay";
255 };
256
257 &usb_host0_ohci {
258         status = "okay";
259 };
260
261 &vopb {
262         status = "okay";
263 };
264
265 &vopb_mmu {
266         status = "okay";
267 };
268
269 &vopl {
270         status = "okay";
271 };
272
273 &vopl_mmu {
274         status = "okay";
275 };