150222f3bSMarcus Cooper/* 250222f3bSMarcus Cooper * Copyright 2015 - Marcus Cooper <codekipper@gmail.com> 380e5f83cSHans de Goede * Copyright 2015 - Karsten Merker <merker@debian.org> 450222f3bSMarcus Cooper * 550222f3bSMarcus Cooper * This file is dual-licensed: you can use it either under the terms 650222f3bSMarcus Cooper * of the GPL or the X11 license, at your option. Note that this dual 750222f3bSMarcus Cooper * licensing only applies to this file, and not this project as a 850222f3bSMarcus Cooper * whole. 950222f3bSMarcus Cooper * 1050222f3bSMarcus Cooper * a) This file is free software; you can redistribute it and/or 1150222f3bSMarcus Cooper * modify it under the terms of the GNU General Public License as 1250222f3bSMarcus Cooper * published by the Free Software Foundation; either version 2 of the 1350222f3bSMarcus Cooper * License, or (at your option) any later version. 1450222f3bSMarcus Cooper * 1550222f3bSMarcus Cooper * This file is distributed in the hope that it will be useful, 1650222f3bSMarcus Cooper * but WITHOUT ANY WARRANTY; without even the implied warranty of 1750222f3bSMarcus Cooper * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1850222f3bSMarcus Cooper * GNU General Public License for more details. 1950222f3bSMarcus Cooper * 2050222f3bSMarcus Cooper * Or, alternatively, 2150222f3bSMarcus Cooper * 2250222f3bSMarcus Cooper * b) Permission is hereby granted, free of charge, to any person 2350222f3bSMarcus Cooper * obtaining a copy of this software and associated documentation 2450222f3bSMarcus Cooper * files (the "Software"), to deal in the Software without 2550222f3bSMarcus Cooper * restriction, including without limitation the rights to use, 2650222f3bSMarcus Cooper * copy, modify, merge, publish, distribute, sublicense, and/or 2750222f3bSMarcus Cooper * sell copies of the Software, and to permit persons to whom the 2850222f3bSMarcus Cooper * Software is furnished to do so, subject to the following 2950222f3bSMarcus Cooper * conditions: 3050222f3bSMarcus Cooper * 3150222f3bSMarcus Cooper * The above copyright notice and this permission notice shall be 3250222f3bSMarcus Cooper * included in all copies or substantial portions of the Software. 3350222f3bSMarcus Cooper * 3450222f3bSMarcus Cooper * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3550222f3bSMarcus Cooper * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3650222f3bSMarcus Cooper * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3750222f3bSMarcus Cooper * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3850222f3bSMarcus Cooper * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 3950222f3bSMarcus Cooper * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 4050222f3bSMarcus Cooper * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4150222f3bSMarcus Cooper * OTHER DEALINGS IN THE SOFTWARE. 4250222f3bSMarcus Cooper */ 4350222f3bSMarcus Cooper 4450222f3bSMarcus Cooper/dts-v1/; 4550222f3bSMarcus Cooper#include "sun7i-a20.dtsi" 4650222f3bSMarcus Cooper#include "sunxi-common-regulators.dtsi" 4750222f3bSMarcus Cooper 4850222f3bSMarcus Cooper#include <dt-bindings/gpio/gpio.h> 4980e5f83cSHans de Goede#include <dt-bindings/input/input.h> 5050222f3bSMarcus Cooper#include <dt-bindings/interrupt-controller/irq.h> 5150222f3bSMarcus Cooper 5250222f3bSMarcus Cooper/ { 5350222f3bSMarcus Cooper model = "Olimex A20-Olimex-SOM-EVB"; 5450222f3bSMarcus Cooper compatible = "olimex,a20-olimex-som-evb", "allwinner,sun7i-a20"; 5550222f3bSMarcus Cooper 5650222f3bSMarcus Cooper aliases { 5750222f3bSMarcus Cooper serial0 = &uart0; 5850222f3bSMarcus Cooper }; 5950222f3bSMarcus Cooper 6050222f3bSMarcus Cooper chosen { 6150222f3bSMarcus Cooper stdout-path = "serial0:115200n8"; 6250222f3bSMarcus Cooper }; 6350222f3bSMarcus Cooper 64*b9d59d08SJagan Teki hdmi-connector { 65*b9d59d08SJagan Teki compatible = "hdmi-connector"; 66*b9d59d08SJagan Teki type = "a"; 67*b9d59d08SJagan Teki 68*b9d59d08SJagan Teki port { 69*b9d59d08SJagan Teki hdmi_con_in: endpoint { 70*b9d59d08SJagan Teki remote-endpoint = <&hdmi_out_con>; 71*b9d59d08SJagan Teki }; 72*b9d59d08SJagan Teki }; 73*b9d59d08SJagan Teki }; 74*b9d59d08SJagan Teki 7550222f3bSMarcus Cooper leds { 7650222f3bSMarcus Cooper compatible = "gpio-leds"; 7750222f3bSMarcus Cooper pinctrl-names = "default"; 7850222f3bSMarcus Cooper pinctrl-0 = <&led_pins_olimex_som_evb>; 7950222f3bSMarcus Cooper 8050222f3bSMarcus Cooper green { 8150222f3bSMarcus Cooper label = "a20-olimex-som-evb:green:usr"; 8250222f3bSMarcus Cooper gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 8350222f3bSMarcus Cooper default-state = "on"; 8450222f3bSMarcus Cooper }; 8550222f3bSMarcus Cooper }; 8650222f3bSMarcus Cooper}; 8750222f3bSMarcus Cooper 8850222f3bSMarcus Cooper&ahci { 8950222f3bSMarcus Cooper target-supply = <®_ahci_5v>; 9050222f3bSMarcus Cooper status = "okay"; 9150222f3bSMarcus Cooper}; 9250222f3bSMarcus Cooper 93*b9d59d08SJagan Teki&de { 94*b9d59d08SJagan Teki status = "okay"; 95*b9d59d08SJagan Teki}; 96*b9d59d08SJagan Teki 9750222f3bSMarcus Cooper&ehci0 { 9850222f3bSMarcus Cooper status = "okay"; 9950222f3bSMarcus Cooper}; 10050222f3bSMarcus Cooper 10150222f3bSMarcus Cooper&ehci1 { 10250222f3bSMarcus Cooper status = "okay"; 10350222f3bSMarcus Cooper}; 10450222f3bSMarcus Cooper 105*b9d59d08SJagan Teki&cpu0 { 106*b9d59d08SJagan Teki cpu-supply = <®_dcdc2>; 107*b9d59d08SJagan Teki}; 108*b9d59d08SJagan Teki 10980e5f83cSHans de Goede&codec { 11080e5f83cSHans de Goede status = "okay"; 11180e5f83cSHans de Goede}; 11280e5f83cSHans de Goede 11350222f3bSMarcus Cooper&gmac { 11450222f3bSMarcus Cooper pinctrl-names = "default"; 11550222f3bSMarcus Cooper pinctrl-0 = <&gmac_pins_rgmii_a>; 11650222f3bSMarcus Cooper phy = <&phy1>; 11750222f3bSMarcus Cooper phy-mode = "rgmii"; 11850222f3bSMarcus Cooper status = "okay"; 11950222f3bSMarcus Cooper 12050222f3bSMarcus Cooper phy1: ethernet-phy@1 { 12150222f3bSMarcus Cooper reg = <1>; 12250222f3bSMarcus Cooper }; 12350222f3bSMarcus Cooper}; 12450222f3bSMarcus Cooper 125*b9d59d08SJagan Teki&hdmi { 126*b9d59d08SJagan Teki status = "okay"; 127*b9d59d08SJagan Teki}; 128*b9d59d08SJagan Teki 129*b9d59d08SJagan Teki&hdmi_out { 130*b9d59d08SJagan Teki hdmi_out_con: endpoint { 131*b9d59d08SJagan Teki remote-endpoint = <&hdmi_con_in>; 132*b9d59d08SJagan Teki }; 133*b9d59d08SJagan Teki}; 134*b9d59d08SJagan Teki 13550222f3bSMarcus Cooper&i2c0 { 13650222f3bSMarcus Cooper pinctrl-names = "default"; 13750222f3bSMarcus Cooper pinctrl-0 = <&i2c0_pins_a>; 13850222f3bSMarcus Cooper status = "okay"; 13950222f3bSMarcus Cooper 14050222f3bSMarcus Cooper axp209: pmic@34 { 14150222f3bSMarcus Cooper reg = <0x34>; 14250222f3bSMarcus Cooper interrupt-parent = <&nmi_intc>; 14350222f3bSMarcus Cooper interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 14450222f3bSMarcus Cooper }; 14550222f3bSMarcus Cooper}; 14650222f3bSMarcus Cooper 147*b9d59d08SJagan Teki&i2c1 { 148*b9d59d08SJagan Teki pinctrl-names = "default"; 149*b9d59d08SJagan Teki pinctrl-0 = <&i2c1_pins_a>; 150*b9d59d08SJagan Teki status = "okay"; 151*b9d59d08SJagan Teki}; 152*b9d59d08SJagan Teki 153*b9d59d08SJagan Teki&i2c2 { 154*b9d59d08SJagan Teki pinctrl-names = "default"; 155*b9d59d08SJagan Teki pinctrl-0 = <&i2c2_pins_a>; 156*b9d59d08SJagan Teki status = "okay"; 157*b9d59d08SJagan Teki}; 158*b9d59d08SJagan Teki 15980e5f83cSHans de Goede&lradc { 16080e5f83cSHans de Goede vref-supply = <®_vcc3v0>; 16150222f3bSMarcus Cooper status = "okay"; 16280e5f83cSHans de Goede 16380e5f83cSHans de Goede button@190 { 16480e5f83cSHans de Goede label = "Volume Up"; 16580e5f83cSHans de Goede linux,code = <KEY_VOLUMEUP>; 16680e5f83cSHans de Goede channel = <0>; 16780e5f83cSHans de Goede voltage = <190000>; 16880e5f83cSHans de Goede }; 16980e5f83cSHans de Goede 17080e5f83cSHans de Goede button@390 { 17180e5f83cSHans de Goede label = "Volume Down"; 17280e5f83cSHans de Goede linux,code = <KEY_VOLUMEDOWN>; 17380e5f83cSHans de Goede channel = <0>; 17480e5f83cSHans de Goede voltage = <390000>; 17580e5f83cSHans de Goede }; 17680e5f83cSHans de Goede 17780e5f83cSHans de Goede button@600 { 17880e5f83cSHans de Goede label = "Menu"; 17980e5f83cSHans de Goede linux,code = <KEY_MENU>; 18080e5f83cSHans de Goede channel = <0>; 18180e5f83cSHans de Goede voltage = <600000>; 18280e5f83cSHans de Goede }; 18380e5f83cSHans de Goede 18480e5f83cSHans de Goede button@800 { 18580e5f83cSHans de Goede label = "Search"; 18680e5f83cSHans de Goede linux,code = <KEY_SEARCH>; 18780e5f83cSHans de Goede channel = <0>; 18880e5f83cSHans de Goede voltage = <800000>; 18980e5f83cSHans de Goede }; 19080e5f83cSHans de Goede 19180e5f83cSHans de Goede button@980 { 19280e5f83cSHans de Goede label = "Home"; 19380e5f83cSHans de Goede linux,code = <KEY_HOMEPAGE>; 19480e5f83cSHans de Goede channel = <0>; 19580e5f83cSHans de Goede voltage = <980000>; 19680e5f83cSHans de Goede }; 19780e5f83cSHans de Goede 19880e5f83cSHans de Goede button@1180 { 19980e5f83cSHans de Goede label = "Esc"; 20080e5f83cSHans de Goede linux,code = <KEY_ESC>; 20180e5f83cSHans de Goede channel = <0>; 20280e5f83cSHans de Goede voltage = <1180000>; 20380e5f83cSHans de Goede }; 20480e5f83cSHans de Goede 20580e5f83cSHans de Goede button@1400 { 20680e5f83cSHans de Goede label = "Enter"; 20780e5f83cSHans de Goede linux,code = <KEY_ENTER>; 20880e5f83cSHans de Goede channel = <0>; 20980e5f83cSHans de Goede voltage = <1400000>; 21080e5f83cSHans de Goede }; 21150222f3bSMarcus Cooper}; 21250222f3bSMarcus Cooper 21350222f3bSMarcus Cooper&mmc0 { 21450222f3bSMarcus Cooper pinctrl-names = "default"; 215*b9d59d08SJagan Teki pinctrl-0 = <&mmc0_pins_a>; 21650222f3bSMarcus Cooper vmmc-supply = <®_vcc3v3>; 21750222f3bSMarcus Cooper bus-width = <4>; 218*b9d59d08SJagan Teki cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */ 21950222f3bSMarcus Cooper status = "okay"; 22050222f3bSMarcus Cooper}; 22150222f3bSMarcus Cooper 22280e5f83cSHans de Goede&mmc3 { 22380e5f83cSHans de Goede pinctrl-names = "default"; 22480e5f83cSHans de Goede pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>; 22580e5f83cSHans de Goede vmmc-supply = <®_vcc3v3>; 22680e5f83cSHans de Goede bus-width = <4>; 227*b9d59d08SJagan Teki cd-gpios = <&pio 7 0 GPIO_ACTIVE_LOW>; /* PH0 */ 22880e5f83cSHans de Goede status = "okay"; 22980e5f83cSHans de Goede}; 23080e5f83cSHans de Goede 23150222f3bSMarcus Cooper&ohci0 { 23250222f3bSMarcus Cooper status = "okay"; 23350222f3bSMarcus Cooper}; 23450222f3bSMarcus Cooper 23550222f3bSMarcus Cooper&ohci1 { 23650222f3bSMarcus Cooper status = "okay"; 23750222f3bSMarcus Cooper}; 23850222f3bSMarcus Cooper 23950222f3bSMarcus Cooper&otg_sram { 24050222f3bSMarcus Cooper status = "okay"; 24150222f3bSMarcus Cooper}; 24250222f3bSMarcus Cooper 24350222f3bSMarcus Cooper&pio { 24450222f3bSMarcus Cooper ahci_pwr_pin_olimex_som_evb: ahci_pwr_pin@1 { 245*b9d59d08SJagan Teki pins = "PC3"; 246*b9d59d08SJagan Teki function = "gpio_out"; 24750222f3bSMarcus Cooper }; 24850222f3bSMarcus Cooper 24950222f3bSMarcus Cooper led_pins_olimex_som_evb: led_pins@0 { 250*b9d59d08SJagan Teki pins = "PH2"; 251*b9d59d08SJagan Teki function = "gpio_out"; 252*b9d59d08SJagan Teki drive-strength = <20>; 25350222f3bSMarcus Cooper }; 25450222f3bSMarcus Cooper 25580e5f83cSHans de Goede mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 { 256*b9d59d08SJagan Teki pins = "PH0"; 257*b9d59d08SJagan Teki function = "gpio_in"; 258*b9d59d08SJagan Teki bias-pull-up; 25980e5f83cSHans de Goede }; 26080e5f83cSHans de Goede 26150222f3bSMarcus Cooper usb0_id_detect_pin: usb0_id_detect_pin@0 { 262*b9d59d08SJagan Teki pins = "PH4"; 263*b9d59d08SJagan Teki function = "gpio_in"; 26450222f3bSMarcus Cooper }; 26550222f3bSMarcus Cooper 26650222f3bSMarcus Cooper usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 267*b9d59d08SJagan Teki pins = "PH5"; 268*b9d59d08SJagan Teki function = "gpio_in"; 26950222f3bSMarcus Cooper }; 27050222f3bSMarcus Cooper}; 27150222f3bSMarcus Cooper 27250222f3bSMarcus Cooper®_ahci_5v { 27350222f3bSMarcus Cooper pinctrl-0 = <&ahci_pwr_pin_olimex_som_evb>; 27450222f3bSMarcus Cooper gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 27550222f3bSMarcus Cooper status = "okay"; 27650222f3bSMarcus Cooper}; 27750222f3bSMarcus Cooper 27850222f3bSMarcus Cooper#include "axp209.dtsi" 27950222f3bSMarcus Cooper 28050222f3bSMarcus Cooper®_dcdc2 { 28150222f3bSMarcus Cooper regulator-always-on; 28250222f3bSMarcus Cooper regulator-min-microvolt = <1000000>; 28380e5f83cSHans de Goede regulator-max-microvolt = <1400000>; 28450222f3bSMarcus Cooper regulator-name = "vdd-cpu"; 28550222f3bSMarcus Cooper}; 28650222f3bSMarcus Cooper 28750222f3bSMarcus Cooper®_dcdc3 { 28850222f3bSMarcus Cooper regulator-always-on; 28950222f3bSMarcus Cooper regulator-min-microvolt = <1000000>; 29050222f3bSMarcus Cooper regulator-max-microvolt = <1400000>; 29150222f3bSMarcus Cooper regulator-name = "vdd-int-dll"; 29250222f3bSMarcus Cooper}; 29350222f3bSMarcus Cooper 29450222f3bSMarcus Cooper®_ldo1 { 29550222f3bSMarcus Cooper regulator-name = "vdd-rtc"; 29650222f3bSMarcus Cooper}; 29750222f3bSMarcus Cooper 29850222f3bSMarcus Cooper®_ldo2 { 29950222f3bSMarcus Cooper regulator-always-on; 30050222f3bSMarcus Cooper regulator-min-microvolt = <3000000>; 30150222f3bSMarcus Cooper regulator-max-microvolt = <3000000>; 30250222f3bSMarcus Cooper regulator-name = "avcc"; 30350222f3bSMarcus Cooper}; 30450222f3bSMarcus Cooper 30550222f3bSMarcus Cooper®_usb0_vbus { 30650222f3bSMarcus Cooper status = "okay"; 30750222f3bSMarcus Cooper}; 30850222f3bSMarcus Cooper 30950222f3bSMarcus Cooper®_usb1_vbus { 31050222f3bSMarcus Cooper status = "okay"; 31150222f3bSMarcus Cooper}; 31250222f3bSMarcus Cooper 31350222f3bSMarcus Cooper®_usb2_vbus { 31450222f3bSMarcus Cooper status = "okay"; 31550222f3bSMarcus Cooper}; 31650222f3bSMarcus Cooper 317*b9d59d08SJagan Teki&spi1 { 318*b9d59d08SJagan Teki pinctrl-names = "default"; 319*b9d59d08SJagan Teki pinctrl-0 = <&spi1_pins_a>, 320*b9d59d08SJagan Teki <&spi1_cs0_pins_a>; 321*b9d59d08SJagan Teki status = "okay"; 322*b9d59d08SJagan Teki}; 323*b9d59d08SJagan Teki 324*b9d59d08SJagan Teki&spi2 { 325*b9d59d08SJagan Teki pinctrl-names = "default"; 326*b9d59d08SJagan Teki pinctrl-0 = <&spi2_pins_a>, 327*b9d59d08SJagan Teki <&spi2_cs0_pins_a>; 328*b9d59d08SJagan Teki status = "okay"; 329*b9d59d08SJagan Teki}; 330*b9d59d08SJagan Teki 33150222f3bSMarcus Cooper&uart0 { 33250222f3bSMarcus Cooper pinctrl-names = "default"; 33350222f3bSMarcus Cooper pinctrl-0 = <&uart0_pins_a>; 33450222f3bSMarcus Cooper status = "okay"; 33550222f3bSMarcus Cooper}; 33650222f3bSMarcus Cooper 337*b9d59d08SJagan Teki&uart6 { 338*b9d59d08SJagan Teki pinctrl-names = "default"; 339*b9d59d08SJagan Teki pinctrl-0 = <&uart6_pins_a>; 340*b9d59d08SJagan Teki status = "okay"; 341*b9d59d08SJagan Teki}; 342*b9d59d08SJagan Teki 343*b9d59d08SJagan Teki&uart7 { 344*b9d59d08SJagan Teki pinctrl-names = "default"; 345*b9d59d08SJagan Teki pinctrl-0 = <&uart7_pins_a>; 346*b9d59d08SJagan Teki status = "okay"; 347*b9d59d08SJagan Teki}; 348*b9d59d08SJagan Teki 34950222f3bSMarcus Cooper&usb_otg { 35050222f3bSMarcus Cooper dr_mode = "otg"; 35150222f3bSMarcus Cooper status = "okay"; 35250222f3bSMarcus Cooper}; 35350222f3bSMarcus Cooper 35450222f3bSMarcus Cooper&usbphy { 35550222f3bSMarcus Cooper pinctrl-names = "default"; 35650222f3bSMarcus Cooper pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 35780e5f83cSHans de Goede usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */ 35880e5f83cSHans de Goede usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */ 35950222f3bSMarcus Cooper usb0_vbus-supply = <®_usb0_vbus>; 36050222f3bSMarcus Cooper usb1_vbus-supply = <®_usb1_vbus>; 36150222f3bSMarcus Cooper usb2_vbus-supply = <®_usb2_vbus>; 36250222f3bSMarcus Cooper status = "okay"; 36350222f3bSMarcus Cooper}; 364