| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
// Copyright (C) 2019 Ondřej Jirman <[email protected]> |
| 3 |
|
| 4 |
/dts-v1/; |
| 5 |
|
| 6 |
#include "sun50i-h6.dtsi" |
| 7 |
#include "sun50i-h6-cpu-opp.dtsi" |
| 8 |
|
| 9 |
#include <dt-bindings/gpio/gpio.h> |
| 10 |
|
| 11 |
/ { |
| 12 |
model = "OrangePi 3"; |
| 13 |
compatible = "xunlong,orangepi-3", "allwinner,sun50i-h6"; |
| 14 |
|
| 15 |
aliases { |
| 16 |
serial0 = &uart0; |
| 17 |
serial1 = &uart1; |
| 18 |
}; |
| 19 |
|
| 20 |
chosen { |
| 21 |
stdout-path = "serial0:115200n8"; |
| 22 |
}; |
| 23 |
|
| 24 |
connector { |
| 25 |
compatible = "hdmi-connector"; |
| 26 |
ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ |
| 27 |
type = "a"; |
| 28 |
|
| 29 |
port { |
| 30 |
hdmi_con_in: endpoint { |
| 31 |
remote-endpoint = <&hdmi_out_con>; |
| 32 |
}; |
| 33 |
}; |
| 34 |
}; |
| 35 |
|
| 36 |
ext_osc32k: ext-osc32k-clk { |
| 37 |
#clock-cells = <0>; |
| 38 |
compatible = "fixed-clock"; |
| 39 |
clock-frequency = <32768>; |
| 40 |
clock-output-names = "ext_osc32k"; |
| 41 |
}; |
| 42 |
|
| 43 |
leds { |
| 44 |
compatible = "gpio-leds"; |
| 45 |
|
| 46 |
led-0 { |
| 47 |
label = "orangepi:red:power"; |
| 48 |
gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ |
| 49 |
default-state = "on"; |
| 50 |
}; |
| 51 |
|
| 52 |
led-1 { |
| 53 |
label = "orangepi:green:status"; |
| 54 |
gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ |
| 55 |
}; |
| 56 |
}; |
| 57 |
|
| 58 |
reg_vcc5v: vcc5v { |
| 59 |
/* board wide 5V supply directly from the DC jack */ |
| 60 |
compatible = "regulator-fixed"; |
| 61 |
regulator-name = "vcc-5v"; |
| 62 |
regulator-min-microvolt = <5000000>; |
| 63 |
regulator-max-microvolt = <5000000>; |
| 64 |
regulator-always-on; |
| 65 |
}; |
| 66 |
|
| 67 |
reg_vcc33_wifi: vcc33-wifi { |
| 68 |
/* Always on 3.3V regulator for WiFi and BT */ |
| 69 |
compatible = "regulator-fixed"; |
| 70 |
regulator-name = "vcc33-wifi"; |
| 71 |
regulator-min-microvolt = <3300000>; |
| 72 |
regulator-max-microvolt = <3300000>; |
| 73 |
regulator-always-on; |
| 74 |
vin-supply = <®_vcc5v>; |
| 75 |
}; |
| 76 |
|
| 77 |
reg_vcc_wifi_io: vcc-wifi-io { |
| 78 |
/* Always on 1.8V/300mA regulator for WiFi and BT IO */ |
| 79 |
compatible = "regulator-fixed"; |
| 80 |
regulator-name = "vcc-wifi-io"; |
| 81 |
regulator-min-microvolt = <1800000>; |
| 82 |
regulator-max-microvolt = <1800000>; |
| 83 |
regulator-always-on; |
| 84 |
vin-supply = <®_vcc33_wifi>; |
| 85 |
}; |
| 86 |
|
| 87 |
wifi_pwrseq: wifi-pwrseq { |
| 88 |
compatible = "mmc-pwrseq-simple"; |
| 89 |
clocks = <&rtc CLK_OSC32K_FANOUT>; |
| 90 |
clock-names = "ext_clock"; |
| 91 |
reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */ |
| 92 |
post-power-on-delay-ms = <200>; |
| 93 |
}; |
| 94 |
}; |
| 95 |
|
| 96 |
&cpu0 { |
| 97 |
cpu-supply = <®_dcdca>; |
| 98 |
}; |
| 99 |
|
| 100 |
&de { |
| 101 |
status = "okay"; |
| 102 |
}; |
| 103 |
|
| 104 |
&dwc3 { |
| 105 |
status = "okay"; |
| 106 |
}; |
| 107 |
|
| 108 |
&ehci0 { |
| 109 |
status = "okay"; |
| 110 |
}; |
| 111 |
|
| 112 |
&ehci3 { |
| 113 |
status = "okay"; |
| 114 |
}; |
| 115 |
|
| 116 |
&gpu { |
| 117 |
mali-supply = <®_dcdcc>; |
| 118 |
status = "okay"; |
| 119 |
}; |
| 120 |
|
| 121 |
&hdmi { |
| 122 |
status = "okay"; |
| 123 |
}; |
| 124 |
|
| 125 |
&hdmi_out { |
| 126 |
hdmi_out_con: endpoint { |
| 127 |
remote-endpoint = <&hdmi_con_in>; |
| 128 |
}; |
| 129 |
}; |
| 130 |
|
| 131 |
&mmc0 { |
| 132 |
vmmc-supply = <®_cldo1>; |
| 133 |
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 134 |
disable-wp; |
| 135 |
bus-width = <4>; |
| 136 |
status = "okay"; |
| 137 |
}; |
| 138 |
|
| 139 |
&mmc1 { |
| 140 |
vmmc-supply = <®_vcc33_wifi>; |
| 141 |
vqmmc-supply = <®_vcc_wifi_io>; |
| 142 |
mmc-pwrseq = <&wifi_pwrseq>; |
| 143 |
bus-width = <4>; |
| 144 |
non-removable; |
| 145 |
status = "okay"; |
| 146 |
|
| 147 |
brcm: wifi@1 { |
| 148 |
reg = <1>; |
| 149 |
compatible = "brcm,bcm4329-fmac"; |
| 150 |
interrupt-parent = <&r_pio>; |
| 151 |
interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */ |
| 152 |
interrupt-names = "host-wake"; |
| 153 |
}; |
| 154 |
}; |
| 155 |
|
| 156 |
&mmc2 { |
| 157 |
vmmc-supply = <®_cldo1>; |
| 158 |
vqmmc-supply = <®_bldo2>; |
| 159 |
cap-mmc-hw-reset; |
| 160 |
non-removable; |
| 161 |
bus-width = <8>; |
| 162 |
status = "okay"; |
| 163 |
}; |
| 164 |
|
| 165 |
&ohci0 { |
| 166 |
status = "okay"; |
| 167 |
}; |
| 168 |
|
| 169 |
&ohci3 { |
| 170 |
status = "okay"; |
| 171 |
}; |
| 172 |
|
| 173 |
&pio { |
| 174 |
vcc-pc-supply = <®_bldo2>; |
| 175 |
vcc-pd-supply = <®_cldo1>; |
| 176 |
vcc-pg-supply = <®_vcc_wifi_io>; |
| 177 |
}; |
| 178 |
|
| 179 |
&r_i2c { |
| 180 |
status = "okay"; |
| 181 |
|
| 182 |
axp805: pmic@36 { |
| 183 |
compatible = "x-powers,axp805", "x-powers,axp806"; |
| 184 |
reg = <0x36>; |
| 185 |
interrupt-parent = <&r_intc>; |
| 186 |
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>; |
| 187 |
interrupt-controller; |
| 188 |
#interrupt-cells = <1>; |
| 189 |
x-powers,self-working-mode; |
| 190 |
vina-supply = <®_vcc5v>; |
| 191 |
vinb-supply = <®_vcc5v>; |
| 192 |
vinc-supply = <®_vcc5v>; |
| 193 |
vind-supply = <®_vcc5v>; |
| 194 |
vine-supply = <®_vcc5v>; |
| 195 |
aldoin-supply = <®_vcc5v>; |
| 196 |
bldoin-supply = <®_vcc5v>; |
| 197 |
cldoin-supply = <®_vcc5v>; |
| 198 |
|
| 199 |
regulators { |
| 200 |
reg_aldo1: aldo1 { |
| 201 |
regulator-always-on; |
| 202 |
regulator-min-microvolt = <3300000>; |
| 203 |
regulator-max-microvolt = <3300000>; |
| 204 |
regulator-name = "vcc-pl-led-ir"; |
| 205 |
}; |
| 206 |
|
| 207 |
reg_aldo2: aldo2 { |
| 208 |
regulator-min-microvolt = <3300000>; |
| 209 |
regulator-max-microvolt = <3300000>; |
| 210 |
regulator-name = "vcc33-audio-tv-ephy-mac"; |
| 211 |
}; |
| 212 |
|
| 213 |
/* ALDO3 is shorted to CLDO1 */ |
| 214 |
reg_aldo3: aldo3 { |
| 215 |
regulator-always-on; |
| 216 |
regulator-min-microvolt = <3300000>; |
| 217 |
regulator-max-microvolt = <3300000>; |
| 218 |
regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-1"; |
| 219 |
}; |
| 220 |
|
| 221 |
reg_bldo1: bldo1 { |
| 222 |
regulator-always-on; |
| 223 |
regulator-min-microvolt = <1800000>; |
| 224 |
regulator-max-microvolt = <1800000>; |
| 225 |
regulator-name = "vcc18-dram-bias-pll"; |
| 226 |
}; |
| 227 |
|
| 228 |
reg_bldo2: bldo2 { |
| 229 |
regulator-always-on; |
| 230 |
regulator-min-microvolt = <1800000>; |
| 231 |
regulator-max-microvolt = <1800000>; |
| 232 |
regulator-name = "vcc-efuse-pcie-hdmi-pc"; |
| 233 |
}; |
| 234 |
|
| 235 |
bldo3 { |
| 236 |
/* unused */ |
| 237 |
}; |
| 238 |
|
| 239 |
bldo4 { |
| 240 |
/* unused */ |
| 241 |
}; |
| 242 |
|
| 243 |
reg_cldo1: cldo1 { |
| 244 |
regulator-always-on; |
| 245 |
regulator-min-microvolt = <3300000>; |
| 246 |
regulator-max-microvolt = <3300000>; |
| 247 |
regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-2"; |
| 248 |
}; |
| 249 |
|
| 250 |
cldo2 { |
| 251 |
/* unused */ |
| 252 |
}; |
| 253 |
|
| 254 |
cldo3 { |
| 255 |
/* unused */ |
| 256 |
}; |
| 257 |
|
| 258 |
reg_dcdca: dcdca { |
| 259 |
regulator-always-on; |
| 260 |
regulator-min-microvolt = <800000>; |
| 261 |
regulator-max-microvolt = <1160000>; |
| 262 |
regulator-ramp-delay = <2500>; |
| 263 |
regulator-name = "vdd-cpu"; |
| 264 |
}; |
| 265 |
|
| 266 |
reg_dcdcc: dcdcc { |
| 267 |
regulator-enable-ramp-delay = <32000>; |
| 268 |
regulator-min-microvolt = <810000>; |
| 269 |
regulator-max-microvolt = <1080000>; |
| 270 |
regulator-ramp-delay = <2500>; |
| 271 |
regulator-name = "vdd-gpu"; |
| 272 |
}; |
| 273 |
|
| 274 |
reg_dcdcd: dcdcd { |
| 275 |
regulator-always-on; |
| 276 |
regulator-min-microvolt = <960000>; |
| 277 |
regulator-max-microvolt = <960000>; |
| 278 |
regulator-name = "vdd-sys"; |
| 279 |
}; |
| 280 |
|
| 281 |
reg_dcdce: dcdce { |
| 282 |
regulator-always-on; |
| 283 |
regulator-min-microvolt = <1200000>; |
| 284 |
regulator-max-microvolt = <1200000>; |
| 285 |
regulator-name = "vcc-dram"; |
| 286 |
}; |
| 287 |
|
| 288 |
sw { |
| 289 |
/* unused */ |
| 290 |
}; |
| 291 |
}; |
| 292 |
}; |
| 293 |
}; |
| 294 |
|
| 295 |
&r_ir { |
| 296 |
status = "okay"; |
| 297 |
}; |
| 298 |
|
| 299 |
&rtc { |
| 300 |
clocks = <&ext_osc32k>; |
| 301 |
}; |
| 302 |
|
| 303 |
&uart0 { |
| 304 |
pinctrl-names = "default"; |
| 305 |
pinctrl-0 = <&uart0_ph_pins>; |
| 306 |
status = "okay"; |
| 307 |
}; |
| 308 |
|
| 309 |
/* There's the BT part of the AP6256 connected to that UART */ |
| 310 |
&uart1 { |
| 311 |
pinctrl-names = "default"; |
| 312 |
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; |
| 313 |
uart-has-rtscts; |
| 314 |
status = "okay"; |
| 315 |
|
| 316 |
bluetooth { |
| 317 |
compatible = "brcm,bcm4345c5"; |
| 318 |
clocks = <&rtc CLK_OSC32K_FANOUT>; |
| 319 |
clock-names = "lpo"; |
| 320 |
device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */ |
| 321 |
host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */ |
| 322 |
shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */ |
| 323 |
max-speed = <1500000>; |
| 324 |
}; |
| 325 |
}; |
| 326 |
|
| 327 |
&usb2otg { |
| 328 |
/* |
| 329 |
* This board doesn't have a controllable VBUS even though it |
| 330 |
* does have an ID pin. Using it as anything but a USB host is |
| 331 |
* unsafe. |
| 332 |
*/ |
| 333 |
dr_mode = "host"; |
| 334 |
status = "okay"; |
| 335 |
}; |
| 336 |
|
| 337 |
&usb2phy { |
| 338 |
usb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */ |
| 339 |
usb0_vbus-supply = <®_vcc5v>; |
| 340 |
usb3_vbus-supply = <®_vcc5v>; |
| 341 |
status = "okay"; |
| 342 |
}; |
| 343 |
|
| 344 |
&usb3phy { |
| 345 |
status = "okay"; |
| 346 |
}; |