Merge tag 'pci-v5.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[linux.git] / arch / arm / boot / dts / bcm2711-rpi-4-b.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3 #include "bcm2711.dtsi"
4 #include "bcm2835-rpi.dtsi"
5 #include "bcm283x-rpi-usb-peripheral.dtsi"
6
7 / {
8         compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
9         model = "Raspberry Pi 4 Model B";
10
11         chosen {
12                 /* 8250 auxiliary UART instead of pl011 */
13                 stdout-path = "serial1:115200n8";
14         };
15
16         /* Will be filled by the bootloader */
17         memory@0 {
18                 device_type = "memory";
19                 reg = <0 0 0>;
20         };
21
22         aliases {
23                 ethernet0 = &genet;
24                 pcie0 = &pcie0;
25         };
26
27         leds {
28                 act {
29                         gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
30                 };
31
32                 pwr {
33                         label = "PWR";
34                         gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
35                         default-state = "keep";
36                         linux,default-trigger = "default-on";
37                 };
38         };
39
40         wifi_pwrseq: wifi-pwrseq {
41                 compatible = "mmc-pwrseq-simple";
42                 reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
43         };
44
45         sd_io_1v8_reg: sd_io_1v8_reg {
46                 compatible = "regulator-gpio";
47                 regulator-name = "vdd-sd-io";
48                 regulator-min-microvolt = <1800000>;
49                 regulator-max-microvolt = <3300000>;
50                 regulator-boot-on;
51                 regulator-always-on;
52                 regulator-settling-time-us = <5000>;
53                 gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
54                 states = <1800000 0x1
55                           3300000 0x0>;
56                 status = "okay";
57         };
58 };
59
60 &firmware {
61         expgpio: gpio {
62                 compatible = "raspberrypi,firmware-gpio";
63                 gpio-controller;
64                 #gpio-cells = <2>;
65                 gpio-line-names = "BT_ON",
66                                   "WL_ON",
67                                   "PWR_LED_OFF",
68                                   "GLOBAL_RESET",
69                                   "VDD_SD_IO_SEL",
70                                   "CAM_GPIO",
71                                   "",
72                                   "";
73                 status = "okay";
74         };
75 };
76
77 &pwm1 {
78         pinctrl-names = "default";
79         pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
80         status = "okay";
81 };
82
83 /* SDHCI is used to control the SDIO for wireless */
84 &sdhci {
85         #address-cells = <1>;
86         #size-cells = <0>;
87         pinctrl-names = "default";
88         pinctrl-0 = <&emmc_gpio34>;
89         bus-width = <4>;
90         non-removable;
91         mmc-pwrseq = <&wifi_pwrseq>;
92         status = "okay";
93
94         brcmf: wifi@1 {
95                 reg = <1>;
96                 compatible = "brcm,bcm4329-fmac";
97         };
98 };
99
100 /* EMMC2 is used to drive the SD card */
101 &emmc2 {
102         vqmmc-supply = <&sd_io_1v8_reg>;
103         broken-cd;
104         status = "okay";
105 };
106
107 &genet {
108         phy-handle = <&phy1>;
109         phy-mode = "rgmii-rxid";
110         status = "okay";
111 };
112
113 &genet_mdio {
114         phy1: ethernet-phy@1 {
115                 /* No PHY interrupt */
116                 reg = <0x1>;
117         };
118 };
119
120 /* uart0 communicates with the BT module */
121 &uart0 {
122         pinctrl-names = "default";
123         pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
124         uart-has-rtscts;
125         status = "okay";
126
127         bluetooth {
128                 compatible = "brcm,bcm43438-bt";
129                 max-speed = <2000000>;
130                 shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
131         };
132 };
133
134 /* uart1 is mapped to the pin header */
135 &uart1 {
136         pinctrl-names = "default";
137         pinctrl-0 = <&uart1_gpio14>;
138         status = "okay";
139 };
140
141 &vchiq {
142         interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
143 };