GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm / boot / dts / bcm2837-rpi-zero-2-w.dts
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2022 Stefan Wahren <stefan.wahren@i2se.com>
4  */
5
6 /dts-v1/;
7 #include "bcm2837.dtsi"
8 #include "bcm2836-rpi.dtsi"
9 #include "bcm283x-rpi-usb-otg.dtsi"
10 #include "bcm283x-rpi-wifi-bt.dtsi"
11
12 / {
13         compatible = "raspberrypi,model-zero-2-w", "brcm,bcm2837";
14         model = "Raspberry Pi Zero 2 W";
15
16         memory@0 {
17                 device_type = "memory";
18                 reg = <0 0x20000000>;
19         };
20
21         chosen {
22                 /* 8250 auxiliary UART instead of pl011 */
23                 stdout-path = "serial1:115200n8";
24         };
25
26         leds {
27                 led-act {
28                         gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
29                 };
30         };
31 };
32
33 &bt {
34         shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
35 };
36
37 &gpio {
38         /*
39          * This is based on the official GPU firmware DT blob.
40          *
41          * Legend:
42          * "NC" = not connected (no rail from the SoC)
43          * "FOO" = GPIO line named "FOO" on the schematic
44          * "FOO_N" = GPIO line named "FOO" on schematic, active low
45          */
46         gpio-line-names = "ID_SDA",
47                           "ID_SCL",
48                           "SDA1",
49                           "SCL1",
50                           "GPIO_GCLK",
51                           "GPIO5",
52                           "GPIO6",
53                           "SPI_CE1_N",
54                           "SPI_CE0_N",
55                           "SPI_MISO",
56                           "SPI_MOSI",
57                           "SPI_SCLK",
58                           "GPIO12",
59                           "GPIO13",
60                           /* Serial port */
61                           "TXD0",
62                           "RXD0",
63                           "GPIO16",
64                           "GPIO17",
65                           "GPIO18",
66                           "GPIO19",
67                           "GPIO20",
68                           "GPIO21",
69                           "GPIO22",
70                           "GPIO23",
71                           "GPIO24",
72                           "GPIO25",
73                           "GPIO26",
74                           "GPIO27",
75                           "HDMI_HPD_N",
76                           "STATUS_LED_N",
77                           "NC", /* GPIO30 */
78                           "NC", /* GPIO31 */
79                           "NC", /* GPIO32 */
80                           "NC", /* GPIO33 */
81                           "NC", /* GPIO34 */
82                           "NC", /* GPIO35 */
83                           "NC", /* GPIO36 */
84                           "NC", /* GPIO37 */
85                           "NC", /* GPIO38 */
86                           "NC", /* GPIO39 */
87                           "CAM_GPIO0", /* GPIO40 */
88                           "WL_ON", /* GPIO41 */
89                           "BT_ON", /* GPIO42 */
90                           "WIFI_CLK", /* GPIO43 */
91                           "SDA0", /* GPIO44 */
92                           "SCL0", /* GPIO45 */
93                           "SMPS_SCL",
94                           "SMPS_SDA",
95                           /* Used by SD Card */
96                           "SD_CLK_R",
97                           "SD_CMD_R",
98                           "SD_DATA0_R",
99                           "SD_DATA1_R",
100                           "SD_DATA2_R",
101                           "SD_DATA3_R";
102
103         pinctrl-0 = <&gpioout &alt0>;
104 };
105
106 &hdmi {
107         hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
108         power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
109         status = "okay";
110 };
111
112 &sdhci {
113         pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
114 };
115
116 &sdhost {
117         pinctrl-names = "default";
118         pinctrl-0 = <&sdhost_gpio48>;
119         bus-width = <4>;
120         status = "okay";
121 };
122
123 &uart0 {
124         pinctrl-names = "default";
125         pinctrl-0 = <&uart0_gpio32 &uart0_ctsrts_gpio30>;
126 };
127
128 &uart1 {
129         pinctrl-names = "default";
130         pinctrl-0 = <&uart1_gpio14>;
131         status = "okay";
132 };
133
134 &wifi_pwrseq {
135         reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
136 };