f60418856a7f23510967d8d145c36a075868c40a
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0521-ARM-dts-update-bcm2711-rpi-cm4.dts-and-400.patch
1 From a38d7464ca20e1c0aaa3ed77e03e1ea6af4bc557 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 31 Mar 2021 10:22:30 +0100
4 Subject: [PATCH] ARM: dts: update bcm2711-rpi-cm4.dts and -400
5
6 Neither CM4 nor Pi 400 have appeared upstream yet, and as a result
7 they have missed out on improvements to the Pi 4B platform.
8
9 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
10
11 ARM: dts: Bring bcm2711-rpi-400.dts up-to-date
12
13 Pi 400 support has not appeared upstream yet, and as a result it has
14 missed out on improvements to the other Pi 4 platforms.
15
16 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
17 ---
18 arch/arm/boot/dts/bcm2711-rpi-400.dts | 17 +++++++
19 arch/arm/boot/dts/bcm2711-rpi-cm4.dts | 73 +++++++++++++++++++++------
20 2 files changed, 74 insertions(+), 16 deletions(-)
21
22 --- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
23 +++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
24 @@ -24,6 +24,7 @@
25 emmc2bus = &emmc2bus;
26 ethernet0 = &genet;
27 pcie0 = &pcie0;
28 + blconfig = &blconfig;
29 };
30
31 leds {
32 @@ -215,6 +216,22 @@
33 status = "okay";
34 };
35
36 +&rmem {
37 + /*
38 + * RPi4's co-processor will copy the board's bootloader configuration
39 + * into memory for the OS to consume. It'll also update this node with
40 + * its placement information.
41 + */
42 + blconfig: nvram@0 {
43 + compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
44 + #address-cells = <1>;
45 + #size-cells = <1>;
46 + reg = <0x0 0x0 0x0>;
47 + no-map;
48 + status = "disabled";
49 + };
50 +};
51 +
52 /* SDHCI is used to control the SDIO for wireless */
53 &sdhci {
54 #address-cells = <1>;
55 --- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
56 +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
57 @@ -3,6 +3,8 @@
58 #include "bcm2711.dtsi"
59 #include "bcm2835-rpi.dtsi"
60
61 +#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
62 +
63 / {
64 compatible = "raspberrypi,4-compute-module", "brcm,bcm2711";
65 model = "Raspberry Pi Compute Module 4";
66 @@ -22,6 +24,7 @@
67 emmc2bus = &emmc2bus;
68 ethernet0 = &genet;
69 pcie0 = &pcie0;
70 + blconfig = &blconfig;
71 };
72
73 leds {
74 @@ -76,6 +79,11 @@
75 };
76
77 &firmware {
78 + firmware_clocks: clocks {
79 + compatible = "raspberrypi,firmware-clocks";
80 + #clock-cells = <1>;
81 + };
82 +
83 expgpio: gpio {
84 compatible = "raspberrypi,firmware-gpio";
85 gpio-controller;
86 @@ -102,6 +110,11 @@
87 output-low;
88 };
89 };
90 +
91 + reset: reset {
92 + compatible = "raspberrypi,firmware-reset";
93 + #reset-cells = <1>;
94 + };
95 };
96
97 &gpio {
98 @@ -209,20 +222,28 @@
99 status = "okay";
100 };
101
102 -&vc4 {
103 - status = "okay";
104 -};
105 -
106 -&vec {
107 - status = "disabled";
108 -};
109 -
110 &pwm1 {
111 pinctrl-names = "default";
112 pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
113 status = "okay";
114 };
115
116 +&rmem {
117 + /*
118 + * RPi4's co-processor will copy the board's bootloader configuration
119 + * into memory for the OS to consume. It'll also update this node with
120 + * its placement information.
121 + */
122 + blconfig: nvram@0 {
123 + compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
124 + #address-cells = <1>;
125 + #size-cells = <1>;
126 + reg = <0x0 0x0 0x0>;
127 + no-map;
128 + status = "disabled";
129 + };
130 +};
131 +
132 /* SDHCI is used to control the SDIO for wireless */
133 &sdhci {
134 #address-cells = <1>;
135 @@ -262,6 +283,21 @@
136 };
137 };
138
139 +&pcie0 {
140 + pci@1,0 {
141 + #address-cells = <3>;
142 + #size-cells = <2>;
143 + ranges;
144 +
145 + reg = <0 0 0 0 0>;
146 +
147 + usb@1,0 {
148 + reg = <0x10000 0 0 0 0>;
149 + resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
150 + };
151 + };
152 +};
153 +
154 /* uart0 communicates with the BT module */
155 &uart0 {
156 pinctrl-names = "default";
157 @@ -287,6 +323,14 @@
158 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
159 };
160
161 +&vc4 {
162 + status = "okay";
163 +};
164 +
165 +&vec {
166 + status = "disabled";
167 +};
168 +
169 // =============================================
170 // Downstream rpi- changes
171
172 @@ -306,6 +350,7 @@
173 #include "bcm283x-rpi-csi0-2lane.dtsi"
174 #include "bcm283x-rpi-csi1-4lane.dtsi"
175 #include "bcm283x-rpi-i2c0mux_0_44.dtsi"
176 +#include "bcm283x-rpi-cam1-regulator.dtsi"
177
178 / {
179 chosen {
180 @@ -331,14 +376,6 @@
181 };
182
183 /delete-node/ wifi-pwrseq;
184 -
185 - cam0_reg: cam1_reg: cam1_reg {
186 - compatible = "regulator-fixed";
187 - regulator-name = "cam1-reg";
188 - gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
189 - enable-active-high;
190 - status = "disabled";
191 - };
192 };
193
194 &mmcnr {
195 @@ -589,6 +626,10 @@
196 brcm,disable-headphones = <1>;
197 };
198
199 +cam0_reg: &cam1_reg {
200 + gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
201 +};
202 +
203 / {
204 __overrides__ {
205 act_led_gpio = <&act_led>,"gpios:4";