blob: 6592cb21e32c8d9c921ec2762a5aad777974a81f [file] [log] [blame]
Hans de Goededb325e82015-04-15 19:03:49 +02001/*
2 * This is based on sun4i-a10-olinuxino-lime.dts
3 *
4 * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
5 * Copyright (c) 2014 FUKAUMI Naoki <naobsd@gmail.com>
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
16 *
17 * This file is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public
23 * License along with this file; if not, write to the Free
24 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
25 * MA 02110-1301 USA
26 *
27 * Or, alternatively,
28 *
29 * b) Permission is hereby granted, free of charge, to any person
30 * obtaining a copy of this software and associated documentation
31 * files (the "Software"), to deal in the Software without
32 * restriction, including without limitation the rights to use,
33 * copy, modify, merge, publish, distribute, sublicense, and/or
34 * sell copies of the Software, and to permit persons to whom the
35 * Software is furnished to do so, subject to the following
36 * conditions:
37 *
38 * The above copyright notice and this permission notice shall be
39 * included in all copies or substantial portions of the Software.
40 *
41 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
42 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
43 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
44 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
45 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
46 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
47 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
48 * OTHER DEALINGS IN THE SOFTWARE.
49 */
50
51/dts-v1/;
52#include "sun7i-a20.dtsi"
53#include "sunxi-common-regulators.dtsi"
54
55#include <dt-bindings/gpio/gpio.h>
56#include <dt-bindings/interrupt-controller/irq.h>
57#include <dt-bindings/pinctrl/sun4i-a10.h>
58
59/ {
60 model = "Olimex A20-OLinuXino-LIME";
61 compatible = "olimex,a20-olinuxino-lime", "allwinner,sun7i-a20";
62
63 aliases {
64 serial0 = &uart0;
65 };
66
67 chosen {
68 stdout-path = "serial0:115200n8";
69 };
70
71 leds {
72 compatible = "gpio-leds";
73 pinctrl-names = "default";
74 pinctrl-0 = <&led_pins_olinuxinolime>;
75
76 green {
77 label = "a20-olinuxino-lime:green:usr";
78 gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
79 default-state = "on";
80 };
81 };
82};
83
84&ahci {
85 target-supply = <&reg_ahci_5v>;
86 status = "okay";
87};
88
89&ehci0 {
90 status = "okay";
91};
92
93&ehci1 {
94 status = "okay";
95};
96
97&gmac {
98 pinctrl-names = "default";
99 pinctrl-0 = <&gmac_pins_mii_a>;
100 phy = <&phy1>;
101 phy-mode = "mii";
102 status = "okay";
103
104 phy1: ethernet-phy@1 {
105 reg = <1>;
106 };
107};
108
109&i2c0 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&i2c0_pins_a>;
112 status = "okay";
113
114 axp209: pmic@34 {
115 compatible = "x-powers,axp209";
116 reg = <0x34>;
117 interrupt-parent = <&nmi_intc>;
118 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
119
120 interrupt-controller;
121 #interrupt-cells = <1>;
122 };
123};
124
125&mmc0 {
126 pinctrl-names = "default";
127 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
128 vmmc-supply = <&reg_vcc3v3>;
129 bus-width = <4>;
130 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
131 cd-inverted;
132 status = "okay";
133};
134
135&ohci0 {
136 status = "okay";
137};
138
139&ohci1 {
140 status = "okay";
141};
142
143&pio {
144 ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
145 allwinner,pins = "PC3";
146 allwinner,function = "gpio_out";
147 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
148 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
149 };
150
151 led_pins_olinuxinolime: led_pins@0 {
152 allwinner,pins = "PH2";
153 allwinner,function = "gpio_out";
154 allwinner,drive = <SUN4I_PINCTRL_20_MA>;
155 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
156 };
157};
158
159&reg_ahci_5v {
160 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
161 gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
162 status = "okay";
163};
164
165&reg_usb1_vbus {
166 status = "okay";
167};
168
169&reg_usb2_vbus {
170 status = "okay";
171};
172
173&uart0 {
174 pinctrl-names = "default";
175 pinctrl-0 = <&uart0_pins_a>;
176 status = "okay";
177};
178
179&usbphy {
180 usb1_vbus-supply = <&reg_usb1_vbus>;
181 usb2_vbus-supply = <&reg_usb2_vbus>;
182 status = "okay";
183};