hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v11.dts
....@@ -8,6 +8,7 @@
88 #include <dt-bindings/display/drm_mipi_dsi.h>
99 #include <dt-bindings/sensor-dev.h>
1010 #include <dt-bindings/pwm/pwm.h>
11
+#include "dt-bindings/usb/pd.h"
1112 #include "rk3399pro.dtsi"
1213 #include "rk3399-android.dtsi"
1314 #include "rk3399-opp.dtsi"
....@@ -198,6 +199,16 @@
198199 reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
199200 };
200201
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
+
201212 vcc_phy: vcc-phy-regulator {
202213 compatible = "regulator-fixed";
203214 regulator-name = "vcc_phy";
....@@ -240,7 +251,6 @@
240251
241252 &cdn_dp {
242253 status = "okay";
243
- extcon = <&fusb0>;
244254 phys = <&tcphy0_dp>;
245255 };
246256
....@@ -618,8 +628,8 @@
618628 };
619629 };
620630
621
- vdd_cpu_b: tcs452x@1c {
622
- compatible = "tcs,tcs452x";
631
+ vdd_cpu_b: tcs4525@1c {
632
+ compatible = "tcs,tcs4525";
623633 reg = <0x1c>;
624634 vin-supply = <&vcc5v0_sys>;
625635 regulator-compatible = "fan53555-reg";
....@@ -638,8 +648,8 @@
638648 };
639649 };
640650
641
- vdd_gpu: tcs452x@10 {
642
- compatible = "tcs,tcs452x";
651
+ vdd_gpu: tcs4526@10 {
652
+ compatible = "tcs,tcs4526";
643653 reg = <0x10>;
644654 vin-supply = <&vcc5v0_sys>;
645655 regulator-compatible = "fan53555-reg";
....@@ -661,7 +671,6 @@
661671 bq25700: bq25700@6b {
662672 compatible = "ti,bq25703";
663673 reg = <0x6b>;
664
- extcon = <&fusb0>;
665674 interrupt-parent = <&gpio1>;
666675 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
667676 pinctrl-names = "default";
....@@ -735,16 +744,53 @@
735744 i2c-scl-falling-time-ns = <11>;
736745 clock-frequency = <100000>;
737746
738
- fusb0: fusb30x@22 {
739
- compatible = "fairchild,fusb302";
747
+ usbc0: fusb302@22 {
748
+ compatible = "fcs,fusb302";
740749 reg = <0x22>;
750
+ interrupt-parent = <&gpio1>;
751
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
741752 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>;
745755 status = "okay";
746
- };
747756
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
+ };
748794 };
749795
750796 &i2s1 {
....@@ -838,8 +884,16 @@
838884 };
839885
840886 &tcphy0 {
841
- extcon = <&fusb0>;
842887 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
+ };
843897 };
844898
845899 &tcphy1 {
....@@ -854,7 +908,6 @@
854908
855909 &u2phy0 {
856910 status = "okay";
857
- extcon = <&fusb0>;
858911
859912 u2phy0_otg: otg-port {
860913 status = "okay";
....@@ -911,7 +964,15 @@
911964
912965 &usbdrd_dwc3_0 {
913966 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
+ };
915976 };
916977
917978 &usbdrd_dwc3_1 {
....@@ -936,13 +997,6 @@
936997 charger_ok_int: charger-ok-int {
937998 rockchip,pins =
938999 <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>;
9461000 };
9471001 };
9481002
....@@ -1031,6 +1085,16 @@
10311085 };
10321086 };
10331087
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
+
10341098 wireless-bluetooth {
10351099 uart0_gpios: uart0-gpios {
10361100 rockchip,pins =