xref: /openbmc/u-boot/arch/arm/dts/sun7i-a20-m3.dts (revision 592cd5de)
153ab4af3SHans de Goede/*
253ab4af3SHans de Goede * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
353ab4af3SHans de Goede *
453ab4af3SHans de Goede * Hans de Goede <hdegoede@redhat.com>
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 "sun7i-a20.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/interrupt-controller/irq.h>
5153ab4af3SHans de Goede
5253ab4af3SHans de Goede/ {
5353ab4af3SHans de Goede	model = "Mele M3";
5453ab4af3SHans de Goede	compatible = "mele,m3", "allwinner,sun7i-a20";
5553ab4af3SHans de Goede
5653ab4af3SHans de Goede	aliases {
5753ab4af3SHans de Goede		serial0 = &uart0;
5853ab4af3SHans de Goede	};
5953ab4af3SHans de Goede
6053ab4af3SHans de Goede	chosen {
6153ab4af3SHans de Goede		stdout-path = "serial0:115200n8";
6253ab4af3SHans de Goede	};
6353ab4af3SHans de Goede
6453ab4af3SHans de Goede	leds {
6553ab4af3SHans de Goede		compatible = "gpio-leds";
6653ab4af3SHans de Goede		pinctrl-names = "default";
6753ab4af3SHans de Goede		pinctrl-0 = <&led_pins_m3>;
6853ab4af3SHans de Goede
6953ab4af3SHans de Goede		blue {
7053ab4af3SHans de Goede			label = "m3:blue:usr";
7153ab4af3SHans de Goede			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
7253ab4af3SHans de Goede		};
7353ab4af3SHans de Goede	};
7453ab4af3SHans de Goede};
7553ab4af3SHans de Goede
7653ab4af3SHans de Goede&ehci0 {
7753ab4af3SHans de Goede	status = "okay";
7853ab4af3SHans de Goede};
7953ab4af3SHans de Goede
8053ab4af3SHans de Goede&ehci1 {
8153ab4af3SHans de Goede	status = "okay";
8253ab4af3SHans de Goede};
8353ab4af3SHans de Goede
8453ab4af3SHans de Goede&gmac {
8553ab4af3SHans de Goede	pinctrl-names = "default";
8653ab4af3SHans de Goede	pinctrl-0 = <&gmac_pins_mii_a>;
8753ab4af3SHans de Goede	phy = <&phy1>;
8853ab4af3SHans de Goede	phy-mode = "mii";
8953ab4af3SHans de Goede	status = "okay";
9053ab4af3SHans de Goede
9153ab4af3SHans de Goede	phy1: ethernet-phy@1 {
9253ab4af3SHans de Goede		reg = <1>;
9353ab4af3SHans de Goede	};
9453ab4af3SHans de Goede};
9553ab4af3SHans de Goede
9653ab4af3SHans de Goede&i2c0 {
9753ab4af3SHans de Goede	pinctrl-names = "default";
9853ab4af3SHans de Goede	pinctrl-0 = <&i2c0_pins_a>;
9953ab4af3SHans de Goede	status = "okay";
10053ab4af3SHans de Goede
10153ab4af3SHans de Goede	axp209: pmic@34 {
10253ab4af3SHans de Goede		compatible = "x-powers,axp209";
10353ab4af3SHans de Goede		reg = <0x34>;
10453ab4af3SHans de Goede		interrupt-parent = <&nmi_intc>;
10553ab4af3SHans de Goede		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
10653ab4af3SHans de Goede
10753ab4af3SHans de Goede		interrupt-controller;
10853ab4af3SHans de Goede		#interrupt-cells = <1>;
10953ab4af3SHans de Goede	};
11053ab4af3SHans de Goede};
11153ab4af3SHans de Goede
11253ab4af3SHans de Goede&ir0 {
11353ab4af3SHans de Goede	pinctrl-names = "default";
1148b1ba941SHans de Goede	pinctrl-0 = <&ir0_rx_pins_a>;
11553ab4af3SHans de Goede	status = "okay";
11653ab4af3SHans de Goede};
11753ab4af3SHans de Goede
11853ab4af3SHans de Goede&mmc0 {
11953ab4af3SHans de Goede	pinctrl-names = "default";
120*b9d59d08SJagan Teki	pinctrl-0 = <&mmc0_pins_a>;
12153ab4af3SHans de Goede	vmmc-supply = <&reg_vcc3v3>;
12253ab4af3SHans de Goede	bus-width = <4>;
123*b9d59d08SJagan Teki	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
12453ab4af3SHans de Goede	status = "okay";
12553ab4af3SHans de Goede};
12653ab4af3SHans de Goede
12753ab4af3SHans de Goede&mmc2 {
12853ab4af3SHans de Goede	pinctrl-names = "default";
12953ab4af3SHans de Goede	pinctrl-0 = <&mmc2_pins_a>;
13053ab4af3SHans de Goede	vmmc-supply = <&reg_vcc3v3>;
13153ab4af3SHans de Goede	bus-width = <4>;
13253ab4af3SHans de Goede	non-removable;
13353ab4af3SHans de Goede	status = "okay";
13453ab4af3SHans de Goede};
13553ab4af3SHans de Goede
13653ab4af3SHans de Goede&ohci0 {
13753ab4af3SHans de Goede	status = "okay";
13853ab4af3SHans de Goede};
13953ab4af3SHans de Goede
14053ab4af3SHans de Goede&ohci1 {
14153ab4af3SHans de Goede	status = "okay";
14253ab4af3SHans de Goede};
14353ab4af3SHans de Goede
14453ab4af3SHans de Goede&pio {
14553ab4af3SHans de Goede	led_pins_m3: led_pins@0 {
146*b9d59d08SJagan Teki		pins = "PH20";
147*b9d59d08SJagan Teki		function = "gpio_out";
14853ab4af3SHans de Goede	};
14953ab4af3SHans de Goede};
15053ab4af3SHans de Goede
15153ab4af3SHans de Goede&reg_usb1_vbus {
15253ab4af3SHans de Goede	status = "okay";
15353ab4af3SHans de Goede};
15453ab4af3SHans de Goede
15553ab4af3SHans de Goede&reg_usb2_vbus {
15653ab4af3SHans de Goede	status = "okay";
15753ab4af3SHans de Goede};
15853ab4af3SHans de Goede
15953ab4af3SHans de Goede&uart0 {
16053ab4af3SHans de Goede	pinctrl-names = "default";
16153ab4af3SHans de Goede	pinctrl-0 = <&uart0_pins_a>;
16253ab4af3SHans de Goede	status = "okay";
16353ab4af3SHans de Goede};
16453ab4af3SHans de Goede
16553ab4af3SHans de Goede&usbphy {
16653ab4af3SHans de Goede	usb1_vbus-supply = <&reg_usb1_vbus>;
16753ab4af3SHans de Goede	usb2_vbus-supply = <&reg_usb2_vbus>;
16853ab4af3SHans de Goede	status = "okay";
16953ab4af3SHans de Goede};
170