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 | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 10 | chosen { |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 11 | u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci; |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 12 | }; |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 13 | |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 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 | }; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 22 | }; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 23 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 24 | &combphy2_psu { |
| 25 | status = "okay"; |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 26 | }; |
| 27 | |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 28 | &fspim2_pins { |
| 29 | bootph-all; |
| 30 | }; |
| 31 | |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 32 | &pinctrl { |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 33 | usb { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 34 | usbc0_int: usbc0-int { |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 35 | rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 36 | }; |
| 37 | }; |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 38 | }; |
| 39 | |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 40 | &sdhci { |
| 41 | cap-mmc-highspeed; |
| 42 | mmc-ddr-1_8v; |
| 43 | mmc-hs200-1_8v; |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 44 | }; |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 45 | |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 46 | &sfc { |
| 47 | bootph-pre-ram; |
| 48 | u-boot,spl-sfc-no-dma; |
| 49 | pinctrl-names = "default"; |
| 50 | pinctrl-0 = <&fspim2_pins>; |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 51 | 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 Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 63 | &u2phy0 { |
| 64 | status = "okay"; |
| 65 | }; |
| 66 | |
| 67 | &u2phy0_otg { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 68 | status = "okay"; |
| 69 | }; |
| 70 | |
FUKAUMI Naoki | 6131517 | 2023-09-05 20:47:35 +0900 | [diff] [blame] | 71 | &u2phy1 { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 72 | status = "okay"; |
| 73 | }; |
| 74 | |
FUKAUMI Naoki | 6131517 | 2023-09-05 20:47:35 +0900 | [diff] [blame] | 75 | &u2phy1_otg { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 76 | status = "okay"; |
| 77 | }; |
| 78 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 79 | &usbdp_phy1 { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 80 | status = "okay"; |
| 81 | }; |
| 82 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 83 | &usbdp_phy1_u3 { |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 84 | status = "okay"; |
| 85 | }; |
| 86 | |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 87 | &usbdp_phy0 { |
| 88 | orientation-switch; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 89 | mode-switch; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 90 | 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 Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 97 | |
| 98 | usbdp_phy0_typec_ss: endpoint@0 { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 99 | reg = <0>; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 100 | remote-endpoint = <&usbc0_ss>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 101 | }; |
| 102 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 103 | usbdp_phy0_typec_sbu: endpoint@1 { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 104 | reg = <1>; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 105 | remote-endpoint = <&usbc0_sbu>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 106 | }; |
| 107 | }; |
| 108 | }; |
| 109 | |
| 110 | &usbdp_phy0_u3 { |
| 111 | status = "okay"; |
| 112 | }; |
| 113 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 114 | &usb_host0_xhci { |
| 115 | usb-role-switch; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 116 | status = "okay"; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 117 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 118 | port { |
| 119 | #address-cells = <1>; |
| 120 | #size-cells = <0>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 121 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 122 | usb_host0_xhci_drd_sw: endpoint { |
| 123 | remote-endpoint = <&usbc0_hs>; |
| 124 | }; |
| 125 | }; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 126 | }; |
| 127 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 128 | &usb_host1_xhci { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 129 | status = "okay"; |
| 130 | }; |
| 131 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 132 | &usb_host2_xhci { |
| 133 | status = "okay"; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 134 | }; |
| 135 | |
| 136 | &i2c4 { |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 137 | pinctrl-names = "default"; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 138 | pinctrl-0 = <&i2c4m1_xfer>; |
| 139 | status = "okay"; |
| 140 | |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 141 | usbc0: usb-typec@22 { |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 142 | 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 Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 148 | vbus-supply = <&vcc12v_dcin>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 149 | status = "okay"; |
| 150 | |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 151 | usb_con: connector { |
| 152 | compatible = "usb-c-connector"; |
| 153 | label = "USB-C"; |
| 154 | data-role = "dual"; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 155 | power-role = "sink"; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 156 | try-power-role = "sink"; |
| 157 | op-sink-microwatt = <1000000>; |
| 158 | sink-pdos = |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 159 | <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>, |
| 160 | <PDO_VAR(5000, 20000, 5000)>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 161 | |
| 162 | ports { |
| 163 | #address-cells = <1>; |
| 164 | #size-cells = <0>; |
| 165 | |
| 166 | port@0 { |
| 167 | reg = <0>; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 168 | usbc0_hs: endpoint { |
| 169 | remote-endpoint = <&usb_host0_xhci_drd_sw>; |
Eugen Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 170 | }; |
| 171 | }; |
| 172 | |
| 173 | port@1 { |
| 174 | reg = <1>; |
Jonas Karlman | f9b28c2 | 2023-10-17 17:02:11 +0000 | [diff] [blame] | 175 | 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 Hristev | 41bbad8 | 2023-05-29 13:01:35 +0300 | [diff] [blame] | 184 | }; |
| 185 | }; |
| 186 | }; |
| 187 | }; |
| 188 | }; |
| 189 | }; |