rockchip: rk3588: Sync device tree from linux v6.8-rc1
[pandora-u-boot.git] / arch / arm / dts / rk3588-rock-5b-u-boot.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2023 Collabora Ltd.
4  */
5
6 #include "rk3588-u-boot.dtsi"
7 #include <dt-bindings/usb/pd.h>
8
9 / {
10         chosen {
11                 u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
12         };
13
14         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
24 &fspim2_pins {
25         bootph-all;
26 };
27
28 &pinctrl {
29         usb {
30                 usbc0_int: usbc0-int {
31                         rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
32                 };
33         };
34 };
35
36 &sdhci {
37         cap-mmc-highspeed;
38         mmc-ddr-1_8v;
39         mmc-hs200-1_8v;
40 };
41
42 &sfc {
43         bootph-pre-ram;
44         u-boot,spl-sfc-no-dma;
45         pinctrl-names = "default";
46         pinctrl-0 = <&fspim2_pins>;
47         status = "okay";
48
49         flash@0 {
50                 bootph-pre-ram;
51                 compatible = "jedec,spi-nor";
52                 reg = <0>;
53                 spi-max-frequency = <24000000>;
54                 spi-rx-bus-width = <4>;
55                 spi-tx-bus-width = <1>;
56         };
57 };
58
59 &u2phy0 {
60         status = "okay";
61 };
62
63 &u2phy0_otg {
64         status = "okay";
65 };
66
67 &u2phy1 {
68         status = "okay";
69 };
70
71 &u2phy1_otg {
72         status = "okay";
73 };
74
75 &usbdp_phy1 {
76         status = "okay";
77 };
78
79 &usbdp_phy1_u3 {
80         status = "okay";
81 };
82
83 &usbdp_phy0 {
84         orientation-switch;
85         mode-switch;
86         sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
87         sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
88         status = "okay";
89
90         port {
91                 #address-cells = <1>;
92                 #size-cells = <0>;
93
94                 usbdp_phy0_typec_ss: endpoint@0 {
95                         reg = <0>;
96                         remote-endpoint = <&usbc0_ss>;
97                 };
98
99                 usbdp_phy0_typec_sbu: endpoint@1 {
100                         reg = <1>;
101                         remote-endpoint = <&usbc0_sbu>;
102                 };
103         };
104 };
105
106 &usbdp_phy0_u3 {
107         status = "okay";
108 };
109
110 &usb_host0_xhci {
111         usb-role-switch;
112         status = "okay";
113
114         port {
115                 #address-cells = <1>;
116                 #size-cells = <0>;
117
118                 usb_host0_xhci_drd_sw: endpoint {
119                         remote-endpoint = <&usbc0_hs>;
120                 };
121         };
122 };
123
124 &usb_host1_xhci {
125         status = "okay";
126 };
127
128 &i2c4 {
129         pinctrl-names = "default";
130         pinctrl-0 = <&i2c4m1_xfer>;
131         status = "okay";
132
133         usbc0: usb-typec@22 {
134                 compatible = "fcs,fusb302";
135                 reg = <0x22>;
136                 interrupt-parent = <&gpio3>;
137                 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
138                 pinctrl-names = "default";
139                 pinctrl-0 = <&usbc0_int>;
140                 vbus-supply = <&vcc12v_dcin>;
141                 status = "okay";
142
143                 usb_con: connector {
144                         compatible = "usb-c-connector";
145                         label = "USB-C";
146                         data-role = "dual";
147                         power-role = "sink";
148                         try-power-role = "sink";
149                         op-sink-microwatt = <1000000>;
150                         sink-pdos =
151                                 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
152                                 <PDO_VAR(5000, 20000, 5000)>;
153
154                         ports {
155                                 #address-cells = <1>;
156                                 #size-cells = <0>;
157
158                                 port@0 {
159                                         reg = <0>;
160                                         usbc0_hs: endpoint {
161                                                 remote-endpoint = <&usb_host0_xhci_drd_sw>;
162                                         };
163                                 };
164
165                                 port@1 {
166                                         reg = <1>;
167                                         usbc0_ss: endpoint {
168                                                 remote-endpoint = <&usbdp_phy0_typec_ss>;
169                                         };
170                                 };
171
172                                 port@2 {
173                                         reg = <2>;
174                                         usbc0_sbu: endpoint {
175                                                 remote-endpoint = <&usbdp_phy0_typec_sbu>;
176                                         };
177                                 };
178                         };
179                 };
180         };
181 };