blob: 44401565533fa303ae34c7c05d167b01b3c38a0b [file] [log] [blame]
Maxime Ripardd4da2eb2012-11-14 20:17:04 +01001/*
2 * Copyright 2012 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
Maxime Ripard5ba312c2014-09-02 19:25:26 +02006 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
Maxime Ripardd4da2eb2012-11-14 20:17:04 +010010 *
Maxime Ripard5ba312c2014-09-02 19:25:26 +020011 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this file; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
24 * MA 02110-1301 USA
25 *
26 * Or, alternatively,
27 *
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
35 * conditions:
36 *
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
Maxime Ripardd4da2eb2012-11-14 20:17:04 +010048 */
49
50/dts-v1/;
Hans de Goedeec011af52014-12-23 11:13:21 +010051#include "sun5i-a13.dtsi"
52#include "sunxi-common-regulators.dtsi"
Maxime Ripardbca12922014-12-16 22:59:55 +010053
54#include <dt-bindings/gpio/gpio.h>
Hans de Goedeec011af52014-12-23 11:13:21 +010055#include <dt-bindings/input/input.h>
Maxime Ripard092a0c32014-12-16 22:59:57 +010056#include <dt-bindings/pinctrl/sun4i-a10.h>
Maxime Ripardd4da2eb2012-11-14 20:17:04 +010057
58/ {
59 model = "Olimex A13-Olinuxino";
Maxime Ripard68136b12012-12-12 17:08:23 +010060 compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
Maxime Ripardd4da2eb2012-11-14 20:17:04 +010061
Maxime Ripard117a2cc2015-01-22 22:10:54 +010062 aliases {
63 serial0 = &uart1;
64 };
65
Maxime Ripard59ebbe82015-03-15 20:47:31 +010066 chosen {
67 stdout-path = "serial0:115200n8";
68 };
69
Maxime Ripardbfef0812013-01-08 22:35:17 +010070 leds {
71 compatible = "gpio-leds";
72 pinctrl-names = "default";
73 pinctrl-0 = <&led_pins_olinuxino>;
74
75 power {
Maxime Ripardbca12922014-12-16 22:59:55 +010076 gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
Maxime Ripardbfef0812013-01-08 22:35:17 +010077 default-state = "on";
78 };
79 };
Maxime Ripardb2547162015-01-31 12:11:54 +010080};
Roman Byshko4703bc82014-03-01 20:26:31 +010081
Maxime Ripardb2547162015-01-31 12:11:54 +010082&ehci0 {
83 status = "okay";
84};
85
86&i2c0 {
87 pinctrl-names = "default";
88 pinctrl-0 = <&i2c0_pins_a>;
89 status = "okay";
90
91 axp209: pmic@34 {
92 compatible = "x-powers,axp209";
93 reg = <0x34>;
94 interrupts = <0>;
95
96 interrupt-controller;
97 #interrupt-cells = <1>;
Roman Byshko4703bc82014-03-01 20:26:31 +010098 };
Maxime Ripardd4da2eb2012-11-14 20:17:04 +010099};
Maxime Ripardb2547162015-01-31 12:11:54 +0100100
101&i2c1 {
102 pinctrl-names = "default";
103 pinctrl-0 = <&i2c1_pins_a>;
104 status = "okay";
105};
106
107&i2c2 {
108 pinctrl-names = "default";
109 pinctrl-0 = <&i2c2_pins_a>;
110 status = "okay";
111};
112
113&lradc {
114 vref-supply = <&reg_vcc3v0>;
115 status = "okay";
116
117 button@191 {
118 label = "Volume Up";
119 linux,code = <KEY_VOLUMEUP>;
120 channel = <0>;
121 voltage = <191274>;
122 };
123
124 button@392 {
125 label = "Volume Down";
126 linux,code = <KEY_VOLUMEDOWN>;
127 channel = <0>;
128 voltage = <392644>;
129 };
130
131 button@601 {
132 label = "Menu";
133 linux,code = <KEY_MENU>;
134 channel = <0>;
135 voltage = <601151>;
136 };
137
138 button@795 {
139 label = "Enter";
140 linux,code = <KEY_ENTER>;
141 channel = <0>;
142 voltage = <795090>;
143 };
144
145 button@987 {
146 label = "Home";
147 linux,code = <KEY_HOMEPAGE>;
148 channel = <0>;
149 voltage = <987387>;
150 };
151};
152
153&mmc0 {
154 pinctrl-names = "default";
155 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
156 vmmc-supply = <&reg_vcc3v3>;
157 bus-width = <4>;
158 cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
159 cd-inverted;
160 status = "okay";
161};
162
163&ohci0 {
164 status = "okay";
165};
166
167&pio {
168 mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
169 allwinner,pins = "PG0";
170 allwinner,function = "gpio_in";
171 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
172 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
173 };
174
175 led_pins_olinuxino: led_pins@0 {
176 allwinner,pins = "PG9";
177 allwinner,function = "gpio_out";
178 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
179 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
180 };
181
182 usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 {
183 allwinner,pins = "PG11";
184 allwinner,function = "gpio_out";
185 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
186 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
187 };
188};
189
190&reg_usb1_vbus {
191 pinctrl-0 = <&usb1_vbus_pin_olinuxino>;
192 gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
193 status = "okay";
194};
195
196&uart1 {
197 pinctrl-names = "default";
198 pinctrl-0 = <&uart1_pins_b>;
199 status = "okay";
200};
201
202&usbphy {
203 usb1_vbus-supply = <&reg_usb1_vbus>;
204 status = "okay";
205};