blob: b595ddef702846de00ee32f2daa4a2c6c54e28f8 [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 };
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000022};
Eugen Hristev41bbad82023-05-29 13:01:35 +030023
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000024&combphy2_psu {
25 status = "okay";
Eugen Hristeva856b1a2023-05-15 12:59:45 +030026};
27
Jonas Karlmanadb78942023-05-18 15:39:30 +000028&fspim2_pins {
29 bootph-all;
30};
31
Eugen Hristeva856b1a2023-05-15 12:59:45 +030032&pinctrl {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000033 usb {
Eugen Hristev41bbad82023-05-29 13:01:35 +030034 usbc0_int: usbc0-int {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000035 rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
Eugen Hristev41bbad82023-05-29 13:01:35 +030036 };
37 };
Eugen Hristev32f36cf2023-02-22 11:05:12 +020038};
39
Jonas Karlmanced8be02023-04-18 16:46:41 +000040&sdhci {
41 cap-mmc-highspeed;
42 mmc-ddr-1_8v;
43 mmc-hs200-1_8v;
Jonas Karlmanced8be02023-04-18 16:46:41 +000044};
Eugen Hristeva856b1a2023-05-15 12:59:45 +030045
Jonas Karlmanadb78942023-05-18 15:39:30 +000046&sfc {
47 bootph-pre-ram;
48 u-boot,spl-sfc-no-dma;
49 pinctrl-names = "default";
50 pinctrl-0 = <&fspim2_pins>;
Jonas Karlmanadb78942023-05-18 15:39:30 +000051 status = "okay";
52
53 flash@0 {
54 bootph-pre-ram;
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <24000000>;
58 spi-rx-bus-width = <4>;
59 spi-tx-bus-width = <1>;
60 };
61};
62
Eugen Hristev41bbad82023-05-29 13:01:35 +030063&u2phy0 {
64 status = "okay";
65};
66
67&u2phy0_otg {
Eugen Hristev41bbad82023-05-29 13:01:35 +030068 status = "okay";
69};
70
FUKAUMI Naoki61315172023-09-05 20:47:35 +090071&u2phy1 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030072 status = "okay";
73};
74
FUKAUMI Naoki61315172023-09-05 20:47:35 +090075&u2phy1_otg {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030076 status = "okay";
77};
78
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000079&usbdp_phy1 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030080 status = "okay";
81};
82
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000083&usbdp_phy1_u3 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030084 status = "okay";
85};
86
Eugen Hristev41bbad82023-05-29 13:01:35 +030087&usbdp_phy0 {
88 orientation-switch;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000089 mode-switch;
Eugen Hristev41bbad82023-05-29 13:01:35 +030090 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
91 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
92 status = "okay";
93
94 port {
95 #address-cells = <1>;
96 #size-cells = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000097
98 usbdp_phy0_typec_ss: endpoint@0 {
Eugen Hristev41bbad82023-05-29 13:01:35 +030099 reg = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000100 remote-endpoint = <&usbc0_ss>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300101 };
102
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000103 usbdp_phy0_typec_sbu: endpoint@1 {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300104 reg = <1>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000105 remote-endpoint = <&usbc0_sbu>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300106 };
107 };
108};
109
110&usbdp_phy0_u3 {
111 status = "okay";
112};
113
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000114&usb_host0_xhci {
115 usb-role-switch;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300116 status = "okay";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300117
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000118 port {
119 #address-cells = <1>;
120 #size-cells = <0>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300121
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000122 usb_host0_xhci_drd_sw: endpoint {
123 remote-endpoint = <&usbc0_hs>;
124 };
125 };
Eugen Hristev41bbad82023-05-29 13:01:35 +0300126};
127
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000128&usb_host1_xhci {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300129 status = "okay";
130};
131
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000132&usb_host2_xhci {
133 status = "okay";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300134};
135
136&i2c4 {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000137 pinctrl-names = "default";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300138 pinctrl-0 = <&i2c4m1_xfer>;
139 status = "okay";
140
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000141 usbc0: usb-typec@22 {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300142 compatible = "fcs,fusb302";
143 reg = <0x22>;
144 interrupt-parent = <&gpio3>;
145 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
146 pinctrl-names = "default";
147 pinctrl-0 = <&usbc0_int>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000148 vbus-supply = <&vcc12v_dcin>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300149 status = "okay";
150
Eugen Hristev41bbad82023-05-29 13:01:35 +0300151 usb_con: connector {
152 compatible = "usb-c-connector";
153 label = "USB-C";
154 data-role = "dual";
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000155 power-role = "sink";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300156 try-power-role = "sink";
157 op-sink-microwatt = <1000000>;
158 sink-pdos =
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000159 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
160 <PDO_VAR(5000, 20000, 5000)>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300161
162 ports {
163 #address-cells = <1>;
164 #size-cells = <0>;
165
166 port@0 {
167 reg = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000168 usbc0_hs: endpoint {
169 remote-endpoint = <&usb_host0_xhci_drd_sw>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300170 };
171 };
172
173 port@1 {
174 reg = <1>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000175 usbc0_ss: endpoint {
176 remote-endpoint = <&usbdp_phy0_typec_ss>;
177 };
178 };
179
180 port@2 {
181 reg = <2>;
182 usbc0_sbu: endpoint {
183 remote-endpoint = <&usbdp_phy0_typec_sbu>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300184 };
185 };
186 };
187 };
188 };
189};