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#include <dt-bindings/pinctrl/sun4i-a10.h> 5053ab4af3SHans de Goede 5153ab4af3SHans de Goede/ { 5253ab4af3SHans de Goede model = "Olimex A20-OLinuXino-LIME2"; 5353ab4af3SHans de Goede compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20"; 5453ab4af3SHans de Goede 5553ab4af3SHans de Goede aliases { 5653ab4af3SHans de Goede serial0 = &uart0; 5753ab4af3SHans de Goede }; 5853ab4af3SHans de Goede 5953ab4af3SHans de Goede chosen { 6053ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 6153ab4af3SHans de Goede }; 6253ab4af3SHans de Goede 6353ab4af3SHans de Goede leds { 6453ab4af3SHans de Goede compatible = "gpio-leds"; 6553ab4af3SHans de Goede pinctrl-names = "default"; 6653ab4af3SHans de Goede pinctrl-0 = <&led_pins_olinuxinolime>; 6753ab4af3SHans de Goede 6853ab4af3SHans de Goede green { 6953ab4af3SHans de Goede label = "a20-olinuxino-lime2:green:usr"; 7053ab4af3SHans de Goede gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; 7153ab4af3SHans de Goede default-state = "on"; 7253ab4af3SHans de Goede }; 7353ab4af3SHans de Goede }; 7453ab4af3SHans de Goede 7553ab4af3SHans de Goede reg_axp_ipsout: axp_ipsout { 7653ab4af3SHans de Goede compatible = "regulator-fixed"; 7753ab4af3SHans de Goede regulator-name = "axp-ipsout"; 7853ab4af3SHans de Goede regulator-min-microvolt = <5000000>; 7953ab4af3SHans de Goede regulator-max-microvolt = <5000000>; 8053ab4af3SHans de Goede regulator-always-on; 8153ab4af3SHans de Goede }; 8253ab4af3SHans de Goede}; 8353ab4af3SHans de Goede 8453ab4af3SHans de Goede&ahci { 8553ab4af3SHans de Goede target-supply = <®_ahci_5v>; 8653ab4af3SHans de Goede status = "okay"; 8753ab4af3SHans de Goede}; 8853ab4af3SHans de Goede 8953ab4af3SHans de Goede&ehci0 { 9053ab4af3SHans de Goede status = "okay"; 9153ab4af3SHans de Goede}; 9253ab4af3SHans de Goede 9353ab4af3SHans de Goede&ehci1 { 9453ab4af3SHans de Goede status = "okay"; 9553ab4af3SHans de Goede}; 9653ab4af3SHans de Goede 9753ab4af3SHans de Goede&gmac { 9853ab4af3SHans de Goede pinctrl-names = "default"; 9953ab4af3SHans de Goede pinctrl-0 = <&gmac_pins_rgmii_a>; 10053ab4af3SHans de Goede phy = <&phy1>; 10153ab4af3SHans de Goede phy-mode = "rgmii"; 10253ab4af3SHans de Goede status = "okay"; 10353ab4af3SHans de Goede 10453ab4af3SHans de Goede phy1: ethernet-phy@1 { 10553ab4af3SHans de Goede reg = <1>; 10653ab4af3SHans de Goede }; 10753ab4af3SHans de Goede}; 10853ab4af3SHans de Goede 10953ab4af3SHans de Goede&i2c0 { 11053ab4af3SHans de Goede pinctrl-names = "default"; 11153ab4af3SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 11253ab4af3SHans de Goede status = "okay"; 11353ab4af3SHans de Goede 11453ab4af3SHans de Goede axp209: pmic@34 { 11553ab4af3SHans de Goede compatible = "x-powers,axp209"; 11653ab4af3SHans de Goede reg = <0x34>; 11753ab4af3SHans de Goede interrupt-parent = <&nmi_intc>; 11853ab4af3SHans de Goede interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 11953ab4af3SHans de Goede 12053ab4af3SHans de Goede interrupt-controller; 12153ab4af3SHans de Goede #interrupt-cells = <1>; 12253ab4af3SHans de Goede 12353ab4af3SHans de Goede acin-supply = <®_axp_ipsout>; 12453ab4af3SHans de Goede vin2-supply = <®_axp_ipsout>; 12553ab4af3SHans de Goede vin3-supply = <®_axp_ipsout>; 12653ab4af3SHans de Goede ldo24in-supply = <®_axp_ipsout>; 12753ab4af3SHans de Goede ldo3in-supply = <®_axp_ipsout>; 12853ab4af3SHans de Goede 12953ab4af3SHans de Goede regulators { 13053ab4af3SHans de Goede vdd_rtc: ldo1 { 13153ab4af3SHans de Goede regulator-min-microvolt = <1300000>; 13253ab4af3SHans de Goede regulator-max-microvolt = <1300000>; 13353ab4af3SHans de Goede regulator-always-on; 13453ab4af3SHans de Goede }; 13553ab4af3SHans de Goede 13653ab4af3SHans de Goede avcc: ldo2 { 13753ab4af3SHans de Goede regulator-min-microvolt = <1800000>; 13853ab4af3SHans de Goede regulator-max-microvolt = <3300000>; 13953ab4af3SHans de Goede regulator-always-on; 14053ab4af3SHans de Goede }; 14153ab4af3SHans de Goede 14253ab4af3SHans de Goede vcc_csi0: ldo3 { 14353ab4af3SHans de Goede regulator-min-microvolt = <700000>; 14453ab4af3SHans de Goede regulator-max-microvolt = <3500000>; 14553ab4af3SHans de Goede regulator-always-on; 14653ab4af3SHans de Goede }; 14753ab4af3SHans de Goede 14853ab4af3SHans de Goede vcc_csi1: ldo4 { 14953ab4af3SHans de Goede regulator-min-microvolt = <1250000>; 15053ab4af3SHans de Goede regulator-max-microvolt = <3300000>; 15153ab4af3SHans de Goede regulator-always-on; 15253ab4af3SHans de Goede }; 15353ab4af3SHans de Goede 15453ab4af3SHans de Goede vdd_cpu: dcdc2 { 15553ab4af3SHans de Goede regulator-min-microvolt = <700000>; 15653ab4af3SHans de Goede regulator-max-microvolt = <2275000>; 15753ab4af3SHans de Goede regulator-always-on; 15853ab4af3SHans de Goede }; 15953ab4af3SHans de Goede 16053ab4af3SHans de Goede vdd_int: dcdc3 { 16153ab4af3SHans de Goede regulator-min-microvolt = <700000>; 16253ab4af3SHans de Goede regulator-max-microvolt = <3500000>; 16353ab4af3SHans de Goede regulator-always-on; 16453ab4af3SHans de Goede }; 16553ab4af3SHans de Goede }; 16653ab4af3SHans de Goede }; 16753ab4af3SHans de Goede}; 16853ab4af3SHans de Goede 16953ab4af3SHans de Goede&i2c1 { 17053ab4af3SHans de Goede pinctrl-names = "default"; 17153ab4af3SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 17253ab4af3SHans de Goede status = "okay"; 173*80e5f83cSHans de Goede 174*80e5f83cSHans de Goede eeprom: eeprom@50 { 175*80e5f83cSHans de Goede compatible = "atmel,24c16"; 176*80e5f83cSHans de Goede reg = <0x50>; 177*80e5f83cSHans de Goede pagesize = <16>; 178*80e5f83cSHans de Goede }; 17953ab4af3SHans de Goede}; 18053ab4af3SHans de Goede 18153ab4af3SHans de Goede&mmc0 { 18253ab4af3SHans de Goede pinctrl-names = "default"; 18353ab4af3SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 18453ab4af3SHans de Goede vmmc-supply = <®_vcc3v3>; 18553ab4af3SHans de Goede bus-width = <4>; 18653ab4af3SHans de Goede cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 18753ab4af3SHans de Goede cd-inverted; 18853ab4af3SHans de Goede status = "okay"; 18953ab4af3SHans de Goede}; 19053ab4af3SHans de Goede 19153ab4af3SHans de Goede&ohci0 { 19253ab4af3SHans de Goede status = "okay"; 19353ab4af3SHans de Goede}; 19453ab4af3SHans de Goede 19553ab4af3SHans de Goede&ohci1 { 19653ab4af3SHans de Goede status = "okay"; 19753ab4af3SHans de Goede}; 19853ab4af3SHans de Goede 199*80e5f83cSHans de Goede&otg_sram { 200*80e5f83cSHans de Goede status = "okay"; 201*80e5f83cSHans de Goede}; 202*80e5f83cSHans de Goede 20353ab4af3SHans de Goede&pio { 20453ab4af3SHans de Goede ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { 20553ab4af3SHans de Goede allwinner,pins = "PC3"; 20653ab4af3SHans de Goede allwinner,function = "gpio_out"; 20753ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 20853ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 20953ab4af3SHans de Goede }; 21053ab4af3SHans de Goede 21153ab4af3SHans de Goede led_pins_olinuxinolime: led_pins@0 { 21253ab4af3SHans de Goede allwinner,pins = "PH2"; 21353ab4af3SHans de Goede allwinner,function = "gpio_out"; 21453ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_20_MA>; 21553ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 21653ab4af3SHans de Goede }; 217*80e5f83cSHans de Goede 218*80e5f83cSHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 219*80e5f83cSHans de Goede allwinner,pins = "PH4"; 220*80e5f83cSHans de Goede allwinner,function = "gpio_in"; 221*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 222*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 223*80e5f83cSHans de Goede }; 224*80e5f83cSHans de Goede 225*80e5f83cSHans de Goede usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 226*80e5f83cSHans de Goede allwinner,pins = "PH5"; 227*80e5f83cSHans de Goede allwinner,function = "gpio_in"; 228*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 229*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>; 230*80e5f83cSHans de Goede }; 231*80e5f83cSHans de Goede 232*80e5f83cSHans de Goede usb0_vbus_pin_lime2: usb0_vbus_pin@0 { 233*80e5f83cSHans de Goede allwinner,pins = "PC17"; 234*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 235*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 236*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 237*80e5f83cSHans de Goede }; 23853ab4af3SHans de Goede}; 23953ab4af3SHans de Goede 24053ab4af3SHans de Goede®_ahci_5v { 24153ab4af3SHans de Goede pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>; 24253ab4af3SHans de Goede gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>; 24353ab4af3SHans de Goede status = "okay"; 24453ab4af3SHans de Goede}; 24553ab4af3SHans de Goede 246*80e5f83cSHans de Goede®_usb0_vbus { 247*80e5f83cSHans de Goede pinctrl-0 = <&usb0_vbus_pin_lime2>; 248*80e5f83cSHans de Goede gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>; 249*80e5f83cSHans de Goede status = "okay"; 250*80e5f83cSHans de Goede}; 251*80e5f83cSHans de Goede 25253ab4af3SHans de Goede®_usb1_vbus { 25353ab4af3SHans de Goede status = "okay"; 25453ab4af3SHans de Goede}; 25553ab4af3SHans de Goede 25653ab4af3SHans de Goede®_usb2_vbus { 25753ab4af3SHans de Goede status = "okay"; 25853ab4af3SHans de Goede}; 25953ab4af3SHans de Goede 26053ab4af3SHans de Goede&uart0 { 26153ab4af3SHans de Goede pinctrl-names = "default"; 26253ab4af3SHans de Goede pinctrl-0 = <&uart0_pins_a>; 26353ab4af3SHans de Goede status = "okay"; 26453ab4af3SHans de Goede}; 26553ab4af3SHans de Goede 266*80e5f83cSHans de Goede&usb_otg { 267*80e5f83cSHans de Goede dr_mode = "otg"; 268*80e5f83cSHans de Goede status = "okay"; 269*80e5f83cSHans de Goede}; 270*80e5f83cSHans de Goede 27153ab4af3SHans de Goede&usbphy { 272*80e5f83cSHans de Goede pinctrl-names = "default"; 273*80e5f83cSHans de Goede pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 274*80e5f83cSHans de Goede usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 275*80e5f83cSHans de Goede usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ 276*80e5f83cSHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 27753ab4af3SHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 27853ab4af3SHans de Goede usb2_vbus-supply = <®_usb2_vbus>; 27953ab4af3SHans de Goede status = "okay"; 28053ab4af3SHans de Goede}; 281