ARM: shmobile: koelsch: add Ether DT support
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / r8a7791-koelsch.dts
1 /*
2  * Device Tree Source for the Koelsch board
3  *
4  * Copyright (C) 2013 Renesas Electronics Corporation
5  * Copyright (C) 2013-2014 Renesas Solutions Corp.
6  * Copyright (C) 2014 Cogent Embedded, Inc.
7  *
8  * This file is licensed under the terms of the GNU General Public License
9  * version 2.  This program is licensed "as is" without any warranty of any
10  * kind, whether express or implied.
11  */
12
13 /dts-v1/;
14 #include "r8a7791.dtsi"
15 #include <dt-bindings/gpio/gpio.h>
16
17 / {
18         model = "Koelsch";
19         compatible = "renesas,koelsch", "renesas,r8a7791";
20
21         chosen {
22                 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
23         };
24
25         memory@40000000 {
26                 device_type = "memory";
27                 reg = <0 0x40000000 0 0x40000000>;
28         };
29
30         memory@200000000 {
31                 device_type = "memory";
32                 reg = <2 0x00000000 0 0x40000000>;
33         };
34
35         lbsc {
36                 #address-cells = <1>;
37                 #size-cells = <1>;
38         };
39
40         gpio-keys {
41                 compatible = "gpio-keys";
42
43                 key-a {
44                         gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
45                         linux,code = <30>;
46                         label = "SW30";
47                         gpio-key,wakeup;
48                         debounce-interval = <20>;
49                 };
50                 key-b {
51                         gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
52                         linux,code = <48>;
53                         label = "SW31";
54                         gpio-key,wakeup;
55                         debounce-interval = <20>;
56                 };
57                 key-c {
58                         gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
59                         linux,code = <46>;
60                         label = "SW32";
61                         gpio-key,wakeup;
62                         debounce-interval = <20>;
63                 };
64                 key-d {
65                         gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
66                         linux,code = <32>;
67                         label = "SW33";
68                         gpio-key,wakeup;
69                         debounce-interval = <20>;
70                 };
71                 key-e {
72                         gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
73                         linux,code = <18>;
74                         label = "SW34";
75                         gpio-key,wakeup;
76                         debounce-interval = <20>;
77                 };
78                 key-f {
79                         gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
80                         linux,code = <33>;
81                         label = "SW35";
82                         gpio-key,wakeup;
83                         debounce-interval = <20>;
84                 };
85                 key-g {
86                         gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
87                         linux,code = <34>;
88                         label = "SW36";
89                         gpio-key,wakeup;
90                         debounce-interval = <20>;
91                 };
92         };
93
94         leds {
95                 compatible = "gpio-leds";
96                 led6 {
97                         gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
98                 };
99                 led7 {
100                         gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
101                 };
102                 led8 {
103                         gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
104                 };
105         };
106 };
107
108 &extal_clk {
109         clock-frequency = <20000000>;
110 };
111
112 &i2c2 {
113         pinctrl-0 = <&i2c2_pins>;
114         pinctrl-names = "default";
115
116         status = "okay";
117         clock-frequency = <400000>;
118
119         eeprom@50 {
120                 compatible = "renesas,24c02";
121                 reg = <0x50>;
122                 pagesize = <16>;
123         };
124 };
125
126 &pfc {
127         pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
128         pinctrl-names = "default";
129
130         i2c2_pins: i2c {
131                 renesas,groups = "i2c2";
132                 renesas,function = "i2c2";
133         };
134
135         du_pins: du {
136                 renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0";
137                 renesas,function = "du";
138         };
139
140         scif0_pins: serial0 {
141                 renesas,groups = "scif0_data_d";
142                 renesas,function = "scif0";
143         };
144
145         scif1_pins: serial1 {
146                 renesas,groups = "scif1_data_d";
147                 renesas,function = "scif1";
148         };
149
150         ether_pins: ether {
151                 renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
152                 renesas,function = "eth";
153         };
154
155         phy1_pins: phy1 {
156                 renesas,groups = "intc_irq0";
157                 renesas,function = "intc";
158         };
159
160         qspi_pins: spi {
161                 renesas,groups = "qspi_ctrl", "qspi_data4";
162                 renesas,function = "qspi";
163         };
164 };
165
166 &ether {
167         pinctrl-0 = <&ether_pins &phy1_pins>;
168         pinctrl-names = "default";
169
170         phy-handle = <&phy1>;
171         renesas,ether-link-active-low;
172         status = "ok";
173
174         phy1: ethernet-phy@1 {
175                 reg = <1>;
176                 interrupt-parent = <&irqc0>;
177                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
178         };
179 };
180
181 &sata0 {
182         status = "okay";
183 };
184
185 &spi {
186         pinctrl-0 = <&qspi_pins>;
187         pinctrl-names = "default";
188
189         status = "okay";
190
191         flash: flash@0 {
192                 #address-cells = <1>;
193                 #size-cells = <1>;
194                 compatible = "spansion,s25fl512s";
195                 reg = <0>;
196                 spi-max-frequency = <30000000>;
197                 m25p,fast-read;
198
199                 partition@0 {
200                         label = "loader";
201                         reg = <0x00000000 0x00080000>;
202                         read-only;
203                 };
204                 partition@80000 {
205                         label = "bootenv";
206                         reg = <0x00080000 0x00080000>;
207                         read-only;
208                 };
209                 partition@100000 {
210                         label = "data";
211                         reg = <0x00100000 0x03f00000>;
212                 };
213         };
214 };