hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v11-linux.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-linux.dtsi"
1314 #include "rk3399-opp.dtsi"
....@@ -135,6 +136,8 @@
135136 prepare-delay-ms = <20>;
136137 enable-delay-ms = <20>;
137138 reset-delay-ms = <20>;
139
+ width-mm = <120>;
140
+ height-mm = <160>;
138141
139142 display-timings {
140143 native-mode = <&timing0>;
....@@ -201,6 +204,26 @@
201204 status = "disabled";
202205 };
203206
207
+ vbus_typec: vbus-typec-regulator {
208
+ compatible = "regulator-fixed";
209
+ enable-active-high;
210
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
211
+ pinctrl-names = "default";
212
+ pinctrl-0 = <&vcc5v0_typec0_en>;
213
+ regulator-name = "vbus_typec";
214
+ vin-supply = <&vcc5v0_sys>;
215
+ };
216
+
217
+ vbus_typec: vbus-typec-regulator {
218
+ compatible = "regulator-fixed";
219
+ enable-active-high;
220
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
221
+ pinctrl-names = "default";
222
+ pinctrl-0 = <&vcc5v0_typec0_en>;
223
+ regulator-name = "vbus_typec";
224
+ vin-supply = <&vcc5v0_sys>;
225
+ };
226
+
204227 vcc_phy: vcc-phy-regulator {
205228 compatible = "regulator-fixed";
206229 regulator-name = "vcc_phy";
....@@ -243,7 +266,6 @@
243266
244267 &cdn_dp {
245268 status = "okay";
246
- extcon = <&fusb0>;
247269 phys = <&tcphy0_dp>;
248270 };
249271
....@@ -614,8 +636,8 @@
614636 };
615637 };
616638
617
- vdd_cpu_b: tcs452x@1c {
618
- compatible = "tcs,tcs452x";
639
+ vdd_cpu_b: tcs4525@1c {
640
+ compatible = "tcs,tcs4525";
619641 reg = <0x1c>;
620642 vin-supply = <&vcc5v0_sys>;
621643 regulator-compatible = "fan53555-reg";
....@@ -634,8 +656,8 @@
634656 };
635657 };
636658
637
- vdd_gpu: tcs452x@10 {
638
- compatible = "tcs,tcs452x";
659
+ vdd_gpu: tcs4526@10 {
660
+ compatible = "tcs,tcs4526";
639661 reg = <0x10>;
640662 vin-supply = <&vcc5v0_sys>;
641663 regulator-compatible = "fan53555-reg";
....@@ -657,7 +679,6 @@
657679 bq25700: bq25700@6b {
658680 compatible = "ti,bq25703";
659681 reg = <0x6b>;
660
- extcon = <&fusb0>;
661682 interrupt-parent = <&gpio1>;
662683 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
663684 pinctrl-names = "default";
....@@ -786,16 +807,53 @@
786807 i2c-scl-falling-time-ns = <11>;
787808 clock-frequency = <100000>;
788809
789
- fusb0: fusb30x@22 {
790
- compatible = "fairchild,fusb302";
810
+ usbc0: fusb302@22 {
811
+ compatible = "fcs,fusb302";
791812 reg = <0x22>;
813
+ interrupt-parent = <&gpio1>;
814
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
792815 pinctrl-names = "default";
793
- pinctrl-0 = <&fusb0_int>;
794
- int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
795
- vbus-5v-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_LOW>;
816
+ pinctrl-0 = <&usbc0_int>;
817
+ vbus-supply = <&vbus_typec>;
796818 status = "okay";
797
- };
798819
820
+ ports {
821
+ #address-cells = <1>;
822
+ #size-cells = <0>;
823
+
824
+ port@0 {
825
+ reg = <0>;
826
+ usbc0_role_sw: endpoint@0 {
827
+ remote-endpoint = <&dwc3_0_role_switch>;
828
+ };
829
+ };
830
+ };
831
+
832
+ usb_con: connector {
833
+ compatible = "usb-c-connector";
834
+ label = "USB-C";
835
+ data-role = "dual";
836
+ power-role = "dual";
837
+ try-power-role = "sink";
838
+ op-sink-microwatt = <1000000>;
839
+ sink-pdos =
840
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
841
+ source-pdos =
842
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
843
+
844
+ ports {
845
+ #address-cells = <1>;
846
+ #size-cells = <0>;
847
+
848
+ port@0 {
849
+ reg = <0>;
850
+ usbc0_orien_sw: endpoint {
851
+ remote-endpoint = <&tcphy0_orientation_switch>;
852
+ };
853
+ };
854
+ };
855
+ };
856
+ };
799857 };
800858
801859 &i2s1 {
....@@ -995,8 +1053,16 @@
9951053 };
9961054
9971055 &tcphy0 {
998
- extcon = <&fusb0>;
9991056 status = "okay";
1057
+ orientation-switch;
1058
+ port {
1059
+ #address-cells = <1>;
1060
+ #size-cells = <0>;
1061
+ tcphy0_orientation_switch: endpoint@0 {
1062
+ reg = <0>;
1063
+ remote-endpoint = <&usbc0_orien_sw>;
1064
+ };
1065
+ };
10001066 };
10011067
10021068 &tcphy1 {
....@@ -1011,7 +1077,6 @@
10111077
10121078 &u2phy0 {
10131079 status = "okay";
1014
- extcon = <&fusb0>;
10151080
10161081 u2phy0_otg: otg-port {
10171082 status = "okay";
....@@ -1067,7 +1132,15 @@
10671132
10681133 &usbdrd_dwc3_0 {
10691134 status = "okay";
1070
- extcon = <&fusb0>;
1135
+ usb-role-switch;
1136
+ port {
1137
+ #address-cells = <1>;
1138
+ #size-cells = <0>;
1139
+ dwc3_0_role_switch: endpoint@0 {
1140
+ reg = <0>;
1141
+ remote-endpoint = <&usbc0_role_sw>;
1142
+ };
1143
+ };
10711144 };
10721145
10731146 &usbdrd_dwc3_1 {
....@@ -1105,13 +1178,6 @@
11051178 cam_pwren_high: cam-pwren-high {
11061179 rockchip,pins =
11071180 <4 RK_PC5 RK_FUNC_GPIO &pcfg_output_high>;
1108
- };
1109
- };
1110
-
1111
- fusb30x {
1112
- fusb0_int: fusb0-int {
1113
- rockchip,pins =
1114
- <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
11151181 };
11161182 };
11171183
....@@ -1205,6 +1271,16 @@
12051271 };
12061272 };
12071273
1274
+ usb-typec {
1275
+ usbc0_int: usbc0-int {
1276
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1277
+ };
1278
+
1279
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1280
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1281
+ };
1282
+ };
1283
+
12081284 wireless-bluetooth {
12091285 bt_irq_gpio: bt-irq-gpio {
12101286 rockchip,pins =