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