blob: 3f390ef26a3f922af3fcdd796555d2aa84bb27d1 [file] [log] [blame]
Eugen Hristev32f36cf2023-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 Hristev41bbad82023-05-29 13:01:35 +03007#include <dt-bindings/usb/pd.h>
Eugen Hristev32f36cf2023-02-22 11:05:12 +02008
9/ {
Eugen Hristev32f36cf2023-02-22 11:05:12 +020010 chosen {
Jonas Karlmanced8be02023-04-18 16:46:41 +000011 u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
Eugen Hristev32f36cf2023-02-22 11:05:12 +020012 };
Eugen Hristeva856b1a2023-05-15 12:59:45 +030013
Eugen Hristev41bbad82023-05-29 13:01:35 +030014 vcc12v_dcin: vcc12v-dcin-regulator {
15 compatible = "regulator-fixed";
16 regulator-name = "vcc12v_dcin";
17 regulator-always-on;
18 regulator-boot-on;
19 regulator-min-microvolt = <12000000>;
20 regulator-max-microvolt = <12000000>;
21 };
22
23 vcc5v0_usbdcin: vcc5v0-usbdcin {
24 compatible = "regulator-fixed";
25 regulator-name = "vcc5v0_usbdcin";
26 regulator-always-on;
27 regulator-boot-on;
28 regulator-min-microvolt = <5000000>;
29 regulator-max-microvolt = <5000000>;
30 vin-supply = <&vcc12v_dcin>;
31 };
32
Eugen Hristev41bbad82023-05-29 13:01:35 +030033 vcc5v0_usb: vcc5v0-usb {
34 compatible = "regulator-fixed";
35 regulator-name = "vcc5v0_usb";
36 regulator-always-on;
37 regulator-boot-on;
38 regulator-min-microvolt = <5000000>;
39 regulator-max-microvolt = <5000000>;
40 vin-supply = <&vcc5v0_usbdcin>;
41 };
42
43 vbus5v0_typec: vbus5v0-typec {
44 compatible = "regulator-fixed";
45 regulator-name = "vbus5v0_typec";
46 regulator-min-microvolt = <5000000>;
47 regulator-max-microvolt = <5000000>;
48 enable-active-high;
49 gpio = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
50 vin-supply = <&vcc5v0_usb>;
51 pinctrl-names = "default";
52 pinctrl-0 = <&typec5v_pwren>;
53 };
Eugen Hristeva856b1a2023-05-15 12:59:45 +030054};
55
Jonas Karlmanadb78942023-05-18 15:39:30 +000056&fspim2_pins {
57 bootph-all;
58};
59
Eugen Hristeva856b1a2023-05-15 12:59:45 +030060&pinctrl {
Eugen Hristev41bbad82023-05-29 13:01:35 +030061 usb-typec {
62 usbc0_int: usbc0-int {
63 rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
64 };
65
66 typec5v_pwren: typec5v-pwren {
67 rockchip,pins = <2 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
68 };
69 };
Eugen Hristev32f36cf2023-02-22 11:05:12 +020070};
71
Jonas Karlmanced8be02023-04-18 16:46:41 +000072&sdhci {
73 cap-mmc-highspeed;
74 mmc-ddr-1_8v;
75 mmc-hs200-1_8v;
Jonas Karlmanced8be02023-04-18 16:46:41 +000076};
Eugen Hristeva856b1a2023-05-15 12:59:45 +030077
Jonas Karlmanadb78942023-05-18 15:39:30 +000078&sfc {
79 bootph-pre-ram;
80 u-boot,spl-sfc-no-dma;
81 pinctrl-names = "default";
82 pinctrl-0 = <&fspim2_pins>;
Jonas Karlmanadb78942023-05-18 15:39:30 +000083 status = "okay";
84
85 flash@0 {
86 bootph-pre-ram;
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <24000000>;
90 spi-rx-bus-width = <4>;
91 spi-tx-bus-width = <1>;
92 };
93};
94
Eugen Hristev41bbad82023-05-29 13:01:35 +030095&u2phy0 {
96 status = "okay";
97};
98
99&u2phy0_otg {
100 rockchip,typec-vbus-det;
101 status = "okay";
102};
103
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900104&u2phy1 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +0300105 status = "okay";
106};
107
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900108&u2phy1_otg {
Eugen Hristeva856b1a2023-05-15 12:59:45 +0300109 status = "okay";
110};
111
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900112&usb2phy2_grf {
Eugen Hristeva856b1a2023-05-15 12:59:45 +0300113 status = "okay";
114};
115
116&usb2phy3_grf {
117 status = "okay";
118};
119
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900120&usb_host0_ehci {
121 companion = <&usb_host0_ohci>;
Eugen Hristeva856b1a2023-05-15 12:59:45 +0300122};
123
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900124&usb_host1_ehci {
125 companion = <&usb_host1_ohci>;
Eugen Hristeva856b1a2023-05-15 12:59:45 +0300126};
127
Eugen Hristev41bbad82023-05-29 13:01:35 +0300128&usbdp_phy0 {
129 orientation-switch;
130 svid = <0xff01>;
131 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
132 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
133 status = "okay";
134
135 port {
136 #address-cells = <1>;
137 #size-cells = <0>;
138 usbdp_phy0_orientation_switch: endpoint@0 {
139 reg = <0>;
140 remote-endpoint = <&usbc0_orien_sw>;
141 };
142
143 usbdp_phy0_dp_altmode_mux: endpoint@1 {
144 reg = <1>;
145 remote-endpoint = <&dp_altmode_mux>;
146 };
147 };
148};
149
150&usbdp_phy0_u3 {
151 status = "okay";
152};
153
Eugen Hristev41bbad82023-05-29 13:01:35 +0300154&usbdp_phy1 {
155 rockchip,dp-lane-mux = <2 3>;
156 status = "okay";
157};
158
159&usbdp_phy1_u3 {
160 status = "okay";
161};
162
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900163&usbdrd3_0 {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300164 status = "okay";
165};
166
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900167&usbdrd3_1 {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300168 status = "okay";
169};
170
FUKAUMI Naoki61315172023-09-05 20:47:35 +0900171&usbdrd_dwc3_0 {
172 usb-role-switch;
173
174 port {
175 #address-cells = <1>;
176 #size-cells = <0>;
177 dwc3_0_role_switch: endpoint@0 {
178 reg = <0>;
179 remote-endpoint = <&usbc0_role_sw>;
180 };
181 };
Eugen Hristev41bbad82023-05-29 13:01:35 +0300182};
183
184&i2c4 {
185 pinctrl-0 = <&i2c4m1_xfer>;
186 status = "okay";
187
188 usbc0: fusb302@22 {
189 compatible = "fcs,fusb302";
190 reg = <0x22>;
191 interrupt-parent = <&gpio3>;
192 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
193 pinctrl-names = "default";
194 pinctrl-0 = <&usbc0_int>;
195 vbus-supply = <&vbus5v0_typec>;
196 status = "okay";
197
198 ports {
199 #address-cells = <1>;
200 #size-cells = <0>;
201
202 port@0 {
203 reg = <0>;
204 usbc0_role_sw: endpoint@0 {
205 remote-endpoint = <&dwc3_0_role_switch>;
206 };
207 };
208 };
209
210 usb_con: connector {
211 compatible = "usb-c-connector";
212 label = "USB-C";
213 data-role = "dual";
214 power-role = "dual";
215 try-power-role = "sink";
216 op-sink-microwatt = <1000000>;
217 sink-pdos =
218 <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
219 source-pdos =
220 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
221
222 altmodes {
223 #address-cells = <1>;
224 #size-cells = <0>;
225
226 altmode@0 {
227 reg = <0>;
228 svid = <0xff01>;
229 vdo = <0xffffffff>;
230 };
231 };
232
233 ports {
234 #address-cells = <1>;
235 #size-cells = <0>;
236
237 port@0 {
238 reg = <0>;
239 usbc0_orien_sw: endpoint {
240 remote-endpoint = <&usbdp_phy0_orientation_switch>;
241 };
242 };
243
244 port@1 {
245 reg = <1>;
246 dp_altmode_mux: endpoint {
247 remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
248 };
249 };
250 };
251 };
252 };
253};