1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2724ba675SRob Herring/* 3724ba675SRob Herring * Device Tree Source for A20-SOM204-EVB Board 4724ba675SRob Herring * 5724ba675SRob Herring * Copyright (C) 2018 Olimex Ltd. 6724ba675SRob Herring * Author: Stefan Mavrodiev <stefan@olimex.com> 7724ba675SRob Herring */ 8724ba675SRob Herring 9724ba675SRob Herring/dts-v1/; 10724ba675SRob Herring#include "sun7i-a20.dtsi" 11724ba675SRob Herring#include "sunxi-common-regulators.dtsi" 12724ba675SRob Herring 13724ba675SRob Herring 14724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 15724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h> 16724ba675SRob Herring#include <dt-bindings/pwm/pwm.h> 17724ba675SRob Herring 18724ba675SRob Herring/ { 19724ba675SRob Herring model = "Olimex A20-SOM204-EVB"; 20724ba675SRob Herring compatible = "olimex,a20-olimex-som204-evb", "allwinner,sun7i-a20"; 21724ba675SRob Herring 22724ba675SRob Herring aliases { 23724ba675SRob Herring serial0 = &uart0; 24724ba675SRob Herring serial1 = &uart4; 25724ba675SRob Herring serial2 = &uart7; 26724ba675SRob Herring spi0 = &spi1; 27724ba675SRob Herring spi1 = &spi2; 28724ba675SRob Herring ethernet1 = &rtl8723bs; 29724ba675SRob Herring }; 30724ba675SRob Herring 31724ba675SRob Herring chosen { 32724ba675SRob Herring stdout-path = "serial0:115200n8"; 33724ba675SRob Herring }; 34724ba675SRob Herring 35724ba675SRob Herring hdmi-connector { 36724ba675SRob Herring compatible = "hdmi-connector"; 37724ba675SRob Herring type = "a"; 38724ba675SRob Herring 39724ba675SRob Herring port { 40724ba675SRob Herring hdmi_con_in: endpoint { 41724ba675SRob Herring remote-endpoint = <&hdmi_out_con>; 42724ba675SRob Herring }; 43724ba675SRob Herring }; 44724ba675SRob Herring }; 45724ba675SRob Herring 46724ba675SRob Herring leds { 47724ba675SRob Herring compatible = "gpio-leds"; 48724ba675SRob Herring 49724ba675SRob Herring led-0 { 50724ba675SRob Herring label = "a20-som204-evb:green:stat"; 51724ba675SRob Herring gpios = <&pio 8 0 GPIO_ACTIVE_HIGH>; 52724ba675SRob Herring default-state = "on"; 53724ba675SRob Herring }; 54724ba675SRob Herring 55724ba675SRob Herring led-1 { 56724ba675SRob Herring label = "a20-som204-evb:green:led1"; 57724ba675SRob Herring gpios = <&pio 8 10 GPIO_ACTIVE_HIGH>; 58724ba675SRob Herring default-state = "on"; 59724ba675SRob Herring }; 60724ba675SRob Herring 61724ba675SRob Herring led-2 { 62724ba675SRob Herring label = "a20-som204-evb:yellow:led2"; 63724ba675SRob Herring gpios = <&pio 8 11 GPIO_ACTIVE_HIGH>; 64724ba675SRob Herring default-state = "on"; 65724ba675SRob Herring }; 66724ba675SRob Herring }; 67724ba675SRob Herring 68*0f47ef3fSKrzysztof Kozlowski rtl_pwrseq: pwrseq-0 { 69724ba675SRob Herring compatible = "mmc-pwrseq-simple"; 70724ba675SRob Herring reset-gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; 71724ba675SRob Herring }; 72724ba675SRob Herring}; 73724ba675SRob Herring 74724ba675SRob Herring&ahci { 75724ba675SRob Herring target-supply = <®_ahci_5v>; 76724ba675SRob Herring status = "okay"; 77724ba675SRob Herring}; 78724ba675SRob Herring 79724ba675SRob Herring&can0 { 80724ba675SRob Herring pinctrl-names = "default"; 81724ba675SRob Herring pinctrl-0 = <&can_ph_pins>; 82724ba675SRob Herring status = "okay"; 83724ba675SRob Herring}; 84724ba675SRob Herring 85724ba675SRob Herring&codec { 86724ba675SRob Herring status = "okay"; 87724ba675SRob Herring}; 88724ba675SRob Herring 89724ba675SRob Herring&cpu0 { 90724ba675SRob Herring cpu-supply = <®_dcdc2>; 91724ba675SRob Herring}; 92724ba675SRob Herring 93724ba675SRob Herring&de { 94724ba675SRob Herring status = "okay"; 95724ba675SRob Herring}; 96724ba675SRob Herring 97724ba675SRob Herring&ehci0 { 98724ba675SRob Herring status = "okay"; 99724ba675SRob Herring}; 100724ba675SRob Herring 101724ba675SRob Herring&ehci1 { 102724ba675SRob Herring status = "okay"; 103724ba675SRob Herring}; 104724ba675SRob Herring 105724ba675SRob Herring&gmac { 106724ba675SRob Herring pinctrl-names = "default"; 107724ba675SRob Herring pinctrl-0 = <&gmac_rgmii_pins>; 108724ba675SRob Herring phy-handle = <&phy3>; 109724ba675SRob Herring phy-mode = "rgmii"; 110724ba675SRob Herring phy-supply = <®_vcc3v3>; 111724ba675SRob Herring status = "okay"; 112724ba675SRob Herring}; 113724ba675SRob Herring 114724ba675SRob Herring&hdmi { 115724ba675SRob Herring status = "okay"; 116724ba675SRob Herring}; 117724ba675SRob Herring 118724ba675SRob Herring&hdmi_out { 119724ba675SRob Herring hdmi_out_con: endpoint { 120724ba675SRob Herring remote-endpoint = <&hdmi_con_in>; 121724ba675SRob Herring }; 122724ba675SRob Herring}; 123724ba675SRob Herring 124724ba675SRob Herring&i2c0 { 125724ba675SRob Herring status = "okay"; 126724ba675SRob Herring 127724ba675SRob Herring axp209: pmic@34 { 128724ba675SRob Herring reg = <0x34>; 129724ba675SRob Herring interrupt-parent = <&nmi_intc>; 130724ba675SRob Herring interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 131724ba675SRob Herring }; 132724ba675SRob Herring}; 133724ba675SRob Herring 134724ba675SRob Herring/* Exposed to UEXT1 */ 135724ba675SRob Herring&i2c1 { 136724ba675SRob Herring status = "okay"; 137724ba675SRob Herring 138724ba675SRob Herring eeprom: eeprom@50 { 139724ba675SRob Herring compatible = "atmel,24c16"; 140724ba675SRob Herring reg = <0x50>; 141724ba675SRob Herring pagesize = <16>; 142724ba675SRob Herring }; 143724ba675SRob Herring}; 144724ba675SRob Herring 145724ba675SRob Herring/* Exposed to UEXT2 */ 146724ba675SRob Herring&i2c2 { 147724ba675SRob Herring status = "okay"; 148724ba675SRob Herring}; 149724ba675SRob Herring 150724ba675SRob Herring&ir0 { 151724ba675SRob Herring pinctrl-names = "default"; 152724ba675SRob Herring pinctrl-0 = <&ir0_rx_pin>; 153724ba675SRob Herring status = "okay"; 154724ba675SRob Herring}; 155724ba675SRob Herring 156724ba675SRob Herring&gmac_mdio { 157724ba675SRob Herring phy3: ethernet-phy@3 { 158724ba675SRob Herring reg = <3>; 159724ba675SRob Herring reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */ 160724ba675SRob Herring reset-assert-us = <10000>; 161724ba675SRob Herring /* wait 1s after reset, otherwise fail to read phy id */ 162724ba675SRob Herring reset-deassert-us = <1000000>; 163724ba675SRob Herring }; 164724ba675SRob Herring}; 165724ba675SRob Herring 166724ba675SRob Herring&mmc0 { 167724ba675SRob Herring vmmc-supply = <®_vcc3v3>; 168724ba675SRob Herring bus-width = <4>; 169724ba675SRob Herring cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; 170724ba675SRob Herring status = "okay"; 171724ba675SRob Herring}; 172724ba675SRob Herring 173724ba675SRob Herring&mmc3 { 174724ba675SRob Herring vmmc-supply = <®_vcc3v3>; 175724ba675SRob Herring mmc-pwrseq = <&rtl_pwrseq>; 176724ba675SRob Herring bus-width = <4>; 177724ba675SRob Herring non-removable; 178724ba675SRob Herring status = "okay"; 179724ba675SRob Herring 180*0f47ef3fSKrzysztof Kozlowski rtl8723bs: wifi@1 { 181724ba675SRob Herring reg = <1>; 182724ba675SRob Herring }; 183724ba675SRob Herring}; 184724ba675SRob Herring 185724ba675SRob Herring&ohci0 { 186724ba675SRob Herring status = "okay"; 187724ba675SRob Herring}; 188724ba675SRob Herring 189724ba675SRob Herring&ohci1 { 190724ba675SRob Herring status = "okay"; 191724ba675SRob Herring}; 192724ba675SRob Herring 193724ba675SRob Herring&otg_sram { 194724ba675SRob Herring status = "okay"; 195724ba675SRob Herring}; 196724ba675SRob Herring 197724ba675SRob Herring&pio { 198724ba675SRob Herring uart3_rts_pin: uart3-rts-pin { 199724ba675SRob Herring pins = "PG8"; 200724ba675SRob Herring function = "uart3"; 201724ba675SRob Herring }; 202724ba675SRob Herring}; 203724ba675SRob Herring 204724ba675SRob Herring#include "axp209.dtsi" 205724ba675SRob Herring 206724ba675SRob Herring&ac_power_supply { 207724ba675SRob Herring status = "okay"; 208724ba675SRob Herring}; 209724ba675SRob Herring 210724ba675SRob Herring&battery_power_supply { 211724ba675SRob Herring status = "okay"; 212724ba675SRob Herring}; 213724ba675SRob Herring 214724ba675SRob Herring®_ahci_5v { 215724ba675SRob Herring gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 216724ba675SRob Herring status = "okay"; 217724ba675SRob Herring}; 218724ba675SRob Herring 219724ba675SRob Herring®_dcdc2 { 220724ba675SRob Herring regulator-always-on; 221724ba675SRob Herring regulator-min-microvolt = <1000000>; 222724ba675SRob Herring regulator-max-microvolt = <1400000>; 223724ba675SRob Herring regulator-name = "vdd-cpu"; 224724ba675SRob Herring}; 225724ba675SRob Herring 226724ba675SRob Herring®_dcdc3 { 227724ba675SRob Herring regulator-always-on; 228724ba675SRob Herring regulator-min-microvolt = <1000000>; 229724ba675SRob Herring regulator-max-microvolt = <1400000>; 230724ba675SRob Herring regulator-name = "vdd-int-dll"; 231724ba675SRob Herring}; 232724ba675SRob Herring 233724ba675SRob Herring®_ldo1 { 234724ba675SRob Herring regulator-always-on; 235724ba675SRob Herring regulator-min-microvolt = <1300000>; 236724ba675SRob Herring regulator-max-microvolt = <1300000>; 237724ba675SRob Herring regulator-name = "vdd-rtc"; 238724ba675SRob Herring}; 239724ba675SRob Herring 240724ba675SRob Herring®_ldo2 { 241724ba675SRob Herring regulator-always-on; 242724ba675SRob Herring regulator-min-microvolt = <3000000>; 243724ba675SRob Herring regulator-max-microvolt = <3000000>; 244724ba675SRob Herring regulator-name = "avcc"; 245724ba675SRob Herring}; 246724ba675SRob Herring 247724ba675SRob Herring®_ldo4 { 248724ba675SRob Herring regulator-min-microvolt = <3300000>; 249724ba675SRob Herring regulator-max-microvolt = <3300000>; 250724ba675SRob Herring regulator-name = "vcc-pg"; 251724ba675SRob Herring}; 252724ba675SRob Herring 253724ba675SRob Herring®_usb0_vbus { 254724ba675SRob Herring gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>; 255724ba675SRob Herring status = "okay"; 256724ba675SRob Herring}; 257724ba675SRob Herring 258724ba675SRob Herring®_usb1_vbus { 259724ba675SRob Herring status = "okay"; 260724ba675SRob Herring}; 261724ba675SRob Herring 262724ba675SRob Herring®_usb2_vbus { 263724ba675SRob Herring status = "okay"; 264724ba675SRob Herring}; 265724ba675SRob Herring 266724ba675SRob Herring/* Exposed to UEXT1 */ 267724ba675SRob Herring&spi1 { 268724ba675SRob Herring pinctrl-names = "default"; 269724ba675SRob Herring pinctrl-0 = <&spi1_pi_pins>, 270724ba675SRob Herring <&spi1_cs0_pi_pin>; 271724ba675SRob Herring status = "okay"; 272724ba675SRob Herring}; 273724ba675SRob Herring 274724ba675SRob Herring/* Exposed to UEXT2 */ 275724ba675SRob Herring&spi2 { 276724ba675SRob Herring pinctrl-names = "default"; 277724ba675SRob Herring pinctrl-0 = <&spi2_pc_pins>, 278724ba675SRob Herring <&spi2_cs0_pc_pin>; 279724ba675SRob Herring status = "okay"; 280724ba675SRob Herring}; 281724ba675SRob Herring 282724ba675SRob Herring&uart0 { 283724ba675SRob Herring pinctrl-names = "default"; 284724ba675SRob Herring pinctrl-0 = <&uart0_pb_pins>; 285724ba675SRob Herring status = "okay"; 286724ba675SRob Herring}; 287724ba675SRob Herring 288724ba675SRob Herring/* Used for RTL8723BS bluetooth */ 289724ba675SRob Herring&uart3 { 290724ba675SRob Herring pinctrl-names = "default"; 291724ba675SRob Herring pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_pin>; 292724ba675SRob Herring status = "okay"; 293724ba675SRob Herring}; 294724ba675SRob Herring 295724ba675SRob Herring/* Exposed to UEXT1 */ 296724ba675SRob Herring&uart4 { 297724ba675SRob Herring pinctrl-names = "default"; 298724ba675SRob Herring pinctrl-0 = <&uart4_pg_pins>; 299724ba675SRob Herring status = "okay"; 300724ba675SRob Herring}; 301724ba675SRob Herring 302724ba675SRob Herring/* Exposed to UEXT2 */ 303724ba675SRob Herring&uart7 { 304724ba675SRob Herring pinctrl-names = "default"; 305724ba675SRob Herring pinctrl-0 = <&uart7_pi_pins>; 306724ba675SRob Herring status = "okay"; 307724ba675SRob Herring}; 308724ba675SRob Herring 309724ba675SRob Herring&usb_otg { 310724ba675SRob Herring dr_mode = "otg"; 311724ba675SRob Herring status = "okay"; 312724ba675SRob Herring}; 313724ba675SRob Herring 314724ba675SRob Herring&usb_power_supply { 315724ba675SRob Herring status = "okay"; 316724ba675SRob Herring}; 317724ba675SRob Herring 318724ba675SRob Herring&usbphy { 319724ba675SRob Herring usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 320724ba675SRob Herring usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ 321724ba675SRob Herring usb0_vbus_power-supply = <&usb_power_supply>; 322724ba675SRob Herring usb0_vbus-supply = <®_usb0_vbus>; 323724ba675SRob Herring usb1_vbus-supply = <®_usb1_vbus>; 324724ba675SRob Herring usb2_vbus-supply = <®_usb2_vbus>; 325724ba675SRob Herring status = "okay"; 326724ba675SRob Herring}; 327