ARM: dts: sun9i: Enable mmc2 on A80 Optimus Board
[deliverable/linux.git] / arch / arm / boot / dts / sun9i-a80-optimus.dts
1 /*
2 * Copyright 2014 Chen-Yu Tsai
3 *
4 * Chen-Yu Tsai <wens@csie.org>
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 "sun9i-a80.dtsi"
52 #include "sunxi-common-regulators.dtsi"
53
54 #include <dt-bindings/gpio/gpio.h>
55 #include <dt-bindings/pinctrl/sun4i-a10.h>
56
57 / {
58 model = "Merrii A80 Optimus Board";
59 compatible = "merrii,a80-optimus", "allwinner,sun9i-a80";
60
61 chosen {
62 bootargs = "earlyprintk console=ttyS0,115200";
63 };
64
65 leds {
66 compatible = "gpio-leds";
67 pinctrl-names = "default";
68 pinctrl-0 = <&led_pins_optimus>;
69
70 /* The LED names match those found on the board */
71
72 led2 {
73 label = "optimus:led2:usr";
74 gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
75 };
76
77 /* led3 is on PM15, in R_PIO */
78
79 led4 {
80 label = "optimus:led4:usr";
81 gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>;
82 };
83 };
84 };
85
86 &i2c3 {
87 pinctrl-names = "default";
88 pinctrl-0 = <&i2c3_pins_a>;
89 status = "okay";
90 };
91
92 &i2c3_pins_a {
93 /* Enable internal pull-up */
94 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
95 };
96
97 &pio {
98 led_pins_optimus: led-pins@0 {
99 allwinner,pins = "PH0", "PH1";
100 allwinner,function = "gpio_out";
101 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
102 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
103 };
104
105 mmc0_cd_pin_optimus: mmc0_cd_pin@0 {
106 allwinner,pins = "PH18";
107 allwinner,function = "gpio_in";
108 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
109 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
110 };
111 };
112
113 &mmc0 {
114 pinctrl-names = "default";
115 pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin_optimus>;
116 vmmc-supply = <&reg_vcc3v0>;
117 bus-width = <4>;
118 cd-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH8 */
119 cd-inverted;
120 status = "okay";
121 };
122
123 &mmc2 {
124 pinctrl-names = "default";
125 pinctrl-0 = <&mmc2_8bit_pins>;
126 vmmc-supply = <&reg_vcc3v0>;
127 bus-width = <8>;
128 non-removable;
129 status = "okay";
130 };
131
132 &uart0 {
133 pinctrl-names = "default";
134 pinctrl-0 = <&uart0_pins_a>;
135 status = "okay";
136 };
137
138 &uart4 {
139 pinctrl-names = "default";
140 pinctrl-0 = <&uart4_pins_a>;
141 status = "okay";
142 };
143
144 &uart4_pins_a {
145 /* Enable internal pull-up */
146 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
147 };
This page took 0.032906 seconds and 5 git commands to generate.