xref: /freebsd-src/sys/contrib/device-tree/src/arm/broadcom/bcm2836-rpi-2-b.dts (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2f126890aSEmmanuel Vadot/dts-v1/;
3f126890aSEmmanuel Vadot#include "bcm2836.dtsi"
4f126890aSEmmanuel Vadot#include "bcm2836-rpi.dtsi"
5f126890aSEmmanuel Vadot#include "bcm283x-rpi-led-deprecated.dtsi"
6f126890aSEmmanuel Vadot#include "bcm283x-rpi-smsc9514.dtsi"
7f126890aSEmmanuel Vadot#include "bcm283x-rpi-usb-host.dtsi"
8f126890aSEmmanuel Vadot
9f126890aSEmmanuel Vadot/ {
10f126890aSEmmanuel Vadot	compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
11f126890aSEmmanuel Vadot	model = "Raspberry Pi 2 Model B";
12f126890aSEmmanuel Vadot
13f126890aSEmmanuel Vadot	memory@0 {
14f126890aSEmmanuel Vadot		device_type = "memory";
15f126890aSEmmanuel Vadot		reg = <0 0x40000000>;
16f126890aSEmmanuel Vadot	};
17f126890aSEmmanuel Vadot};
18f126890aSEmmanuel Vadot
19f126890aSEmmanuel Vadot&gpio {
20f126890aSEmmanuel Vadot	/*
21f126890aSEmmanuel Vadot	 * Taken from rpi_SCH_2b_1p2_reduced.pdf and
22f126890aSEmmanuel Vadot	 * the official GPU firmware DT blob.
23f126890aSEmmanuel Vadot	 *
24f126890aSEmmanuel Vadot	 * Legend:
25f126890aSEmmanuel Vadot	 * "FOO" = GPIO line named "FOO" on the schematic
26f126890aSEmmanuel Vadot	 * "FOO_N" = GPIO line named "FOO" on schematic, active low
27f126890aSEmmanuel Vadot	 */
28f126890aSEmmanuel Vadot	gpio-line-names = "ID_SDA",
29f126890aSEmmanuel Vadot			  "ID_SCL",
30f126890aSEmmanuel Vadot			  "SDA1",
31f126890aSEmmanuel Vadot			  "SCL1",
32f126890aSEmmanuel Vadot			  "GPIO_GCLK",
33f126890aSEmmanuel Vadot			  "GPIO5",
34f126890aSEmmanuel Vadot			  "GPIO6",
35f126890aSEmmanuel Vadot			  "SPI_CE1_N",
36f126890aSEmmanuel Vadot			  "SPI_CE0_N",
37f126890aSEmmanuel Vadot			  "SPI_MISO",
38f126890aSEmmanuel Vadot			  "SPI_MOSI",
39f126890aSEmmanuel Vadot			  "SPI_SCLK",
40f126890aSEmmanuel Vadot			  "GPIO12",
41f126890aSEmmanuel Vadot			  "GPIO13",
42f126890aSEmmanuel Vadot			  /* Serial port */
43f126890aSEmmanuel Vadot			  "TXD0",
44f126890aSEmmanuel Vadot			  "RXD0",
45f126890aSEmmanuel Vadot			  "GPIO16",
46f126890aSEmmanuel Vadot			  "GPIO17",
47f126890aSEmmanuel Vadot			  "GPIO18",
48f126890aSEmmanuel Vadot			  "GPIO19",
49f126890aSEmmanuel Vadot			  "GPIO20",
50f126890aSEmmanuel Vadot			  "GPIO21",
51f126890aSEmmanuel Vadot			  "GPIO22",
52f126890aSEmmanuel Vadot			  "GPIO23",
53f126890aSEmmanuel Vadot			  "GPIO24",
54f126890aSEmmanuel Vadot			  "GPIO25",
55f126890aSEmmanuel Vadot			  "GPIO26",
56f126890aSEmmanuel Vadot			  "GPIO27",
57f126890aSEmmanuel Vadot			  "SDA0",
58f126890aSEmmanuel Vadot			  "SCL0",
59f126890aSEmmanuel Vadot			  "", /* GPIO30 */
60f126890aSEmmanuel Vadot			  "LAN_RUN",
61f126890aSEmmanuel Vadot			  "CAM_GPIO1",
62f126890aSEmmanuel Vadot			  "", /* GPIO33 */
63f126890aSEmmanuel Vadot			  "", /* GPIO34 */
64f126890aSEmmanuel Vadot			  "PWR_LOW_N",
65f126890aSEmmanuel Vadot			  "", /* GPIO36 */
66f126890aSEmmanuel Vadot			  "", /* GPIO37 */
67f126890aSEmmanuel Vadot			  "USB_LIMIT",
68f126890aSEmmanuel Vadot			  "", /* GPIO39 */
69f126890aSEmmanuel Vadot			  "PWM0_OUT",
70f126890aSEmmanuel Vadot			  "CAM_GPIO0",
71f126890aSEmmanuel Vadot			  "SMPS_SCL",
72f126890aSEmmanuel Vadot			  "SMPS_SDA",
73f126890aSEmmanuel Vadot			  "ETH_CLK",
74f126890aSEmmanuel Vadot			  "PWM1_OUT",
75f126890aSEmmanuel Vadot			  "HDMI_HPD_N",
76f126890aSEmmanuel Vadot			  "STATUS_LED",
77f126890aSEmmanuel Vadot			  /* Used by SD Card */
78f126890aSEmmanuel Vadot			  "SD_CLK_R",
79f126890aSEmmanuel Vadot			  "SD_CMD_R",
80f126890aSEmmanuel Vadot			  "SD_DATA0_R",
81f126890aSEmmanuel Vadot			  "SD_DATA1_R",
82f126890aSEmmanuel Vadot			  "SD_DATA2_R",
83f126890aSEmmanuel Vadot			  "SD_DATA3_R";
84f126890aSEmmanuel Vadot
85*aa1a8ff2SEmmanuel Vadot	pinctrl-names = "default";
86f126890aSEmmanuel Vadot	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
87f126890aSEmmanuel Vadot
88f126890aSEmmanuel Vadot	/* I2S interface */
89f126890aSEmmanuel Vadot	i2s_alt0: i2s_alt0 {
90f126890aSEmmanuel Vadot		brcm,pins = <18 19 20 21>;
91f126890aSEmmanuel Vadot		brcm,function = <BCM2835_FSEL_ALT0>;
92f126890aSEmmanuel Vadot	};
93f126890aSEmmanuel Vadot};
94f126890aSEmmanuel Vadot
95f126890aSEmmanuel Vadot&hdmi {
96f126890aSEmmanuel Vadot	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
97f126890aSEmmanuel Vadot	power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
98f126890aSEmmanuel Vadot	status = "okay";
99f126890aSEmmanuel Vadot};
100f126890aSEmmanuel Vadot
101f126890aSEmmanuel Vadot&led_act {
102f126890aSEmmanuel Vadot	gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
103f126890aSEmmanuel Vadot};
104f126890aSEmmanuel Vadot
105f126890aSEmmanuel Vadot&leds {
106f126890aSEmmanuel Vadot	led-pwr {
107f126890aSEmmanuel Vadot		label = "PWR";
108f126890aSEmmanuel Vadot		gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
109f126890aSEmmanuel Vadot		default-state = "keep";
110f126890aSEmmanuel Vadot		linux,default-trigger = "default-on";
111f126890aSEmmanuel Vadot	};
112f126890aSEmmanuel Vadot};
113f126890aSEmmanuel Vadot
114f126890aSEmmanuel Vadot&pwm {
115f126890aSEmmanuel Vadot	pinctrl-names = "default";
116f126890aSEmmanuel Vadot	pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
117f126890aSEmmanuel Vadot	status = "okay";
118f126890aSEmmanuel Vadot};
119f126890aSEmmanuel Vadot
120f126890aSEmmanuel Vadot&sdhost {
121f126890aSEmmanuel Vadot	pinctrl-names = "default";
122f126890aSEmmanuel Vadot	pinctrl-0 = <&sdhost_gpio48>;
123f126890aSEmmanuel Vadot	bus-width = <4>;
124f126890aSEmmanuel Vadot	status = "okay";
125f126890aSEmmanuel Vadot};
126f126890aSEmmanuel Vadot
127f126890aSEmmanuel Vadot&uart0 {
128f126890aSEmmanuel Vadot	pinctrl-names = "default";
129f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_gpio14>;
130f126890aSEmmanuel Vadot	status = "okay";
131f126890aSEmmanuel Vadot};
132