blob: 673846245cd9053ba2fd4921d1043bf8d699c822 [file] [log] [blame]
Oliver Schinagl01ed6632013-10-08 10:22:32 +02001/*
2 * Copyright 2013 Oliver Schinagl
3 *
4 * Oliver Schinagl <oliver@schinagl.nl>
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
9 *
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
12 */
13
14/dts-v1/;
Maxime Ripard71455702014-12-16 22:59:54 +010015#include "sun7i-a20.dtsi"
16#include "sunxi-common-regulators.dtsi"
Oliver Schinagl01ed6632013-10-08 10:22:32 +020017
Maxime Ripardbca12922014-12-16 22:59:55 +010018#include <dt-bindings/gpio/gpio.h>
Maxime Ripard092a0c32014-12-16 22:59:57 +010019#include <dt-bindings/pinctrl/sun4i-a10.h>
Maxime Ripardbca12922014-12-16 22:59:55 +010020
Oliver Schinagl01ed6632013-10-08 10:22:32 +020021/ {
22 model = "Cubietech Cubietruck";
23 compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
24
25 soc@01c00000 {
Hans de Goedec6211832014-05-02 17:57:28 +020026 mmc0: mmc@01c0f000 {
27 pinctrl-names = "default";
28 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
Hans de Goede0ed9eab2014-05-11 09:46:57 +020029 vmmc-supply = <&reg_vcc3v3>;
Hans de Goedec6211832014-05-02 17:57:28 +020030 bus-width = <4>;
Maxime Ripardbca12922014-12-16 22:59:55 +010031 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
Hans de Goedec6211832014-05-02 17:57:28 +020032 cd-inverted;
33 status = "okay";
34 };
35
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020036 mmc3: mmc@01c12000 {
37 pinctrl-names = "default";
38 pinctrl-0 = <&mmc3_pins_a>;
39 vmmc-supply = <&reg_vmmc3>;
Hans de Goedec5b72612014-05-21 19:43:30 +020040 bus-width = <4>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020041 non-removable;
42 status = "okay";
43 };
44
Hans de Goedea415eef2014-03-01 20:26:34 +010045 usbphy: phy@01c13400 {
Roman Byshkoa7679b62014-11-10 19:55:10 +010046 usb0_vbus-supply = <&reg_usb0_vbus>;
Hans de Goedea415eef2014-03-01 20:26:34 +010047 usb1_vbus-supply = <&reg_usb1_vbus>;
48 usb2_vbus-supply = <&reg_usb2_vbus>;
49 status = "okay";
50 };
51
52 ehci0: usb@01c14000 {
53 status = "okay";
54 };
55
56 ohci0: usb@01c14400 {
57 status = "okay";
58 };
59
Hans de Goede902febf2014-03-01 20:26:22 +010060 ahci: sata@01c18000 {
61 target-supply = <&reg_ahci_5v>;
62 status = "okay";
63 };
64
Hans de Goedea415eef2014-03-01 20:26:34 +010065 ehci1: usb@01c1c000 {
66 status = "okay";
67 };
68
69 ohci1: usb@01c1c400 {
70 status = "okay";
71 };
72
Oliver Schinagl01ed6632013-10-08 10:22:32 +020073 pinctrl@01c20800 {
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020074 mmc3_pins_a: mmc3@0 {
75 /* AP6210 requires pull-up */
Maxime Ripard092a0c32014-12-16 22:59:57 +010076 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020077 };
78
79 vmmc3_pin_cubietruck: vmmc3_pin@0 {
80 allwinner,pins = "PH9";
81 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010082 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
83 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +020084 };
85
Hans de Goede902febf2014-03-01 20:26:22 +010086 ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
87 allwinner,pins = "PH12";
88 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010089 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
90 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Hans de Goede902febf2014-03-01 20:26:22 +010091 };
92
Oliver Schinagl01ed6632013-10-08 10:22:32 +020093 led_pins_cubietruck: led_pins@0 {
94 allwinner,pins = "PH7", "PH11", "PH20", "PH21";
95 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010096 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
97 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +020098 };
Roman Byshko9eb1e272014-11-10 19:55:09 +010099
100 usb0_vbus_pin_a: usb0_vbus_pin@0 {
101 allwinner,pins = "PH17";
102 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +0100103 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
104 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Roman Byshko9eb1e272014-11-10 19:55:09 +0100105 };
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200106 };
107
Alexandre Belloni96ac3b32014-04-28 18:17:14 +0200108 pwm: pwm@01c20e00 {
109 pinctrl-names = "default";
110 pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>;
111 status = "okay";
112 };
113
Alexander Bersenev02564522014-06-09 00:08:13 +0600114 ir0: ir@01c21800 {
115 pinctrl-names = "default";
116 pinctrl-0 = <&ir0_pins_a>;
117 status = "okay";
118 };
119
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200120 uart0: serial@01c28000 {
121 pinctrl-names = "default";
122 pinctrl-0 = <&uart0_pins_a>;
123 status = "okay";
124 };
Chen-Yu Tsai62673552014-01-06 13:58:12 +0800125
126 i2c0: i2c@01c2ac00 {
127 pinctrl-names = "default";
128 pinctrl-0 = <&i2c0_pins_a>;
129 status = "okay";
Carlo Caioneec0c9332014-06-30 23:57:53 +0200130
131 axp209: pmic@34 {
132 compatible = "x-powers,axp209";
133 reg = <0x34>;
134 interrupt-parent = <&nmi_intc>;
135 interrupts = <0 8>;
136
137 interrupt-controller;
138 #interrupt-cells = <1>;
139 };
Chen-Yu Tsai62673552014-01-06 13:58:12 +0800140 };
141
142 i2c1: i2c@01c2b000 {
143 pinctrl-names = "default";
144 pinctrl-0 = <&i2c1_pins_a>;
145 status = "okay";
146 };
147
148 i2c2: i2c@01c2b400 {
149 pinctrl-names = "default";
150 pinctrl-0 = <&i2c2_pins_a>;
151 status = "okay";
152 };
Chen-Yu Tsai67073d92014-02-10 18:35:51 +0800153
154 gmac: ethernet@01c50000 {
155 pinctrl-names = "default";
156 pinctrl-0 = <&gmac_pins_rgmii_a>;
157 phy = <&phy1>;
158 phy-mode = "rgmii";
159 status = "okay";
160
161 phy1: ethernet-phy@1 {
162 reg = <1>;
163 };
164 };
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200165 };
166
167 leds {
168 compatible = "gpio-leds";
169 pinctrl-names = "default";
170 pinctrl-0 = <&led_pins_cubietruck>;
171
172 blue {
173 label = "cubietruck:blue:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100174 gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200175 };
176
177 orange {
178 label = "cubietruck:orange:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100179 gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200180 };
181
182 white {
183 label = "cubietruck:white:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100184 gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200185 };
186
187 green {
188 label = "cubietruck:green:usr";
Maxime Ripardbca12922014-12-16 22:59:55 +0100189 gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200190 };
191 };
Hans de Goede902febf2014-03-01 20:26:22 +0100192
193 reg_ahci_5v: ahci-5v {
194 pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
Maxime Ripardbca12922014-12-16 22:59:55 +0100195 gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
Hans de Goede902febf2014-03-01 20:26:22 +0100196 status = "okay";
197 };
Hans de Goedea415eef2014-03-01 20:26:34 +0100198
Roman Byshko9eb1e272014-11-10 19:55:09 +0100199 reg_usb0_vbus: usb0-vbus {
200 pinctrl-0 = <&usb0_vbus_pin_a>;
Maxime Ripardbca12922014-12-16 22:59:55 +0100201 gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>;
Roman Byshko9eb1e272014-11-10 19:55:09 +0100202 status = "okay";
203 };
204
Hans de Goedea415eef2014-03-01 20:26:34 +0100205 reg_usb1_vbus: usb1-vbus {
206 status = "okay";
207 };
208
209 reg_usb2_vbus: usb2-vbus {
210 status = "okay";
211 };
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +0200212
213 reg_vmmc3: vmmc3 {
214 compatible = "regulator-fixed";
215 pinctrl-names = "default";
216 pinctrl-0 = <&vmmc3_pin_cubietruck>;
217 regulator-name = "vmmc3";
218 regulator-min-microvolt = <3300000>;
219 regulator-max-microvolt = <3300000>;
220 enable-active-high;
Maxime Ripardbca12922014-12-16 22:59:55 +0100221 gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
Chen-Yu Tsai3906c0a2014-05-02 17:57:29 +0200222 };
Oliver Schinagl01ed6632013-10-08 10:22:32 +0200223};