dts: 2712: Update for device tree
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / broadcom / bcm2708-rpi-zero-w.dts
1 /dts-v1/;
2
3 #include "bcm2708.dtsi"
4 #include "bcm2708-rpi.dtsi"
5 #include "bcm283x-rpi-csi1-2lane.dtsi"
6 #include "bcm283x-rpi-i2c0mux_0_28.dtsi"
7 #include "bcm2708-rpi-bt.dtsi"
8 #include "bcm283x-rpi-led-deprecated.dtsi"
9
10 / {
11         compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
12         model = "Raspberry Pi Zero W";
13
14         chosen {
15                 bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0";
16         };
17
18         aliases {
19                 serial0 = &uart1;
20                 serial1 = &uart0;
21                 mmc1 = &mmcnr;
22         };
23 };
24
25 &gpio {
26         /*
27          * This is based on the official GPU firmware DT blob.
28          *
29          * Legend:
30          * "NC" = not connected (no rail from the SoC)
31          * "FOO" = GPIO line named "FOO" on the schematic
32          * "FOO_N" = GPIO line named "FOO" on schematic, active low
33          */
34         gpio-line-names = "ID_SDA",
35                           "ID_SCL",
36                           "SDA1",
37                           "SCL1",
38                           "GPIO_GCLK",
39                           "GPIO5",
40                           "GPIO6",
41                           "SPI_CE1_N",
42                           "SPI_CE0_N",
43                           "SPI_MISO",
44                           "SPI_MOSI",
45                           "SPI_SCLK",
46                           "GPIO12",
47                           "GPIO13",
48                           /* Serial port */
49                           "TXD1",
50                           "RXD1",
51                           "GPIO16",
52                           "GPIO17",
53                           "GPIO18",
54                           "GPIO19",
55                           "GPIO20",
56                           "GPIO21",
57                           "GPIO22",
58                           "GPIO23",
59                           "GPIO24",
60                           "GPIO25",
61                           "GPIO26",
62                           "GPIO27",
63                           "SDA0",
64                           "SCL0",
65                           /* Used by BT module */
66                           "CTS0",
67                           "RTS0",
68                           "TXD0",
69                           "RXD0",
70                           /* Used by Wifi */
71                           "SD1_CLK",
72                           "SD1_CMD",
73                           "SD1_DATA0",
74                           "SD1_DATA1",
75                           "SD1_DATA2",
76                           "SD1_DATA3",
77                           "CAM_GPIO1", /* GPIO40 */
78                           "WL_ON", /* GPIO41 */
79                           "NC", /* GPIO42 */
80                           "WIFI_CLK", /* GPIO43 */
81                           "CAM_GPIO0", /* GPIO44 */
82                           "BT_ON", /* GPIO45 */
83                           "HDMI_HPD_N",
84                           "STATUS_LED_N",
85                           /* Used by SD Card */
86                           "SD_CLK_R",
87                           "SD_CMD_R",
88                           "SD_DATA0_R",
89                           "SD_DATA1_R",
90                           "SD_DATA2_R",
91                           "SD_DATA3_R";
92
93         spi0_pins: spi0_pins {
94                 brcm,pins = <9 10 11>;
95                 brcm,function = <4>; /* alt0 */
96         };
97
98         spi0_cs_pins: spi0_cs_pins {
99                 brcm,pins = <8 7>;
100                 brcm,function = <1>; /* output */
101         };
102
103         i2c0_pins: i2c0 {
104                 brcm,pins = <0 1>;
105                 brcm,function = <4>;
106         };
107
108         i2c1_pins: i2c1 {
109                 brcm,pins = <2 3>;
110                 brcm,function = <4>;
111         };
112
113         i2s_pins: i2s {
114                 brcm,pins = <18 19 20 21>;
115                 brcm,function = <4>; /* alt0 */
116         };
117
118         sdio_pins: sdio_pins {
119                 brcm,pins = <34 35 36 37 38 39>;
120                 brcm,function = <7>; /* ALT3 = SD1 */
121                 brcm,pull = <0 2 2 2 2 2>;
122         };
123
124         bt_pins: bt_pins {
125                 brcm,pins = <43>;
126                 brcm,function = <4>; /* alt0:GPCLK2 */
127                 brcm,pull = <0>; /* none */
128         };
129
130         uart0_pins: uart0_pins {
131                 brcm,pins = <30 31 32 33>;
132                 brcm,function = <7>; /* alt3=UART0 */
133                 brcm,pull = <2 0 0 2>; /* up none none up */
134         };
135
136         uart1_pins: uart1_pins {
137                 brcm,pins;
138                 brcm,function;
139                 brcm,pull;
140         };
141
142         uart1_bt_pins: uart1_bt_pins {
143                 brcm,pins = <32 33 30 31>;
144                 brcm,function = <BCM2835_FSEL_ALT5>; /* alt5=UART1 */
145                 brcm,pull = <0 2 2 0>;
146         };
147
148         audio_pins: audio_pins {
149                 brcm,pins = <>;
150                 brcm,function = <>;
151         };
152 };
153
154 &mmcnr {
155         pinctrl-names = "default";
156         pinctrl-0 = <&sdio_pins>;
157         bus-width = <4>;
158         status = "okay";
159         #address-cells = <1>;
160         #size-cells = <0>;
161
162         brcmf: wifi@1 {
163                 reg = <1>;
164                 compatible = "brcm,bcm4329-fmac";
165         };
166 };
167
168 &uart0 {
169         pinctrl-names = "default";
170         pinctrl-0 = <&uart0_pins &bt_pins>;
171         status = "okay";
172 };
173
174 &uart1 {
175         pinctrl-names = "default";
176         pinctrl-0 = <&uart1_pins>;
177         status = "okay";
178 };
179
180 &spi0 {
181         pinctrl-names = "default";
182         pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
183         cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
184
185         spidev0: spidev@0{
186                 compatible = "spidev";
187                 reg = <0>;      /* CE0 */
188                 #address-cells = <1>;
189                 #size-cells = <0>;
190                 spi-max-frequency = <125000000>;
191         };
192
193         spidev1: spidev@1{
194                 compatible = "spidev";
195                 reg = <1>;      /* CE1 */
196                 #address-cells = <1>;
197                 #size-cells = <0>;
198                 spi-max-frequency = <125000000>;
199         };
200 };
201
202 &i2c0if {
203         clock-frequency = <100000>;
204 };
205
206 &i2c1 {
207         pinctrl-names = "default";
208         pinctrl-0 = <&i2c1_pins>;
209         clock-frequency = <100000>;
210 };
211
212 &i2c2 {
213         clock-frequency = <100000>;
214 };
215
216 &i2s {
217         pinctrl-names = "default";
218         pinctrl-0 = <&i2s_pins>;
219 };
220
221 &led_act {
222         gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
223         default-state = "off";
224         linux,default-trigger = "actpwr";
225 };
226
227 &hdmi {
228         hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
229 };
230
231 &vchiq {
232         pinctrl-names = "default";
233         pinctrl-0 = <&audio_pins>;
234 };
235
236 &cam1_reg {
237         gpio = <&gpio 44 GPIO_ACTIVE_HIGH>;
238 };
239
240 cam0_reg: &cam_dummy_reg {
241 };
242
243 i2c_arm: &i2c1 {};
244 i2c_vc: &i2c0 {};
245 i2c_csi_dsi0: &i2c0 {};
246
247 / {
248         __overrides__ {
249                 audio = <&chosen>,"bootargs{on='snd_bcm2835.enable_hdmi=1',off='snd_bcm2835.enable_hdmi=0'}";
250
251                 act_led_gpio = <&led_act>,"gpios:4";
252                 act_led_activelow = <&led_act>,"gpios:8";
253                 act_led_trigger = <&led_act>,"linux,default-trigger";
254         };
255 };