ARM: dts: kirkwood: set default pinctrl for SPI0
[cascardo/linux.git] / arch / arm / boot / dts / kirkwood-openblocks_a7.dts
1 /*
2  * Device Tree file for OpenBlocks A7 board
3  *
4  * Copyright (C) 2013 Free Electrons
5  *
6  * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7  *
8  * This file is licensed under the terms of the GNU General Public
9  * License version 2.  This program is licensed "as is" without any
10  * warranty of any kind, whether express or implied.
11  */
12
13 /dts-v1/;
14
15 #include "kirkwood.dtsi"
16 #include "kirkwood-6282.dtsi"
17
18 / {
19         model = "Plat'Home OpenBlocksA7";
20         compatible = "plathome,openblocks-a7", "marvell,kirkwood-88f6283", "marvell,kirkwood";
21
22         memory {
23                 device_type = "memory";
24                 reg = <0x00000000 0x40000000>; /* 1 GB */
25         };
26
27         chosen {
28                 bootargs = "console=ttyS0,115200n8 earlyprintk";
29                 stdout-path = &uart0;
30         };
31
32         ocp@f1000000 {
33                 serial@12000 {
34                         status = "okay";
35                 };
36
37                 serial@12100 {
38                         status = "okay";
39                 };
40
41                 sata@80000 {
42                         nr-ports = <1>;
43                         status = "okay";
44                 };
45
46                 i2c@11100 {
47                         status = "okay";
48                         pinctrl-0 = <&pmx_twsi1>;
49                         pinctrl-names = "default";
50
51                         s24c02: s24c02@50 {
52                                 compatible = "24c02";
53                                 reg = <0x50>;
54                         };
55                 };
56
57                 pinctrl: pin-controller@10000 {
58                         pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>;
59                         pinctrl-names = "default";
60
61                         pmx_uart0: pmx-uart0 {
62                                 marvell,pins = "mpp10", "mpp11", "mpp15",
63                                         "mpp16";
64                                 marvell,function = "uart0";
65                         };
66
67                         pmx_uart1: pmx-uart1 {
68                                 marvell,pins = "mpp13", "mpp14", "mpp8",
69                                         "mpp9";
70                                 marvell,function = "uart1";
71                         };
72
73                         pmx_sysrst: pmx-sysrst {
74                                 marvell,pins = "mpp6";
75                                 marvell,function = "sysrst";
76                         };
77
78                         pmx_dip_switches: pmx-dip-switches {
79                                 marvell,pins = "mpp44", "mpp45", "mpp46", "mpp47";
80                                 marvell,function = "gpio";
81                         };
82
83                         /*
84                          * Accessible on connector J202. The MPP
85                          * listed below are pin 1-7, pin 8 is unused,
86                          * pin 9 is external reset input and pin 10 is
87                          * ground.
88                          */
89                         pmx_gpio_header: pmx-gpio-header {
90                                 marvell,pins = "mpp17", "mpp7", "mpp29", "mpp28",
91                                                "mpp35", "mpp34", "mpp40";
92                                 marvell,function = "gpio";
93                         };
94
95                         pmx_gpio_init: pmx-init {
96                                 marvell,pins = "mpp38";
97                                 marvell,function = "gpio";
98                         };
99
100                         pmx_usb_oc: pmx-usb-oc {
101                                 marvell,pins = "mpp39";
102                                 marvell,function = "gpio";
103                         };
104
105                         pmx_leds: pmx-leds {
106                                 marvell,pins = "mpp41", "mpp42", "mpp43";
107                                 marvell,function = "gpio";
108                         };
109                 };
110         };
111
112         gpio-leds {
113                 compatible = "gpio-leds";
114                 pinctrl-0 = <&pmx_leds>;
115                 pinctrl-names = "default";
116
117                 led-red {
118                         label = "obsa7:red:stat";
119                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
120                 };
121
122                 led-green {
123                         label = "obsa7:green:stat";
124                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
125                 };
126
127                 led-yellow {
128                         label = "obsa7:yellow:stat";
129                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
130                 };
131         };
132
133         gpio_keys {
134                 compatible = "gpio-keys";
135                 pinctrl-0 = <&pmx_gpio_init>;
136                 pinctrl-names = "default";
137                 #address-cells = <1>;
138                 #size-cells = <0>;
139
140                 button@1 {
141                         label = "Init Button";
142                         linux,code = <KEY_POWER>;
143                         gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
144                 };
145         };
146 };
147
148 &nand {
149         chip-delay = <25>;
150         status = "okay";
151         pinctrl-0 = <&pmx_nand>;
152         pinctrl-names = "default";
153
154         partition@0 {
155                 label = "uboot";
156                 reg = <0x0 0x1c0000>;
157         };
158
159         partition@1c0000 {
160                 label = "env";
161                 reg = <0x1c0000 0x2c0000>;
162         };
163
164         partition@480000 {
165                 label = "test";
166                 reg = <0x480000 0x160000>;
167         };
168
169         partition@5e0000 {
170                 label = "conf";
171                 reg = <0x5e0000 0x540000>;
172         };
173
174         partition@b20000 {
175                 label = "linux";
176                 reg = <0xb20000 0x3d40000>;
177         };
178
179         partition@4860000 {
180                 label = "user";
181                 reg = <0x4860000 0xb7a0000>;
182         };
183 };
184
185 &mdio {
186         status = "okay";
187
188         ethphy0: ethernet-phy@0 {
189                 reg = <0>;
190         };
191
192         ethphy1: ethernet-phy@1 {
193                 reg = <1>;
194         };
195 };
196
197 &eth0 {
198         status = "okay";
199         ethernet0-port@0 {
200                 phy-handle = <&ethphy0>;
201         };
202 };
203
204 &eth1 {
205         status = "okay";
206         ethernet1-port@0 {
207                 phy-handle = <&ethphy1>;
208         };
209 };