hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
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"
....@@ -125,6 +126,8 @@
125126 prepare-delay-ms = <20>;
126127 enable-delay-ms = <20>;
127128 reset-delay-ms = <20>;
129
+ width-mm = <120>;
130
+ height-mm = <160>;
128131
129132 display-timings {
130133 native-mode = <&timing0>;
....@@ -198,6 +201,16 @@
198201 reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
199202 };
200203
204
+ vbus_typec: vbus-typec-regulator {
205
+ compatible = "regulator-fixed";
206
+ enable-active-high;
207
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
208
+ pinctrl-names = "default";
209
+ pinctrl-0 = <&vcc5v0_typec0_en>;
210
+ regulator-name = "vbus_typec";
211
+ vin-supply = <&vcc5v0_sys>;
212
+ };
213
+
201214 vcc_phy: vcc-phy-regulator {
202215 compatible = "regulator-fixed";
203216 regulator-name = "vcc_phy";
....@@ -240,7 +253,6 @@
240253
241254 &cdn_dp {
242255 status = "okay";
243
- extcon = <&fusb0>;
244256 phys = <&tcphy0_dp>;
245257 };
246258
....@@ -618,8 +630,8 @@
618630 };
619631 };
620632
621
- vdd_cpu_b: tcs452x@1c {
622
- compatible = "tcs,tcs452x";
633
+ vdd_cpu_b: tcs4525@1c {
634
+ compatible = "tcs,tcs4525";
623635 reg = <0x1c>;
624636 vin-supply = <&vcc5v0_sys>;
625637 regulator-compatible = "fan53555-reg";
....@@ -638,8 +650,8 @@
638650 };
639651 };
640652
641
- vdd_gpu: tcs452x@10 {
642
- compatible = "tcs,tcs452x";
653
+ vdd_gpu: tcs4526@10 {
654
+ compatible = "tcs,tcs4526";
643655 reg = <0x10>;
644656 vin-supply = <&vcc5v0_sys>;
645657 regulator-compatible = "fan53555-reg";
....@@ -661,7 +673,6 @@
661673 bq25700: bq25700@6b {
662674 compatible = "ti,bq25703";
663675 reg = <0x6b>;
664
- extcon = <&fusb0>;
665676 interrupt-parent = <&gpio1>;
666677 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
667678 pinctrl-names = "default";
....@@ -735,16 +746,53 @@
735746 i2c-scl-falling-time-ns = <11>;
736747 clock-frequency = <100000>;
737748
738
- fusb0: fusb30x@22 {
739
- compatible = "fairchild,fusb302";
749
+ usbc0: fusb302@22 {
750
+ compatible = "fcs,fusb302";
740751 reg = <0x22>;
752
+ interrupt-parent = <&gpio1>;
753
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
741754 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>;
755
+ pinctrl-0 = <&usbc0_int>;
756
+ vbus-supply = <&vbus_typec>;
745757 status = "okay";
746
- };
747758
759
+ ports {
760
+ #address-cells = <1>;
761
+ #size-cells = <0>;
762
+
763
+ port@0 {
764
+ reg = <0>;
765
+ usbc0_role_sw: endpoint@0 {
766
+ remote-endpoint = <&dwc3_0_role_switch>;
767
+ };
768
+ };
769
+ };
770
+
771
+ usb_con: connector {
772
+ compatible = "usb-c-connector";
773
+ label = "USB-C";
774
+ data-role = "dual";
775
+ power-role = "dual";
776
+ try-power-role = "sink";
777
+ op-sink-microwatt = <1000000>;
778
+ sink-pdos =
779
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
780
+ source-pdos =
781
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
782
+
783
+ ports {
784
+ #address-cells = <1>;
785
+ #size-cells = <0>;
786
+
787
+ port@0 {
788
+ reg = <0>;
789
+ usbc0_orien_sw: endpoint {
790
+ remote-endpoint = <&tcphy0_orientation_switch>;
791
+ };
792
+ };
793
+ };
794
+ };
795
+ };
748796 };
749797
750798 &i2s1 {
....@@ -838,8 +886,16 @@
838886 };
839887
840888 &tcphy0 {
841
- extcon = <&fusb0>;
842889 status = "okay";
890
+ orientation-switch;
891
+ port {
892
+ #address-cells = <1>;
893
+ #size-cells = <0>;
894
+ tcphy0_orientation_switch: endpoint@0 {
895
+ reg = <0>;
896
+ remote-endpoint = <&usbc0_orien_sw>;
897
+ };
898
+ };
843899 };
844900
845901 &tcphy1 {
....@@ -854,7 +910,6 @@
854910
855911 &u2phy0 {
856912 status = "okay";
857
- extcon = <&fusb0>;
858913
859914 u2phy0_otg: otg-port {
860915 status = "okay";
....@@ -911,7 +966,15 @@
911966
912967 &usbdrd_dwc3_0 {
913968 status = "okay";
914
- extcon = <&fusb0>;
969
+ usb-role-switch;
970
+ port {
971
+ #address-cells = <1>;
972
+ #size-cells = <0>;
973
+ dwc3_0_role_switch: endpoint@0 {
974
+ reg = <0>;
975
+ remote-endpoint = <&usbc0_role_sw>;
976
+ };
977
+ };
915978 };
916979
917980 &usbdrd_dwc3_1 {
....@@ -936,13 +999,6 @@
936999 charger_ok_int: charger-ok-int {
9371000 rockchip,pins =
9381001 <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>;
9461002 };
9471003 };
9481004
....@@ -1031,6 +1087,16 @@
10311087 };
10321088 };
10331089
1090
+ usb-typec {
1091
+ usbc0_int: usbc0-int {
1092
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1093
+ };
1094
+
1095
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1096
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1097
+ };
1098
+ };
1099
+
10341100 wireless-bluetooth {
10351101 uart0_gpios: uart0-gpios {
10361102 rockchip,pins =