• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2016 - Stefan Mavrodiev <stefan.mavrodiev@gmail.com>
3 *                  Olimex LTD. <support@olimex.com>
4 *
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
9 *
10 *  a) This file is free software; you can redistribute it and/or
11 *     modify it under the terms of the GNU General Public License as
12 *     published by the Free Software Foundation; either version 2 of the
13 *     License, or (at your option) any later version.
14 *
15 *     This file is distributed in the hope that it will be useful,
16 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 *     GNU General Public License for more details.
19 *
20 * Or, alternatively,
21 *
22 *  b) Permission is hereby granted, free of charge, to any person
23 *     obtaining a copy of this software and associated documentation
24 *     files (the "Software"), to deal in the Software without
25 *     restriction, including without limitation the rights to use,
26 *     copy, modify, merge, publish, distribute, sublicense, and/or
27 *     sell copies of the Software, and to permit persons to whom the
28 *     Software is furnished to do so, subject to the following
29 *     conditions:
30 *
31 *     The above copyright notice and this permission notice shall be
32 *     included in all copies or substantial portions of the Software.
33 *
34 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 *     OTHER DEALINGS IN THE SOFTWARE.
42 */
43
44/dts-v1/;
45#include "sun8i-a33.dtsi"
46#include "sunxi-common-regulators.dtsi"
47
48#include <dt-bindings/gpio/gpio.h>
49#include <dt-bindings/input/input.h>
50
51/ {
52	model = "Olimex A33-OLinuXino";
53	compatible = "olimex,a33-olinuxino","allwinner,sun8i-a33";
54
55	aliases {
56		serial0 = &uart0;
57	};
58
59	chosen {
60		stdout-path = "serial0:115200n8";
61	};
62
63	leds {
64		compatible = "gpio-leds";
65		pinctrl-names = "default";
66		pinctrl-0 = <&led_pin_olinuxino>;
67
68		green {
69			label = "a33-olinuxino:green:usr";
70			gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
71		};
72	};
73};
74
75&ehci0 {
76	status = "okay";
77};
78
79&mmc0 {
80	pinctrl-names = "default";
81	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
82	vmmc-supply = <&reg_dcdc1>;
83	bus-width = <4>;
84	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
85	cd-inverted;
86	status = "okay";
87};
88
89&ohci0 {
90	status = "okay";
91};
92
93&pio {
94	led_pin_olinuxino: led_pins@0 {
95		pins = "PB7";
96		function = "gpio_out";
97	};
98
99	mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
100		pins = "PB4";
101		function = "gpio_in";
102	};
103
104	usb0_id_detect_pin: usb0_id_detect_pin@0 {
105		pins = "PB3";
106		function = "gpio_in";
107	};
108};
109
110&r_rsb {
111	status = "okay";
112
113	axp22x: pmic@3a3 {
114		compatible = "x-powers,axp223";
115		reg = <0x3a3>;
116		interrupt-parent = <&nmi_intc>;
117		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
118		eldoin-supply = <&reg_dcdc1>;
119		x-powers,drive-vbus-en;
120	};
121};
122
123#include "axp223.dtsi"
124
125&reg_aldo1 {
126	regulator-always-on;
127	regulator-min-microvolt = <3300000>;
128	regulator-max-microvolt = <3300000>;
129	regulator-name = "vcc-io";
130};
131
132&reg_aldo2 {
133	regulator-always-on;
134	regulator-min-microvolt = <2350000>;
135	regulator-max-microvolt = <2650000>;
136	regulator-name = "vdd-dll";
137};
138
139&reg_aldo3 {
140	regulator-always-on;
141	regulator-min-microvolt = <3300000>;
142	regulator-max-microvolt = <3300000>;
143	regulator-name = "vcc-avcc";
144};
145
146&reg_dc1sw {
147	regulator-name = "vcc-lcd";
148};
149
150&reg_dc5ldo {
151	regulator-always-on;
152	regulator-min-microvolt = <900000>;
153	regulator-max-microvolt = <1400000>;
154	regulator-name = "vdd-cpus";
155};
156
157&reg_dcdc1 {
158	regulator-always-on;
159	regulator-min-microvolt = <3300000>;
160	regulator-max-microvolt = <3300000>;
161	regulator-name = "vcc-3v3";
162};
163
164&reg_dcdc2 {
165	regulator-always-on;
166	regulator-min-microvolt = <900000>;
167	regulator-max-microvolt = <1400000>;
168	regulator-name = "vdd-sys";
169};
170
171&reg_dcdc3 {
172	regulator-always-on;
173	regulator-min-microvolt = <900000>;
174	regulator-max-microvolt = <1400000>;
175	regulator-name = "vdd-cpu";
176};
177
178&reg_dcdc5 {
179	regulator-always-on;
180	regulator-min-microvolt = <1500000>;
181	regulator-max-microvolt = <1500000>;
182	regulator-name = "vcc-dram";
183};
184
185&reg_drivevbus {
186	regulator-name = "usb0-vbus";
187	status = "okay";
188};
189
190&reg_rtc_ldo {
191	regulator-name = "vcc-rtc";
192};
193
194&simplefb_lcd {
195	vcc-lcd-supply = <&reg_dc1sw>;
196};
197
198&uart0 {
199	pinctrl-names = "default";
200	pinctrl-0 = <&uart0_pins_b>;
201	status = "okay";
202};
203
204&usb_otg {
205	dr_mode = "otg";
206	status = "okay";
207};
208
209&usb_power_supply {
210	status = "okay";
211};
212
213&usbphy {
214	pinctrl-names = "default";
215	pinctrl-0 = <&usb0_id_detect_pin>;
216	usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
217	usb0_vbus_power-supply = <&usb_power_supply>;
218	usb0_vbus-supply = <&reg_drivevbus>;
219	status = "okay";
220};
221