.. | .. |
---|
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-android.dtsi" |
---|
13 | 14 | #include "rk3399-opp.dtsi" |
---|
.. | .. |
---|
198 | 199 | reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; |
---|
199 | 200 | }; |
---|
200 | 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 | + |
---|
201 | 212 | vcc_phy: vcc-phy-regulator { |
---|
202 | 213 | compatible = "regulator-fixed"; |
---|
203 | 214 | regulator-name = "vcc_phy"; |
---|
.. | .. |
---|
240 | 251 | |
---|
241 | 252 | &cdn_dp { |
---|
242 | 253 | status = "okay"; |
---|
243 | | - extcon = <&fusb0>; |
---|
244 | 254 | phys = <&tcphy0_dp>; |
---|
245 | 255 | }; |
---|
246 | 256 | |
---|
.. | .. |
---|
618 | 628 | }; |
---|
619 | 629 | }; |
---|
620 | 630 | |
---|
621 | | - vdd_cpu_b: tcs452x@1c { |
---|
622 | | - compatible = "tcs,tcs452x"; |
---|
| 631 | + vdd_cpu_b: tcs4525@1c { |
---|
| 632 | + compatible = "tcs,tcs4525"; |
---|
623 | 633 | reg = <0x1c>; |
---|
624 | 634 | vin-supply = <&vcc5v0_sys>; |
---|
625 | 635 | regulator-compatible = "fan53555-reg"; |
---|
.. | .. |
---|
638 | 648 | }; |
---|
639 | 649 | }; |
---|
640 | 650 | |
---|
641 | | - vdd_gpu: tcs452x@10 { |
---|
642 | | - compatible = "tcs,tcs452x"; |
---|
| 651 | + vdd_gpu: tcs4526@10 { |
---|
| 652 | + compatible = "tcs,tcs4526"; |
---|
643 | 653 | reg = <0x10>; |
---|
644 | 654 | vin-supply = <&vcc5v0_sys>; |
---|
645 | 655 | regulator-compatible = "fan53555-reg"; |
---|
.. | .. |
---|
661 | 671 | bq25700: bq25700@6b { |
---|
662 | 672 | compatible = "ti,bq25703"; |
---|
663 | 673 | reg = <0x6b>; |
---|
664 | | - extcon = <&fusb0>; |
---|
665 | 674 | interrupt-parent = <&gpio1>; |
---|
666 | 675 | interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>; |
---|
667 | 676 | pinctrl-names = "default"; |
---|
.. | .. |
---|
735 | 744 | i2c-scl-falling-time-ns = <11>; |
---|
736 | 745 | clock-frequency = <100000>; |
---|
737 | 746 | |
---|
738 | | - fusb0: fusb30x@22 { |
---|
739 | | - compatible = "fairchild,fusb302"; |
---|
| 747 | + usbc0: fusb302@22 { |
---|
| 748 | + compatible = "fcs,fusb302"; |
---|
740 | 749 | reg = <0x22>; |
---|
| 750 | + interrupt-parent = <&gpio1>; |
---|
| 751 | + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>; |
---|
741 | 752 | pinctrl-names = "default"; |
---|
742 | | - pinctrl-0 = <&fusb0_int>; |
---|
743 | | - int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; |
---|
744 | | - vbus-5v-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_LOW>; |
---|
| 753 | + pinctrl-0 = <&usbc0_int>; |
---|
| 754 | + vbus-supply = <&vbus_typec>; |
---|
745 | 755 | status = "okay"; |
---|
746 | | - }; |
---|
747 | 756 | |
---|
| 757 | + ports { |
---|
| 758 | + #address-cells = <1>; |
---|
| 759 | + #size-cells = <0>; |
---|
| 760 | + |
---|
| 761 | + port@0 { |
---|
| 762 | + reg = <0>; |
---|
| 763 | + usbc0_role_sw: endpoint@0 { |
---|
| 764 | + remote-endpoint = <&dwc3_0_role_switch>; |
---|
| 765 | + }; |
---|
| 766 | + }; |
---|
| 767 | + }; |
---|
| 768 | + |
---|
| 769 | + usb_con: connector { |
---|
| 770 | + compatible = "usb-c-connector"; |
---|
| 771 | + label = "USB-C"; |
---|
| 772 | + data-role = "dual"; |
---|
| 773 | + power-role = "dual"; |
---|
| 774 | + try-power-role = "sink"; |
---|
| 775 | + op-sink-microwatt = <1000000>; |
---|
| 776 | + sink-pdos = |
---|
| 777 | + <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>; |
---|
| 778 | + source-pdos = |
---|
| 779 | + <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>; |
---|
| 780 | + |
---|
| 781 | + ports { |
---|
| 782 | + #address-cells = <1>; |
---|
| 783 | + #size-cells = <0>; |
---|
| 784 | + |
---|
| 785 | + port@0 { |
---|
| 786 | + reg = <0>; |
---|
| 787 | + usbc0_orien_sw: endpoint { |
---|
| 788 | + remote-endpoint = <&tcphy0_orientation_switch>; |
---|
| 789 | + }; |
---|
| 790 | + }; |
---|
| 791 | + }; |
---|
| 792 | + }; |
---|
| 793 | + }; |
---|
748 | 794 | }; |
---|
749 | 795 | |
---|
750 | 796 | &i2s1 { |
---|
.. | .. |
---|
838 | 884 | }; |
---|
839 | 885 | |
---|
840 | 886 | &tcphy0 { |
---|
841 | | - extcon = <&fusb0>; |
---|
842 | 887 | status = "okay"; |
---|
| 888 | + orientation-switch; |
---|
| 889 | + port { |
---|
| 890 | + #address-cells = <1>; |
---|
| 891 | + #size-cells = <0>; |
---|
| 892 | + tcphy0_orientation_switch: endpoint@0 { |
---|
| 893 | + reg = <0>; |
---|
| 894 | + remote-endpoint = <&usbc0_orien_sw>; |
---|
| 895 | + }; |
---|
| 896 | + }; |
---|
843 | 897 | }; |
---|
844 | 898 | |
---|
845 | 899 | &tcphy1 { |
---|
.. | .. |
---|
854 | 908 | |
---|
855 | 909 | &u2phy0 { |
---|
856 | 910 | status = "okay"; |
---|
857 | | - extcon = <&fusb0>; |
---|
858 | 911 | |
---|
859 | 912 | u2phy0_otg: otg-port { |
---|
860 | 913 | status = "okay"; |
---|
.. | .. |
---|
911 | 964 | |
---|
912 | 965 | &usbdrd_dwc3_0 { |
---|
913 | 966 | status = "okay"; |
---|
914 | | - extcon = <&fusb0>; |
---|
| 967 | + usb-role-switch; |
---|
| 968 | + port { |
---|
| 969 | + #address-cells = <1>; |
---|
| 970 | + #size-cells = <0>; |
---|
| 971 | + dwc3_0_role_switch: endpoint@0 { |
---|
| 972 | + reg = <0>; |
---|
| 973 | + remote-endpoint = <&usbc0_role_sw>; |
---|
| 974 | + }; |
---|
| 975 | + }; |
---|
915 | 976 | }; |
---|
916 | 977 | |
---|
917 | 978 | &usbdrd_dwc3_1 { |
---|
.. | .. |
---|
936 | 997 | charger_ok_int: charger-ok-int { |
---|
937 | 998 | rockchip,pins = |
---|
938 | 999 | <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; |
---|
939 | | - }; |
---|
940 | | - }; |
---|
941 | | - |
---|
942 | | - fusb30x { |
---|
943 | | - fusb0_int: fusb0-int { |
---|
944 | | - rockchip,pins = |
---|
945 | | - <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; |
---|
946 | 1000 | }; |
---|
947 | 1001 | }; |
---|
948 | 1002 | |
---|
.. | .. |
---|
1031 | 1085 | }; |
---|
1032 | 1086 | }; |
---|
1033 | 1087 | |
---|
| 1088 | + usb-typec { |
---|
| 1089 | + usbc0_int: usbc0-int { |
---|
| 1090 | + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; |
---|
| 1091 | + }; |
---|
| 1092 | + |
---|
| 1093 | + vcc5v0_typec0_en: vcc5v0-typec0-en { |
---|
| 1094 | + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; |
---|
| 1095 | + }; |
---|
| 1096 | + }; |
---|
| 1097 | + |
---|
1034 | 1098 | wireless-bluetooth { |
---|
1035 | 1099 | uart0_gpios: uart0-gpios { |
---|
1036 | 1100 | rockchip,pins = |
---|