| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd |
| 4 |
*/ |
| 5 |
|
| 6 |
/dts-v1/; |
| 7 |
#include "rk3399-roc-pc.dtsi" |
| 8 |
|
| 9 |
/* |
| 10 |
* Notice: |
| 11 |
* 1. rk3399-roc-pc-plus is powered by dc_12v directly. |
| 12 |
* 2. rk3399-roc-pc-plus has only vcc_bus_typec0 in schematic, which is coresponding |
| 13 |
* to vcc_vbus_typec1 in rk3399-roc-pc. |
| 14 |
* For simplicity, reserve the node name of vcc_vbus_typec1. |
| 15 |
* 3. vcc5v0_host is actually 2 regulators (host0, 1) controlled by the same gpio. |
| 16 |
*/ |
| 17 |
|
| 18 |
/delete-node/ &fusb1; |
| 19 |
/delete-node/ &hub_rst; |
| 20 |
/delete-node/ &mp8859; |
| 21 |
/delete-node/ &vcc_sys_en; |
| 22 |
/delete-node/ &vcc_vbus_typec0; |
| 23 |
/delete-node/ &yellow_led; |
| 24 |
|
| 25 |
/ { |
| 26 |
model = "Firefly ROC-RK3399-PC-PLUS Board"; |
| 27 |
compatible = "firefly,roc-rk3399-pc-plus", "rockchip,rk3399"; |
| 28 |
|
| 29 |
dc_12v: regulator-dc-12v { |
| 30 |
compatible = "regulator-fixed"; |
| 31 |
regulator-name = "dc_12v"; |
| 32 |
regulator-always-on; |
| 33 |
regulator-boot-on; |
| 34 |
regulator-min-microvolt = <12000000>; |
| 35 |
regulator-max-microvolt = <12000000>; |
| 36 |
}; |
| 37 |
|
| 38 |
es8388-sound { |
| 39 |
compatible = "simple-audio-card"; |
| 40 |
pinctrl-names = "default"; |
| 41 |
pinctrl-0 = <&hp_det_pin>; |
| 42 |
simple-audio-card,name = "rockchip,es8388-codec"; |
| 43 |
simple-audio-card,format = "i2s"; |
| 44 |
simple-audio-card,mclk-fs = <256>; |
| 45 |
simple-audio-card,widgets = |
| 46 |
"Microphone", "Mic Jack", |
| 47 |
"Headphone", "Headphones"; |
| 48 |
simple-audio-card,routing = |
| 49 |
"LINPUT1", "Mic Jack", |
| 50 |
"Headphone Amp INL", "LOUT2", |
| 51 |
"Headphone Amp INR", "ROUT2", |
| 52 |
"Headphones", "Headphone Amp OUTL", |
| 53 |
"Headphones", "Headphone Amp OUTR"; |
| 54 |
simple-audio-card,hp-det-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; |
| 55 |
simple-audio-card,aux-devs = <&headphones_amp>; |
| 56 |
simple-audio-card,pin-switches = "Headphones"; |
| 57 |
|
| 58 |
simple-audio-card,codec { |
| 59 |
sound-dai = <&es8388>; |
| 60 |
}; |
| 61 |
|
| 62 |
simple-audio-card,cpu { |
| 63 |
sound-dai = <&i2s1>; |
| 64 |
}; |
| 65 |
}; |
| 66 |
|
| 67 |
gpio-fan { |
| 68 |
#cooling-cells = <2>; |
| 69 |
compatible = "gpio-fan"; |
| 70 |
gpio-fan,speed-map = <0 0 3000 1>; |
| 71 |
gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; |
| 72 |
}; |
| 73 |
|
| 74 |
/delete-node/ gpio-keys; |
| 75 |
|
| 76 |
/* not amplifier, used as switcher only */ |
| 77 |
headphones_amp: headphones-amp { |
| 78 |
compatible = "simple-audio-amplifier"; |
| 79 |
pinctrl-names = "default"; |
| 80 |
pinctrl-0 = <&ear_ctl_pin>; |
| 81 |
enable-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; |
| 82 |
sound-name-prefix = "Headphone Amp"; |
| 83 |
VCC-supply = <&vcca3v0_codec>; |
| 84 |
}; |
| 85 |
|
| 86 |
ir-receiver { |
| 87 |
linux,rc-map-name = "rc-khadas"; |
| 88 |
}; |
| 89 |
|
| 90 |
leds { |
| 91 |
pinctrl-names = "default"; |
| 92 |
pinctrl-0 = <&work_led_pin>, <&diy_led_pin>; |
| 93 |
}; |
| 94 |
}; |
| 95 |
|
| 96 |
&fusb0 { |
| 97 |
vbus-supply = <&vcc_vbus_typec1>; |
| 98 |
}; |
| 99 |
|
| 100 |
&i2c0 { |
| 101 |
hym8563: rtc@51 { |
| 102 |
compatible = "haoyu,hym8563"; |
| 103 |
reg = <0x51>; |
| 104 |
interrupt-parent = <&gpio0>; |
| 105 |
interrupts = <RK_PA5 IRQ_TYPE_EDGE_FALLING>; |
| 106 |
#clock-cells = <0>; |
| 107 |
clock-output-names = "xin32k"; |
| 108 |
pinctrl-names = "default"; |
| 109 |
pinctrl-0 = <&hym8563_int>; |
| 110 |
}; |
| 111 |
}; |
| 112 |
|
| 113 |
&i2c1 { |
| 114 |
es8388: es8388@11 { |
| 115 |
compatible = "everest,es8388", "everest,es8328"; |
| 116 |
reg = <0x11>; |
| 117 |
clocks = <&cru SCLK_I2S_8CH_OUT>; |
| 118 |
#sound-dai-cells = <0>; |
| 119 |
AVDD-supply = <&vcca3v0_codec>; |
| 120 |
DVDD-supply = <&vcca1v8_codec>; |
| 121 |
HPVDD-supply = <&vcca3v0_codec>; |
| 122 |
PVDD-supply = <&vcca1v8_codec>; |
| 123 |
}; |
| 124 |
}; |
| 125 |
|
| 126 |
/* <4 RK_PA0 1 &pcfg_pull_none> is used as i2s_8ch_mclk_pin */ |
| 127 |
&i2s0_8ch_bus { |
| 128 |
rockchip,pins = |
| 129 |
<3 RK_PD0 1 &pcfg_pull_none>, |
| 130 |
<3 RK_PD1 1 &pcfg_pull_none>, |
| 131 |
<3 RK_PD2 1 &pcfg_pull_none>, |
| 132 |
<3 RK_PD3 1 &pcfg_pull_none>, |
| 133 |
<3 RK_PD4 1 &pcfg_pull_none>, |
| 134 |
<3 RK_PD5 1 &pcfg_pull_none>, |
| 135 |
<3 RK_PD6 1 &pcfg_pull_none>, |
| 136 |
<3 RK_PD7 1 &pcfg_pull_none>; |
| 137 |
}; |
| 138 |
|
| 139 |
&i2s1 { |
| 140 |
pinctrl-names = "default"; |
| 141 |
pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>; |
| 142 |
rockchip,playback-channels = <2>; |
| 143 |
rockchip,capture-channels = <2>; |
| 144 |
status = "okay"; |
| 145 |
}; |
| 146 |
|
| 147 |
&pinctrl { |
| 148 |
es8388 { |
| 149 |
ear_ctl_pin: ear-ctl-pin { |
| 150 |
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_high>; |
| 151 |
}; |
| 152 |
|
| 153 |
hp_det_pin: hp-det-pin { |
| 154 |
rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>; |
| 155 |
}; |
| 156 |
}; |
| 157 |
|
| 158 |
hym8563 { |
| 159 |
hym8563_int: hym8563-int { |
| 160 |
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 161 |
}; |
| 162 |
}; |
| 163 |
|
| 164 |
i2s1 { |
| 165 |
i2s_8ch_mclk_pin: i2s-8ch-mclk-pin { |
| 166 |
rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>; |
| 167 |
}; |
| 168 |
}; |
| 169 |
}; |
| 170 |
|
| 171 |
&u2phy0 { |
| 172 |
status = "okay"; |
| 173 |
|
| 174 |
u2phy0_otg: otg-port { |
| 175 |
phy-supply = <&vcc_vbus_typec1>; |
| 176 |
status = "okay"; |
| 177 |
}; |
| 178 |
|
| 179 |
u2phy0_host: host-port { |
| 180 |
phy-supply = <&vcc5v0_host>; |
| 181 |
status = "okay"; |
| 182 |
}; |
| 183 |
}; |
| 184 |
|
| 185 |
&u2phy1 { |
| 186 |
status = "okay"; |
| 187 |
|
| 188 |
u2phy1_otg: otg-port { |
| 189 |
phy-supply = <&vcc5v0_host>; |
| 190 |
status = "okay"; |
| 191 |
}; |
| 192 |
|
| 193 |
u2phy1_host: host-port { |
| 194 |
phy-supply = <&vcc5v0_host>; |
| 195 |
status = "okay"; |
| 196 |
}; |
| 197 |
}; |
| 198 |
|
| 199 |
&uart0 { |
| 200 |
pinctrl-names = "default"; |
| 201 |
pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; |
| 202 |
status = "okay"; |
| 203 |
}; |
| 204 |
|
| 205 |
&usbdrd_dwc3_0 { |
| 206 |
dr_mode = "host"; |
| 207 |
status = "okay"; |
| 208 |
}; |
| 209 |
|
| 210 |
&vcc_sys { |
| 211 |
/* vcc_sys is fixed, not controlled by any gpio */ |
| 212 |
/delete-property/ gpio; |
| 213 |
/delete-property/ pinctrl-names; |
| 214 |
/delete-property/ pinctrl-0; |
| 215 |
}; |
| 216 |
|
| 217 |
&vcc5v0_host { |
| 218 |
pinctrl-names = "default"; |
| 219 |
pinctrl-0 = <&vcc5v0_host_en>; |
| 220 |
}; |