1*80e5f83cSHans de Goede/* 2*80e5f83cSHans de Goede * Copyright 2015 Siarhei Siamashka <siarhei.siamashka@gmail.com> 3*80e5f83cSHans de Goede * 4*80e5f83cSHans de Goede * This file is dual-licensed: you can use it either under the terms 5*80e5f83cSHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 6*80e5f83cSHans de Goede * licensing only applies to this file, and not this project as a 7*80e5f83cSHans de Goede * whole. 8*80e5f83cSHans de Goede * 9*80e5f83cSHans de Goede * a) This file is free software; you can redistribute it and/or 10*80e5f83cSHans de Goede * modify it under the terms of the GNU General Public License as 11*80e5f83cSHans de Goede * published by the Free Software Foundation; either version 2 of the 12*80e5f83cSHans de Goede * License, or (at your option) any later version. 13*80e5f83cSHans de Goede * 14*80e5f83cSHans de Goede * This file is distributed in the hope that it will be useful, 15*80e5f83cSHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*80e5f83cSHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*80e5f83cSHans de Goede * GNU General Public License for more details. 18*80e5f83cSHans de Goede * 19*80e5f83cSHans de Goede * Or, alternatively, 20*80e5f83cSHans de Goede * 21*80e5f83cSHans de Goede * b) Permission is hereby granted, free of charge, to any person 22*80e5f83cSHans de Goede * obtaining a copy of this software and associated documentation 23*80e5f83cSHans de Goede * files (the "Software"), to deal in the Software without 24*80e5f83cSHans de Goede * restriction, including without limitation the rights to use, 25*80e5f83cSHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 26*80e5f83cSHans de Goede * sell copies of the Software, and to permit persons to whom the 27*80e5f83cSHans de Goede * Software is furnished to do so, subject to the following 28*80e5f83cSHans de Goede * conditions: 29*80e5f83cSHans de Goede * 30*80e5f83cSHans de Goede * The above copyright notice and this permission notice shall be 31*80e5f83cSHans de Goede * included in all copies or substantial portions of the Software. 32*80e5f83cSHans de Goede * 33*80e5f83cSHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34*80e5f83cSHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35*80e5f83cSHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36*80e5f83cSHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37*80e5f83cSHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38*80e5f83cSHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39*80e5f83cSHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40*80e5f83cSHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 41*80e5f83cSHans de Goede */ 42*80e5f83cSHans de Goede 43*80e5f83cSHans de Goede/* 44*80e5f83cSHans de Goede * The LinkSprite pcDuino2 board is almost identical to the older 45*80e5f83cSHans de Goede * LinkSprite pcDuino1 board. The only software visible difference 46*80e5f83cSHans de Goede * is that the pcDuino2 board got a USB VBUS voltage regulator, which 47*80e5f83cSHans de Goede * is controlled by the PD2 pin (pulled-up by default). Also one of 48*80e5f83cSHans de Goede * the USB host ports has been replaced with a USB WIFI chip. 49*80e5f83cSHans de Goede */ 50*80e5f83cSHans de Goede 51*80e5f83cSHans de Goede#include "sun4i-a10-pcduino.dts" 52*80e5f83cSHans de Goede 53*80e5f83cSHans de Goede/ { 54*80e5f83cSHans de Goede model = "LinkSprite pcDuino2"; 55*80e5f83cSHans de Goede compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10"; 56*80e5f83cSHans de Goede}; 57*80e5f83cSHans de Goede 58*80e5f83cSHans de Goede&pio { 59*80e5f83cSHans de Goede usb2_vbus_pin_pcduino2: usb2_vbus_pin@0 { 60*80e5f83cSHans de Goede allwinner,pins = "PD2"; 61*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 62*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 63*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 64*80e5f83cSHans de Goede }; 65*80e5f83cSHans de Goede}; 66*80e5f83cSHans de Goede 67*80e5f83cSHans de Goede®_usb2_vbus { 68*80e5f83cSHans de Goede pinctrl-names = "default"; 69*80e5f83cSHans de Goede pinctrl-0 = <&usb2_vbus_pin_pcduino2>; 70*80e5f83cSHans de Goede gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; 71*80e5f83cSHans de Goede status = "okay"; 72*80e5f83cSHans de Goede}; 73*80e5f83cSHans de Goede 74*80e5f83cSHans de Goede&usbphy { 75*80e5f83cSHans de Goede usb1_vbus-supply = <®_vcc3v3>; /* USB WIFI is always on */ 76*80e5f83cSHans de Goede usb2_vbus-supply = <®_usb2_vbus>; 77*80e5f83cSHans de Goede status = "okay"; 78*80e5f83cSHans de Goede}; 79