hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10.dts
....@@ -197,6 +197,16 @@
197197 reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
198198 };
199199
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
+
200210 vcc_phy: vcc-phy-regulator {
201211 compatible = "regulator-fixed";
202212 regulator-name = "vcc_phy";
....@@ -239,7 +249,6 @@
239249
240250 &cdn_dp {
241251 status = "okay";
242
- extcon = <&fusb0>;
243252 phys = <&tcphy0_dp>;
244253 };
245254
....@@ -676,7 +685,6 @@
676685 bq25700: bq25700@6b {
677686 compatible = "ti,bq25703";
678687 reg = <0x6b>;
679
- extcon = <&fusb0>;
680688 interrupt-parent = <&gpio1>;
681689 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
682690 pinctrl-names = "default";
....@@ -750,15 +758,53 @@
750758 i2c-scl-falling-time-ns = <11>;
751759 clock-frequency = <100000>;
752760
753
- fusb0: fusb30x@22 {
754
- compatible = "fairchild,fusb302";
761
+ usbc0: fusb302@22 {
762
+ compatible = "fcs,fusb302";
755763 reg = <0x22>;
764
+ interrupt-parent = <&gpio1>;
765
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
756766 pinctrl-names = "default";
757
- pinctrl-0 = <&fusb0_int>;
758
- int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
767
+ pinctrl-0 = <&usbc0_int>;
768
+ vbus-supply = <&vbus_typec>;
759769 status = "okay";
760
- };
761770
771
+ ports {
772
+ #address-cells = <1>;
773
+ #size-cells = <0>;
774
+
775
+ port@0 {
776
+ reg = <0>;
777
+ usbc0_role_sw: endpoint@0 {
778
+ remote-endpoint = <&dwc3_0_role_switch>;
779
+ };
780
+ };
781
+ };
782
+
783
+ usb_con: connector {
784
+ compatible = "usb-c-connector";
785
+ label = "USB-C";
786
+ data-role = "dual";
787
+ power-role = "dual";
788
+ try-power-role = "sink";
789
+ op-sink-microwatt = <1000000>;
790
+ sink-pdos =
791
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
792
+ source-pdos =
793
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
794
+
795
+ ports {
796
+ #address-cells = <1>;
797
+ #size-cells = <0>;
798
+
799
+ port@0 {
800
+ reg = <0>;
801
+ usbc0_orien_sw: endpoint {
802
+ remote-endpoint = <&tcphy0_orientation_switch>;
803
+ };
804
+ };
805
+ };
806
+ };
807
+ };
762808 };
763809
764810 &i2s1 {
....@@ -856,8 +902,16 @@
856902 };
857903
858904 &tcphy0 {
859
- extcon = <&fusb0>;
860905 status = "okay";
906
+ orientation-switch;
907
+ port {
908
+ #address-cells = <1>;
909
+ #size-cells = <0>;
910
+ tcphy0_orientation_switch: endpoint@0 {
911
+ reg = <0>;
912
+ remote-endpoint = <&usbc0_orien_sw>;
913
+ };
914
+ };
861915 };
862916
863917 &tcphy1 {
....@@ -872,7 +926,6 @@
872926
873927 &u2phy0 {
874928 status = "okay";
875
- extcon = <&fusb0>;
876929
877930 u2phy0_otg: otg-port {
878931 status = "okay";
....@@ -928,7 +981,15 @@
928981
929982 &usbdrd_dwc3_0 {
930983 status = "okay";
931
- extcon = <&fusb0>;
984
+ usb-role-switch;
985
+ port {
986
+ #address-cells = <1>;
987
+ #size-cells = <0>;
988
+ dwc3_0_role_switch: endpoint@0 {
989
+ reg = <0>;
990
+ remote-endpoint = <&usbc0_role_sw>;
991
+ };
992
+ };
932993 };
933994
934995 &usbdrd_dwc3_1 {
....@@ -953,13 +1014,6 @@
9531014 charger_ok_int: charger-ok-int {
9541015 rockchip,pins =
9551016 <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
956
- };
957
- };
958
-
959
- fusb30x {
960
- fusb0_int: fusb0-int {
961
- rockchip,pins =
962
- <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
9631017 };
9641018 };
9651019
....@@ -1048,6 +1102,16 @@
10481102 };
10491103 };
10501104
1105
+ usb-typec {
1106
+ usbc0_int: usbc0-int {
1107
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1108
+ };
1109
+
1110
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1111
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1112
+ };
1113
+ };
1114
+
10511115 wireless-bluetooth {
10521116 uart0_gpios: uart0-gpios {
10531117 rockchip,pins =