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