1/* 2 * Copyright (C) Harald Geyer <harald@ccbib.org> 3 * based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com> 4 * 5 * SPDX-License-Identifier: (GPL-2.0 OR MIT) 6 */ 7 8/dts-v1/; 9 10#include "sun50i-a64.dtsi" 11 12#include <dt-bindings/gpio/gpio.h> 13#include <dt-bindings/input/input.h> 14#include <dt-bindings/pwm/pwm.h> 15 16/ { 17 model = "Olimex A64 Teres-I"; 18 compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64"; 19 20 aliases { 21 serial0 = &uart0; 22 }; 23 24 chosen { 25 stdout-path = "serial0:115200n8"; 26 27 framebuffer-lcd { 28 eDP25-supply = <®_dldo2>; 29 eDP12-supply = <®_dldo3>; 30 }; 31 }; 32 33 gpio-keys { 34 compatible = "gpio-keys"; 35 36 lid-switch { 37 label = "Lid Switch"; 38 gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ 39 linux,input-type = <EV_SW>; 40 linux,code = <SW_LID>; 41 wakeup-source; 42 }; 43 }; 44 45 leds { 46 compatible = "gpio-leds"; 47 48 capslock { 49 label = "teres-i:green:capslock"; 50 gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */ 51 }; 52 53 numlock { 54 label = "teres-i:green:numlock"; 55 gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ 56 }; 57 }; 58 59 reg_usb1_vbus: usb1-vbus { 60 compatible = "regulator-fixed"; 61 regulator-name = "usb1-vbus"; 62 regulator-min-microvolt = <5000000>; 63 regulator-max-microvolt = <5000000>; 64 enable-active-high; 65 gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ 66 status = "okay"; 67 }; 68 69 wifi_pwrseq: wifi_pwrseq { 70 compatible = "mmc-pwrseq-simple"; 71 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 72 }; 73}; 74 75&ehci1 { 76 status = "okay"; 77}; 78 79 80/* The ANX6345 eDP-bridge is on i2c0. There is no linux (mainline) 81 * driver for this chip at the moment, the bootloader initializes it. 82 * However it can be accessed with the i2c-dev driver from user space. 83 */ 84&i2c0 { 85 clock-frequency = <100000>; 86 pinctrl-names = "default"; 87 pinctrl-0 = <&i2c0_pins>; 88 status = "okay"; 89}; 90 91&mmc0 { 92 pinctrl-names = "default"; 93 pinctrl-0 = <&mmc0_pins>; 94 vmmc-supply = <®_dcdc1>; 95 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 96 disable-wp; 97 bus-width = <4>; 98 status = "okay"; 99}; 100 101&mmc1 { 102 pinctrl-names = "default"; 103 pinctrl-0 = <&mmc1_pins>; 104 vmmc-supply = <®_aldo2>; 105 vqmmc-supply = <®_dldo4>; 106 mmc-pwrseq = <&wifi_pwrseq>; 107 bus-width = <4>; 108 non-removable; 109 status = "okay"; 110 111 rtl8723bs: wifi@1 { 112 reg = <1>; 113 interrupt-parent = <&r_pio>; 114 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ 115 interrupt-names = "host-wake"; 116 }; 117}; 118 119&mmc2 { 120 pinctrl-names = "default"; 121 pinctrl-0 = <&mmc2_pins>; 122 vmmc-supply = <®_dcdc1>; 123 vqmmc-supply = <®_dcdc1>; 124 bus-width = <8>; 125 non-removable; 126 cap-mmc-hw-reset; 127 status = "okay"; 128}; 129 130&ohci1 { 131 status = "okay"; 132}; 133 134&r_rsb { 135 status = "okay"; 136 137 axp803: pmic@3a3 { 138 compatible = "x-powers,axp803"; 139 reg = <0x3a3>; 140 interrupt-parent = <&r_intc>; 141 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 142 wakeup-source; 143 }; 144}; 145 146#include "axp803.dtsi" 147 148&ac_power_supply { 149 status = "okay"; 150}; 151 152&battery_power_supply { 153 status = "okay"; 154}; 155 156®_aldo1 { 157 regulator-always-on; 158 regulator-min-microvolt = <2800000>; 159 regulator-max-microvolt = <2800000>; 160 regulator-name = "vcc-pe"; 161}; 162 163®_aldo2 { 164 regulator-always-on; 165 regulator-min-microvolt = <3300000>; 166 regulator-max-microvolt = <3300000>; 167 regulator-name = "vcc-pl"; 168}; 169 170®_aldo3 { 171 regulator-always-on; 172 regulator-min-microvolt = <3000000>; 173 regulator-max-microvolt = <3000000>; 174 regulator-name = "vcc-pll-avcc"; 175}; 176 177®_dcdc1 { 178 regulator-always-on; 179 regulator-min-microvolt = <3300000>; 180 regulator-max-microvolt = <3300000>; 181 regulator-name = "vcc-3v3"; 182}; 183 184®_dcdc2 { 185 regulator-always-on; 186 regulator-min-microvolt = <1040000>; 187 regulator-max-microvolt = <1300000>; 188 regulator-name = "vdd-cpux"; 189}; 190 191/* DCDC3 is polyphased with DCDC2 */ 192 193®_dcdc5 { 194 regulator-always-on; 195 regulator-min-microvolt = <1500000>; 196 regulator-max-microvolt = <1500000>; 197 regulator-name = "vcc-ddr3"; 198}; 199 200®_dcdc6 { 201 regulator-always-on; 202 regulator-min-microvolt = <1100000>; 203 regulator-max-microvolt = <1100000>; 204 regulator-name = "vdd-sys"; 205}; 206 207®_dldo1 { 208 regulator-min-microvolt = <3300000>; 209 regulator-max-microvolt = <3300000>; 210 regulator-name = "vcc-hdmi"; 211}; 212 213®_dldo2 { 214 regulator-min-microvolt = <2500000>; 215 regulator-max-microvolt = <2500000>; 216 regulator-name = "vcc-pd"; 217}; 218 219®_dldo3 { 220 regulator-min-microvolt = <1200000>; 221 regulator-max-microvolt = <1200000>; 222 regulator-name = "vdd-edp"; 223}; 224 225®_dldo4 { 226 regulator-min-microvolt = <3300000>; 227 regulator-max-microvolt = <3300000>; 228 regulator-name = "vcc-wifi-io"; 229}; 230 231®_eldo1 { 232 regulator-min-microvolt = <1800000>; 233 regulator-max-microvolt = <1800000>; 234 regulator-name = "cpvdd"; 235}; 236 237®_eldo2 { 238 regulator-min-microvolt = <1800000>; 239 regulator-max-microvolt = <1800000>; 240 regulator-name = "vcc-dvdd-csi"; 241}; 242 243®_fldo1 { 244 regulator-min-microvolt = <1200000>; 245 regulator-max-microvolt = <1200000>; 246 regulator-name = "vcc-1v2-hsic"; 247}; 248 249/* 250 * The A64 chip cannot work with this regulator off, although 251 * it seems to be only driving the AR100 core. 252 * Maybe we don't still know well about CPUs domain. 253 */ 254®_fldo2 { 255 regulator-always-on; 256 regulator-min-microvolt = <1100000>; 257 regulator-max-microvolt = <1100000>; 258 regulator-name = "vdd-cpus"; 259}; 260 261®_rtc_ldo { 262 regulator-name = "vcc-rtc"; 263}; 264 265&simplefb_hdmi { 266 vcc-hdmi-supply = <®_dldo1>; 267}; 268 269&uart0 { 270 pinctrl-names = "default"; 271 pinctrl-0 = <&uart0_pb_pins>; 272 status = "okay"; 273}; 274 275&usbphy { 276 usb1_vbus-supply = <®_usb1_vbus>; 277 status = "okay"; 278}; 279