153ab4af3SHans de Goede/* 253ab4af3SHans de Goede * Copyright 2014 Chen-Yu Tsai 353ab4af3SHans de Goede * 453ab4af3SHans de Goede * Chen-Yu Tsai <wens@csie.org> 553ab4af3SHans de Goede * 653ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms 753ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 853ab4af3SHans de Goede * licensing only applies to this file, and not this project as a 953ab4af3SHans de Goede * whole. 1053ab4af3SHans de Goede * 1153ab4af3SHans de Goede * a) This file is free software; you can redistribute it and/or 1253ab4af3SHans de Goede * modify it under the terms of the GNU General Public License as 1353ab4af3SHans de Goede * published by the Free Software Foundation; either version 2 of the 1453ab4af3SHans de Goede * License, or (at your option) any later version. 1553ab4af3SHans de Goede * 1653ab4af3SHans de Goede * This file is distributed in the hope that it will be useful, 1753ab4af3SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 1853ab4af3SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1953ab4af3SHans de Goede * GNU General Public License for more details. 2053ab4af3SHans de Goede * 2153ab4af3SHans de Goede * Or, alternatively, 2253ab4af3SHans de Goede * 2353ab4af3SHans de Goede * b) Permission is hereby granted, free of charge, to any person 2453ab4af3SHans de Goede * obtaining a copy of this software and associated documentation 2553ab4af3SHans de Goede * files (the "Software"), to deal in the Software without 2653ab4af3SHans de Goede * restriction, including without limitation the rights to use, 2753ab4af3SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 2853ab4af3SHans de Goede * sell copies of the Software, and to permit persons to whom the 2953ab4af3SHans de Goede * Software is furnished to do so, subject to the following 3053ab4af3SHans de Goede * conditions: 3153ab4af3SHans de Goede * 3253ab4af3SHans de Goede * The above copyright notice and this permission notice shall be 3353ab4af3SHans de Goede * included in all copies or substantial portions of the Software. 3453ab4af3SHans de Goede * 3553ab4af3SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3653ab4af3SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3753ab4af3SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3853ab4af3SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3953ab4af3SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 4053ab4af3SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 4153ab4af3SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4253ab4af3SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 4353ab4af3SHans de Goede */ 4453ab4af3SHans de Goede 4553ab4af3SHans de Goede/dts-v1/; 4653ab4af3SHans de Goede#include "sun9i-a80.dtsi" 4753ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi" 4853ab4af3SHans de Goede 4953ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h> 5053ab4af3SHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h> 5153ab4af3SHans de Goede 5253ab4af3SHans de Goede/ { 5353ab4af3SHans de Goede model = "Merrii A80 Optimus Board"; 5453ab4af3SHans de Goede compatible = "merrii,a80-optimus", "allwinner,sun9i-a80"; 5553ab4af3SHans de Goede 5653ab4af3SHans de Goede aliases { 5753ab4af3SHans de Goede serial0 = &uart0; 5853ab4af3SHans de Goede serial1 = &uart4; 5953ab4af3SHans de Goede }; 6053ab4af3SHans de Goede 6153ab4af3SHans de Goede chosen { 6253ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 6353ab4af3SHans de Goede }; 6453ab4af3SHans de Goede 6553ab4af3SHans de Goede leds { 6653ab4af3SHans de Goede compatible = "gpio-leds"; 6753ab4af3SHans de Goede pinctrl-names = "default"; 68*80e5f83cSHans de Goede pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>; 6953ab4af3SHans de Goede 7053ab4af3SHans de Goede /* The LED names match those found on the board */ 7153ab4af3SHans de Goede 7253ab4af3SHans de Goede led2 { 7353ab4af3SHans de Goede label = "optimus:led2:usr"; 7453ab4af3SHans de Goede gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; 7553ab4af3SHans de Goede }; 7653ab4af3SHans de Goede 77*80e5f83cSHans de Goede led3 { 78*80e5f83cSHans de Goede label = "optimus:led3:usr"; 79*80e5f83cSHans de Goede gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */ 80*80e5f83cSHans de Goede }; 8153ab4af3SHans de Goede 8253ab4af3SHans de Goede led4 { 8353ab4af3SHans de Goede label = "optimus:led4:usr"; 8453ab4af3SHans de Goede gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; 8553ab4af3SHans de Goede }; 8653ab4af3SHans de Goede }; 8753ab4af3SHans de Goede 8853ab4af3SHans de Goede reg_usb3_vbus: usb3-vbus { 8953ab4af3SHans de Goede compatible = "regulator-fixed"; 9053ab4af3SHans de Goede pinctrl-names = "default"; 9153ab4af3SHans de Goede pinctrl-0 = <&usb3_vbus_pin_optimus>; 9253ab4af3SHans de Goede regulator-name = "usb3-vbus"; 9353ab4af3SHans de Goede regulator-min-microvolt = <5000000>; 9453ab4af3SHans de Goede regulator-max-microvolt = <5000000>; 9553ab4af3SHans de Goede enable-active-high; 9653ab4af3SHans de Goede gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ 9753ab4af3SHans de Goede }; 9853ab4af3SHans de Goede}; 9953ab4af3SHans de Goede 10053ab4af3SHans de Goede&ehci0 { 10153ab4af3SHans de Goede status = "okay"; 10253ab4af3SHans de Goede}; 10353ab4af3SHans de Goede 10453ab4af3SHans de Goede&ehci1 { 10553ab4af3SHans de Goede status = "okay"; 10653ab4af3SHans de Goede}; 10753ab4af3SHans de Goede 10853ab4af3SHans de Goede&ehci2 { 10953ab4af3SHans de Goede status = "okay"; 11053ab4af3SHans de Goede}; 11153ab4af3SHans de Goede 11253ab4af3SHans de Goede&ohci0 { 11353ab4af3SHans de Goede status = "okay"; 11453ab4af3SHans de Goede}; 11553ab4af3SHans de Goede 11653ab4af3SHans de Goede&ohci2 { 11753ab4af3SHans de Goede status = "okay"; 11853ab4af3SHans de Goede}; 11953ab4af3SHans de Goede 12053ab4af3SHans de Goede&pio { 12153ab4af3SHans de Goede led_pins_optimus: led-pins@0 { 12253ab4af3SHans de Goede allwinner,pins = "PH0", "PH1"; 12353ab4af3SHans de Goede allwinner,function = "gpio_out"; 12453ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 12553ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 12653ab4af3SHans de Goede }; 12753ab4af3SHans de Goede 12853ab4af3SHans de Goede mmc0_cd_pin_optimus: mmc0_cd_pin@0 { 12953ab4af3SHans de Goede allwinner,pins = "PH18"; 13053ab4af3SHans de Goede allwinner,function = "gpio_in"; 13153ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 13253ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 13353ab4af3SHans de Goede }; 13453ab4af3SHans de Goede 13553ab4af3SHans de Goede usb1_vbus_pin_optimus: usb1_vbus_pin@1 { 13653ab4af3SHans de Goede allwinner,pins = "PH4"; 13753ab4af3SHans de Goede allwinner,function = "gpio_out"; 13853ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 13953ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 14053ab4af3SHans de Goede }; 14153ab4af3SHans de Goede 14253ab4af3SHans de Goede usb3_vbus_pin_optimus: usb3_vbus_pin@1 { 14353ab4af3SHans de Goede allwinner,pins = "PH5"; 14453ab4af3SHans de Goede allwinner,function = "gpio_out"; 14553ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 14653ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 14753ab4af3SHans de Goede }; 14853ab4af3SHans de Goede}; 14953ab4af3SHans de Goede 15053ab4af3SHans de Goede&mmc0 { 15153ab4af3SHans de Goede pinctrl-names = "default"; 15253ab4af3SHans de Goede pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin_optimus>; 15353ab4af3SHans de Goede vmmc-supply = <®_vcc3v0>; 15453ab4af3SHans de Goede bus-width = <4>; 15553ab4af3SHans de Goede cd-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH8 */ 15653ab4af3SHans de Goede cd-inverted; 15753ab4af3SHans de Goede status = "okay"; 15853ab4af3SHans de Goede}; 15953ab4af3SHans de Goede 16053ab4af3SHans de Goede&mmc2 { 16153ab4af3SHans de Goede pinctrl-names = "default"; 16253ab4af3SHans de Goede pinctrl-0 = <&mmc2_8bit_pins>; 16353ab4af3SHans de Goede vmmc-supply = <®_vcc3v0>; 16453ab4af3SHans de Goede bus-width = <8>; 16553ab4af3SHans de Goede non-removable; 166*80e5f83cSHans de Goede cap-mmc-hw-reset; 16753ab4af3SHans de Goede status = "okay"; 16853ab4af3SHans de Goede}; 16953ab4af3SHans de Goede 170*80e5f83cSHans de Goede&mmc2_8bit_pins { 171*80e5f83cSHans de Goede /* Increase drive strength for DDR modes */ 172*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_40_MA>; 173*80e5f83cSHans de Goede}; 174*80e5f83cSHans de Goede 17553ab4af3SHans de Goede®_usb1_vbus { 17653ab4af3SHans de Goede pinctrl-0 = <&usb1_vbus_pin_optimus>; 17753ab4af3SHans de Goede gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 17853ab4af3SHans de Goede status = "okay"; 17953ab4af3SHans de Goede}; 18053ab4af3SHans de Goede 181*80e5f83cSHans de Goede&r_ir { 182*80e5f83cSHans de Goede status = "okay"; 183*80e5f83cSHans de Goede}; 184*80e5f83cSHans de Goede 185*80e5f83cSHans de Goede&r_pio { 186*80e5f83cSHans de Goede led_r_pins_optimus: led-pins@1 { 187*80e5f83cSHans de Goede allwinner,pins = "PM15"; 188*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 189*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 190*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 191*80e5f83cSHans de Goede }; 192*80e5f83cSHans de Goede}; 193*80e5f83cSHans de Goede 194*80e5f83cSHans de Goede&r_rsb { 195*80e5f83cSHans de Goede status = "okay"; 196*80e5f83cSHans de Goede}; 197*80e5f83cSHans de Goede 19853ab4af3SHans de Goede&uart0 { 19953ab4af3SHans de Goede pinctrl-names = "default"; 20053ab4af3SHans de Goede pinctrl-0 = <&uart0_pins_a>; 20153ab4af3SHans de Goede status = "okay"; 20253ab4af3SHans de Goede}; 20353ab4af3SHans de Goede 20453ab4af3SHans de Goede&usbphy1 { 20553ab4af3SHans de Goede phy-supply = <®_usb1_vbus>; 20653ab4af3SHans de Goede status = "okay"; 20753ab4af3SHans de Goede}; 20853ab4af3SHans de Goede 20953ab4af3SHans de Goede&usbphy2 { 21053ab4af3SHans de Goede status = "okay"; 21153ab4af3SHans de Goede}; 21253ab4af3SHans de Goede 21353ab4af3SHans de Goede&usbphy3 { 21453ab4af3SHans de Goede phy-supply = <®_usb3_vbus>; 21553ab4af3SHans de Goede status = "okay"; 21653ab4af3SHans de Goede}; 217