| .. | .. |
|---|
| 9 | 9 | #include <dt-bindings/sensor-dev.h> |
|---|
| 10 | 10 | #include "rk3399-vop-clk-set.dtsi" |
|---|
| 11 | 11 | #include <dt-bindings/input/input.h> |
|---|
| 12 | +#include "dt-bindings/usb/pd.h" |
|---|
| 12 | 13 | |
|---|
| 13 | 14 | / { |
|---|
| 14 | 15 | compatible = "rockchip,rk3399-evb-ind", "rockchip,rk3399"; |
|---|
| .. | .. |
|---|
| 87 | 88 | }; |
|---|
| 88 | 89 | |
|---|
| 89 | 90 | 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>; |
|---|
| 107 | 108 | }; |
|---|
| 108 | 109 | }; |
|---|
| 109 | 110 | |
|---|
| .. | .. |
|---|
| 116 | 117 | |
|---|
| 117 | 118 | hdmi_sound: hdmi-sound { |
|---|
| 118 | 119 | 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; |
|---|
| 130 | 126 | }; |
|---|
| 131 | 127 | |
|---|
| 132 | 128 | rk_headset: rk-headset { |
|---|
| 129 | + status = "disabled"; |
|---|
| 133 | 130 | compatible = "rockchip_headset"; |
|---|
| 134 | 131 | headset_gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; |
|---|
| 135 | 132 | pinctrl-names = "default"; |
|---|
| .. | .. |
|---|
| 141 | 138 | status = "okay"; |
|---|
| 142 | 139 | compatible = "simple-audio-card"; |
|---|
| 143 | 140 | simple-audio-card,name = "ROCKCHIP,SPDIF"; |
|---|
| 141 | + simple-audio-card,mclk-fs = <128>; |
|---|
| 144 | 142 | simple-audio-card,cpu { |
|---|
| 145 | 143 | sound-dai = <&spdif>; |
|---|
| 146 | 144 | }; |
|---|
| .. | .. |
|---|
| 177 | 175 | wifi_chip_type = "ap6354"; |
|---|
| 178 | 176 | sdio_vref = <1800>; |
|---|
| 179 | 177 | WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */ |
|---|
| 178 | + WIFI,poweren_gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>; |
|---|
| 180 | 179 | status = "okay"; |
|---|
| 181 | 180 | }; |
|---|
| 182 | 181 | |
|---|
| .. | .. |
|---|
| 206 | 205 | status = "okay"; |
|---|
| 207 | 206 | }; |
|---|
| 208 | 207 | |
|---|
| 209 | | - dummy_codec: dummy-codec { |
|---|
| 210 | | - compatible = "rockchip,dummy-codec"; |
|---|
| 211 | | - #sound-dai-cells = <0>; |
|---|
| 212 | | - }; |
|---|
| 213 | | - |
|---|
| 214 | 208 | tc358749x_sound:tc358749x-sound { |
|---|
| 215 | 209 | status = "okay"; |
|---|
| 216 | 210 | compatible = "simple-audio-card"; |
|---|
| .. | .. |
|---|
| 219 | 213 | simple-audio-card,bitclock-master = <&sound0_master>; |
|---|
| 220 | 214 | simple-audio-card,frame-master = <&sound0_master>; |
|---|
| 221 | 215 | simple-audio-card,cpu { |
|---|
| 222 | | - sound-dai = <&i2s0>; |
|---|
| 216 | + sound-dai = <&i2s0>; |
|---|
| 223 | 217 | }; |
|---|
| 224 | 218 | sound0_master: simple-audio-card,codec { |
|---|
| 225 | | - sound-dai = <&dummy_codec>; |
|---|
| 219 | + sound-dai = <&tc358749x>; |
|---|
| 226 | 220 | }; |
|---|
| 227 | 221 | }; |
|---|
| 228 | 222 | |
|---|
| .. | .. |
|---|
| 261 | 255 | regulator-boot-on; |
|---|
| 262 | 256 | regulator-min-microvolt = <5000000>; |
|---|
| 263 | 257 | 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>; |
|---|
| 264 | 268 | }; |
|---|
| 265 | 269 | |
|---|
| 266 | 270 | vcc_phy: vcc-phy-regulator { |
|---|
| .. | .. |
|---|
| 306 | 310 | |
|---|
| 307 | 311 | &cdn_dp { |
|---|
| 308 | 312 | status = "okay"; |
|---|
| 309 | | - extcon = <&fusb0>; |
|---|
| 310 | 313 | phys = <&tcphy0_dp>; |
|---|
| 311 | 314 | }; |
|---|
| 312 | 315 | |
|---|
| .. | .. |
|---|
| 424 | 427 | pinctrl-names = "default"; |
|---|
| 425 | 428 | pinctrl-0 = <&rgmii_pins>; |
|---|
| 426 | 429 | tx_delay = <0x22>; |
|---|
| 427 | | - rx_delay = <0x08>; |
|---|
| 430 | + rx_delay = <0x23>; |
|---|
| 428 | 431 | status = "okay"; |
|---|
| 429 | 432 | }; |
|---|
| 430 | 433 | |
|---|
| .. | .. |
|---|
| 443 | 446 | i2c-scl-falling-time-ns = <4>; |
|---|
| 444 | 447 | clock-frequency = <400000>; |
|---|
| 445 | 448 | |
|---|
| 446 | | - vdd_cpu_b: tcs452x@1c { |
|---|
| 447 | | - compatible = "tcs,tcs452x"; |
|---|
| 449 | + vdd_cpu_b: tcs4525@1c { |
|---|
| 450 | + compatible = "tcs,tcs4525"; |
|---|
| 448 | 451 | reg = <0x1c>; |
|---|
| 449 | 452 | vin-supply = <&vcc5v0_sys>; |
|---|
| 450 | 453 | regulator-compatible = "fan53555-reg"; |
|---|
| .. | .. |
|---|
| 463 | 466 | }; |
|---|
| 464 | 467 | }; |
|---|
| 465 | 468 | |
|---|
| 466 | | - vdd_gpu: tcs452x@10 { |
|---|
| 467 | | - compatible = "tcs,tcs452x"; |
|---|
| 469 | + vdd_gpu: tcs4526@10 { |
|---|
| 470 | + compatible = "tcs,tcs4526"; |
|---|
| 468 | 471 | reg = <0x10>; |
|---|
| 469 | 472 | vin-supply = <&vcc5v0_sys>; |
|---|
| 470 | 473 | regulator-compatible = "fan53555-reg"; |
|---|
| .. | .. |
|---|
| 839 | 842 | layout = <8>; |
|---|
| 840 | 843 | }; |
|---|
| 841 | 844 | |
|---|
| 842 | | - fusb0: fusb30x@22 { |
|---|
| 843 | | - compatible = "fairchild,fusb302"; |
|---|
| 845 | + usbc0: fusb302@22 { |
|---|
| 846 | + compatible = "fcs,fusb302"; |
|---|
| 844 | 847 | reg = <0x22>; |
|---|
| 848 | + interrupt-parent = <&gpio1>; |
|---|
| 849 | + interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>; |
|---|
| 845 | 850 | 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>; |
|---|
| 849 | 853 | 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 | + }; |
|---|
| 850 | 910 | }; |
|---|
| 851 | 911 | |
|---|
| 852 | 912 | sensor@0d { |
|---|
| .. | .. |
|---|
| 865 | 925 | bq25700: bq25700@6b {//6a |
|---|
| 866 | 926 | compatible = "ti,bq25703"; |
|---|
| 867 | 927 | reg = <0x6b>; |
|---|
| 868 | | - extcon = <&fusb0>; |
|---|
| 869 | 928 | |
|---|
| 870 | 929 | interrupt-parent = <&gpio0>; |
|---|
| 871 | 930 | interrupts = <5 IRQ_TYPE_LEVEL_LOW>; |
|---|
| .. | .. |
|---|
| 1118 | 1177 | &sdio0 { |
|---|
| 1119 | 1178 | clock-frequency = <150000000>; |
|---|
| 1120 | 1179 | clock-freq-min-max = <200000 150000000>; |
|---|
| 1121 | | - supports-sdio; |
|---|
| 1180 | + no-sd; |
|---|
| 1181 | + no-mmc; |
|---|
| 1122 | 1182 | bus-width = <4>; |
|---|
| 1123 | 1183 | disable-wp; |
|---|
| 1124 | 1184 | cap-sd-highspeed; |
|---|
| .. | .. |
|---|
| 1136 | 1196 | &sdmmc { |
|---|
| 1137 | 1197 | clock-frequency = <150000000>; |
|---|
| 1138 | 1198 | clock-freq-min-max = <100000 150000000>; |
|---|
| 1139 | | - supports-sd; |
|---|
| 1199 | + no-sdio; |
|---|
| 1200 | + no-mmc; |
|---|
| 1140 | 1201 | bus-width = <4>; |
|---|
| 1141 | 1202 | cap-mmc-highspeed; |
|---|
| 1142 | 1203 | cap-sd-highspeed; |
|---|
| .. | .. |
|---|
| 1153 | 1214 | &sdhci { |
|---|
| 1154 | 1215 | bus-width = <8>; |
|---|
| 1155 | 1216 | mmc-hs400-1_8v; |
|---|
| 1156 | | - supports-emmc; |
|---|
| 1217 | + no-sdio; |
|---|
| 1218 | + no-sd; |
|---|
| 1157 | 1219 | non-removable; |
|---|
| 1158 | 1220 | keep-power-in-suspend; |
|---|
| 1159 | 1221 | mmc-hs400-enhanced-strobe; |
|---|
| .. | .. |
|---|
| 1166 | 1228 | }; |
|---|
| 1167 | 1229 | |
|---|
| 1168 | 1230 | &tcphy0 { |
|---|
| 1169 | | - extcon = <&fusb0>; |
|---|
| 1170 | 1231 | 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 | + }; |
|---|
| 1171 | 1247 | }; |
|---|
| 1172 | 1248 | |
|---|
| 1173 | 1249 | &tcphy1 { |
|---|
| .. | .. |
|---|
| 1194 | 1270 | |
|---|
| 1195 | 1271 | &u2phy0 { |
|---|
| 1196 | 1272 | status = "okay"; |
|---|
| 1197 | | - extcon = <&fusb0>; |
|---|
| 1198 | 1273 | |
|---|
| 1199 | 1274 | u2phy0_otg: otg-port { |
|---|
| 1200 | 1275 | status = "okay"; |
|---|
| .. | .. |
|---|
| 1228 | 1303 | |
|---|
| 1229 | 1304 | &usbdrd_dwc3_0 { |
|---|
| 1230 | 1305 | 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 | + }; |
|---|
| 1232 | 1315 | }; |
|---|
| 1233 | 1316 | |
|---|
| 1234 | 1317 | &usbdrd_dwc3_1 { |
|---|
| .. | .. |
|---|
| 1321 | 1404 | }; |
|---|
| 1322 | 1405 | }; |
|---|
| 1323 | 1406 | |
|---|
| 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 | | - |
|---|
| 1331 | 1407 | mpu6500 { |
|---|
| 1332 | 1408 | mpu6500_irq_gpio: mpu6500-irq-gpio { |
|---|
| 1333 | 1409 | rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; |
|---|
| .. | .. |
|---|
| 1411 | 1487 | }; |
|---|
| 1412 | 1488 | }; |
|---|
| 1413 | 1489 | |
|---|
| 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 | + |
|---|
| 1414 | 1501 | vcc_sd { |
|---|
| 1415 | 1502 | vcc_sd_h: vcc-sd-h { |
|---|
| 1416 | 1503 | rockchip,pins = |
|---|