blob: d6020ca790f64f8e16b27a5fcf9696c3305fbd26 [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 {
Jonas Karlmanab956bb2024-04-22 06:28:50 +000021 bootph-pre-ram;
22 bootph-some-ram;
Jonas Karlmanadb78942023-05-18 15:39:30 +000023};
24
Eugen Hristeva856b1a2023-05-15 12:59:45 +030025&pinctrl {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000026 usb {
Eugen Hristev41bbad82023-05-29 13:01:35 +030027 usbc0_int: usbc0-int {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000028 rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
Eugen Hristev41bbad82023-05-29 13:01:35 +030029 };
30 };
Eugen Hristev32f36cf2023-02-22 11:05:12 +020031};
32
Jonas Karlmanced8be02023-04-18 16:46:41 +000033&sdhci {
34 cap-mmc-highspeed;
Jonas Karlmanced8be02023-04-18 16:46:41 +000035 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 {
Jonas Karlmanadb78942023-05-18 15:39:30 +000039 pinctrl-names = "default";
40 pinctrl-0 = <&fspim2_pins>;
Jonas Karlmanadb78942023-05-18 15:39:30 +000041 status = "okay";
42
43 flash@0 {
Jonas Karlmanadb78942023-05-18 15:39:30 +000044 compatible = "jedec,spi-nor";
45 reg = <0>;
Jonas Karlmanab956bb2024-04-22 06:28:50 +000046 bootph-pre-ram;
47 bootph-some-ram;
Jonas Karlmanadb78942023-05-18 15:39:30 +000048 spi-max-frequency = <24000000>;
49 spi-rx-bus-width = <4>;
50 spi-tx-bus-width = <1>;
51 };
52};
53
Eugen Hristev41bbad82023-05-29 13:01:35 +030054&u2phy0 {
55 status = "okay";
56};
57
58&u2phy0_otg {
Eugen Hristev41bbad82023-05-29 13:01:35 +030059 status = "okay";
60};
61
FUKAUMI Naoki61315172023-09-05 20:47:35 +090062&u2phy1 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030063 status = "okay";
64};
65
FUKAUMI Naoki61315172023-09-05 20:47:35 +090066&u2phy1_otg {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030067 status = "okay";
68};
69
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000070&usbdp_phy1 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030071 status = "okay";
72};
73
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000074&usbdp_phy1_u3 {
Eugen Hristeva856b1a2023-05-15 12:59:45 +030075 status = "okay";
76};
77
Eugen Hristev41bbad82023-05-29 13:01:35 +030078&usbdp_phy0 {
79 orientation-switch;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000080 mode-switch;
Eugen Hristev41bbad82023-05-29 13:01:35 +030081 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
82 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
83 status = "okay";
84
85 port {
86 #address-cells = <1>;
87 #size-cells = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000088
89 usbdp_phy0_typec_ss: endpoint@0 {
Eugen Hristev41bbad82023-05-29 13:01:35 +030090 reg = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000091 remote-endpoint = <&usbc0_ss>;
Eugen Hristev41bbad82023-05-29 13:01:35 +030092 };
93
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000094 usbdp_phy0_typec_sbu: endpoint@1 {
Eugen Hristev41bbad82023-05-29 13:01:35 +030095 reg = <1>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000096 remote-endpoint = <&usbc0_sbu>;
Eugen Hristev41bbad82023-05-29 13:01:35 +030097 };
98 };
99};
100
101&usbdp_phy0_u3 {
102 status = "okay";
103};
104
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000105&usb_host0_xhci {
106 usb-role-switch;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300107 status = "okay";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300108
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000109 port {
110 #address-cells = <1>;
111 #size-cells = <0>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300112
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000113 usb_host0_xhci_drd_sw: endpoint {
114 remote-endpoint = <&usbc0_hs>;
115 };
116 };
Eugen Hristev41bbad82023-05-29 13:01:35 +0300117};
118
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000119&usb_host1_xhci {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300120 status = "okay";
121};
122
Eugen Hristev41bbad82023-05-29 13:01:35 +0300123&i2c4 {
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000124 pinctrl-names = "default";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300125 pinctrl-0 = <&i2c4m1_xfer>;
126 status = "okay";
127
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000128 usbc0: usb-typec@22 {
Eugen Hristev41bbad82023-05-29 13:01:35 +0300129 compatible = "fcs,fusb302";
130 reg = <0x22>;
131 interrupt-parent = <&gpio3>;
132 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
133 pinctrl-names = "default";
134 pinctrl-0 = <&usbc0_int>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000135 vbus-supply = <&vcc12v_dcin>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300136 status = "okay";
137
Eugen Hristev41bbad82023-05-29 13:01:35 +0300138 usb_con: connector {
139 compatible = "usb-c-connector";
140 label = "USB-C";
141 data-role = "dual";
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000142 power-role = "sink";
Eugen Hristev41bbad82023-05-29 13:01:35 +0300143 try-power-role = "sink";
144 op-sink-microwatt = <1000000>;
145 sink-pdos =
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000146 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
147 <PDO_VAR(5000, 20000, 5000)>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300148
149 ports {
150 #address-cells = <1>;
151 #size-cells = <0>;
152
153 port@0 {
154 reg = <0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000155 usbc0_hs: endpoint {
156 remote-endpoint = <&usb_host0_xhci_drd_sw>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300157 };
158 };
159
160 port@1 {
161 reg = <1>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +0000162 usbc0_ss: endpoint {
163 remote-endpoint = <&usbdp_phy0_typec_ss>;
164 };
165 };
166
167 port@2 {
168 reg = <2>;
169 usbc0_sbu: endpoint {
170 remote-endpoint = <&usbdp_phy0_typec_sbu>;
Eugen Hristev41bbad82023-05-29 13:01:35 +0300171 };
172 };
173 };
174 };
175 };
176};