18cc087a1SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 28cc087a1SEmmanuel Vadot/* 38cc087a1SEmmanuel Vadot * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd 48cc087a1SEmmanuel Vadot */ 58cc087a1SEmmanuel Vadot 68cc087a1SEmmanuel Vadot/dts-v1/; 78cc087a1SEmmanuel Vadot#include "rk3399-roc-pc.dtsi" 88cc087a1SEmmanuel Vadot 98cc087a1SEmmanuel Vadot/* 108cc087a1SEmmanuel Vadot * Notice: 118cc087a1SEmmanuel Vadot * 1. rk3399-roc-pc-plus is powered by dc_12v directly. 128cc087a1SEmmanuel Vadot * 2. rk3399-roc-pc-plus has only vcc_bus_typec0 in schematic, which is coresponding 138cc087a1SEmmanuel Vadot * to vcc_vbus_typec1 in rk3399-roc-pc. 148cc087a1SEmmanuel Vadot * For simplicity, reserve the node name of vcc_vbus_typec1. 158cc087a1SEmmanuel Vadot * 3. vcc5v0_host is actually 2 regulators (host0, 1) controlled by the same gpio. 168cc087a1SEmmanuel Vadot */ 178cc087a1SEmmanuel Vadot 188cc087a1SEmmanuel Vadot/delete-node/ &fusb1; 198cc087a1SEmmanuel Vadot/delete-node/ &hub_rst; 208cc087a1SEmmanuel Vadot/delete-node/ &mp8859; 218cc087a1SEmmanuel Vadot/delete-node/ &vcc_sys_en; 228cc087a1SEmmanuel Vadot/delete-node/ &vcc_vbus_typec0; 238cc087a1SEmmanuel Vadot/delete-node/ &yellow_led; 248cc087a1SEmmanuel Vadot 258cc087a1SEmmanuel Vadot/ { 268cc087a1SEmmanuel Vadot model = "Firefly ROC-RK3399-PC-PLUS Board"; 278cc087a1SEmmanuel Vadot compatible = "firefly,roc-rk3399-pc-plus", "rockchip,rk3399"; 288cc087a1SEmmanuel Vadot 298cc087a1SEmmanuel Vadot dc_12v: dc-12v { 308cc087a1SEmmanuel Vadot compatible = "regulator-fixed"; 318cc087a1SEmmanuel Vadot regulator-name = "dc_12v"; 328cc087a1SEmmanuel Vadot regulator-always-on; 338cc087a1SEmmanuel Vadot regulator-boot-on; 348cc087a1SEmmanuel Vadot regulator-min-microvolt = <12000000>; 358cc087a1SEmmanuel Vadot regulator-max-microvolt = <12000000>; 368cc087a1SEmmanuel Vadot }; 378cc087a1SEmmanuel Vadot 388cc087a1SEmmanuel Vadot es8388-sound { 398cc087a1SEmmanuel Vadot compatible = "simple-audio-card"; 408cc087a1SEmmanuel Vadot pinctrl-names = "default"; 418cc087a1SEmmanuel Vadot pinctrl-0 = <&hp_det_pin>; 428cc087a1SEmmanuel Vadot simple-audio-card,name = "rockchip,es8388-codec"; 438cc087a1SEmmanuel Vadot simple-audio-card,format = "i2s"; 448cc087a1SEmmanuel Vadot simple-audio-card,mclk-fs = <256>; 458cc087a1SEmmanuel Vadot simple-audio-card,widgets = 468cc087a1SEmmanuel Vadot "Microphone", "Mic Jack", 478cc087a1SEmmanuel Vadot "Headphone", "Headphones"; 488cc087a1SEmmanuel Vadot simple-audio-card,routing = 498cc087a1SEmmanuel Vadot "LINPUT1", "Mic Jack", 508cc087a1SEmmanuel Vadot "Headphone Amp INL", "LOUT2", 518cc087a1SEmmanuel Vadot "Headphone Amp INR", "ROUT2", 528cc087a1SEmmanuel Vadot "Headphones", "Headphone Amp OUTL", 538cc087a1SEmmanuel Vadot "Headphones", "Headphone Amp OUTR"; 548cc087a1SEmmanuel Vadot simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; 558cc087a1SEmmanuel Vadot simple-audio-card,aux-devs = <&headphones_amp>; 568cc087a1SEmmanuel Vadot simple-audio-card,pin-switches = "Headphones"; 578cc087a1SEmmanuel Vadot 588cc087a1SEmmanuel Vadot simple-audio-card,codec { 598cc087a1SEmmanuel Vadot sound-dai = <&es8388>; 608cc087a1SEmmanuel Vadot }; 618cc087a1SEmmanuel Vadot 628cc087a1SEmmanuel Vadot simple-audio-card,cpu { 638cc087a1SEmmanuel Vadot sound-dai = <&i2s1>; 648cc087a1SEmmanuel Vadot }; 658cc087a1SEmmanuel Vadot }; 668cc087a1SEmmanuel Vadot 678cc087a1SEmmanuel Vadot gpio-fan { 688cc087a1SEmmanuel Vadot #cooling-cells = <2>; 698cc087a1SEmmanuel Vadot compatible = "gpio-fan"; 708cc087a1SEmmanuel Vadot gpio-fan,speed-map = <0 0 3000 1>; 718cc087a1SEmmanuel Vadot gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; 728cc087a1SEmmanuel Vadot }; 738cc087a1SEmmanuel Vadot 748cc087a1SEmmanuel Vadot /delete-node/ gpio-keys; 758cc087a1SEmmanuel Vadot 768cc087a1SEmmanuel Vadot /* not amplifier, used as switcher only */ 778cc087a1SEmmanuel Vadot headphones_amp: headphones-amp { 788cc087a1SEmmanuel Vadot compatible = "simple-audio-amplifier"; 798cc087a1SEmmanuel Vadot pinctrl-names = "default"; 808cc087a1SEmmanuel Vadot pinctrl-0 = <&ear_ctl_pin>; 818cc087a1SEmmanuel Vadot enable-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 828cc087a1SEmmanuel Vadot sound-name-prefix = "Headphone Amp"; 838cc087a1SEmmanuel Vadot VCC-supply = <&vcca3v0_codec>; 848cc087a1SEmmanuel Vadot }; 858cc087a1SEmmanuel Vadot 868cc087a1SEmmanuel Vadot ir-receiver { 878cc087a1SEmmanuel Vadot linux,rc-map-name = "rc-khadas"; 888cc087a1SEmmanuel Vadot }; 898cc087a1SEmmanuel Vadot 908cc087a1SEmmanuel Vadot leds { 918cc087a1SEmmanuel Vadot pinctrl-names = "default"; 928cc087a1SEmmanuel Vadot pinctrl-0 = <&work_led_pin>, <&diy_led_pin>; 938cc087a1SEmmanuel Vadot }; 948cc087a1SEmmanuel Vadot}; 958cc087a1SEmmanuel Vadot 968cc087a1SEmmanuel Vadot&fusb0 { 978cc087a1SEmmanuel Vadot vbus-supply = <&vcc_vbus_typec1>; 988cc087a1SEmmanuel Vadot}; 998cc087a1SEmmanuel Vadot 1008cc087a1SEmmanuel Vadot&i2c0 { 101*7ef62cebSEmmanuel Vadot hym8563: rtc@51 { 1028cc087a1SEmmanuel Vadot compatible = "haoyu,hym8563"; 1038cc087a1SEmmanuel Vadot reg = <0x51>; 1048cc087a1SEmmanuel Vadot interrupt-parent = <&gpio0>; 1058cc087a1SEmmanuel Vadot interrupts = <RK_PA5 IRQ_TYPE_EDGE_FALLING>; 1068cc087a1SEmmanuel Vadot #clock-cells = <0>; 1078cc087a1SEmmanuel Vadot clock-output-names = "xin32k"; 1088cc087a1SEmmanuel Vadot pinctrl-names = "default"; 1098cc087a1SEmmanuel Vadot pinctrl-0 = <&hym8563_int>; 1108cc087a1SEmmanuel Vadot }; 1118cc087a1SEmmanuel Vadot}; 1128cc087a1SEmmanuel Vadot 1138cc087a1SEmmanuel Vadot&i2c1 { 1148cc087a1SEmmanuel Vadot es8388: es8388@11 { 1158cc087a1SEmmanuel Vadot compatible = "everest,es8388"; 1168cc087a1SEmmanuel Vadot reg = <0x11>; 1178cc087a1SEmmanuel Vadot clocks = <&cru SCLK_I2S_8CH_OUT>; 1188cc087a1SEmmanuel Vadot #sound-dai-cells = <0>; 1198cc087a1SEmmanuel Vadot }; 1208cc087a1SEmmanuel Vadot}; 1218cc087a1SEmmanuel Vadot 1228cc087a1SEmmanuel Vadot/* <4 RK_PA0 1 &pcfg_pull_none> is used as i2s_8ch_mclk_pin */ 1238cc087a1SEmmanuel Vadot&i2s0_8ch_bus { 1248cc087a1SEmmanuel Vadot rockchip,pins = 1258cc087a1SEmmanuel Vadot <3 RK_PD0 1 &pcfg_pull_none>, 1268cc087a1SEmmanuel Vadot <3 RK_PD1 1 &pcfg_pull_none>, 1278cc087a1SEmmanuel Vadot <3 RK_PD2 1 &pcfg_pull_none>, 1288cc087a1SEmmanuel Vadot <3 RK_PD3 1 &pcfg_pull_none>, 1298cc087a1SEmmanuel Vadot <3 RK_PD4 1 &pcfg_pull_none>, 1308cc087a1SEmmanuel Vadot <3 RK_PD5 1 &pcfg_pull_none>, 1318cc087a1SEmmanuel Vadot <3 RK_PD6 1 &pcfg_pull_none>, 1328cc087a1SEmmanuel Vadot <3 RK_PD7 1 &pcfg_pull_none>; 1338cc087a1SEmmanuel Vadot}; 1348cc087a1SEmmanuel Vadot 1358cc087a1SEmmanuel Vadot&i2s1 { 1368cc087a1SEmmanuel Vadot pinctrl-names = "default"; 1378cc087a1SEmmanuel Vadot pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>; 1388cc087a1SEmmanuel Vadot rockchip,playback-channels = <2>; 1398cc087a1SEmmanuel Vadot rockchip,capture-channels = <2>; 1408cc087a1SEmmanuel Vadot status = "okay"; 1418cc087a1SEmmanuel Vadot}; 1428cc087a1SEmmanuel Vadot 1438cc087a1SEmmanuel Vadot&pinctrl { 1448cc087a1SEmmanuel Vadot es8388 { 1458cc087a1SEmmanuel Vadot ear_ctl_pin: ear-ctl-pin { 1468cc087a1SEmmanuel Vadot rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_high>; 1478cc087a1SEmmanuel Vadot }; 1488cc087a1SEmmanuel Vadot 1498cc087a1SEmmanuel Vadot hp_det_pin: hp-det-pin { 1508cc087a1SEmmanuel Vadot rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>; 1518cc087a1SEmmanuel Vadot }; 1528cc087a1SEmmanuel Vadot }; 1538cc087a1SEmmanuel Vadot 1548cc087a1SEmmanuel Vadot hym8563 { 1558cc087a1SEmmanuel Vadot hym8563_int: hym8563-int { 1568cc087a1SEmmanuel Vadot rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 1578cc087a1SEmmanuel Vadot }; 1588cc087a1SEmmanuel Vadot }; 1598cc087a1SEmmanuel Vadot 1608cc087a1SEmmanuel Vadot i2s1 { 1618cc087a1SEmmanuel Vadot i2s_8ch_mclk_pin: i2s-8ch-mclk-pin { 1628cc087a1SEmmanuel Vadot rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>; 1638cc087a1SEmmanuel Vadot }; 1648cc087a1SEmmanuel Vadot }; 1658cc087a1SEmmanuel Vadot}; 1668cc087a1SEmmanuel Vadot 1678cc087a1SEmmanuel Vadot&u2phy0 { 1688cc087a1SEmmanuel Vadot status = "okay"; 1698cc087a1SEmmanuel Vadot 1708cc087a1SEmmanuel Vadot u2phy0_otg: otg-port { 1718cc087a1SEmmanuel Vadot phy-supply = <&vcc_vbus_typec1>; 1728cc087a1SEmmanuel Vadot status = "okay"; 1738cc087a1SEmmanuel Vadot }; 1748cc087a1SEmmanuel Vadot 1758cc087a1SEmmanuel Vadot u2phy0_host: host-port { 1768cc087a1SEmmanuel Vadot phy-supply = <&vcc5v0_host>; 1778cc087a1SEmmanuel Vadot status = "okay"; 1788cc087a1SEmmanuel Vadot }; 1798cc087a1SEmmanuel Vadot}; 1808cc087a1SEmmanuel Vadot 1818cc087a1SEmmanuel Vadot&u2phy1 { 1828cc087a1SEmmanuel Vadot status = "okay"; 1838cc087a1SEmmanuel Vadot 1848cc087a1SEmmanuel Vadot u2phy1_otg: otg-port { 1858cc087a1SEmmanuel Vadot phy-supply = <&vcc5v0_host>; 1868cc087a1SEmmanuel Vadot status = "okay"; 1878cc087a1SEmmanuel Vadot }; 1888cc087a1SEmmanuel Vadot 1898cc087a1SEmmanuel Vadot u2phy1_host: host-port { 1908cc087a1SEmmanuel Vadot phy-supply = <&vcc5v0_host>; 1918cc087a1SEmmanuel Vadot status = "okay"; 1928cc087a1SEmmanuel Vadot }; 1938cc087a1SEmmanuel Vadot}; 1948cc087a1SEmmanuel Vadot 1958cc087a1SEmmanuel Vadot&uart0 { 1968cc087a1SEmmanuel Vadot pinctrl-names = "default"; 1978cc087a1SEmmanuel Vadot pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; 1988cc087a1SEmmanuel Vadot status = "okay"; 1998cc087a1SEmmanuel Vadot}; 2008cc087a1SEmmanuel Vadot 2018cc087a1SEmmanuel Vadot&usbdrd_dwc3_0 { 2028cc087a1SEmmanuel Vadot dr_mode = "host"; 2038cc087a1SEmmanuel Vadot status = "okay"; 2048cc087a1SEmmanuel Vadot}; 2058cc087a1SEmmanuel Vadot 2068cc087a1SEmmanuel Vadot&vcc_sys { 2078cc087a1SEmmanuel Vadot /* vcc_sys is fixed, not controlled by any gpio */ 2088cc087a1SEmmanuel Vadot /delete-property/ gpio; 2098cc087a1SEmmanuel Vadot /delete-property/ pinctrl-names; 2108cc087a1SEmmanuel Vadot /delete-property/ pinctrl-0; 2118cc087a1SEmmanuel Vadot}; 2128cc087a1SEmmanuel Vadot 2138cc087a1SEmmanuel Vadot&vcc5v0_host { 2148cc087a1SEmmanuel Vadot pinctrl-names = "default"; 2158cc087a1SEmmanuel Vadot pinctrl-0 = <&vcc5v0_host_en>; 2168cc087a1SEmmanuel Vadot}; 217