153ab4af3SHans de Goede/*
253ab4af3SHans de Goede * Copyright 2015 Hans de Goede <hdegoede@redhat.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 "sun4i-a10.dtsi"
4553ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi"
4653ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h>
4753ab4af3SHans de Goede
4853ab4af3SHans de Goede/ {
4953ab4af3SHans de Goede	model = "MK802";
5053ab4af3SHans de Goede	compatible = "allwinner,mk802", "allwinner,sun4i-a10";
5153ab4af3SHans de Goede
5253ab4af3SHans de Goede	aliases {
5353ab4af3SHans de Goede		serial0 = &uart0;
5453ab4af3SHans de Goede	};
5553ab4af3SHans de Goede
5653ab4af3SHans de Goede	chosen {
5753ab4af3SHans de Goede		stdout-path = "serial0:115200n8";
5853ab4af3SHans de Goede	};
59*3c92cca3SJagan Teki
60*3c92cca3SJagan Teki	hdmi-connector {
61*3c92cca3SJagan Teki		compatible = "hdmi-connector";
62*3c92cca3SJagan Teki		type = "a";
63*3c92cca3SJagan Teki
64*3c92cca3SJagan Teki		port {
65*3c92cca3SJagan Teki			hdmi_con_in: endpoint {
66*3c92cca3SJagan Teki				remote-endpoint = <&hdmi_out_con>;
67*3c92cca3SJagan Teki			};
68*3c92cca3SJagan Teki		};
69*3c92cca3SJagan Teki	};
7053ab4af3SHans de Goede};
7153ab4af3SHans de Goede
7280e5f83cSHans de Goede&codec {
7380e5f83cSHans de Goede	status = "okay";
7480e5f83cSHans de Goede};
7580e5f83cSHans de Goede
76*3c92cca3SJagan Teki&de {
77*3c92cca3SJagan Teki	status = "okay";
78*3c92cca3SJagan Teki};
79*3c92cca3SJagan Teki
8053ab4af3SHans de Goede&ehci0 {
8153ab4af3SHans de Goede	status = "okay";
8253ab4af3SHans de Goede};
8353ab4af3SHans de Goede
8453ab4af3SHans de Goede&ehci1 {
8553ab4af3SHans de Goede	status = "okay";
8653ab4af3SHans de Goede};
8753ab4af3SHans de Goede
88*3c92cca3SJagan Teki&hdmi {
89*3c92cca3SJagan Teki	status = "okay";
90*3c92cca3SJagan Teki};
91*3c92cca3SJagan Teki
92*3c92cca3SJagan Teki&hdmi_out {
93*3c92cca3SJagan Teki	hdmi_out_con: endpoint {
94*3c92cca3SJagan Teki		remote-endpoint = <&hdmi_con_in>;
95*3c92cca3SJagan Teki	};
96*3c92cca3SJagan Teki};
97*3c92cca3SJagan Teki
9853ab4af3SHans de Goede&mmc0 {
9953ab4af3SHans de Goede	vmmc-supply = <&reg_vcc3v3>;
10053ab4af3SHans de Goede	bus-width = <4>;
101*3c92cca3SJagan Teki	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
10253ab4af3SHans de Goede	status = "okay";
10353ab4af3SHans de Goede};
10453ab4af3SHans de Goede
10553ab4af3SHans de Goede&ohci0 {
10653ab4af3SHans de Goede	status = "okay";
10753ab4af3SHans de Goede};
10853ab4af3SHans de Goede
10980e5f83cSHans de Goede&otg_sram {
11080e5f83cSHans de Goede	status = "okay";
11180e5f83cSHans de Goede};
11280e5f83cSHans de Goede
11380e5f83cSHans de Goede&reg_usb0_vbus {
11480e5f83cSHans de Goede	status = "okay";
11580e5f83cSHans de Goede};
11680e5f83cSHans de Goede
11753ab4af3SHans de Goede&reg_usb1_vbus {
11853ab4af3SHans de Goede	status = "okay";
11953ab4af3SHans de Goede};
12053ab4af3SHans de Goede
12153ab4af3SHans de Goede&reg_usb2_vbus {
12253ab4af3SHans de Goede	gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
12353ab4af3SHans de Goede	status = "okay";
12453ab4af3SHans de Goede};
12553ab4af3SHans de Goede
12653ab4af3SHans de Goede&uart0 {
12753ab4af3SHans de Goede	pinctrl-names = "default";
128*3c92cca3SJagan Teki	pinctrl-0 = <&uart0_pb_pins>;
12953ab4af3SHans de Goede	status = "okay";
13053ab4af3SHans de Goede};
13153ab4af3SHans de Goede
13280e5f83cSHans de Goede&usb_otg {
13380e5f83cSHans de Goede	dr_mode = "otg";
13480e5f83cSHans de Goede	status = "okay";
13580e5f83cSHans de Goede};
13680e5f83cSHans de Goede
13753ab4af3SHans de Goede&usbphy {
13880e5f83cSHans de Goede	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
13980e5f83cSHans de Goede	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
14080e5f83cSHans de Goede	usb0_vbus-supply = <&reg_usb0_vbus>;
14153ab4af3SHans de Goede	usb1_vbus-supply = <&reg_usb1_vbus>;
14253ab4af3SHans de Goede	usb2_vbus-supply = <&reg_usb2_vbus>;
14353ab4af3SHans de Goede	status = "okay";
14453ab4af3SHans de Goede};
145