1f64f2e0fSJagan Teki// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2f64f2e0fSJagan Teki/* 3f64f2e0fSJagan Teki * Copyright (C) 2018 Amarula Solutions B.V. 4f64f2e0fSJagan Teki * Author: Jagan Teki <jagan@amarulasolutions.com> 5f64f2e0fSJagan Teki */ 6f64f2e0fSJagan Teki 7f64f2e0fSJagan Teki/dts-v1/; 8f64f2e0fSJagan Teki 9f64f2e0fSJagan Teki#include "sun50i-a64.dtsi" 10f64f2e0fSJagan Teki 11f64f2e0fSJagan Teki#include <dt-bindings/gpio/gpio.h> 12f64f2e0fSJagan Teki 13f64f2e0fSJagan Teki/ { 14f64f2e0fSJagan Teki model = "Amarula A64-Relic"; 15f64f2e0fSJagan Teki compatible = "amarula,a64-relic", "allwinner,sun50i-a64"; 16f64f2e0fSJagan Teki 17f64f2e0fSJagan Teki aliases { 18f64f2e0fSJagan Teki serial0 = &uart0; 19f64f2e0fSJagan Teki }; 20f64f2e0fSJagan Teki 21f64f2e0fSJagan Teki chosen { 22f64f2e0fSJagan Teki stdout-path = "serial0:115200n8"; 23f64f2e0fSJagan Teki }; 2433c3d4ebSJagan Teki 25*7cc399f2SJagan Teki i2c { 26*7cc399f2SJagan Teki compatible = "i2c-gpio"; 27*7cc399f2SJagan Teki sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; 28*7cc399f2SJagan Teki scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; 29*7cc399f2SJagan Teki i2c-gpio,delay-us = <5>; 30*7cc399f2SJagan Teki #address-cells = <1>; 31*7cc399f2SJagan Teki #size-cells = <0>; 32*7cc399f2SJagan Teki 33*7cc399f2SJagan Teki ov5640: camera@3c { 34*7cc399f2SJagan Teki compatible = "ovti,ov5640"; 35*7cc399f2SJagan Teki reg = <0x3c>; 36*7cc399f2SJagan Teki pinctrl-names = "default"; 37*7cc399f2SJagan Teki pinctrl-0 = <&csi_mclk_pin>; 38*7cc399f2SJagan Teki clocks = <&ccu CLK_CSI_MCLK>; 39*7cc399f2SJagan Teki clock-names = "xclk"; 40*7cc399f2SJagan Teki 41*7cc399f2SJagan Teki AVDD-supply = <®_aldo1>; 42*7cc399f2SJagan Teki DOVDD-supply = <®_dldo3>; 43*7cc399f2SJagan Teki DVDD-supply = <®_eldo3>; 44*7cc399f2SJagan Teki reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */ 45*7cc399f2SJagan Teki powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */ 46*7cc399f2SJagan Teki 47*7cc399f2SJagan Teki port { 48*7cc399f2SJagan Teki ov5640_ep: endpoint { 49*7cc399f2SJagan Teki remote-endpoint = <&csi_ep>; 50*7cc399f2SJagan Teki bus-width = <8>; 51*7cc399f2SJagan Teki hsync-active = <1>; /* Active high */ 52*7cc399f2SJagan Teki vsync-active = <0>; /* Active low */ 53*7cc399f2SJagan Teki data-active = <1>; /* Active high */ 54*7cc399f2SJagan Teki pclk-sample = <1>; /* Rising */ 55*7cc399f2SJagan Teki }; 56*7cc399f2SJagan Teki }; 57*7cc399f2SJagan Teki }; 58*7cc399f2SJagan Teki }; 59*7cc399f2SJagan Teki 6033c3d4ebSJagan Teki wifi_pwrseq: wifi-pwrseq { 6133c3d4ebSJagan Teki compatible = "mmc-pwrseq-simple"; 6233c3d4ebSJagan Teki clocks = <&rtc 1>; 6333c3d4ebSJagan Teki clock-names = "ext_clock"; 6433c3d4ebSJagan Teki reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */ 6533c3d4ebSJagan Teki }; 66f64f2e0fSJagan Teki}; 67f64f2e0fSJagan Teki 68*7cc399f2SJagan Teki&csi { 69*7cc399f2SJagan Teki status = "okay"; 70*7cc399f2SJagan Teki 71*7cc399f2SJagan Teki port { 72*7cc399f2SJagan Teki csi_ep: endpoint { 73*7cc399f2SJagan Teki remote-endpoint = <&ov5640_ep>; 74*7cc399f2SJagan Teki bus-width = <8>; 75*7cc399f2SJagan Teki hsync-active = <1>; /* Active high */ 76*7cc399f2SJagan Teki vsync-active = <0>; /* Active low */ 77*7cc399f2SJagan Teki data-active = <1>; /* Active high */ 78*7cc399f2SJagan Teki pclk-sample = <1>; /* Rising */ 79*7cc399f2SJagan Teki }; 80*7cc399f2SJagan Teki }; 81*7cc399f2SJagan Teki}; 82*7cc399f2SJagan Teki 83f64f2e0fSJagan Teki&ehci0 { 84f64f2e0fSJagan Teki status = "okay"; 85f64f2e0fSJagan Teki}; 86f64f2e0fSJagan Teki 87ea738c32SJagan Teki&i2c0 { 88ea738c32SJagan Teki pinctrl-names = "default"; 89ea738c32SJagan Teki pinctrl-0 = <&i2c0_pins>; 90ea738c32SJagan Teki status = "okay"; 91ea738c32SJagan Teki 92ea738c32SJagan Teki sensor@48 { 93ea738c32SJagan Teki compatible = "st,stlm75"; 94ea738c32SJagan Teki reg = <0x48>; 95ea738c32SJagan Teki }; 96ea738c32SJagan Teki}; 97ea738c32SJagan Teki 98ea738c32SJagan Teki&i2c0_pins { 99ea738c32SJagan Teki bias-pull-up; 100ea738c32SJagan Teki}; 101ea738c32SJagan Teki 10233c3d4ebSJagan Teki&mmc1 { 10333c3d4ebSJagan Teki pinctrl-names = "default"; 10433c3d4ebSJagan Teki pinctrl-0 = <&mmc1_pins>; 10533c3d4ebSJagan Teki vmmc-supply = <®_dcdc1>; 10633c3d4ebSJagan Teki /* 10733c3d4ebSJagan Teki * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but 10833c3d4ebSJagan Teki * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with 10933c3d4ebSJagan Teki * 0Ohm register to vcc-io-wifi so eldo1 is used. 11033c3d4ebSJagan Teki */ 11133c3d4ebSJagan Teki vqmmc-supply = <®_eldo1>; 11233c3d4ebSJagan Teki mmc-pwrseq = <&wifi_pwrseq>; 11333c3d4ebSJagan Teki bus-width = <4>; 11433c3d4ebSJagan Teki non-removable; 11533c3d4ebSJagan Teki status = "okay"; 11633c3d4ebSJagan Teki 11733c3d4ebSJagan Teki brcmf: wifi@1 { 11833c3d4ebSJagan Teki reg = <1>; 11933c3d4ebSJagan Teki compatible = "brcm,bcm4329-fmac"; 12033c3d4ebSJagan Teki interrupt-parent = <&r_pio>; 12133c3d4ebSJagan Teki interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */ 12233c3d4ebSJagan Teki interrupt-names = "host-wake"; 12333c3d4ebSJagan Teki }; 12433c3d4ebSJagan Teki}; 12533c3d4ebSJagan Teki 126f64f2e0fSJagan Teki&mmc2 { 127f64f2e0fSJagan Teki pinctrl-names = "default"; 128f64f2e0fSJagan Teki pinctrl-0 = <&mmc2_pins>; 129f64f2e0fSJagan Teki vmmc-supply = <®_dcdc1>; 130f64f2e0fSJagan Teki bus-width = <8>; 131f64f2e0fSJagan Teki non-removable; 132f64f2e0fSJagan Teki cap-mmc-hw-reset; 133f64f2e0fSJagan Teki status = "okay"; 134f64f2e0fSJagan Teki}; 135f64f2e0fSJagan Teki 136f64f2e0fSJagan Teki&ohci0 { 137f64f2e0fSJagan Teki status = "okay"; 138f64f2e0fSJagan Teki}; 139f64f2e0fSJagan Teki 140f64f2e0fSJagan Teki&r_rsb { 141f64f2e0fSJagan Teki status = "okay"; 142f64f2e0fSJagan Teki 143f64f2e0fSJagan Teki axp803: pmic@3a3 { 144f64f2e0fSJagan Teki compatible = "x-powers,axp803"; 145f64f2e0fSJagan Teki reg = <0x3a3>; 146f64f2e0fSJagan Teki interrupt-parent = <&r_intc>; 147f64f2e0fSJagan Teki interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 148f64f2e0fSJagan Teki x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */ 149f64f2e0fSJagan Teki }; 150f64f2e0fSJagan Teki}; 151f64f2e0fSJagan Teki 152f64f2e0fSJagan Teki#include "axp803.dtsi" 153f64f2e0fSJagan Teki 154f64f2e0fSJagan Teki®_aldo1 { 155f64f2e0fSJagan Teki regulator-always-on; 156f64f2e0fSJagan Teki regulator-min-microvolt = <2800000>; 157f64f2e0fSJagan Teki regulator-max-microvolt = <2800000>; 158f64f2e0fSJagan Teki regulator-name = "avdd-csi"; 159f64f2e0fSJagan Teki}; 160f64f2e0fSJagan Teki 161f64f2e0fSJagan Teki®_aldo2 { 162f64f2e0fSJagan Teki regulator-always-on; 163f64f2e0fSJagan Teki regulator-min-microvolt = <1800000>; 164f64f2e0fSJagan Teki regulator-max-microvolt = <3300000>; 165f64f2e0fSJagan Teki regulator-name = "vcc-pl"; 166f64f2e0fSJagan Teki}; 167f64f2e0fSJagan Teki 168f64f2e0fSJagan Teki®_aldo3 { 169f64f2e0fSJagan Teki regulator-always-on; 170f64f2e0fSJagan Teki regulator-min-microvolt = <3000000>; 171f64f2e0fSJagan Teki regulator-max-microvolt = <3000000>; 172f64f2e0fSJagan Teki regulator-name = "vcc-pll-avcc"; 173f64f2e0fSJagan Teki}; 174f64f2e0fSJagan Teki 175f64f2e0fSJagan Teki®_dcdc1 { 176f64f2e0fSJagan Teki regulator-always-on; 177f64f2e0fSJagan Teki regulator-min-microvolt = <3300000>; 178f64f2e0fSJagan Teki regulator-max-microvolt = <3300000>; 179f64f2e0fSJagan Teki regulator-name = "vcc-3v3"; 180f64f2e0fSJagan Teki}; 181f64f2e0fSJagan Teki 182f64f2e0fSJagan Teki®_dcdc2 { 183f64f2e0fSJagan Teki regulator-always-on; 184f64f2e0fSJagan Teki regulator-min-microvolt = <1040000>; 185f64f2e0fSJagan Teki regulator-max-microvolt = <1300000>; 186f64f2e0fSJagan Teki regulator-name = "vdd-cpux"; 187f64f2e0fSJagan Teki}; 188f64f2e0fSJagan Teki 189f64f2e0fSJagan Teki/* DCDC3 is polyphased with DCDC2 */ 190f64f2e0fSJagan Teki 191f64f2e0fSJagan Teki®_dcdc5 { 192f64f2e0fSJagan Teki regulator-always-on; 193f64f2e0fSJagan Teki regulator-min-microvolt = <1500000>; 194f64f2e0fSJagan Teki regulator-max-microvolt = <1500000>; 195f64f2e0fSJagan Teki regulator-name = "vcc-dram"; 196f64f2e0fSJagan Teki}; 197f64f2e0fSJagan Teki 198f64f2e0fSJagan Teki®_dcdc6 { 199f64f2e0fSJagan Teki regulator-always-on; 200f64f2e0fSJagan Teki regulator-min-microvolt = <1100000>; 201f64f2e0fSJagan Teki regulator-max-microvolt = <1100000>; 202f64f2e0fSJagan Teki regulator-name = "vdd-sys"; 203f64f2e0fSJagan Teki}; 204f64f2e0fSJagan Teki 205f64f2e0fSJagan Teki®_dldo1 { 206f64f2e0fSJagan Teki regulator-min-microvolt = <3300000>; 207f64f2e0fSJagan Teki regulator-max-microvolt = <3300000>; 208f64f2e0fSJagan Teki regulator-name = "vcc-hdmi-dsi-sensor"; 209f64f2e0fSJagan Teki}; 210f64f2e0fSJagan Teki 211f64f2e0fSJagan Teki®_dldo2 { 212f64f2e0fSJagan Teki regulator-min-microvolt = <3300000>; 213f64f2e0fSJagan Teki regulator-max-microvolt = <3300000>; 214f64f2e0fSJagan Teki regulator-name = "vcc-mipi"; 215f64f2e0fSJagan Teki}; 216f64f2e0fSJagan Teki 217f64f2e0fSJagan Teki®_dldo3 { 218f64f2e0fSJagan Teki regulator-min-microvolt = <2800000>; 219f64f2e0fSJagan Teki regulator-max-microvolt = <2800000>; 220f64f2e0fSJagan Teki regulator-name = "dovdd-csi"; 221f64f2e0fSJagan Teki}; 222f64f2e0fSJagan Teki 223f64f2e0fSJagan Teki®_dldo4 { 224f64f2e0fSJagan Teki regulator-min-microvolt = <3300000>; 225f64f2e0fSJagan Teki regulator-max-microvolt = <3300000>; 226f64f2e0fSJagan Teki regulator-name = "vcc-wifi-io"; 227f64f2e0fSJagan Teki}; 228f64f2e0fSJagan Teki 229f64f2e0fSJagan Teki®_drivevbus { 230f64f2e0fSJagan Teki regulator-name = "usb0-vbus"; 231f64f2e0fSJagan Teki status = "okay"; 232f64f2e0fSJagan Teki}; 233f64f2e0fSJagan Teki 234f64f2e0fSJagan Teki®_eldo1 { 235f64f2e0fSJagan Teki regulator-always-on; 236f64f2e0fSJagan Teki regulator-min-microvolt = <1800000>; 237f64f2e0fSJagan Teki regulator-max-microvolt = <1800000>; 238f64f2e0fSJagan Teki regulator-name = "cpvdd"; 239f64f2e0fSJagan Teki}; 240f64f2e0fSJagan Teki 241f64f2e0fSJagan Teki®_eldo3 { 242f64f2e0fSJagan Teki regulator-min-microvolt = <1800000>; 243f64f2e0fSJagan Teki regulator-max-microvolt = <1800000>; 244f64f2e0fSJagan Teki regulator-name = "dvdd-csi"; 245f64f2e0fSJagan Teki}; 246f64f2e0fSJagan Teki 247f64f2e0fSJagan Teki®_fldo1 { 248f64f2e0fSJagan Teki regulator-min-microvolt = <1200000>; 249f64f2e0fSJagan Teki regulator-max-microvolt = <1200000>; 250f64f2e0fSJagan Teki regulator-name = "vcc-1v2-hsic"; 251f64f2e0fSJagan Teki}; 252f64f2e0fSJagan Teki 253f64f2e0fSJagan Teki/* 254f64f2e0fSJagan Teki * The A64 chip cannot work without this regulator off, although 255f64f2e0fSJagan Teki * it seems to be only driving the AR100 core. 256f64f2e0fSJagan Teki * Maybe we don't still know well about CPUs domain. 257f64f2e0fSJagan Teki */ 258f64f2e0fSJagan Teki®_fldo2 { 259f64f2e0fSJagan Teki regulator-always-on; 260f64f2e0fSJagan Teki regulator-min-microvolt = <1100000>; 261f64f2e0fSJagan Teki regulator-max-microvolt = <1100000>; 262f64f2e0fSJagan Teki regulator-name = "vdd-cpus"; 263f64f2e0fSJagan Teki}; 264f64f2e0fSJagan Teki 265f64f2e0fSJagan Teki®_rtc_ldo { 266f64f2e0fSJagan Teki regulator-name = "vcc-rtc"; 267f64f2e0fSJagan Teki}; 268f64f2e0fSJagan Teki 269f64f2e0fSJagan Teki&uart0 { 270f64f2e0fSJagan Teki pinctrl-names = "default"; 271d91ebb95SChen-Yu Tsai pinctrl-0 = <&uart0_pb_pins>; 272f64f2e0fSJagan Teki status = "okay"; 273f64f2e0fSJagan Teki}; 274f64f2e0fSJagan Teki 275f64f2e0fSJagan Teki&usb_otg { 276f64f2e0fSJagan Teki dr_mode = "otg"; 277f64f2e0fSJagan Teki status = "okay"; 278f64f2e0fSJagan Teki}; 279f64f2e0fSJagan Teki 280f64f2e0fSJagan Teki&usbphy { 281f64f2e0fSJagan Teki usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ 282f64f2e0fSJagan Teki usb0_vbus-supply = <®_drivevbus>; 283f64f2e0fSJagan Teki status = "okay"; 284f64f2e0fSJagan Teki}; 285