153ab4af3SHans de Goede/* 253ab4af3SHans de Goede * Copyright 2014 - Iain Paton <ipaton0@gmail.com> 353ab4af3SHans de Goede * 453ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms 553ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 653ab4af3SHans de Goede * licensing only applies to this file, and not this project as a 753ab4af3SHans de Goede * whole. 853ab4af3SHans de Goede * 953ab4af3SHans de Goede * a) This file is free software; you can redistribute it and/or 1053ab4af3SHans de Goede * modify it under the terms of the GNU General Public License as 1153ab4af3SHans de Goede * published by the Free Software Foundation; either version 2 of the 1253ab4af3SHans de Goede * License, or (at your option) any later version. 1353ab4af3SHans de Goede * 1453ab4af3SHans de Goede * This file is distributed in the hope that it will be useful, 1553ab4af3SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 1653ab4af3SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1753ab4af3SHans de Goede * GNU General Public License for more details. 1853ab4af3SHans de Goede * 1953ab4af3SHans de Goede * Or, alternatively, 2053ab4af3SHans de Goede * 2153ab4af3SHans de Goede * b) Permission is hereby granted, free of charge, to any person 2253ab4af3SHans de Goede * obtaining a copy of this software and associated documentation 2353ab4af3SHans de Goede * files (the "Software"), to deal in the Software without 2453ab4af3SHans de Goede * restriction, including without limitation the rights to use, 2553ab4af3SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 2653ab4af3SHans de Goede * sell copies of the Software, and to permit persons to whom the 2753ab4af3SHans de Goede * Software is furnished to do so, subject to the following 2853ab4af3SHans de Goede * conditions: 2953ab4af3SHans de Goede * 3053ab4af3SHans de Goede * The above copyright notice and this permission notice shall be 3153ab4af3SHans de Goede * included in all copies or substantial portions of the Software. 3253ab4af3SHans de Goede * 3353ab4af3SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3453ab4af3SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3553ab4af3SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3653ab4af3SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3753ab4af3SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 3853ab4af3SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 3953ab4af3SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4053ab4af3SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 4153ab4af3SHans de Goede */ 4253ab4af3SHans de Goede 4353ab4af3SHans de Goede/dts-v1/; 4453ab4af3SHans de Goede#include "sun7i-a20.dtsi" 4553ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi" 4653ab4af3SHans de Goede 4753ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h> 4853ab4af3SHans de Goede#include <dt-bindings/interrupt-controller/irq.h> 4953ab4af3SHans de Goede 5053ab4af3SHans de Goede/ { 5153ab4af3SHans de Goede model = "Olimex A20-OLinuXino-LIME2"; 5253ab4af3SHans de Goede compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20"; 5353ab4af3SHans de Goede 5453ab4af3SHans de Goede aliases { 5553ab4af3SHans de Goede serial0 = &uart0; 5653ab4af3SHans de Goede }; 5753ab4af3SHans de Goede 5853ab4af3SHans de Goede chosen { 5953ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 6053ab4af3SHans de Goede }; 6153ab4af3SHans de Goede 62*b9d59d08SJagan Teki hdmi-connector { 63*b9d59d08SJagan Teki compatible = "hdmi-connector"; 64*b9d59d08SJagan Teki type = "a"; 65*b9d59d08SJagan Teki 66*b9d59d08SJagan Teki port { 67*b9d59d08SJagan Teki hdmi_con_in: endpoint { 68*b9d59d08SJagan Teki remote-endpoint = <&hdmi_out_con>; 69*b9d59d08SJagan Teki }; 70*b9d59d08SJagan Teki }; 71*b9d59d08SJagan Teki }; 72*b9d59d08SJagan Teki 7353ab4af3SHans de Goede leds { 7453ab4af3SHans de Goede compatible = "gpio-leds"; 7553ab4af3SHans de Goede pinctrl-names = "default"; 7653ab4af3SHans de Goede pinctrl-0 = <&led_pins_olinuxinolime>; 7753ab4af3SHans de Goede 7853ab4af3SHans de Goede green { 7953ab4af3SHans de Goede label = "a20-olinuxino-lime2:green:usr"; 8053ab4af3SHans de Goede gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 8153ab4af3SHans de Goede default-state = "on"; 8253ab4af3SHans de Goede }; 8353ab4af3SHans de Goede }; 8453ab4af3SHans de Goede 8553ab4af3SHans de Goede reg_axp_ipsout: axp_ipsout { 8653ab4af3SHans de Goede compatible = "regulator-fixed"; 8753ab4af3SHans de Goede regulator-name = "axp-ipsout"; 8853ab4af3SHans de Goede regulator-min-microvolt = <5000000>; 8953ab4af3SHans de Goede regulator-max-microvolt = <5000000>; 9053ab4af3SHans de Goede regulator-always-on; 9153ab4af3SHans de Goede }; 9253ab4af3SHans de Goede}; 9353ab4af3SHans de Goede 9453ab4af3SHans de Goede&ahci { 9553ab4af3SHans de Goede target-supply = <®_ahci_5v>; 9653ab4af3SHans de Goede status = "okay"; 9753ab4af3SHans de Goede}; 9853ab4af3SHans de Goede 99*b9d59d08SJagan Teki&de { 100*b9d59d08SJagan Teki status = "okay"; 101*b9d59d08SJagan Teki}; 102*b9d59d08SJagan Teki 10353ab4af3SHans de Goede&ehci0 { 10453ab4af3SHans de Goede status = "okay"; 10553ab4af3SHans de Goede}; 10653ab4af3SHans de Goede 10753ab4af3SHans de Goede&ehci1 { 10853ab4af3SHans de Goede status = "okay"; 10953ab4af3SHans de Goede}; 11053ab4af3SHans de Goede 11153ab4af3SHans de Goede&gmac { 11253ab4af3SHans de Goede pinctrl-names = "default"; 11353ab4af3SHans de Goede pinctrl-0 = <&gmac_pins_rgmii_a>; 11453ab4af3SHans de Goede phy = <&phy1>; 11553ab4af3SHans de Goede phy-mode = "rgmii"; 11653ab4af3SHans de Goede status = "okay"; 11753ab4af3SHans de Goede 11853ab4af3SHans de Goede phy1: ethernet-phy@1 { 11953ab4af3SHans de Goede reg = <1>; 12053ab4af3SHans de Goede }; 12153ab4af3SHans de Goede}; 12253ab4af3SHans de Goede 123*b9d59d08SJagan Teki&hdmi { 124*b9d59d08SJagan Teki status = "okay"; 125*b9d59d08SJagan Teki}; 126*b9d59d08SJagan Teki 127*b9d59d08SJagan Teki&hdmi_out { 128*b9d59d08SJagan Teki hdmi_out_con: endpoint { 129*b9d59d08SJagan Teki remote-endpoint = <&hdmi_con_in>; 130*b9d59d08SJagan Teki }; 131*b9d59d08SJagan Teki}; 132*b9d59d08SJagan Teki 13353ab4af3SHans de Goede&i2c0 { 13453ab4af3SHans de Goede pinctrl-names = "default"; 13553ab4af3SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 13653ab4af3SHans de Goede status = "okay"; 13753ab4af3SHans de Goede 13853ab4af3SHans de Goede axp209: pmic@34 { 13953ab4af3SHans de Goede reg = <0x34>; 14053ab4af3SHans de Goede interrupt-parent = <&nmi_intc>; 14153ab4af3SHans de Goede interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 14253ab4af3SHans de Goede }; 14353ab4af3SHans de Goede}; 14453ab4af3SHans de Goede 14553ab4af3SHans de Goede&i2c1 { 14653ab4af3SHans de Goede pinctrl-names = "default"; 14753ab4af3SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 14853ab4af3SHans de Goede status = "okay"; 14980e5f83cSHans de Goede 15080e5f83cSHans de Goede eeprom: eeprom@50 { 15180e5f83cSHans de Goede compatible = "atmel,24c16"; 15280e5f83cSHans de Goede reg = <0x50>; 15380e5f83cSHans de Goede pagesize = <16>; 15480e5f83cSHans de Goede }; 15553ab4af3SHans de Goede}; 15653ab4af3SHans de Goede 15753ab4af3SHans de Goede&mmc0 { 15853ab4af3SHans de Goede pinctrl-names = "default"; 159*b9d59d08SJagan Teki pinctrl-0 = <&mmc0_pins_a>; 16053ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 16153ab4af3SHans de Goede bus-width = <4>; 162*b9d59d08SJagan Teki cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */ 16353ab4af3SHans de Goede status = "okay"; 16453ab4af3SHans de Goede}; 16553ab4af3SHans de Goede 16653ab4af3SHans de Goede&ohci0 { 16753ab4af3SHans de Goede status = "okay"; 16853ab4af3SHans de Goede}; 16953ab4af3SHans de Goede 17053ab4af3SHans de Goede&ohci1 { 17153ab4af3SHans de Goede status = "okay"; 17253ab4af3SHans de Goede}; 17353ab4af3SHans de Goede 17480e5f83cSHans de Goede&otg_sram { 17580e5f83cSHans de Goede status = "okay"; 17680e5f83cSHans de Goede}; 17780e5f83cSHans de Goede 17853ab4af3SHans de Goede&pio { 17953ab4af3SHans de Goede ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { 180*b9d59d08SJagan Teki pins = "PC3"; 181*b9d59d08SJagan Teki function = "gpio_out"; 18253ab4af3SHans de Goede }; 18353ab4af3SHans de Goede 18453ab4af3SHans de Goede led_pins_olinuxinolime: led_pins@0 { 185*b9d59d08SJagan Teki pins = "PH2"; 186*b9d59d08SJagan Teki function = "gpio_out"; 187*b9d59d08SJagan Teki drive-strength = <20>; 18853ab4af3SHans de Goede }; 18980e5f83cSHans de Goede 19080e5f83cSHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 191*b9d59d08SJagan Teki pins = "PH4"; 192*b9d59d08SJagan Teki function = "gpio_in"; 193*b9d59d08SJagan Teki bias-pull-up; 19480e5f83cSHans de Goede }; 19580e5f83cSHans de Goede 19680e5f83cSHans de Goede usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 197*b9d59d08SJagan Teki pins = "PH5"; 198*b9d59d08SJagan Teki function = "gpio_in"; 199*b9d59d08SJagan Teki bias-pull-down; 20080e5f83cSHans de Goede }; 20180e5f83cSHans de Goede 20280e5f83cSHans de Goede usb0_vbus_pin_lime2: usb0_vbus_pin@0 { 203*b9d59d08SJagan Teki pins = "PC17"; 204*b9d59d08SJagan Teki function = "gpio_out"; 20580e5f83cSHans de Goede }; 20653ab4af3SHans de Goede}; 20753ab4af3SHans de Goede 20853ab4af3SHans de Goede®_ahci_5v { 20953ab4af3SHans de Goede pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 21053ab4af3SHans de Goede gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 21153ab4af3SHans de Goede status = "okay"; 21253ab4af3SHans de Goede}; 21353ab4af3SHans de Goede 214*b9d59d08SJagan Teki#include "axp209.dtsi" 215*b9d59d08SJagan Teki 216*b9d59d08SJagan Teki®_dcdc2 { 217*b9d59d08SJagan Teki regulator-always-on; 218*b9d59d08SJagan Teki regulator-min-microvolt = <1000000>; 219*b9d59d08SJagan Teki regulator-max-microvolt = <1400000>; 220*b9d59d08SJagan Teki regulator-name = "vdd-cpu"; 221*b9d59d08SJagan Teki}; 222*b9d59d08SJagan Teki 223*b9d59d08SJagan Teki®_dcdc3 { 224*b9d59d08SJagan Teki regulator-always-on; 225*b9d59d08SJagan Teki regulator-min-microvolt = <1000000>; 226*b9d59d08SJagan Teki regulator-max-microvolt = <1400000>; 227*b9d59d08SJagan Teki regulator-name = "vdd-int-dll"; 228*b9d59d08SJagan Teki}; 229*b9d59d08SJagan Teki 230*b9d59d08SJagan Teki®_ldo1 { 231*b9d59d08SJagan Teki regulator-always-on; 232*b9d59d08SJagan Teki regulator-min-microvolt = <1300000>; 233*b9d59d08SJagan Teki regulator-max-microvolt = <1300000>; 234*b9d59d08SJagan Teki regulator-name = "vdd-rtc"; 235*b9d59d08SJagan Teki}; 236*b9d59d08SJagan Teki 237*b9d59d08SJagan Teki®_ldo2 { 238*b9d59d08SJagan Teki regulator-always-on; 239*b9d59d08SJagan Teki regulator-min-microvolt = <3000000>; 240*b9d59d08SJagan Teki regulator-max-microvolt = <3000000>; 241*b9d59d08SJagan Teki regulator-name = "avcc"; 242*b9d59d08SJagan Teki}; 243*b9d59d08SJagan Teki 244*b9d59d08SJagan Teki®_ldo3 { 245*b9d59d08SJagan Teki regulator-min-microvolt = <2800000>; 246*b9d59d08SJagan Teki regulator-max-microvolt = <2800000>; 247*b9d59d08SJagan Teki regulator-name = "vddio-csi0"; 248*b9d59d08SJagan Teki}; 249*b9d59d08SJagan Teki 250*b9d59d08SJagan Teki®_ldo4 { 251*b9d59d08SJagan Teki regulator-min-microvolt = <2800000>; 252*b9d59d08SJagan Teki regulator-max-microvolt = <2800000>; 253*b9d59d08SJagan Teki regulator-name = "vddio-csi1"; 254*b9d59d08SJagan Teki}; 255*b9d59d08SJagan Teki 25680e5f83cSHans de Goede®_usb0_vbus { 25780e5f83cSHans de Goede pinctrl-0 = <&usb0_vbus_pin_lime2>; 25880e5f83cSHans de Goede gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>; 25980e5f83cSHans de Goede status = "okay"; 26080e5f83cSHans de Goede}; 26180e5f83cSHans de Goede 26253ab4af3SHans de Goede®_usb1_vbus { 26353ab4af3SHans de Goede status = "okay"; 26453ab4af3SHans de Goede}; 26553ab4af3SHans de Goede 26653ab4af3SHans de Goede®_usb2_vbus { 26753ab4af3SHans de Goede status = "okay"; 26853ab4af3SHans de Goede}; 26953ab4af3SHans de Goede 27053ab4af3SHans de Goede&uart0 { 27153ab4af3SHans de Goede pinctrl-names = "default"; 27253ab4af3SHans de Goede pinctrl-0 = <&uart0_pins_a>; 27353ab4af3SHans de Goede status = "okay"; 27453ab4af3SHans de Goede}; 27553ab4af3SHans de Goede 27680e5f83cSHans de Goede&usb_otg { 27780e5f83cSHans de Goede dr_mode = "otg"; 27880e5f83cSHans de Goede status = "okay"; 27980e5f83cSHans de Goede}; 28080e5f83cSHans de Goede 28153ab4af3SHans de Goede&usbphy { 28280e5f83cSHans de Goede pinctrl-names = "default"; 28380e5f83cSHans de Goede pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 28480e5f83cSHans de Goede usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 28580e5f83cSHans de Goede usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ 28680e5f83cSHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 28753ab4af3SHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 28853ab4af3SHans de Goede usb2_vbus-supply = <®_usb2_vbus>; 28953ab4af3SHans de Goede status = "okay"; 29053ab4af3SHans de Goede}; 291