| .. | .. |
|---|
| 8 | 8 | #include <dt-bindings/display/drm_mipi_dsi.h> |
|---|
| 9 | 9 | #include <dt-bindings/sensor-dev.h> |
|---|
| 10 | 10 | #include <dt-bindings/pwm/pwm.h> |
|---|
| 11 | +#include "dt-bindings/usb/pd.h" |
|---|
| 11 | 12 | #include "rk3399pro.dtsi" |
|---|
| 12 | 13 | #include "rk3399-linux.dtsi" |
|---|
| 13 | 14 | #include "rk3399-opp.dtsi" |
|---|
| .. | .. |
|---|
| 196 | 197 | reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; |
|---|
| 197 | 198 | }; |
|---|
| 198 | 199 | |
|---|
| 200 | + vbus_typec: vbus-typec-regulator { |
|---|
| 201 | + compatible = "regulator-fixed"; |
|---|
| 202 | + enable-active-high; |
|---|
| 203 | + gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>; |
|---|
| 204 | + pinctrl-names = "default"; |
|---|
| 205 | + pinctrl-0 = <&vcc5v0_typec0_en>; |
|---|
| 206 | + regulator-name = "vbus_typec"; |
|---|
| 207 | + vin-supply = <&vcc5v0_sys>; |
|---|
| 208 | + }; |
|---|
| 209 | + |
|---|
| 199 | 210 | vcc_phy: vcc-phy-regulator { |
|---|
| 200 | 211 | compatible = "regulator-fixed"; |
|---|
| 201 | 212 | regulator-name = "vcc_phy"; |
|---|
| .. | .. |
|---|
| 238 | 249 | |
|---|
| 239 | 250 | &cdn_dp { |
|---|
| 240 | 251 | status = "okay"; |
|---|
| 241 | | - extcon = <&fusb0>; |
|---|
| 242 | 252 | phys = <&tcphy0_dp>; |
|---|
| 243 | 253 | }; |
|---|
| 244 | 254 | |
|---|
| .. | .. |
|---|
| 647 | 657 | bq25700: bq25700@6b { |
|---|
| 648 | 658 | compatible = "ti,bq25703"; |
|---|
| 649 | 659 | reg = <0x6b>; |
|---|
| 650 | | - extcon = <&fusb0>; |
|---|
| 651 | 660 | interrupt-parent = <&gpio1>; |
|---|
| 652 | 661 | interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>; |
|---|
| 653 | 662 | pinctrl-names = "default"; |
|---|
| .. | .. |
|---|
| 774 | 783 | i2c-scl-falling-time-ns = <11>; |
|---|
| 775 | 784 | clock-frequency = <100000>; |
|---|
| 776 | 785 | |
|---|
| 777 | | - fusb0: fusb30x@22 { |
|---|
| 778 | | - compatible = "fairchild,fusb302"; |
|---|
| 786 | + usbc0: fusb302@22 { |
|---|
| 787 | + compatible = "fcs,fusb302"; |
|---|
| 779 | 788 | reg = <0x22>; |
|---|
| 789 | + interrupt-parent = <&gpio1>; |
|---|
| 790 | + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>; |
|---|
| 780 | 791 | pinctrl-names = "default"; |
|---|
| 781 | | - pinctrl-0 = <&fusb0_int>; |
|---|
| 782 | | - int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; |
|---|
| 792 | + pinctrl-0 = <&usbc0_int>; |
|---|
| 793 | + vbus-supply = <&vbus_typec>; |
|---|
| 783 | 794 | status = "okay"; |
|---|
| 795 | + |
|---|
| 796 | + ports { |
|---|
| 797 | + #address-cells = <1>; |
|---|
| 798 | + #size-cells = <0>; |
|---|
| 799 | + |
|---|
| 800 | + port@0 { |
|---|
| 801 | + reg = <0>; |
|---|
| 802 | + usbc0_role_sw: endpoint@0 { |
|---|
| 803 | + remote-endpoint = <&dwc3_0_role_switch>; |
|---|
| 804 | + }; |
|---|
| 805 | + }; |
|---|
| 806 | + }; |
|---|
| 807 | + |
|---|
| 808 | + usb_con: connector { |
|---|
| 809 | + compatible = "usb-c-connector"; |
|---|
| 810 | + label = "USB-C"; |
|---|
| 811 | + data-role = "dual"; |
|---|
| 812 | + power-role = "dual"; |
|---|
| 813 | + try-power-role = "sink"; |
|---|
| 814 | + op-sink-microwatt = <1000000>; |
|---|
| 815 | + sink-pdos = |
|---|
| 816 | + <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>; |
|---|
| 817 | + source-pdos = |
|---|
| 818 | + <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>; |
|---|
| 819 | + |
|---|
| 820 | + ports { |
|---|
| 821 | + #address-cells = <1>; |
|---|
| 822 | + #size-cells = <0>; |
|---|
| 823 | + |
|---|
| 824 | + port@0 { |
|---|
| 825 | + reg = <0>; |
|---|
| 826 | + usbc0_orien_sw: endpoint { |
|---|
| 827 | + remote-endpoint = <&tcphy0_orientation_switch>; |
|---|
| 828 | + }; |
|---|
| 829 | + }; |
|---|
| 830 | + }; |
|---|
| 831 | + }; |
|---|
| 784 | 832 | }; |
|---|
| 785 | 833 | |
|---|
| 786 | 834 | }; |
|---|
| .. | .. |
|---|
| 982 | 1030 | }; |
|---|
| 983 | 1031 | |
|---|
| 984 | 1032 | &tcphy0 { |
|---|
| 985 | | - extcon = <&fusb0>; |
|---|
| 986 | 1033 | status = "okay"; |
|---|
| 1034 | + orientation-switch; |
|---|
| 1035 | + port { |
|---|
| 1036 | + #address-cells = <1>; |
|---|
| 1037 | + #size-cells = <0>; |
|---|
| 1038 | + tcphy0_orientation_switch: endpoint@0 { |
|---|
| 1039 | + reg = <0>; |
|---|
| 1040 | + remote-endpoint = <&usbc0_orien_sw>; |
|---|
| 1041 | + }; |
|---|
| 1042 | + }; |
|---|
| 987 | 1043 | }; |
|---|
| 988 | 1044 | |
|---|
| 989 | 1045 | &tcphy1 { |
|---|
| .. | .. |
|---|
| 998 | 1054 | |
|---|
| 999 | 1055 | &u2phy0 { |
|---|
| 1000 | 1056 | status = "okay"; |
|---|
| 1001 | | - extcon = <&fusb0>; |
|---|
| 1002 | 1057 | |
|---|
| 1003 | 1058 | u2phy0_otg: otg-port { |
|---|
| 1004 | 1059 | status = "okay"; |
|---|
| .. | .. |
|---|
| 1054 | 1109 | |
|---|
| 1055 | 1110 | &usbdrd_dwc3_0 { |
|---|
| 1056 | 1111 | status = "okay"; |
|---|
| 1057 | | - extcon = <&fusb0>; |
|---|
| 1112 | + usb-role-switch; |
|---|
| 1113 | + port { |
|---|
| 1114 | + #address-cells = <1>; |
|---|
| 1115 | + #size-cells = <0>; |
|---|
| 1116 | + dwc3_0_role_switch: endpoint@0 { |
|---|
| 1117 | + reg = <0>; |
|---|
| 1118 | + remote-endpoint = <&usbc0_role_sw>; |
|---|
| 1119 | + }; |
|---|
| 1120 | + }; |
|---|
| 1058 | 1121 | }; |
|---|
| 1059 | 1122 | |
|---|
| 1060 | 1123 | &usbdrd_dwc3_1 { |
|---|
| .. | .. |
|---|
| 1085 | 1148 | charger_ok_int: charger-ok-int { |
|---|
| 1086 | 1149 | rockchip,pins = |
|---|
| 1087 | 1150 | <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; |
|---|
| 1088 | | - }; |
|---|
| 1089 | | - }; |
|---|
| 1090 | | - |
|---|
| 1091 | | - fusb30x { |
|---|
| 1092 | | - fusb0_int: fusb0-int { |
|---|
| 1093 | | - rockchip,pins = |
|---|
| 1094 | | - <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; |
|---|
| 1095 | 1151 | }; |
|---|
| 1096 | 1152 | }; |
|---|
| 1097 | 1153 | |
|---|
| .. | .. |
|---|
| 1146 | 1202 | }; |
|---|
| 1147 | 1203 | }; |
|---|
| 1148 | 1204 | |
|---|
| 1205 | + usb-typec { |
|---|
| 1206 | + usbc0_int: usbc0-int { |
|---|
| 1207 | + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; |
|---|
| 1208 | + }; |
|---|
| 1209 | + |
|---|
| 1210 | + vcc5v0_typec0_en: vcc5v0-typec0-en { |
|---|
| 1211 | + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; |
|---|
| 1212 | + }; |
|---|
| 1213 | + }; |
|---|
| 1214 | + |
|---|
| 1149 | 1215 | sdio-pwrseq { |
|---|
| 1150 | 1216 | wifi_enable_h: wifi-enable-h { |
|---|
| 1151 | 1217 | rockchip,pins = |
|---|