1af79c4f1SHans de Goede/* 28b1ba941SHans de Goede * Copyright 2015 Marcus Cooper 3af79c4f1SHans de Goede * 48b1ba941SHans de Goede * Marcus Cooper <codekipper@gmail.com> 5af79c4f1SHans de Goede * 68b1ba941SHans de Goede * This file is dual-licensed: you can use it either under the terms 78b1ba941SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 88b1ba941SHans de Goede * licensing only applies to this file, and not this project as a 98b1ba941SHans de Goede * whole. 108b1ba941SHans de Goede * 118b1ba941SHans de Goede * a) This file is free software; you can redistribute it and/or 128b1ba941SHans de Goede * modify it under the terms of the GNU General Public License as 138b1ba941SHans de Goede * published by the Free Software Foundation; either version 2 of the 148b1ba941SHans de Goede * License, or (at your option) any later version. 158b1ba941SHans de Goede * 168b1ba941SHans de Goede * This file is distributed in the hope that it will be useful, 178b1ba941SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 188b1ba941SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 198b1ba941SHans de Goede * GNU General Public License for more details. 208b1ba941SHans de Goede * 218b1ba941SHans de Goede * You should have received a copy of the GNU General Public 228b1ba941SHans de Goede * License along with this file; if not, write to the Free 238b1ba941SHans de Goede * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 248b1ba941SHans de Goede * MA 02110-1301 USA 258b1ba941SHans de Goede * 268b1ba941SHans de Goede * Or, alternatively, 278b1ba941SHans de Goede * 288b1ba941SHans de Goede * b) Permission is hereby granted, free of charge, to any person 298b1ba941SHans de Goede * obtaining a copy of this software and associated documentation 308b1ba941SHans de Goede * files (the "Software"), to deal in the Software without 318b1ba941SHans de Goede * restriction, including without limitation the rights to use, 328b1ba941SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 338b1ba941SHans de Goede * sell copies of the Software, and to permit persons to whom the 348b1ba941SHans de Goede * Software is furnished to do so, subject to the following 358b1ba941SHans de Goede * conditions: 368b1ba941SHans de Goede * 378b1ba941SHans de Goede * The above copyright notice and this permission notice shall be 388b1ba941SHans de Goede * included in all copies or substantial portions of the Software. 398b1ba941SHans de Goede * 408b1ba941SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 418b1ba941SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 428b1ba941SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 438b1ba941SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 448b1ba941SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 458b1ba941SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 468b1ba941SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 478b1ba941SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 48af79c4f1SHans de Goede */ 49af79c4f1SHans de Goede 50af79c4f1SHans de Goede/dts-v1/; 51af79c4f1SHans de Goede#include "sun7i-a20.dtsi" 528b1ba941SHans de Goede#include "sunxi-common-regulators.dtsi" 538b1ba941SHans de Goede 548b1ba941SHans de Goede#include <dt-bindings/gpio/gpio.h> 558b1ba941SHans de Goede#include <dt-bindings/interrupt-controller/irq.h> 56*80e5f83cSHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h> 57af79c4f1SHans de Goede 58af79c4f1SHans de Goede/ { 598b1ba941SHans de Goede model = "mk808c"; 60af79c4f1SHans de Goede compatible = "allwinner,mk808c", "allwinner,sun7i-a20"; 61af79c4f1SHans de Goede 62af79c4f1SHans de Goede aliases { 63af79c4f1SHans de Goede serial0 = &uart0; 648b1ba941SHans de Goede serial1 = &uart2; 65af79c4f1SHans de Goede }; 66af79c4f1SHans de Goede 67af79c4f1SHans de Goede chosen { 68af79c4f1SHans de Goede stdout-path = "serial0:115200n8"; 69af79c4f1SHans de Goede }; 70af79c4f1SHans de Goede}; 71af79c4f1SHans de Goede 72*80e5f83cSHans de Goede&codec { 73*80e5f83cSHans de Goede status = "okay"; 74*80e5f83cSHans de Goede}; 75*80e5f83cSHans de Goede 76af79c4f1SHans de Goede&ehci0 { 77af79c4f1SHans de Goede status = "okay"; 78af79c4f1SHans de Goede}; 79af79c4f1SHans de Goede 80af79c4f1SHans de Goede&ehci1 { 81af79c4f1SHans de Goede status = "okay"; 82af79c4f1SHans de Goede}; 83af79c4f1SHans de Goede 848b1ba941SHans de Goede&i2c0 { 858b1ba941SHans de Goede pinctrl-names = "default"; 868b1ba941SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 878b1ba941SHans de Goede status = "okay"; 888b1ba941SHans de Goede 898b1ba941SHans de Goede axp209: pmic@34 { 908b1ba941SHans de Goede compatible = "x-powers,axp209"; 918b1ba941SHans de Goede reg = <0x34>; 928b1ba941SHans de Goede interrupt-parent = <&nmi_intc>; 938b1ba941SHans de Goede interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 948b1ba941SHans de Goede interrupt-controller; 958b1ba941SHans de Goede #interrupt-cells = <1>; 968b1ba941SHans de Goede }; 978b1ba941SHans de Goede}; 988b1ba941SHans de Goede 998b1ba941SHans de Goede&i2c1 { 1008b1ba941SHans de Goede pinctrl-names = "default"; 1018b1ba941SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 1028b1ba941SHans de Goede status = "okay"; 1038b1ba941SHans de Goede}; 1048b1ba941SHans de Goede 1058b1ba941SHans de Goede&i2c2 { 1068b1ba941SHans de Goede pinctrl-names = "default"; 1078b1ba941SHans de Goede pinctrl-0 = <&i2c2_pins_a>; 1088b1ba941SHans de Goede status = "okay"; 1098b1ba941SHans de Goede}; 1108b1ba941SHans de Goede 1118b1ba941SHans de Goede&mmc0 { 1128b1ba941SHans de Goede pinctrl-names = "default"; 1138b1ba941SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; 1148b1ba941SHans de Goede vmmc-supply = <®_vcc3v0>; 1158b1ba941SHans de Goede bus-width = <4>; 1168b1ba941SHans de Goede cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ 1178b1ba941SHans de Goede cd-inverted; 1188b1ba941SHans de Goede status = "okay"; 1198b1ba941SHans de Goede}; 1208b1ba941SHans de Goede 121af79c4f1SHans de Goede&ohci0 { 122af79c4f1SHans de Goede status = "okay"; 123af79c4f1SHans de Goede}; 124af79c4f1SHans de Goede 125af79c4f1SHans de Goede&ohci1 { 126af79c4f1SHans de Goede status = "okay"; 127af79c4f1SHans de Goede}; 128af79c4f1SHans de Goede 129*80e5f83cSHans de Goede&otg_sram { 130*80e5f83cSHans de Goede status = "okay"; 131*80e5f83cSHans de Goede}; 132*80e5f83cSHans de Goede 133*80e5f83cSHans de Goede&pio { 134*80e5f83cSHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 135*80e5f83cSHans de Goede allwinner,pins = "PH4"; 136*80e5f83cSHans de Goede allwinner,function = "gpio_in"; 137*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 138*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 139*80e5f83cSHans de Goede }; 140*80e5f83cSHans de Goede 141*80e5f83cSHans de Goede usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 142*80e5f83cSHans de Goede allwinner,pins = "PH5"; 143*80e5f83cSHans de Goede allwinner,function = "gpio_in"; 144*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 145*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 146*80e5f83cSHans de Goede }; 147*80e5f83cSHans de Goede}; 148*80e5f83cSHans de Goede 149*80e5f83cSHans de Goede®_usb0_vbus { 150*80e5f83cSHans de Goede status = "okay"; 151*80e5f83cSHans de Goede}; 152*80e5f83cSHans de Goede 1538b1ba941SHans de Goede®_usb1_vbus { 1548b1ba941SHans de Goede status = "okay"; 1558b1ba941SHans de Goede}; 1568b1ba941SHans de Goede 1578b1ba941SHans de Goede®_usb2_vbus { 1588b1ba941SHans de Goede status = "okay"; 1598b1ba941SHans de Goede}; 1608b1ba941SHans de Goede 161af79c4f1SHans de Goede&uart0 { 162af79c4f1SHans de Goede pinctrl-names = "default"; 163af79c4f1SHans de Goede pinctrl-0 = <&uart0_pins_a>; 164af79c4f1SHans de Goede status = "okay"; 165af79c4f1SHans de Goede}; 1668b1ba941SHans de Goede 1678b1ba941SHans de Goede&uart2 { 1688b1ba941SHans de Goede pinctrl-names = "default"; 1698b1ba941SHans de Goede pinctrl-0 = <&uart2_pins_a>; 1708b1ba941SHans de Goede status = "okay"; 1718b1ba941SHans de Goede}; 1728b1ba941SHans de Goede 173*80e5f83cSHans de Goede&usb_otg { 174*80e5f83cSHans de Goede dr_mode = "otg"; 175*80e5f83cSHans de Goede status = "okay"; 176*80e5f83cSHans de Goede}; 177*80e5f83cSHans de Goede 1788b1ba941SHans de Goede&usbphy { 179*80e5f83cSHans de Goede pinctrl-names = "default"; 180*80e5f83cSHans de Goede pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 181*80e5f83cSHans de Goede usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 182*80e5f83cSHans de Goede usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ 183*80e5f83cSHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 1848b1ba941SHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 1858b1ba941SHans de Goede usb2_vbus-supply = <®_usb2_vbus>; 1868b1ba941SHans de Goede status = "okay"; 1878b1ba941SHans de Goede}; 188