Linux-libre 4.10.7-gnu
[librecmc/linux-libre.git] / arch / arm / boot / dts / bcm4708-smartrg-sr400ac.dts
1 /*
2  * Broadcom BCM470X / BCM5301X arm platform code.
3  * DTS for SmartRG SR400ac
4  *
5  * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
6  *
7  * Licensed under the GNU/GPL. See COPYING for details.
8  */
9
10 /dts-v1/;
11
12 #include "bcm4708.dtsi"
13 #include "bcm5301x-nand-cs0-bch8.dtsi"
14
15 / {
16         compatible = "smartrg,sr400ac", "brcm,bcm4708";
17         model = "SmartRG SR400ac";
18
19         chosen {
20                 bootargs = "console=ttyS0,115200 earlycon";
21         };
22
23         memory {
24                 reg = <0x00000000 0x08000000>;
25         };
26
27         leds {
28                 compatible = "gpio-leds";
29
30                 power-white {
31                         label = "bcm53xx:white:power";
32                         gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>;
33                         linux,default-trigger = "default-on";
34                 };
35
36                 power-amber {
37                         label = "bcm53xx:amber:power";
38                         gpios = <&chipcommon 2 GPIO_ACTIVE_HIGH>;
39                         linux,default-trigger = "default-off";
40                 };
41
42                 usb2 {
43                         label = "bcm53xx:white:usb2";
44                         gpios = <&chipcommon 3 GPIO_ACTIVE_HIGH>;
45                         linux,default-trigger = "default-off";
46                 };
47
48                 usb3-white {
49                         label = "bcm53xx:white:usb3";
50                         gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
51                         linux,default-trigger = "default-off";
52                 };
53
54                 usb3-green {
55                         label = "bcm53xx:green:usb3";
56                         gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
57                         linux,default-trigger = "default-off";
58                 };
59
60                 wps {
61                         label = "bcm53xx:white:wps";
62                         gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
63                         linux,default-trigger = "default-off";
64                 };
65
66                 status-red {
67                         label = "bcm53xx:red:status";
68                         gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
69                         linux,default-trigger = "default-off";
70                 };
71
72                 status-green {
73                         label = "bcm53xx:green:status";
74                         gpios = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
75                         linux,default-trigger = "default-off";
76                 };
77
78                 status-blue {
79                         label = "bcm53xx:blue:status";
80                         gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
81                         linux,default-trigger = "default-off";
82                 };
83
84                 wan-white {
85                         label = "bcm53xx:white:wan";
86                         gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
87                         linux,default-trigger = "default-off";
88                 };
89
90                 wan-red {
91                         label = "bcm53xx:red:wan";
92                         gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
93                         linux,default-trigger = "default-off";
94                 };
95         };
96
97         gpio-keys {
98                 compatible = "gpio-keys";
99                 #address-cells = <1>;
100                 #size-cells = <0>;
101
102                 rfkill {
103                         label = "WiFi";
104                         linux,code = <KEY_RFKILL>;
105                         gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
106                 };
107
108                 wps {
109                         label = "WPS";
110                         linux,code = <KEY_WPS_BUTTON>;
111                         gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
112                 };
113
114                 restart {
115                         label = "Reset";
116                         linux,code = <KEY_RESTART>;
117                         gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
118                 };
119         };
120 };
121
122 &uart0 {
123         status = "okay";
124 };
125
126 &spi_nor {
127         status = "okay";
128 };
129
130 &srab {
131         status = "okay";
132
133         ports {
134                 #address-cells = <1>;
135                 #size-cells = <0>;
136
137                 port@0 {
138                         reg = <0>;
139                         label = "lan4";
140                 };
141
142                 port@1 {
143                         reg = <1>;
144                         label = "lan3";
145                 };
146
147                 port@2 {
148                         reg = <2>;
149                         label = "lan2";
150                 };
151
152                 port@3 {
153                         reg = <3>;
154                         label = "lan1";
155                 };
156
157                 port@4 {
158                         reg = <4>;
159                         label = "wan";
160                 };
161
162                 port@5 {
163                         reg = <5>;
164                         label = "cpu";
165                         ethernet = <&gmac0>;
166                 };
167         };
168 };