GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / arm / boot / dts / bcm2835-rpi-zero-w.dts
1 /*
2  * Copyright (C) 2017 Stefan Wahren <stefan.wahren@i2se.com>
3  *
4  * The code contained herein is licensed under the GNU General Public
5  * License. You may obtain a copy of the GNU General Public License
6  * Version 2 or later at the following locations:
7  *
8  * http://www.opensource.org/licenses/gpl-license.html
9  * http://www.gnu.org/copyleft/gpl.html
10  */
11
12 /dts-v1/;
13 #include "bcm2835.dtsi"
14 #include "bcm2835-rpi.dtsi"
15 #include "bcm283x-rpi-usb-host.dtsi"
16
17 / {
18         compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
19         model = "Raspberry Pi Zero W";
20
21         chosen {
22                 /* 8250 auxiliary UART instead of pl011 */
23                 stdout-path = "serial1:115200n8";
24         };
25
26         leds {
27                 act {
28                         gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
29                 };
30         };
31
32         wifi_pwrseq: wifi-pwrseq {
33                 compatible = "mmc-pwrseq-simple";
34                 pinctrl-names = "default";
35                 pinctrl-0 = <&wl_on>;
36                 reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
37         };
38 };
39
40 &gpio {
41         /*
42          * This is based on the official GPU firmware DT blob.
43          *
44          * Legend:
45          * "NC" = not connected (no rail from the SoC)
46          * "FOO" = GPIO line named "FOO" on the schematic
47          * "FOO_N" = GPIO line named "FOO" on schematic, active low
48          */
49         gpio-line-names = "GPIO0",
50                           "GPIO1",
51                           "SDA1",
52                           "SCL1",
53                           "GPIO_GCLK",
54                           "GPIO5",
55                           "GPIO6",
56                           "SPI_CE1_N",
57                           "SPI_CE0_N",
58                           "SPI_MISO",
59                           "SPI_MOSI",
60                           "SPI_SCLK",
61                           "GPIO12",
62                           "GPIO13",
63                           /* Serial port */
64                           "TXD0",
65                           "RXD0",
66                           "GPIO16",
67                           "GPIO17",
68                           "GPIO18",
69                           "GPIO19",
70                           "GPIO20",
71                           "GPIO21",
72                           "GPIO22",
73                           "GPIO23",
74                           "GPIO24",
75                           "GPIO25",
76                           "GPIO26",
77                           "GPIO27",
78                           "SDA0",
79                           "SCL0",
80                           /* Used by BT module */
81                           "CTS0",
82                           "RTS0",
83                           "TXD0",
84                           "RXD0",
85                           /* Used by Wifi */
86                           "SD1_CLK",
87                           "SD1_CMD",
88                           "SD1_DATA0",
89                           "SD1_DATA1",
90                           "SD1_DATA2",
91                           "SD1_DATA3",
92                           "CAM_GPIO1", /* GPIO40 */
93                           "WL_ON", /* GPIO41 */
94                           "NC", /* GPIO42 */
95                           "WIFI_CLK", /* GPIO43 */
96                           "CAM_GPIO0", /* GPIO44 */
97                           "BT_ON", /* GPIO45 */
98                           "HDMI_HPD_N",
99                           "STATUS_LED_N",
100                           /* Used by SD Card */
101                           "SD_CLK_R",
102                           "SD_CMD_R",
103                           "SD_DATA0_R",
104                           "SD_DATA1_R",
105                           "SD_DATA2_R",
106                           "SD_DATA3_R";
107
108         pinctrl-0 = <&gpioout &alt0>;
109
110         wl_on: wl-on {
111                 brcm,pins = <41>;
112                 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
113         };
114 };
115
116 &hdmi {
117         hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
118 };
119
120 &sdhci {
121         #address-cells = <1>;
122         #size-cells = <0>;
123         pinctrl-names = "default";
124         pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
125         mmc-pwrseq = <&wifi_pwrseq>;
126         non-removable;
127         status = "okay";
128
129         brcmf: wifi@1 {
130                 reg = <1>;
131                 compatible = "brcm,bcm4329-fmac";
132         };
133 };
134
135 &uart0 {
136         pinctrl-names = "default";
137         pinctrl-0 = <&uart0_gpio14>;
138         status = "okay";
139 };