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> 56af79c4f1SHans de Goede 57af79c4f1SHans de Goede/ { 588b1ba941SHans de Goede model = "mk808c"; 59af79c4f1SHans de Goede compatible = "allwinner,mk808c", "allwinner,sun7i-a20"; 60af79c4f1SHans de Goede 61af79c4f1SHans de Goede aliases { 62af79c4f1SHans de Goede serial0 = &uart0; 638b1ba941SHans de Goede serial1 = &uart2; 64af79c4f1SHans de Goede }; 65af79c4f1SHans de Goede 66af79c4f1SHans de Goede chosen { 67af79c4f1SHans de Goede stdout-path = "serial0:115200n8"; 68af79c4f1SHans de Goede }; 69*b9d59d08SJagan Teki 70*b9d59d08SJagan Teki hdmi-connector { 71*b9d59d08SJagan Teki compatible = "hdmi-connector"; 72*b9d59d08SJagan Teki type = "a"; 73*b9d59d08SJagan Teki 74*b9d59d08SJagan Teki port { 75*b9d59d08SJagan Teki hdmi_con_in: endpoint { 76*b9d59d08SJagan Teki remote-endpoint = <&hdmi_out_con>; 77*b9d59d08SJagan Teki }; 78*b9d59d08SJagan Teki }; 79*b9d59d08SJagan Teki }; 80af79c4f1SHans de Goede}; 81af79c4f1SHans de Goede 8280e5f83cSHans de Goede&codec { 8380e5f83cSHans de Goede status = "okay"; 8480e5f83cSHans de Goede}; 8580e5f83cSHans de Goede 86*b9d59d08SJagan Teki&de { 87*b9d59d08SJagan Teki status = "okay"; 88*b9d59d08SJagan Teki}; 89*b9d59d08SJagan Teki 90af79c4f1SHans de Goede&ehci0 { 91af79c4f1SHans de Goede status = "okay"; 92af79c4f1SHans de Goede}; 93af79c4f1SHans de Goede 94af79c4f1SHans de Goede&ehci1 { 95af79c4f1SHans de Goede status = "okay"; 96af79c4f1SHans de Goede}; 97af79c4f1SHans de Goede 98*b9d59d08SJagan Teki&hdmi { 99*b9d59d08SJagan Teki status = "okay"; 100*b9d59d08SJagan Teki}; 101*b9d59d08SJagan Teki 102*b9d59d08SJagan Teki&hdmi_out { 103*b9d59d08SJagan Teki hdmi_out_con: endpoint { 104*b9d59d08SJagan Teki remote-endpoint = <&hdmi_con_in>; 105*b9d59d08SJagan Teki }; 106*b9d59d08SJagan Teki}; 107*b9d59d08SJagan Teki 1088b1ba941SHans de Goede&i2c0 { 1098b1ba941SHans de Goede pinctrl-names = "default"; 1108b1ba941SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 1118b1ba941SHans de Goede status = "okay"; 1128b1ba941SHans de Goede 1138b1ba941SHans de Goede axp209: pmic@34 { 1148b1ba941SHans de Goede compatible = "x-powers,axp209"; 1158b1ba941SHans de Goede reg = <0x34>; 1168b1ba941SHans de Goede interrupt-parent = <&nmi_intc>; 1178b1ba941SHans de Goede interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 1188b1ba941SHans de Goede interrupt-controller; 1198b1ba941SHans de Goede #interrupt-cells = <1>; 1208b1ba941SHans de Goede }; 1218b1ba941SHans de Goede}; 1228b1ba941SHans de Goede 1238b1ba941SHans de Goede&i2c1 { 1248b1ba941SHans de Goede pinctrl-names = "default"; 1258b1ba941SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 1268b1ba941SHans de Goede status = "okay"; 1278b1ba941SHans de Goede}; 1288b1ba941SHans de Goede 1298b1ba941SHans de Goede&i2c2 { 1308b1ba941SHans de Goede pinctrl-names = "default"; 1318b1ba941SHans de Goede pinctrl-0 = <&i2c2_pins_a>; 1328b1ba941SHans de Goede status = "okay"; 1338b1ba941SHans de Goede}; 1348b1ba941SHans de Goede 1358b1ba941SHans de Goede&mmc0 { 1368b1ba941SHans de Goede pinctrl-names = "default"; 137*b9d59d08SJagan Teki pinctrl-0 = <&mmc0_pins_a>; 1388b1ba941SHans de Goede vmmc-supply = <®_vcc3v0>; 1398b1ba941SHans de Goede bus-width = <4>; 140*b9d59d08SJagan Teki cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */ 1418b1ba941SHans de Goede status = "okay"; 1428b1ba941SHans de Goede}; 1438b1ba941SHans de Goede 144af79c4f1SHans de Goede&ohci0 { 145af79c4f1SHans de Goede status = "okay"; 146af79c4f1SHans de Goede}; 147af79c4f1SHans de Goede 148af79c4f1SHans de Goede&ohci1 { 149af79c4f1SHans de Goede status = "okay"; 150af79c4f1SHans de Goede}; 151af79c4f1SHans de Goede 15280e5f83cSHans de Goede&otg_sram { 15380e5f83cSHans de Goede status = "okay"; 15480e5f83cSHans de Goede}; 15580e5f83cSHans de Goede 15680e5f83cSHans de Goede&pio { 15780e5f83cSHans de Goede usb0_id_detect_pin: usb0_id_detect_pin@0 { 158*b9d59d08SJagan Teki pins = "PH4"; 159*b9d59d08SJagan Teki function = "gpio_in"; 16080e5f83cSHans de Goede }; 16180e5f83cSHans de Goede 16280e5f83cSHans de Goede usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { 163*b9d59d08SJagan Teki pins = "PH5"; 164*b9d59d08SJagan Teki function = "gpio_in"; 16580e5f83cSHans de Goede }; 16680e5f83cSHans de Goede}; 16780e5f83cSHans de Goede 16880e5f83cSHans de Goede®_usb0_vbus { 16980e5f83cSHans de Goede status = "okay"; 17080e5f83cSHans de Goede}; 17180e5f83cSHans de Goede 1728b1ba941SHans de Goede®_usb1_vbus { 1738b1ba941SHans de Goede status = "okay"; 1748b1ba941SHans de Goede}; 1758b1ba941SHans de Goede 1768b1ba941SHans de Goede®_usb2_vbus { 1778b1ba941SHans de Goede status = "okay"; 1788b1ba941SHans de Goede}; 1798b1ba941SHans de Goede 180af79c4f1SHans de Goede&uart0 { 181af79c4f1SHans de Goede pinctrl-names = "default"; 182af79c4f1SHans de Goede pinctrl-0 = <&uart0_pins_a>; 183af79c4f1SHans de Goede status = "okay"; 184af79c4f1SHans de Goede}; 1858b1ba941SHans de Goede 1868b1ba941SHans de Goede&uart2 { 1878b1ba941SHans de Goede pinctrl-names = "default"; 1888b1ba941SHans de Goede pinctrl-0 = <&uart2_pins_a>; 1898b1ba941SHans de Goede status = "okay"; 1908b1ba941SHans de Goede}; 1918b1ba941SHans de Goede 19280e5f83cSHans de Goede&usb_otg { 19380e5f83cSHans de Goede dr_mode = "otg"; 19480e5f83cSHans de Goede status = "okay"; 19580e5f83cSHans de Goede}; 19680e5f83cSHans de Goede 1978b1ba941SHans de Goede&usbphy { 19880e5f83cSHans de Goede pinctrl-names = "default"; 19980e5f83cSHans de Goede pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; 20080e5f83cSHans de Goede usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ 20180e5f83cSHans de Goede usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ 20280e5f83cSHans de Goede usb0_vbus-supply = <®_usb0_vbus>; 2038b1ba941SHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 2048b1ba941SHans de Goede usb2_vbus-supply = <®_usb2_vbus>; 2058b1ba941SHans de Goede status = "okay"; 2068b1ba941SHans de Goede}; 207