Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | ||||
3 | * Copyright (c) 2023 Collabora Ltd. | ||||
4 | */ | ||||
5 | |||||
6 | #include "rk3588-u-boot.dtsi" | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 7 | #include <dt-bindings/usb/pd.h> |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 8 | |
9 | / { | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 10 | 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 Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 18 | }; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 19 | |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 20 | &fspim2_pins { |
Jonas Karlman | ab956bb | 2024-04-22 06:28:50 +0000 | [diff] [blame] | 21 | bootph-pre-ram; |
22 | bootph-some-ram; | ||||
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 23 | }; |
24 | |||||
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 25 | &pinctrl { |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 26 | usb { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 27 | usbc0_int: usbc0-int { |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 28 | rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 29 | }; |
30 | }; | ||||
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 31 | }; |
32 | |||||
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 33 | &sdhci { |
34 | cap-mmc-highspeed; | ||||
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 35 | mmc-hs200-1_8v; |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 36 | }; |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 37 | |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 38 | &sfc { |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 39 | pinctrl-names = "default"; |
40 | pinctrl-0 = <&fspim2_pins>; | ||||
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 41 | status = "okay"; |
42 | |||||
43 | flash@0 { | ||||
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 44 | compatible = "jedec,spi-nor"; |
45 | reg = <0>; | ||||
Jonas Karlman | ab956bb | 2024-04-22 06:28:50 +0000 | [diff] [blame] | 46 | bootph-pre-ram; |
47 | bootph-some-ram; | ||||
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 48 | spi-max-frequency = <24000000>; |
49 | spi-rx-bus-width = <4>; | ||||
50 | spi-tx-bus-width = <1>; | ||||
51 | }; | ||||
52 | }; | ||||
53 | |||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 54 | &u2phy0 { |
55 | status = "okay"; | ||||
56 | }; | ||||
57 | |||||
58 | &u2phy0_otg { | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 59 | status = "okay"; |
60 | }; | ||||
61 | |||||
FUKAUMI Naoki | 6131517 | 2023-09-05 20:47:35 +0900 | [diff] [blame] | 62 | &u2phy1 { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 63 | status = "okay"; |
64 | }; | ||||
65 | |||||
FUKAUMI Naoki | 6131517 | 2023-09-05 20:47:35 +0900 | [diff] [blame] | 66 | &u2phy1_otg { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 67 | status = "okay"; |
68 | }; | ||||
69 | |||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 70 | &usbdp_phy1 { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 71 | status = "okay"; |
72 | }; | ||||
73 | |||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 74 | &usbdp_phy1_u3 { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 75 | status = "okay"; |
76 | }; | ||||
77 | |||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 78 | &usbdp_phy0 { |
79 | orientation-switch; | ||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 80 | mode-switch; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 81 | 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 Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 88 | |
89 | usbdp_phy0_typec_ss: endpoint@0 { | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 90 | reg = <0>; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 91 | remote-endpoint = <&usbc0_ss>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 92 | }; |
93 | |||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 94 | usbdp_phy0_typec_sbu: endpoint@1 { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 95 | reg = <1>; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 96 | remote-endpoint = <&usbc0_sbu>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 97 | }; |
98 | }; | ||||
99 | }; | ||||
100 | |||||
101 | &usbdp_phy0_u3 { | ||||
102 | status = "okay"; | ||||
103 | }; | ||||
104 | |||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 105 | &usb_host0_xhci { |
106 | usb-role-switch; | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 107 | status = "okay"; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 108 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 109 | port { |
110 | #address-cells = <1>; | ||||
111 | #size-cells = <0>; | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 112 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 113 | usb_host0_xhci_drd_sw: endpoint { |
114 | remote-endpoint = <&usbc0_hs>; | ||||
115 | }; | ||||
116 | }; | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 117 | }; |
118 | |||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 119 | &usb_host1_xhci { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 120 | status = "okay"; |
121 | }; | ||||
122 | |||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 123 | &i2c4 { |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 124 | pinctrl-names = "default"; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 125 | pinctrl-0 = <&i2c4m1_xfer>; |
126 | status = "okay"; | ||||
127 | |||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 128 | usbc0: usb-typec@22 { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 129 | 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 Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 135 | vbus-supply = <&vcc12v_dcin>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 136 | status = "okay"; |
137 | |||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 138 | usb_con: connector { |
139 | compatible = "usb-c-connector"; | ||||
140 | label = "USB-C"; | ||||
141 | data-role = "dual"; | ||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 142 | power-role = "sink"; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 143 | try-power-role = "sink"; |
144 | op-sink-microwatt = <1000000>; | ||||
145 | sink-pdos = | ||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 146 | <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>, |
147 | <PDO_VAR(5000, 20000, 5000)>; | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 148 | |
149 | ports { | ||||
150 | #address-cells = <1>; | ||||
151 | #size-cells = <0>; | ||||
152 | |||||
153 | port@0 { | ||||
154 | reg = <0>; | ||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 155 | usbc0_hs: endpoint { |
156 | remote-endpoint = <&usb_host0_xhci_drd_sw>; | ||||
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 157 | }; |
158 | }; | ||||
159 | |||||
160 | port@1 { | ||||
161 | reg = <1>; | ||||
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 162 | 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 Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 171 | }; |
172 | }; | ||||
173 | }; | ||||
174 | }; | ||||
175 | }; | ||||
176 | }; |