blob: 44401565533fa303ae34c7c05d167b01b3c38a0b [file] [log] [blame]
Hans de Goede53ab4af2015-04-15 19:03:49 +02001/*
2 * Copyright 2012 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
6 * 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.
10 *
11 * 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.
48 */
49
50/dts-v1/;
51#include "sun5i-a13.dtsi"
52#include "sunxi-common-regulators.dtsi"
53
54#include <dt-bindings/gpio/gpio.h>
55#include <dt-bindings/input/input.h>
56#include <dt-bindings/pinctrl/sun4i-a10.h>
57
58/ {
59 model = "Olimex A13-Olinuxino";
60 compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
61
62 aliases {
63 serial0 = &uart1;
64 };
65
66 chosen {
67 stdout-path = "serial0:115200n8";
68 };
69
70 leds {
71 compatible = "gpio-leds";
72 pinctrl-names = "default";
73 pinctrl-0 = <&led_pins_olinuxino>;
74
75 power {
76 gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
77 default-state = "on";
78 };
79 };
80};
81
82&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>;
98 };
99};
100
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};