| 1 |
// SPDX-License-Identifier: (GPL-2.0 OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (C) 2024 Arm Ltd. |
| 4 |
*/ |
| 5 |
|
| 6 |
/dts-v1/; |
| 7 |
|
| 8 |
#include "sun50i-h616.dtsi" |
| 9 |
#include "sun50i-h616-cpu-opp.dtsi" |
| 10 |
|
| 11 |
#include <dt-bindings/gpio/gpio.h> |
| 12 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 13 |
|
| 14 |
/ { |
| 15 |
model = "Yuzuki Chameleon"; |
| 16 |
compatible = "yuzukihd,chameleon", "allwinner,sun50i-h618"; |
| 17 |
|
| 18 |
aliases { |
| 19 |
ethernet1 = &sdio_wifi; |
| 20 |
serial0 = &uart0; |
| 21 |
}; |
| 22 |
|
| 23 |
chosen { |
| 24 |
stdout-path = "serial0:115200n8"; |
| 25 |
}; |
| 26 |
|
| 27 |
reg_vcc5v: vcc5v { |
| 28 |
/* board wide 5V supply directly from the USB-C socket */ |
| 29 |
compatible = "regulator-fixed"; |
| 30 |
regulator-name = "vcc-5v"; |
| 31 |
regulator-min-microvolt = <5000000>; |
| 32 |
regulator-max-microvolt = <5000000>; |
| 33 |
regulator-always-on; |
| 34 |
}; |
| 35 |
|
| 36 |
wifi_pwrseq: pwrseq { |
| 37 |
compatible = "mmc-pwrseq-simple"; |
| 38 |
clocks = <&rtc CLK_OSC32K_FANOUT>; |
| 39 |
clock-names = "ext_clock"; |
| 40 |
pinctrl-0 = <&x32clk_fanout_pin>; |
| 41 |
pinctrl-names = "default"; |
| 42 |
reset-gpios = <&pio 6 11 GPIO_ACTIVE_LOW>; /* PG11 */ |
| 43 |
}; |
| 44 |
}; |
| 45 |
|
| 46 |
&codec { |
| 47 |
allwinner,audio-routing = "Line Out", "LINEOUT"; |
| 48 |
status = "okay"; |
| 49 |
}; |
| 50 |
|
| 51 |
&cpu0 { |
| 52 |
cpu-supply = <®_dcdc2>; |
| 53 |
}; |
| 54 |
|
| 55 |
&ehci0 { |
| 56 |
status = "okay"; |
| 57 |
}; |
| 58 |
|
| 59 |
&ehci1 { |
| 60 |
status = "okay"; |
| 61 |
}; |
| 62 |
|
| 63 |
&ehci2 { |
| 64 |
status = "okay"; |
| 65 |
}; |
| 66 |
|
| 67 |
&ehci3 { |
| 68 |
status = "okay"; |
| 69 |
}; |
| 70 |
|
| 71 |
&mmc0 { |
| 72 |
bus-width = <4>; |
| 73 |
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 74 |
disable-wp; |
| 75 |
vmmc-supply = <®_dldo1>; |
| 76 |
status = "okay"; |
| 77 |
}; |
| 78 |
|
| 79 |
&mmc1 { |
| 80 |
bus-width = <4>; |
| 81 |
mmc-pwrseq = <&wifi_pwrseq>; |
| 82 |
non-removable; |
| 83 |
vmmc-supply = <®_dldo1>; |
| 84 |
vqmmc-supply = <®_dldo1>; |
| 85 |
status = "okay"; |
| 86 |
|
| 87 |
sdio_wifi: wifi@1 { |
| 88 |
reg = <1>; |
| 89 |
interrupt-parent = <&pio>; |
| 90 |
interrupts = <6 12 IRQ_TYPE_LEVEL_LOW>; /* PG12 */ |
| 91 |
interrupt-names = "host-wake"; |
| 92 |
}; |
| 93 |
}; |
| 94 |
|
| 95 |
&mmc2 { |
| 96 |
bus-width = <8>; |
| 97 |
cap-mmc-hw-reset; |
| 98 |
mmc-ddr-3_3v; |
| 99 |
non-removable; |
| 100 |
vmmc-supply = <®_dldo1>; |
| 101 |
vqmmc-supply = <®_dldo1>; |
| 102 |
status = "okay"; |
| 103 |
}; |
| 104 |
|
| 105 |
&ohci0 { |
| 106 |
status = "okay"; |
| 107 |
}; |
| 108 |
|
| 109 |
&ohci1 { |
| 110 |
status = "okay"; |
| 111 |
}; |
| 112 |
|
| 113 |
&ohci2 { |
| 114 |
status = "okay"; |
| 115 |
}; |
| 116 |
|
| 117 |
&ohci3 { |
| 118 |
status = "okay"; |
| 119 |
}; |
| 120 |
|
| 121 |
&pio { |
| 122 |
vcc-pc-supply = <®_dldo1>; |
| 123 |
vcc-pf-supply = <®_dldo1>; /* via VCC_IO */ |
| 124 |
vcc-pg-supply = <®_dldo1>; |
| 125 |
vcc-ph-supply = <®_dldo1>; /* via VCC_IO */ |
| 126 |
vcc-pi-supply = <®_dldo1>; |
| 127 |
}; |
| 128 |
|
| 129 |
&r_i2c { |
| 130 |
status = "okay"; |
| 131 |
|
| 132 |
axp313: pmic@36 { |
| 133 |
compatible = "x-powers,axp313a"; |
| 134 |
reg = <0x36>; |
| 135 |
#interrupt-cells = <1>; |
| 136 |
interrupt-controller; |
| 137 |
interrupt-parent = <&pio>; |
| 138 |
interrupts = <2 2 IRQ_TYPE_LEVEL_LOW>; /* PC2 */ |
| 139 |
|
| 140 |
vin1-supply = <®_vcc5v>; |
| 141 |
vin2-supply = <®_vcc5v>; |
| 142 |
vin3-supply = <®_vcc5v>; |
| 143 |
|
| 144 |
regulators { |
| 145 |
/* Supplies VCC-PLL, so needs to be always on. */ |
| 146 |
reg_aldo1: aldo1 { |
| 147 |
regulator-always-on; |
| 148 |
regulator-min-microvolt = <1800000>; |
| 149 |
regulator-max-microvolt = <1800000>; |
| 150 |
regulator-name = "vcc1v8"; |
| 151 |
}; |
| 152 |
|
| 153 |
/* Supplies VCC-IO, so needs to be always on. */ |
| 154 |
reg_dldo1: dldo1 { |
| 155 |
regulator-always-on; |
| 156 |
regulator-min-microvolt = <3300000>; |
| 157 |
regulator-max-microvolt = <3300000>; |
| 158 |
regulator-name = "vcc3v3"; |
| 159 |
}; |
| 160 |
|
| 161 |
reg_dcdc1: dcdc1 { |
| 162 |
regulator-always-on; |
| 163 |
regulator-min-microvolt = <810000>; |
| 164 |
regulator-max-microvolt = <990000>; |
| 165 |
regulator-name = "vdd-gpu-sys"; |
| 166 |
}; |
| 167 |
|
| 168 |
reg_dcdc2: dcdc2 { |
| 169 |
regulator-always-on; |
| 170 |
regulator-min-microvolt = <810000>; |
| 171 |
regulator-max-microvolt = <1100000>; |
| 172 |
regulator-name = "vdd-cpu"; |
| 173 |
}; |
| 174 |
|
| 175 |
reg_dcdc3: dcdc3 { |
| 176 |
regulator-always-on; |
| 177 |
regulator-min-microvolt = <1500000>; |
| 178 |
regulator-max-microvolt = <1500000>; |
| 179 |
regulator-name = "vdd-dram"; |
| 180 |
}; |
| 181 |
}; |
| 182 |
}; |
| 183 |
}; |
| 184 |
|
| 185 |
&uart0 { |
| 186 |
pinctrl-names = "default"; |
| 187 |
pinctrl-0 = <&uart0_ph_pins>; |
| 188 |
status = "okay"; |
| 189 |
}; |
| 190 |
|
| 191 |
/* Connected to the Bluetooth UART pins of the XR829 Wifi/BT chip. */ |
| 192 |
&uart1 { |
| 193 |
pinctrl-names = "default"; |
| 194 |
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; |
| 195 |
uart-has-rtscts; |
| 196 |
status = "okay"; |
| 197 |
}; |
| 198 |
|
| 199 |
&usbotg { |
| 200 |
/* |
| 201 |
* PHY0 pins are connected to a USB-C socket, but a role switch |
| 202 |
* is not implemented: both CC pins are pulled to GND. |
| 203 |
* The VBUS pins power the device, so a fixed peripheral mode |
| 204 |
* is the best choice. |
| 205 |
* The board can be powered via GPIOs, in this case port0 *can* |
| 206 |
* act as a host (with a cable/adapter ignoring CC), as VBUS is |
| 207 |
* then provided by the GPIOs. Any user of this setup would |
| 208 |
* need to adjust the DT accordingly: dr_mode set to "host", |
| 209 |
* enabling OHCI0 and EHCI0. |
| 210 |
*/ |
| 211 |
dr_mode = "peripheral"; |
| 212 |
status = "okay"; |
| 213 |
}; |
| 214 |
|
| 215 |
&usbphy { |
| 216 |
usb0_id_det-gpios = <&pio 6 18 GPIO_ACTIVE_HIGH>; /* PG18 */ |
| 217 |
usb0_vbus-supply = <®_vcc5v>; |
| 218 |
usb1_vbus-supply = <®_vcc5v>; |
| 219 |
usb2_vbus-supply = <®_vcc5v>; |
| 220 |
usb3_vbus-supply = <®_vcc5v>; |
| 221 |
status = "okay"; |
| 222 |
}; |