Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[sfrench/cifs-2.6.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         /* Needed by firmware to properly init UARTs */
22         aliases {
23                 uart0 = "/soc/serial@7e201000";
24                 uart1 = "/soc/serial@7e215040";
25                 serial0 = "/soc/serial@7e201000";
26                 serial1 = "/soc/serial@7e215040";
27         };
28
29         leds {
30                 act {
31                         gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
32                 };
33         };
34
35         wifi_pwrseq: wifi-pwrseq {
36                 compatible = "mmc-pwrseq-simple";
37                 pinctrl-names = "default";
38                 pinctrl-0 = <&wl_on>;
39                 reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
40         };
41 };
42
43 &gpio {
44         /*
45          * This is based on the official GPU firmware DT blob.
46          *
47          * Legend:
48          * "NC" = not connected (no rail from the SoC)
49          * "FOO" = GPIO line named "FOO" on the schematic
50          * "FOO_N" = GPIO line named "FOO" on schematic, active low
51          */
52         gpio-line-names = "GPIO0",
53                           "GPIO1",
54                           "SDA1",
55                           "SCL1",
56                           "GPIO_GCLK",
57                           "GPIO5",
58                           "GPIO6",
59                           "SPI_CE1_N",
60                           "SPI_CE0_N",
61                           "SPI_MISO",
62                           "SPI_MOSI",
63                           "SPI_SCLK",
64                           "GPIO12",
65                           "GPIO13",
66                           /* Serial port */
67                           "TXD0",
68                           "RXD0",
69                           "GPIO16",
70                           "GPIO17",
71                           "GPIO18",
72                           "GPIO19",
73                           "GPIO20",
74                           "GPIO21",
75                           "GPIO22",
76                           "GPIO23",
77                           "GPIO24",
78                           "GPIO25",
79                           "GPIO26",
80                           "GPIO27",
81                           "SDA0",
82                           "SCL0",
83                           "NC", /* GPIO30 */
84                           "NC", /* GPIO31 */
85                           "NC", /* GPIO32 */
86                           "NC", /* GPIO33 */
87                           "NC", /* GPIO34 */
88                           "NC", /* GPIO35 */
89                           "NC", /* GPIO36 */
90                           "NC", /* GPIO37 */
91                           "NC", /* GPIO38 */
92                           "NC", /* GPIO39 */
93                           "CAM_GPIO1", /* GPIO40 */
94                           "WL_ON", /* GPIO41 */
95                           "NC", /* GPIO42 */
96                           "WIFI_CLK", /* GPIO43 */
97                           "CAM_GPIO0", /* GPIO44 */
98                           "BT_ON", /* GPIO45 */
99                           "HDMI_HPD_N",
100                           "STATUS_LED_N",
101                           /* Used by SD Card */
102                           "SD_CLK_R",
103                           "SD_CMD_R",
104                           "SD_DATA0_R",
105                           "SD_DATA1_R",
106                           "SD_DATA2_R",
107                           "SD_DATA3_R";
108
109         pinctrl-0 = <&gpioout &alt0>;
110
111         wl_on: wl-on {
112                 brcm,pins = <41>;
113                 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
114         };
115 };
116
117 &hdmi {
118         hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
119 };
120
121 &sdhci {
122         #address-cells = <1>;
123         #size-cells = <0>;
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 };