0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2019 Ondřej Jirman <megous@megous.com>
0003
0004 /dts-v1/;
0005
0006 #include "sun50i-h6.dtsi"
0007 #include "sun50i-h6-cpu-opp.dtsi"
0008
0009 #include <dt-bindings/gpio/gpio.h>
0010
0011 / {
0012 model = "OrangePi 3";
0013 compatible = "xunlong,orangepi-3", "allwinner,sun50i-h6";
0014
0015 aliases {
0016 serial0 = &uart0;
0017 serial1 = &uart1;
0018 };
0019
0020 chosen {
0021 stdout-path = "serial0:115200n8";
0022 };
0023
0024 connector {
0025 compatible = "hdmi-connector";
0026 ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
0027 type = "a";
0028
0029 port {
0030 hdmi_con_in: endpoint {
0031 remote-endpoint = <&hdmi_out_con>;
0032 };
0033 };
0034 };
0035
0036 ext_osc32k: ext_osc32k_clk {
0037 #clock-cells = <0>;
0038 compatible = "fixed-clock";
0039 clock-frequency = <32768>;
0040 clock-output-names = "ext_osc32k";
0041 };
0042
0043 leds {
0044 compatible = "gpio-leds";
0045
0046 led-0 {
0047 label = "orangepi:red:power";
0048 gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
0049 default-state = "on";
0050 };
0051
0052 led-1 {
0053 label = "orangepi:green:status";
0054 gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
0055 };
0056 };
0057
0058 reg_vcc5v: vcc5v {
0059 /* board wide 5V supply directly from the DC jack */
0060 compatible = "regulator-fixed";
0061 regulator-name = "vcc-5v";
0062 regulator-min-microvolt = <5000000>;
0063 regulator-max-microvolt = <5000000>;
0064 regulator-always-on;
0065 };
0066
0067 reg_vcc33_wifi: vcc33-wifi {
0068 /* Always on 3.3V regulator for WiFi and BT */
0069 compatible = "regulator-fixed";
0070 regulator-name = "vcc33-wifi";
0071 regulator-min-microvolt = <3300000>;
0072 regulator-max-microvolt = <3300000>;
0073 regulator-always-on;
0074 vin-supply = <®_vcc5v>;
0075 };
0076
0077 reg_vcc_wifi_io: vcc-wifi-io {
0078 /* Always on 1.8V/300mA regulator for WiFi and BT IO */
0079 compatible = "regulator-fixed";
0080 regulator-name = "vcc-wifi-io";
0081 regulator-min-microvolt = <1800000>;
0082 regulator-max-microvolt = <1800000>;
0083 regulator-always-on;
0084 vin-supply = <®_vcc33_wifi>;
0085 };
0086
0087 wifi_pwrseq: wifi-pwrseq {
0088 compatible = "mmc-pwrseq-simple";
0089 clocks = <&rtc CLK_OSC32K_FANOUT>;
0090 clock-names = "ext_clock";
0091 reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
0092 post-power-on-delay-ms = <200>;
0093 };
0094 };
0095
0096 &cpu0 {
0097 cpu-supply = <®_dcdca>;
0098 };
0099
0100 &de {
0101 status = "okay";
0102 };
0103
0104 &dwc3 {
0105 status = "okay";
0106 };
0107
0108 &ehci0 {
0109 status = "okay";
0110 };
0111
0112 &ehci3 {
0113 status = "okay";
0114 };
0115
0116 &gpu {
0117 mali-supply = <®_dcdcc>;
0118 status = "okay";
0119 };
0120
0121 &hdmi {
0122 status = "okay";
0123 };
0124
0125 &hdmi_out {
0126 hdmi_out_con: endpoint {
0127 remote-endpoint = <&hdmi_con_in>;
0128 };
0129 };
0130
0131 &mmc0 {
0132 vmmc-supply = <®_cldo1>;
0133 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0134 bus-width = <4>;
0135 status = "okay";
0136 };
0137
0138 &mmc1 {
0139 vmmc-supply = <®_vcc33_wifi>;
0140 vqmmc-supply = <®_vcc_wifi_io>;
0141 mmc-pwrseq = <&wifi_pwrseq>;
0142 bus-width = <4>;
0143 non-removable;
0144 status = "okay";
0145
0146 brcm: sdio-wifi@1 {
0147 reg = <1>;
0148 compatible = "brcm,bcm4329-fmac";
0149 interrupt-parent = <&r_pio>;
0150 interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */
0151 interrupt-names = "host-wake";
0152 };
0153 };
0154
0155 &mmc2 {
0156 vmmc-supply = <®_cldo1>;
0157 vqmmc-supply = <®_bldo2>;
0158 cap-mmc-hw-reset;
0159 non-removable;
0160 bus-width = <8>;
0161 status = "okay";
0162 };
0163
0164 &ohci0 {
0165 status = "okay";
0166 };
0167
0168 &ohci3 {
0169 status = "okay";
0170 };
0171
0172 &pio {
0173 vcc-pc-supply = <®_bldo2>;
0174 vcc-pd-supply = <®_cldo1>;
0175 vcc-pg-supply = <®_vcc_wifi_io>;
0176 };
0177
0178 &r_ir {
0179 status = "okay";
0180 };
0181
0182 &r_rsb {
0183 status = "okay";
0184
0185 axp805: pmic@745 {
0186 compatible = "x-powers,axp805", "x-powers,axp806";
0187 reg = <0x745>;
0188 interrupt-parent = <&r_intc>;
0189 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
0190 interrupt-controller;
0191 #interrupt-cells = <1>;
0192 x-powers,self-working-mode;
0193 vina-supply = <®_vcc5v>;
0194 vinb-supply = <®_vcc5v>;
0195 vinc-supply = <®_vcc5v>;
0196 vind-supply = <®_vcc5v>;
0197 vine-supply = <®_vcc5v>;
0198 aldoin-supply = <®_vcc5v>;
0199 bldoin-supply = <®_vcc5v>;
0200 cldoin-supply = <®_vcc5v>;
0201
0202 regulators {
0203 reg_aldo1: aldo1 {
0204 regulator-always-on;
0205 regulator-min-microvolt = <3300000>;
0206 regulator-max-microvolt = <3300000>;
0207 regulator-name = "vcc-pl-led-ir";
0208 };
0209
0210 reg_aldo2: aldo2 {
0211 regulator-min-microvolt = <3300000>;
0212 regulator-max-microvolt = <3300000>;
0213 regulator-name = "vcc33-audio-tv-ephy-mac";
0214 };
0215
0216 /* ALDO3 is shorted to CLDO1 */
0217 reg_aldo3: aldo3 {
0218 regulator-always-on;
0219 regulator-min-microvolt = <3300000>;
0220 regulator-max-microvolt = <3300000>;
0221 regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-1";
0222 };
0223
0224 reg_bldo1: bldo1 {
0225 regulator-always-on;
0226 regulator-min-microvolt = <1800000>;
0227 regulator-max-microvolt = <1800000>;
0228 regulator-name = "vcc18-dram-bias-pll";
0229 };
0230
0231 reg_bldo2: bldo2 {
0232 regulator-always-on;
0233 regulator-min-microvolt = <1800000>;
0234 regulator-max-microvolt = <1800000>;
0235 regulator-name = "vcc-efuse-pcie-hdmi-pc";
0236 };
0237
0238 bldo3 {
0239 /* unused */
0240 };
0241
0242 bldo4 {
0243 /* unused */
0244 };
0245
0246 reg_cldo1: cldo1 {
0247 regulator-always-on;
0248 regulator-min-microvolt = <3300000>;
0249 regulator-max-microvolt = <3300000>;
0250 regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-2";
0251 };
0252
0253 cldo2 {
0254 /* unused */
0255 };
0256
0257 cldo3 {
0258 /* unused */
0259 };
0260
0261 reg_dcdca: dcdca {
0262 regulator-always-on;
0263 regulator-min-microvolt = <800000>;
0264 regulator-max-microvolt = <1160000>;
0265 regulator-ramp-delay = <2500>;
0266 regulator-name = "vdd-cpu";
0267 };
0268
0269 reg_dcdcc: dcdcc {
0270 regulator-enable-ramp-delay = <32000>;
0271 regulator-min-microvolt = <810000>;
0272 regulator-max-microvolt = <1080000>;
0273 regulator-ramp-delay = <2500>;
0274 regulator-name = "vdd-gpu";
0275 };
0276
0277 reg_dcdcd: dcdcd {
0278 regulator-always-on;
0279 regulator-min-microvolt = <960000>;
0280 regulator-max-microvolt = <960000>;
0281 regulator-name = "vdd-sys";
0282 };
0283
0284 reg_dcdce: dcdce {
0285 regulator-always-on;
0286 regulator-min-microvolt = <1200000>;
0287 regulator-max-microvolt = <1200000>;
0288 regulator-name = "vcc-dram";
0289 };
0290
0291 sw {
0292 /* unused */
0293 };
0294 };
0295 };
0296 };
0297
0298 &rtc {
0299 clocks = <&ext_osc32k>;
0300 };
0301
0302 &uart0 {
0303 pinctrl-names = "default";
0304 pinctrl-0 = <&uart0_ph_pins>;
0305 status = "okay";
0306 };
0307
0308 /* There's the BT part of the AP6256 connected to that UART */
0309 &uart1 {
0310 pinctrl-names = "default";
0311 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
0312 uart-has-rtscts;
0313 status = "okay";
0314
0315 bluetooth {
0316 compatible = "brcm,bcm4345c5";
0317 clocks = <&rtc CLK_OSC32K_FANOUT>;
0318 clock-names = "lpo";
0319 device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
0320 host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
0321 shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
0322 max-speed = <1500000>;
0323 };
0324 };
0325
0326 &usb2otg {
0327 /*
0328 * This board doesn't have a controllable VBUS even though it
0329 * does have an ID pin. Using it as anything but a USB host is
0330 * unsafe.
0331 */
0332 dr_mode = "host";
0333 status = "okay";
0334 };
0335
0336 &usb2phy {
0337 usb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */
0338 usb0_vbus-supply = <®_vcc5v>;
0339 usb3_vbus-supply = <®_vcc5v>;
0340 status = "okay";
0341 };
0342
0343 &usb3phy {
0344 status = "okay";
0345 };