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