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