blob: 03626e71ea0d140b554039ddbaa5034ea7c96e9b [file] [log] [blame]
Eugen Hristev3bf8e402023-02-22 11:05:12 +02001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2023 Collabora Ltd.
4 */
5
6#include "rk3588-u-boot.dtsi"
Eugen Hristev9ceef3d2023-05-15 12:59:45 +03007#include <dt-bindings/pinctrl/rockchip.h>
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/gpio/gpio.h>
Eugen Hristev32961c02023-05-29 13:01:35 +030010#include <dt-bindings/usb/pd.h>
Eugen Hristev3bf8e402023-02-22 11:05:12 +020011
12/ {
Eugen Hristev3bf8e402023-02-22 11:05:12 +020013 chosen {
Jonas Karlmanb564aa22023-04-18 16:46:41 +000014 u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
Eugen Hristev3bf8e402023-02-22 11:05:12 +020015 };
Eugen Hristev9ceef3d2023-05-15 12:59:45 +030016
Eugen Hristev32961c02023-05-29 13:01:35 +030017 vcc12v_dcin: vcc12v-dcin-regulator {
18 compatible = "regulator-fixed";
19 regulator-name = "vcc12v_dcin";
20 regulator-always-on;
21 regulator-boot-on;
22 regulator-min-microvolt = <12000000>;
23 regulator-max-microvolt = <12000000>;
24 };
25
26 vcc5v0_usbdcin: vcc5v0-usbdcin {
27 compatible = "regulator-fixed";
28 regulator-name = "vcc5v0_usbdcin";
29 regulator-always-on;
30 regulator-boot-on;
31 regulator-min-microvolt = <5000000>;
32 regulator-max-microvolt = <5000000>;
33 vin-supply = <&vcc12v_dcin>;
34 };
35
Eugen Hristev32961c02023-05-29 13:01:35 +030036 vcc5v0_usb: vcc5v0-usb {
37 compatible = "regulator-fixed";
38 regulator-name = "vcc5v0_usb";
39 regulator-always-on;
40 regulator-boot-on;
41 regulator-min-microvolt = <5000000>;
42 regulator-max-microvolt = <5000000>;
43 vin-supply = <&vcc5v0_usbdcin>;
44 };
45
46 vbus5v0_typec: vbus5v0-typec {
47 compatible = "regulator-fixed";
48 regulator-name = "vbus5v0_typec";
49 regulator-min-microvolt = <5000000>;
50 regulator-max-microvolt = <5000000>;
51 enable-active-high;
52 gpio = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
53 vin-supply = <&vcc5v0_usb>;
54 pinctrl-names = "default";
55 pinctrl-0 = <&typec5v_pwren>;
56 };
Eugen Hristev9ceef3d2023-05-15 12:59:45 +030057};
58
Christopher Obbardbfbef682023-05-17 13:01:01 +030059&combphy0_ps {
60 status = "okay";
61};
62
Jonas Karlmanfd6e4252023-05-18 15:39:30 +000063&fspim2_pins {
64 bootph-all;
65};
66
Christopher Obbardbfbef682023-05-17 13:01:01 +030067&pcie2x1l2 {
68 pinctrl-names = "default";
69 pinctrl-0 = <&pcie2x1l2_pins &pcie_reset_h>;
70 reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
71 status = "okay";
72};
73
Eugen Hristev9ceef3d2023-05-15 12:59:45 +030074&pinctrl {
Christopher Obbardbfbef682023-05-17 13:01:01 +030075 pcie {
76 pcie_reset_h: pcie-reset-h {
77 rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
78 };
79
80 pcie2x1l2_pins: pcie2x1l2-pins {
81 rockchip,pins = <3 RK_PC7 4 &pcfg_pull_none>,
82 <3 RK_PD0 4 &pcfg_pull_none>;
83 };
84 };
85
Eugen Hristev32961c02023-05-29 13:01:35 +030086 usb-typec {
87 usbc0_int: usbc0-int {
88 rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
89 };
90
91 typec5v_pwren: typec5v-pwren {
92 rockchip,pins = <2 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
93 };
94 };
Eugen Hristev3bf8e402023-02-22 11:05:12 +020095};
96
Jonas Karlmanb564aa22023-04-18 16:46:41 +000097&sdhci {
98 cap-mmc-highspeed;
99 mmc-ddr-1_8v;
100 mmc-hs200-1_8v;
Jonas Karlmanb564aa22023-04-18 16:46:41 +0000101};
Eugen Hristev9ceef3d2023-05-15 12:59:45 +0300102
Jonas Karlmanfd6e4252023-05-18 15:39:30 +0000103&sfc {
104 bootph-pre-ram;
105 u-boot,spl-sfc-no-dma;
106 pinctrl-names = "default";
107 pinctrl-0 = <&fspim2_pins>;
108 #address-cells = <1>;
109 #size-cells = <0>;
110 status = "okay";
111
112 flash@0 {
113 bootph-pre-ram;
114 compatible = "jedec,spi-nor";
115 reg = <0>;
116 spi-max-frequency = <24000000>;
117 spi-rx-bus-width = <4>;
118 spi-tx-bus-width = <1>;
119 };
120};
121
Eugen Hristev32961c02023-05-29 13:01:35 +0300122&u2phy0 {
123 status = "okay";
124};
125
126&u2phy0_otg {
127 rockchip,typec-vbus-det;
128 status = "okay";
129};
130
FUKAUMI Naoki74273f12023-09-05 20:47:35 +0900131&u2phy1 {
Eugen Hristev9ceef3d2023-05-15 12:59:45 +0300132 status = "okay";
133};
134
FUKAUMI Naoki74273f12023-09-05 20:47:35 +0900135&u2phy1_otg {
Eugen Hristev9ceef3d2023-05-15 12:59:45 +0300136 status = "okay";
137};
138
FUKAUMI Naoki74273f12023-09-05 20:47:35 +0900139&usb2phy2_grf {
Eugen Hristev9ceef3d2023-05-15 12:59:45 +0300140 status = "okay";
141};
142
143&usb2phy3_grf {
144 status = "okay";
145};
146
FUKAUMI Naoki74273f12023-09-05 20:47:35 +0900147&usb_host0_ehci {
148 companion = <&usb_host0_ohci>;
Eugen Hristev9ceef3d2023-05-15 12:59:45 +0300149};
150
FUKAUMI Naoki74273f12023-09-05 20:47:35 +0900151&usb_host1_ehci {
152 companion = <&usb_host1_ohci>;
Eugen Hristev9ceef3d2023-05-15 12:59:45 +0300153};
154
Eugen Hristev32961c02023-05-29 13:01:35 +0300155&usbdp_phy0 {
156 orientation-switch;
157 svid = <0xff01>;
158 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
159 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
160 status = "okay";
161
162 port {
163 #address-cells = <1>;
164 #size-cells = <0>;
165 usbdp_phy0_orientation_switch: endpoint@0 {
166 reg = <0>;
167 remote-endpoint = <&usbc0_orien_sw>;
168 };
169
170 usbdp_phy0_dp_altmode_mux: endpoint@1 {
171 reg = <1>;
172 remote-endpoint = <&dp_altmode_mux>;
173 };
174 };
175};
176
177&usbdp_phy0_u3 {
178 status = "okay";
179};
180
FUKAUMI Naoki74273f12023-09-05 20:47:35 +0900181&usbdp_phy1 {
182 rockchip,dp-lane-mux = <2 3>;
183 status = "okay";
184};
185
186&usbdp_phy1_u3 {
187 status = "okay";
188};
189
Eugen Hristev32961c02023-05-29 13:01:35 +0300190&usbdrd3_0 {
191 status = "okay";
192};
193
FUKAUMI Naoki74273f12023-09-05 20:47:35 +0900194&usbdrd3_1 {
195 status = "okay";
196};
197
Eugen Hristev32961c02023-05-29 13:01:35 +0300198&usbdrd_dwc3_0 {
Eugen Hristev32961c02023-05-29 13:01:35 +0300199 usb-role-switch;
200
201 port {
202 #address-cells = <1>;
203 #size-cells = <0>;
204 dwc3_0_role_switch: endpoint@0 {
205 reg = <0>;
206 remote-endpoint = <&usbc0_role_sw>;
207 };
208 };
209};
210
Eugen Hristev32961c02023-05-29 13:01:35 +0300211&i2c4 {
212 pinctrl-0 = <&i2c4m1_xfer>;
213 status = "okay";
214
215 usbc0: fusb302@22 {
216 compatible = "fcs,fusb302";
217 reg = <0x22>;
218 interrupt-parent = <&gpio3>;
219 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
220 pinctrl-names = "default";
221 pinctrl-0 = <&usbc0_int>;
222 vbus-supply = <&vbus5v0_typec>;
223 status = "okay";
224
225 ports {
226 #address-cells = <1>;
227 #size-cells = <0>;
228
229 port@0 {
230 reg = <0>;
231 usbc0_role_sw: endpoint@0 {
232 remote-endpoint = <&dwc3_0_role_switch>;
233 };
234 };
235 };
236
237 usb_con: connector {
238 compatible = "usb-c-connector";
239 label = "USB-C";
240 data-role = "dual";
241 power-role = "dual";
242 try-power-role = "sink";
243 op-sink-microwatt = <1000000>;
244 sink-pdos =
245 <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
246 source-pdos =
247 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
248
249 altmodes {
250 #address-cells = <1>;
251 #size-cells = <0>;
252
253 altmode@0 {
254 reg = <0>;
255 svid = <0xff01>;
256 vdo = <0xffffffff>;
257 };
258 };
259
260 ports {
261 #address-cells = <1>;
262 #size-cells = <0>;
263
264 port@0 {
265 reg = <0>;
266 usbc0_orien_sw: endpoint {
267 remote-endpoint = <&usbdp_phy0_orientation_switch>;
268 };
269 };
270
271 port@1 {
272 reg = <1>;
273 dp_altmode_mux: endpoint {
274 remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
275 };
276 };
277 };
278 };
279 };
280};