xref: /openbmc/u-boot/arch/arm/dts/sun5i-a13-olinuxino-micro.dts (revision cc49e2bdb8fbd47af28cb7e47696322586e9fff1)
153ab4af3SHans de Goede/*
253ab4af3SHans de Goede * Copyright 2012 Maxime Ripard <maxime.ripard@free-electrons.com>
353ab4af3SHans de Goede * Copyright 2013 Hans de Goede <hdegoede@redhat.com>
453ab4af3SHans de Goede *
553ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms
653ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual
753ab4af3SHans de Goede * licensing only applies to this file, and not this project as a
853ab4af3SHans de Goede * whole.
953ab4af3SHans de Goede *
1053ab4af3SHans de Goede *  a) This file is free software; you can redistribute it and/or
1153ab4af3SHans de Goede *     modify it under the terms of the GNU General Public License as
1253ab4af3SHans de Goede *     published by the Free Software Foundation; either version 2 of the
1353ab4af3SHans de Goede *     License, or (at your option) any later version.
1453ab4af3SHans de Goede *
1553ab4af3SHans de Goede *     This file is distributed in the hope that it will be useful,
1653ab4af3SHans de Goede *     but WITHOUT ANY WARRANTY; without even the implied warranty of
1753ab4af3SHans de Goede *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1853ab4af3SHans de Goede *     GNU General Public License for more details.
1953ab4af3SHans de Goede *
2053ab4af3SHans de Goede * Or, alternatively,
2153ab4af3SHans de Goede *
2253ab4af3SHans de Goede *  b) Permission is hereby granted, free of charge, to any person
2353ab4af3SHans de Goede *     obtaining a copy of this software and associated documentation
2453ab4af3SHans de Goede *     files (the "Software"), to deal in the Software without
2553ab4af3SHans de Goede *     restriction, including without limitation the rights to use,
2653ab4af3SHans de Goede *     copy, modify, merge, publish, distribute, sublicense, and/or
2753ab4af3SHans de Goede *     sell copies of the Software, and to permit persons to whom the
2853ab4af3SHans de Goede *     Software is furnished to do so, subject to the following
2953ab4af3SHans de Goede *     conditions:
3053ab4af3SHans de Goede *
3153ab4af3SHans de Goede *     The above copyright notice and this permission notice shall be
3253ab4af3SHans de Goede *     included in all copies or substantial portions of the Software.
3353ab4af3SHans de Goede *
3453ab4af3SHans de Goede *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
3553ab4af3SHans de Goede *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
3653ab4af3SHans de Goede *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
3753ab4af3SHans de Goede *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
3853ab4af3SHans de Goede *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
3953ab4af3SHans de Goede *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4053ab4af3SHans de Goede *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4153ab4af3SHans de Goede *     OTHER DEALINGS IN THE SOFTWARE.
4253ab4af3SHans de Goede */
4353ab4af3SHans de Goede
4453ab4af3SHans de Goede/dts-v1/;
4553ab4af3SHans de Goede#include "sun5i-a13.dtsi"
4653ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi"
4753ab4af3SHans de Goede
4853ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h>
4953ab4af3SHans de Goede
5053ab4af3SHans de Goede/ {
5153ab4af3SHans de Goede	model = "Olimex A13-Olinuxino Micro";
5253ab4af3SHans de Goede	compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
5353ab4af3SHans de Goede
5453ab4af3SHans de Goede	aliases {
5553ab4af3SHans de Goede		serial0 = &uart1;
5653ab4af3SHans de Goede	};
5753ab4af3SHans de Goede
5853ab4af3SHans de Goede	chosen {
5953ab4af3SHans de Goede		stdout-path = "serial0:115200n8";
6053ab4af3SHans de Goede	};
6153ab4af3SHans de Goede
6253ab4af3SHans de Goede	leds {
6353ab4af3SHans de Goede		compatible = "gpio-leds";
6453ab4af3SHans de Goede		pinctrl-names = "default";
6553ab4af3SHans de Goede		pinctrl-0 = <&led_pins_olinuxinom>;
6653ab4af3SHans de Goede
6753ab4af3SHans de Goede		power {
6853ab4af3SHans de Goede			label = "a13-olinuxino-micro:green:power";
6953ab4af3SHans de Goede			gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
7053ab4af3SHans de Goede			default-state = "on";
7153ab4af3SHans de Goede		};
7253ab4af3SHans de Goede	};
7353ab4af3SHans de Goede};
7453ab4af3SHans de Goede
7553ab4af3SHans de Goede&ehci0 {
7653ab4af3SHans de Goede	status = "okay";
7753ab4af3SHans de Goede};
7853ab4af3SHans de Goede
7953ab4af3SHans de Goede&i2c0 {
8053ab4af3SHans de Goede	pinctrl-names = "default";
8153ab4af3SHans de Goede	pinctrl-0 = <&i2c0_pins_a>;
8253ab4af3SHans de Goede	status = "okay";
8353ab4af3SHans de Goede};
8453ab4af3SHans de Goede
8553ab4af3SHans de Goede&i2c1 {
8653ab4af3SHans de Goede	pinctrl-names = "default";
8753ab4af3SHans de Goede	pinctrl-0 = <&i2c1_pins_a>;
8853ab4af3SHans de Goede	status = "okay";
8953ab4af3SHans de Goede};
9053ab4af3SHans de Goede
9153ab4af3SHans de Goede&i2c2 {
9253ab4af3SHans de Goede	pinctrl-names = "default";
9353ab4af3SHans de Goede	pinctrl-0 = <&i2c2_pins_a>;
9453ab4af3SHans de Goede	status = "okay";
9553ab4af3SHans de Goede};
9653ab4af3SHans de Goede
9753ab4af3SHans de Goede&mmc0 {
9853ab4af3SHans de Goede	pinctrl-names = "default";
9953ab4af3SHans de Goede	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>;
10053ab4af3SHans de Goede	vmmc-supply = <&reg_vcc3v3>;
10153ab4af3SHans de Goede	bus-width = <4>;
102*13b36facSJagan Teki	cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
10353ab4af3SHans de Goede	status = "okay";
10453ab4af3SHans de Goede};
10553ab4af3SHans de Goede
10653ab4af3SHans de Goede&ohci0 {
10753ab4af3SHans de Goede	status = "okay";
10853ab4af3SHans de Goede};
10953ab4af3SHans de Goede
110860fbdd4SHans de Goede&otg_sram {
111860fbdd4SHans de Goede	status = "okay";
112860fbdd4SHans de Goede};
113860fbdd4SHans de Goede
11453ab4af3SHans de Goede&pio {
11553ab4af3SHans de Goede	mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 {
116*13b36facSJagan Teki		pins = "PG0";
117*13b36facSJagan Teki		function = "gpio_in";
118*13b36facSJagan Teki		bias-pull-up;
11953ab4af3SHans de Goede	};
12053ab4af3SHans de Goede
12153ab4af3SHans de Goede	led_pins_olinuxinom: led_pins@0 {
122*13b36facSJagan Teki		pins = "PG9";
123*13b36facSJagan Teki		function = "gpio_out";
124*13b36facSJagan Teki		drive-strength = <20>;
12553ab4af3SHans de Goede	};
12653ab4af3SHans de Goede
127860fbdd4SHans de Goede	usb0_id_detect_pin: usb0_id_detect_pin@0 {
128*13b36facSJagan Teki		pins = "PG2";
129*13b36facSJagan Teki		function = "gpio_in";
130*13b36facSJagan Teki		bias-pull-up;
131860fbdd4SHans de Goede	};
132860fbdd4SHans de Goede
133860fbdd4SHans de Goede	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
134*13b36facSJagan Teki		pins = "PG1";
135*13b36facSJagan Teki		function = "gpio_in";
136*13b36facSJagan Teki		bias-pull-down;
137860fbdd4SHans de Goede	};
138860fbdd4SHans de Goede
139860fbdd4SHans de Goede	usb0_vbus_pin_olinuxinom: usb0_vbus_pin@0 {
140*13b36facSJagan Teki		pins = "PG12";
141*13b36facSJagan Teki		function = "gpio_out";
142860fbdd4SHans de Goede	};
143860fbdd4SHans de Goede
14453ab4af3SHans de Goede	usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 {
145*13b36facSJagan Teki		pins = "PG11";
146*13b36facSJagan Teki		function = "gpio_out";
14753ab4af3SHans de Goede	};
14853ab4af3SHans de Goede};
14953ab4af3SHans de Goede
150860fbdd4SHans de Goede&reg_usb0_vbus {
151860fbdd4SHans de Goede	pinctrl-0 = <&usb0_vbus_pin_olinuxinom>;
152860fbdd4SHans de Goede	gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>;
153860fbdd4SHans de Goede	status = "okay";
154860fbdd4SHans de Goede};
155860fbdd4SHans de Goede
15653ab4af3SHans de Goede&reg_usb1_vbus {
15753ab4af3SHans de Goede	pinctrl-0 = <&usb1_vbus_pin_olinuxinom>;
15853ab4af3SHans de Goede	gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
15953ab4af3SHans de Goede	status = "okay";
16053ab4af3SHans de Goede};
16153ab4af3SHans de Goede
16253ab4af3SHans de Goede&uart1 {
16353ab4af3SHans de Goede	pinctrl-names = "default";
16453ab4af3SHans de Goede	pinctrl-0 = <&uart1_pins_b>;
16553ab4af3SHans de Goede	status = "okay";
16653ab4af3SHans de Goede};
16753ab4af3SHans de Goede
168860fbdd4SHans de Goede&usb_otg {
169860fbdd4SHans de Goede	dr_mode = "otg";
170860fbdd4SHans de Goede	status = "okay";
171860fbdd4SHans de Goede};
172860fbdd4SHans de Goede
17353ab4af3SHans de Goede&usbphy {
174860fbdd4SHans de Goede	pinctrl-names = "default";
175860fbdd4SHans de Goede	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
176860fbdd4SHans de Goede	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
177860fbdd4SHans de Goede	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
178860fbdd4SHans de Goede	usb0_vbus-supply = <&reg_usb0_vbus>;
17953ab4af3SHans de Goede	usb1_vbus-supply = <&reg_usb1_vbus>;
18053ab4af3SHans de Goede	status = "okay";
18153ab4af3SHans de Goede};
182