blob: e99e60185ebebc61dc3f7e6b69e039cd78ad9930 [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 Hristev41bbad82023-05-29 13:01:35 +030010 vcc12v_dcin: vcc12v-dcin-regulator {
11 compatible = "regulator-fixed";
12 regulator-name = "vcc12v_dcin";
13 regulator-always-on;
14 regulator-boot-on;
15 regulator-min-microvolt = <12000000>;
16 regulator-max-microvolt = <12000000>;
17 };
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000018};
Eugen Hristev41bbad82023-05-29 13:01:35 +030019
Jonas Karlmanadb78942023-05-18 15:39:30 +000020&fspim2_pins {
21 bootph-all;
22};
23
Eugen Hristeva856b1a2023-05-15 12:59:45 +030024&pinctrl {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000025 usb {
Eugen Hristev41bbad82023-05-29 13:01:35 +030026 usbc0_int: usbc0-int {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000027 rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
Eugen Hristev41bbad82023-05-29 13:01:35 +030028 };
29 };
Eugen Hristev32f36cf2023-02-22 11:05:12 +020030};
31
Jonas Karlmanced8be02023-04-18 16:46:41 +000032&sdhci {
33 cap-mmc-highspeed;
34 mmc-ddr-1_8v;
35 mmc-hs200-1_8v;
Jonas Karlmanced8be02023-04-18 16:46:41 +000036};
Eugen Hristeva856b1a2023-05-15 12:59:45 +030037
Jonas Karlmanadb78942023-05-18 15:39:30 +000038&sfc {
39 bootph-pre-ram;
40 u-boot,spl-sfc-no-dma;
41 pinctrl-names = "default";
42 pinctrl-0 = <&fspim2_pins>;
Jonas Karlmanadb78942023-05-18 15:39:30 +000043 status = "okay";
44
45 flash@0 {
46 bootph-pre-ram;
47 compatible = "jedec,spi-nor";
48 reg = <0>;
49 spi-max-frequency = <24000000>;
50 spi-rx-bus-width = <4>;
51 spi-tx-bus-width = <1>;
52 };
53};
54
Eugen Hristev41bbad82023-05-29 13:01:35 +030055&u2phy0 {
56 status = "okay";
57};
58
59&u2phy0_otg {
Eugen Hristev41bbad82023-05-29 13:01:35 +030060 status = "okay";
61};
62
FUKAUMI Naoki61315172023-09-05 20:47:35 +090063&u2phy1 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030064 status = "okay";
65};
66
FUKAUMI Naoki61315172023-09-05 20:47:35 +090067&u2phy1_otg {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030068 status = "okay";
69};
70
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000071&usbdp_phy1 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030072 status = "okay";
73};
74
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000075&usbdp_phy1_u3 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030076 status = "okay";
77};
78
Eugen Hristev41bbad82023-05-29 13:01:35 +030079&usbdp_phy0 {
80 orientation-switch;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000081 mode-switch;
Eugen Hristev41bbad82023-05-29 13:01:35 +030082 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
83 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
84 status = "okay";
85
86 port {
87 #address-cells = <1>;
88 #size-cells = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000089
90 usbdp_phy0_typec_ss: endpoint@0 {
Eugen Hristev41bbad82023-05-29 13:01:35 +030091 reg = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000092 remote-endpoint = <&usbc0_ss>;
Eugen Hristev41bbad82023-05-29 13:01:35 +030093 };
94
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000095 usbdp_phy0_typec_sbu: endpoint@1 {
Eugen Hristev41bbad82023-05-29 13:01:35 +030096 reg = <1>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000097 remote-endpoint = <&usbc0_sbu>;
Eugen Hristev41bbad82023-05-29 13:01:35 +030098 };
99 };
100};
101
102&usbdp_phy0_u3 {
103 status = "okay";
104};
105
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000106&usb_host0_xhci {
107 usb-role-switch;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300108 status = "okay";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300109
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000110 port {
111 #address-cells = <1>;
112 #size-cells = <0>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300113
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000114 usb_host0_xhci_drd_sw: endpoint {
115 remote-endpoint = <&usbc0_hs>;
116 };
117 };
Eugen Hristev41bbad82023-05-29 13:01:35 +0300118};
119
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000120&usb_host1_xhci {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300121 status = "okay";
122};
123
Eugen Hristev41bbad82023-05-29 13:01:35 +0300124&i2c4 {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000125 pinctrl-names = "default";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300126 pinctrl-0 = <&i2c4m1_xfer>;
127 status = "okay";
128
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000129 usbc0: usb-typec@22 {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300130 compatible = "fcs,fusb302";
131 reg = <0x22>;
132 interrupt-parent = <&gpio3>;
133 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
134 pinctrl-names = "default";
135 pinctrl-0 = <&usbc0_int>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000136 vbus-supply = <&vcc12v_dcin>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300137 status = "okay";
138
Eugen Hristev41bbad82023-05-29 13:01:35 +0300139 usb_con: connector {
140 compatible = "usb-c-connector";
141 label = "USB-C";
142 data-role = "dual";
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000143 power-role = "sink";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300144 try-power-role = "sink";
145 op-sink-microwatt = <1000000>;
146 sink-pdos =
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000147 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
148 <PDO_VAR(5000, 20000, 5000)>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300149
150 ports {
151 #address-cells = <1>;
152 #size-cells = <0>;
153
154 port@0 {
155 reg = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000156 usbc0_hs: endpoint {
157 remote-endpoint = <&usb_host0_xhci_drd_sw>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300158 };
159 };
160
161 port@1 {
162 reg = <1>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000163 usbc0_ss: endpoint {
164 remote-endpoint = <&usbdp_phy0_typec_ss>;
165 };
166 };
167
168 port@2 {
169 reg = <2>;
170 usbc0_sbu: endpoint {
171 remote-endpoint = <&usbdp_phy0_typec_sbu>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300172 };
173 };
174 };
175 };
176 };
177};