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