hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dtsi
....@@ -9,6 +9,7 @@
99 #include <dt-bindings/sensor-dev.h>
1010 #include "rk3399-vop-clk-set.dtsi"
1111 #include <dt-bindings/input/input.h>
12
+#include "dt-bindings/usb/pd.h"
1213
1314 / {
1415 compatible = "rockchip,rk3399-evb-ind", "rockchip,rk3399";
....@@ -87,23 +88,23 @@
8788 };
8889
8990 rk809_sound: rk809-sound {
90
- compatible = "simple-audio-card";
91
- simple-audio-card,format = "i2s";
92
- simple-audio-card,name = "rockchip,rk809-codec";
93
- simple-audio-card,mclk-fs = <256>;
94
- simple-audio-card,widgets =
95
- "Microphone", "Mic Jack",
96
- "Headphone", "Headphone Jack";
97
- simple-audio-card,routing =
98
- "Mic Jack", "MICBIAS1",
99
- "IN1P", "Mic Jack",
100
- "Headphone Jack", "HPOL",
101
- "Headphone Jack", "HPOR";
102
- simple-audio-card,cpu {
103
- sound-dai = <&i2s1>;
104
- };
105
- simple-audio-card,codec {
106
- sound-dai = <&rk809_codec>;
91
+ compatible = "rockchip,multicodecs-card";
92
+ rockchip,card-name = "rockchip-rk809";
93
+ hp-det-gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
94
+ io-channels = <&saradc 2>;
95
+ io-channel-names = "adc-detect";
96
+ keyup-threshold-microvolt = <1800000>;
97
+ poll-interval = <100>;
98
+ rockchip,format = "i2s";
99
+ rockchip,mclk-fs = <256>;
100
+ rockchip,cpu = <&i2s1>;
101
+ rockchip,codec = <&rk809_codec>;
102
+ pinctrl-names = "default";
103
+ pinctrl-0 = <&hp_det>;
104
+ play-pause-key {
105
+ label = "playpause";
106
+ linux,code = <KEY_PLAYPAUSE>;
107
+ press-threshold-microvolt = <2000>;
107108 };
108109 };
109110
....@@ -116,20 +117,16 @@
116117
117118 hdmi_sound: hdmi-sound {
118119 status = "disabled";
119
- compatible = "simple-audio-card";
120
- simple-audio-card,format = "i2s";
121
- simple-audio-card,mclk-fs = <256>;
122
- simple-audio-card,name = "rockchip,hdmi";
123
-
124
- simple-audio-card,cpu {
125
- sound-dai = <&i2s2>;
126
- };
127
- simple-audio-card,codec {
128
- sound-dai = <&hdmi>;
129
- };
120
+ compatible = "rockchip,hdmi";
121
+ rockchip,mclk-fs = <256>;
122
+ rockchip,card-name = "rockchip-hdmi0";
123
+ rockchip,cpu = <&i2s2>;
124
+ rockchip,codec = <&hdmi>;
125
+ rockchip,jack-det;
130126 };
131127
132128 rk_headset: rk-headset {
129
+ status = "disabled";
133130 compatible = "rockchip_headset";
134131 headset_gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
135132 pinctrl-names = "default";
....@@ -141,6 +138,7 @@
141138 status = "okay";
142139 compatible = "simple-audio-card";
143140 simple-audio-card,name = "ROCKCHIP,SPDIF";
141
+ simple-audio-card,mclk-fs = <128>;
144142 simple-audio-card,cpu {
145143 sound-dai = <&spdif>;
146144 };
....@@ -177,6 +175,7 @@
177175 wifi_chip_type = "ap6354";
178176 sdio_vref = <1800>;
179177 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
178
+ WIFI,poweren_gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
180179 status = "okay";
181180 };
182181
....@@ -206,11 +205,6 @@
206205 status = "okay";
207206 };
208207
209
- dummy_codec: dummy-codec {
210
- compatible = "rockchip,dummy-codec";
211
- #sound-dai-cells = <0>;
212
- };
213
-
214208 tc358749x_sound:tc358749x-sound {
215209 status = "okay";
216210 compatible = "simple-audio-card";
....@@ -219,10 +213,10 @@
219213 simple-audio-card,bitclock-master = <&sound0_master>;
220214 simple-audio-card,frame-master = <&sound0_master>;
221215 simple-audio-card,cpu {
222
- sound-dai = <&i2s0>;
216
+ sound-dai = <&i2s0>;
223217 };
224218 sound0_master: simple-audio-card,codec {
225
- sound-dai = <&dummy_codec>;
219
+ sound-dai = <&tc358749x>;
226220 };
227221 };
228222
....@@ -261,6 +255,16 @@
261255 regulator-boot-on;
262256 regulator-min-microvolt = <5000000>;
263257 regulator-max-microvolt = <5000000>;
258
+ };
259
+
260
+ vbus_typec: vbus-typec-regulator {
261
+ compatible = "regulator-fixed";
262
+ enable-active-high;
263
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
264
+ pinctrl-names = "default";
265
+ pinctrl-0 = <&vcc5v0_typec0_en>;
266
+ regulator-name = "vbus_typec";
267
+ vin-supply = <&vcc5v0_sys>;
264268 };
265269
266270 vcc_phy: vcc-phy-regulator {
....@@ -306,7 +310,6 @@
306310
307311 &cdn_dp {
308312 status = "okay";
309
- extcon = <&fusb0>;
310313 phys = <&tcphy0_dp>;
311314 };
312315
....@@ -424,7 +427,7 @@
424427 pinctrl-names = "default";
425428 pinctrl-0 = <&rgmii_pins>;
426429 tx_delay = <0x22>;
427
- rx_delay = <0x08>;
430
+ rx_delay = <0x23>;
428431 status = "okay";
429432 };
430433
....@@ -443,8 +446,8 @@
443446 i2c-scl-falling-time-ns = <4>;
444447 clock-frequency = <400000>;
445448
446
- vdd_cpu_b: tcs452x@1c {
447
- compatible = "tcs,tcs452x";
449
+ vdd_cpu_b: tcs4525@1c {
450
+ compatible = "tcs,tcs4525";
448451 reg = <0x1c>;
449452 vin-supply = <&vcc5v0_sys>;
450453 regulator-compatible = "fan53555-reg";
....@@ -463,8 +466,8 @@
463466 };
464467 };
465468
466
- vdd_gpu: tcs452x@10 {
467
- compatible = "tcs,tcs452x";
469
+ vdd_gpu: tcs4526@10 {
470
+ compatible = "tcs,tcs4526";
468471 reg = <0x10>;
469472 vin-supply = <&vcc5v0_sys>;
470473 regulator-compatible = "fan53555-reg";
....@@ -839,14 +842,71 @@
839842 layout = <8>;
840843 };
841844
842
- fusb0: fusb30x@22 {
843
- compatible = "fairchild,fusb302";
845
+ usbc0: fusb302@22 {
846
+ compatible = "fcs,fusb302";
844847 reg = <0x22>;
848
+ interrupt-parent = <&gpio1>;
849
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
845850 pinctrl-names = "default";
846
- pinctrl-0 = <&fusb0_int>;
847
- int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
848
- vbus-5v-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
851
+ pinctrl-0 = <&usbc0_int>;
852
+ vbus-supply = <&vbus_typec>;
849853 status = "okay";
854
+
855
+ ports {
856
+ #address-cells = <1>;
857
+ #size-cells = <0>;
858
+
859
+ port@0 {
860
+ reg = <0>;
861
+ usbc0_role_sw: endpoint@0 {
862
+ remote-endpoint = <&dwc3_0_role_switch>;
863
+ };
864
+ };
865
+ };
866
+
867
+ usb_con: connector {
868
+ compatible = "usb-c-connector";
869
+ label = "USB-C";
870
+ data-role = "dual";
871
+ power-role = "dual";
872
+ try-power-role = "sink";
873
+ op-sink-microwatt = <1000000>;
874
+ sink-pdos =
875
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
876
+ source-pdos =
877
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
878
+
879
+ displayport = <&cdn_dp>;
880
+
881
+ altmodes {
882
+ #address-cells = <1>;
883
+ #size-cells = <0>;
884
+
885
+ altmode@0 {
886
+ reg = <0>;
887
+ svid = <0xff01>;
888
+ vdo = <0xffffffff>;
889
+ };
890
+ };
891
+
892
+ ports {
893
+ #address-cells = <1>;
894
+ #size-cells = <0>;
895
+
896
+ port@0 {
897
+ reg = <0>;
898
+ usbc0_orien_sw: endpoint {
899
+ remote-endpoint = <&tcphy0_orientation_switch>;
900
+ };
901
+ };
902
+ port@1 {
903
+ reg = <1>;
904
+ dp_mode_sw: endpoint {
905
+ remote-endpoint = <&tcphy_dp_altmode_switch>;
906
+ };
907
+ };
908
+ };
909
+ };
850910 };
851911
852912 sensor@0d {
....@@ -865,7 +925,6 @@
865925 bq25700: bq25700@6b {//6a
866926 compatible = "ti,bq25703";
867927 reg = <0x6b>;
868
- extcon = <&fusb0>;
869928
870929 interrupt-parent = <&gpio0>;
871930 interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
....@@ -1118,7 +1177,8 @@
11181177 &sdio0 {
11191178 clock-frequency = <150000000>;
11201179 clock-freq-min-max = <200000 150000000>;
1121
- supports-sdio;
1180
+ no-sd;
1181
+ no-mmc;
11221182 bus-width = <4>;
11231183 disable-wp;
11241184 cap-sd-highspeed;
....@@ -1136,7 +1196,8 @@
11361196 &sdmmc {
11371197 clock-frequency = <150000000>;
11381198 clock-freq-min-max = <100000 150000000>;
1139
- supports-sd;
1199
+ no-sdio;
1200
+ no-mmc;
11401201 bus-width = <4>;
11411202 cap-mmc-highspeed;
11421203 cap-sd-highspeed;
....@@ -1153,7 +1214,8 @@
11531214 &sdhci {
11541215 bus-width = <8>;
11551216 mmc-hs400-1_8v;
1156
- supports-emmc;
1217
+ no-sdio;
1218
+ no-sd;
11571219 non-removable;
11581220 keep-power-in-suspend;
11591221 mmc-hs400-enhanced-strobe;
....@@ -1166,8 +1228,22 @@
11661228 };
11671229
11681230 &tcphy0 {
1169
- extcon = <&fusb0>;
11701231 status = "okay";
1232
+
1233
+ svid = <0xff01>;
1234
+ orientation-switch;
1235
+ port {
1236
+ #address-cells = <1>;
1237
+ #size-cells = <0>;
1238
+ tcphy0_orientation_switch: endpoint@0 {
1239
+ reg = <0>;
1240
+ remote-endpoint = <&usbc0_orien_sw>;
1241
+ };
1242
+ tcphy_dp_altmode_switch: endpoint@1 {
1243
+ reg = <1>;
1244
+ remote-endpoint = <&dp_mode_sw>;
1245
+ };
1246
+ };
11711247 };
11721248
11731249 &tcphy1 {
....@@ -1194,7 +1270,6 @@
11941270
11951271 &u2phy0 {
11961272 status = "okay";
1197
- extcon = <&fusb0>;
11981273
11991274 u2phy0_otg: otg-port {
12001275 status = "okay";
....@@ -1228,7 +1303,15 @@
12281303
12291304 &usbdrd_dwc3_0 {
12301305 status = "okay";
1231
- extcon = <&fusb0>;
1306
+ usb-role-switch;
1307
+ port {
1308
+ #address-cells = <1>;
1309
+ #size-cells = <0>;
1310
+ dwc3_0_role_switch: endpoint@0 {
1311
+ reg = <0>;
1312
+ remote-endpoint = <&usbc0_role_sw>;
1313
+ };
1314
+ };
12321315 };
12331316
12341317 &usbdrd_dwc3_1 {
....@@ -1321,13 +1404,6 @@
13211404 };
13221405 };
13231406
1324
- fusb30x {
1325
- fusb0_int: fusb0-int {
1326
- rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
1327
- <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
1328
- };
1329
- };
1330
-
13311407 mpu6500 {
13321408 mpu6500_irq_gpio: mpu6500-irq-gpio {
13331409 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
....@@ -1411,6 +1487,17 @@
14111487 };
14121488 };
14131489
1490
+ usb-typec {
1491
+ usbc0_int: usbc0-int {
1492
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1493
+ };
1494
+
1495
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1496
+ rockchip,pins =
1497
+ <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1498
+ };
1499
+ };
1500
+
14141501 vcc_sd {
14151502 vcc_sd_h: vcc-sd-h {
14161503 rockchip,pins =