1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2016 Stefan Wahren <stefan.wahren@i2se.com>
4 */
5
6/dts-v1/;
7#include "bcm2835.dtsi"
8#include "bcm2835-rpi.dtsi"
9#include "bcm283x-rpi-usb-otg.dtsi"
10
11/ {
12	compatible = "raspberrypi,model-zero", "brcm,bcm2835";
13	model = "Raspberry Pi Zero";
14
15	memory@0 {
16		device_type = "memory";
17		reg = <0 0x20000000>;
18	};
19
20	leds {
21		led-act {
22			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
23		};
24	};
25};
26
27&gpio {
28	/*
29	 * This is based on the official GPU firmware DT blob.
30	 *
31	 * Legend:
32	 * "FOO" = GPIO line named "FOO" on the schematic
33	 * "FOO_N" = GPIO line named "FOO" on schematic, active low
34	 */
35	gpio-line-names = "ID_SDA",
36			  "ID_SCL",
37			  "SDA1",
38			  "SCL1",
39			  "GPIO_GCLK",
40			  "GPIO5",
41			  "GPIO6",
42			  "SPI_CE1_N",
43			  "SPI_CE0_N",
44			  "SPI_MISO",
45			  "SPI_MOSI",
46			  "SPI_SCLK",
47			  "GPIO12",
48			  "GPIO13",
49			  /* Serial port */
50			  "TXD0",
51			  "RXD0",
52			  "GPIO16",
53			  "GPIO17",
54			  "GPIO18",
55			  "GPIO19",
56			  "GPIO20",
57			  "GPIO21",
58			  "GPIO22",
59			  "GPIO23",
60			  "GPIO24",
61			  "GPIO25",
62			  "GPIO26",
63			  "GPIO27",
64			  "SDA0",
65			  "SCL0",
66			  "", /* GPIO30 */
67			  "", /* GPIO31 */
68			  "CAM_GPIO1", /* GPIO32 */
69			  "", /* GPIO33 */
70			  "", /* GPIO34 */
71			  "", /* GPIO35 */
72			  "", /* GPIO36 */
73			  "", /* GPIO37 */
74			  "", /* GPIO38 */
75			  "", /* GPIO39 */
76			  "", /* GPIO40 */
77			  "CAM_GPIO0", /* GPIO41 */
78			  "", /* GPIO42 */
79			  "", /* GPIO43 */
80			  "", /* GPIO44 */
81			  "", /* 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	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
93
94	/* I2S interface */
95	i2s_alt0: i2s_alt0 {
96		brcm,pins = <18 19 20 21>;
97		brcm,function = <BCM2835_FSEL_ALT0>;
98	};
99};
100
101&hdmi {
102	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
103	power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
104	status = "okay";
105};
106
107&sdhost {
108	pinctrl-names = "default";
109	pinctrl-0 = <&sdhost_gpio48>;
110	bus-width = <4>;
111	status = "okay";
112};
113
114&uart0 {
115	pinctrl-names = "default";
116	pinctrl-0 = <&uart0_gpio14>;
117	status = "okay";
118};
119