blob: 3e40ae74f5e294b9635f703382a8a7bca346c416 [file] [log] [blame]
Hans de Goedef9554fb2014-10-01 16:25:37 +02001/*
2 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
3 *
4 * Hans de Goede <hdegoede@redhat.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 *
Maxime Ripard136d18a2014-10-17 11:38:23 +020011 * a) This file is free software; you can redistribute it and/or
Hans de Goedef9554fb2014-10-01 16:25:37 +020012 * 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 *
Maxime Ripard136d18a2014-10-17 11:38:23 +020016 * This file is distributed in the hope that it will be useful,
Hans de Goedef9554fb2014-10-01 16:25:37 +020017 * 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
Maxime Ripard136d18a2014-10-17 11:38:23 +020022 * License along with this file; if not, write to the Free
Hans de Goedef9554fb2014-10-01 16:25:37 +020023 * 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/;
Maxime Ripard71455702014-12-16 22:59:54 +010051#include "sun7i-a20.dtsi"
52#include "sunxi-common-regulators.dtsi"
Hans de Goedef9554fb2014-10-01 16:25:37 +020053
Maxime Ripardbca12922014-12-16 22:59:55 +010054#include <dt-bindings/gpio/gpio.h>
55
Hans de Goedef9554fb2014-10-01 16:25:37 +020056/ {
57 model = "Mele M3";
58 compatible = "mele,m3", "allwinner,sun7i-a20";
59
60 soc@01c00000 {
61 mmc0: mmc@01c0f000 {
62 pinctrl-names = "default";
63 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
64 vmmc-supply = <&reg_vcc3v3>;
65 bus-width = <4>;
Maxime Ripardbca12922014-12-16 22:59:55 +010066 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
Hans de Goedef9554fb2014-10-01 16:25:37 +020067 cd-inverted;
68 status = "okay";
69 };
70
71 mmc2: mmc@01c11000 {
72 pinctrl-names = "default";
73 pinctrl-0 = <&mmc2_pins_a>;
74 vmmc-supply = <&reg_vcc3v3>;
75 bus-width = <4>;
76 non-removable;
77 status = "okay";
78 };
79
80 usbphy: phy@01c13400 {
81 usb1_vbus-supply = <&reg_usb1_vbus>;
82 usb2_vbus-supply = <&reg_usb2_vbus>;
83 status = "okay";
84 };
85
86 ehci0: usb@01c14000 {
87 status = "okay";
88 };
89
90 ohci0: usb@01c14400 {
91 status = "okay";
92 };
93
94 ehci1: usb@01c1c000 {
95 status = "okay";
96 };
97
98 ohci1: usb@01c1c400 {
99 status = "okay";
100 };
101
102 pinctrl@01c20800 {
103 led_pins_m3: led_pins@0 {
104 allwinner,pins = "PH20";
105 allwinner,function = "gpio_out";
106 allwinner,drive = <0>;
107 allwinner,pull = <0>;
108 };
109 };
110
111 ir0: ir@01c21800 {
112 pinctrl-names = "default";
113 pinctrl-0 = <&ir0_pins_a>;
114 status = "okay";
115 };
116
117 uart0: serial@01c28000 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&uart0_pins_a>;
120 status = "okay";
121 };
122
123 i2c0: i2c@01c2ac00 {
124 pinctrl-names = "default";
125 pinctrl-0 = <&i2c0_pins_a>;
126 status = "okay";
127
128 axp209: pmic@34 {
129 compatible = "x-powers,axp209";
130 reg = <0x34>;
131 interrupt-parent = <&nmi_intc>;
132 interrupts = <0 8>;
133
134 interrupt-controller;
135 #interrupt-cells = <1>;
136 };
137 };
138
139 gmac: ethernet@01c50000 {
140 pinctrl-names = "default";
141 pinctrl-0 = <&gmac_pins_mii_a>;
142 phy = <&phy1>;
143 phy-mode = "mii";
144 status = "okay";
145
146 phy1: ethernet-phy@1 {
147 reg = <1>;
148 };
149 };
150 };
151
152 leds {
153 compatible = "gpio-leds";
154 pinctrl-names = "default";
155 pinctrl-0 = <&led_pins_m3>;
156
157 blue {
158 label = "m3:blue:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100159 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
Hans de Goedef9554fb2014-10-01 16:25:37 +0200160 };
161 };
162
163 reg_usb1_vbus: usb1-vbus {
164 status = "okay";
165 };
166
167 reg_usb2_vbus: usb2-vbus {
168 status = "okay";
169 };
170};