Merge commit '81fd23e2b3ccf71c807e671444e8accaba98ca53' of https://git.pengutronix...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / bcm2837-rpi-3-b-plus.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3 #include "bcm2837.dtsi"
4 #include "bcm2836-rpi.dtsi"
5 #include "bcm283x-rpi-lan7515.dtsi"
6 #include "bcm283x-rpi-usb-host.dtsi"
7
8 / {
9         compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837";
10         model = "Raspberry Pi 3 Model B+";
11
12         chosen {
13                 /* 8250 auxiliary UART instead of pl011 */
14                 stdout-path = "serial1:115200n8";
15         };
16
17         memory@0 {
18                 device_type = "memory";
19                 reg = <0 0x40000000>;
20         };
21
22         leds {
23                 led-act {
24                         gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
25                 };
26
27                 led-pwr {
28                         label = "PWR";
29                         gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
30                         default-state = "keep";
31                         linux,default-trigger = "default-on";
32                 };
33         };
34
35         wifi_pwrseq: wifi-pwrseq {
36                 compatible = "mmc-pwrseq-simple";
37                 reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
38         };
39 };
40
41 &firmware {
42         expgpio: gpio {
43                 compatible = "raspberrypi,firmware-gpio";
44                 gpio-controller;
45                 #gpio-cells = <2>;
46                 gpio-line-names = "BT_ON",
47                                   "WL_ON",
48                                   "STATUS_LED_R",
49                                   "LAN_RUN",
50                                   "",
51                                   "CAM_GPIO0",
52                                   "CAM_GPIO1",
53                                   "";
54                 status = "okay";
55         };
56 };
57
58 &gpio {
59         /*
60          * Taken from rpi_SCH_3bplus_1p0_reduced.pdf and
61          * the official GPU firmware DT blob.
62          *
63          * Legend:
64          * "NC" = not connected (no rail from the SoC)
65          * "FOO" = GPIO line named "FOO" on the schematic
66          * "FOO_N" = GPIO line named "FOO" on schematic, active low
67          */
68         gpio-line-names = "ID_SDA",
69                           "ID_SCL",
70                           "SDA1",
71                           "SCL1",
72                           "GPIO_GCLK",
73                           "GPIO5",
74                           "GPIO6",
75                           "SPI_CE1_N",
76                           "SPI_CE0_N",
77                           "SPI_MISO",
78                           "SPI_MOSI",
79                           "SPI_SCLK",
80                           "GPIO12",
81                           "GPIO13",
82                           /* Serial port */
83                           "TXD1",
84                           "RXD1",
85                           "GPIO16",
86                           "GPIO17",
87                           "GPIO18",
88                           "GPIO19",
89                           "GPIO20",
90                           "GPIO21",
91                           "GPIO22",
92                           "GPIO23",
93                           "GPIO24",
94                           "GPIO25",
95                           "GPIO26",
96                           "GPIO27",
97                           "HDMI_HPD_N",
98                           "STATUS_LED_G",
99                           /* Used by BT module */
100                           "CTS0",
101                           "RTS0",
102                           "TXD0",
103                           "RXD0",
104                           /* Used by Wifi */
105                           "SD1_CLK",
106                           "SD1_CMD",
107                           "SD1_DATA0",
108                           "SD1_DATA1",
109                           "SD1_DATA2",
110                           "SD1_DATA3",
111                           "PWM0_OUT",
112                           "PWM1_OUT",
113                           "ETHCLK",
114                           "WIFI_CLK",
115                           "SDA0",
116                           "SCL0",
117                           "SMPS_SCL",
118                           "SMPS_SDA",
119                           /* Used by SD Card */
120                           "SD_CLK_R",
121                           "SD_CMD_R",
122                           "SD_DATA0_R",
123                           "SD_DATA1_R",
124                           "SD_DATA2_R",
125                           "SD_DATA3_R";
126 };
127
128 &hdmi {
129         hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
130         power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
131         status = "okay";
132 };
133
134 &pwm {
135         pinctrl-names = "default";
136         pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>;
137         status = "okay";
138 };
139
140 /* SDHCI is used to control the SDIO for wireless */
141 &sdhci {
142         #address-cells = <1>;
143         #size-cells = <0>;
144         pinctrl-names = "default";
145         pinctrl-0 = <&emmc_gpio34>;
146         status = "okay";
147         bus-width = <4>;
148         non-removable;
149         mmc-pwrseq = <&wifi_pwrseq>;
150
151         brcmf: wifi@1 {
152                 reg = <1>;
153                 compatible = "brcm,bcm4329-fmac";
154         };
155 };
156
157 /* SDHOST is used to drive the SD card */
158 &sdhost {
159         pinctrl-names = "default";
160         pinctrl-0 = <&sdhost_gpio48>;
161         status = "okay";
162         bus-width = <4>;
163 };
164
165 /* uart0 communicates with the BT module */
166 &uart0 {
167         pinctrl-names = "default";
168         pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>;
169         status = "okay";
170
171         bluetooth {
172                 compatible = "brcm,bcm43438-bt";
173                 max-speed = <2000000>;
174                 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
175         };
176 };
177
178 /* uart1 is mapped to the pin header */
179 &uart1 {
180         pinctrl-names = "default";
181         pinctrl-0 = <&uart1_gpio14>;
182         status = "okay";
183 };