Skip to content

Commit 3ddd75f

Browse files
pelwellpopcornmix
authored andcommitted
dts: bcm2712-rpi: Add RP1 firmware and mailboxes
Declare the communications channel to RP1. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1 parent d56b794 commit 3ddd75f

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ rp1_target: &pcie2 {
152152
// This is the RP1 peripheral space
153153
ranges = <0xc0 0x40000000
154154
0x02000000 0x00 0x00000000
155-
0x00 0x00400000>;
155+
0x00 0x00410000>;
156156

157157
dma-ranges =
158158
// inbound RP1 1x_xxxxxxxx -> PCIe 1x_xxxxxxxx
@@ -164,7 +164,7 @@ rp1_target: &pcie2 {
164164
// This allows the RP1 DMA controller to address RP1 hardware
165165
<0xc0 0x40000000
166166
0x02000000 0x0 0x00000000
167-
0x0 0x00400000>,
167+
0x0 0x00410000>,
168168

169169
// inbound RP1 0x_xxxxxxxx -> PCIe 1x_xxxxxxxx
170170
<0x00 0x00000000

arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ rp1_target: &pcie2 {
133133
// This is the RP1 peripheral space
134134
ranges = <0xc0 0x40000000
135135
0x02000000 0x00 0x00000000
136-
0x00 0x00400000>;
136+
0x00 0x00410000>;
137137

138138
dma-ranges =
139139
// inbound RP1 1x_xxxxxxxx -> PCIe 1x_xxxxxxxx
@@ -145,7 +145,7 @@ rp1_target: &pcie2 {
145145
// This allows the RP1 DMA controller to address RP1 hardware
146146
<0xc0 0x40000000
147147
0x02000000 0x0 0x00000000
148-
0x0 0x00400000>,
148+
0x0 0x00410000>,
149149

150150
// inbound RP1 0x_xxxxxxxx -> PCIe 1x_xxxxxxxx
151151
<0x00 0x00000000

arch/arm64/boot/dts/broadcom/bcm2712-rpi.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ pciex4: &pcie2 { };
294294
status = "okay";
295295
};
296296

297+
&rp1_mbox {
298+
status = "okay";
299+
};
300+
297301
/* Add some gpiomem nodes to make the devices accessible to userspace.
298302
* /dev/gpiomem<n> should expose the registers for the interface with DT alias
299303
* gpio<n>.

arch/arm64/boot/dts/broadcom/rp1.dtsi

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313

1414
// ranges and dma-ranges must be provided by the includer
1515

16+
rp1_mbox: mailbox@8000 {
17+
compatible = "raspberrypi,rp1-mbox";
18+
status = "disabled";
19+
reg = <0xc0 0x40008000 0x0 0x4000>; // SYSCFG
20+
interrupts = <RP1_INT_SYSCFG IRQ_TYPE_LEVEL_HIGH>;
21+
#mbox-cells = <1>;
22+
};
23+
1624
rp1_clocks: clocks@18000 {
1725
compatible = "raspberrypi,rp1-clocks";
1826
#clock-cells = <1>;
@@ -1183,6 +1191,19 @@
11831191
assigned-clocks = <&rp1_clocks RP1_CLK_DPI>;
11841192
assigned-clock-parents = <&rp1_clocks RP1_PLL_VIDEO>;
11851193
};
1194+
1195+
sram: sram@400000 {
1196+
compatible = "mmio-sram";
1197+
reg = <0xc0 0x40400000 0x0 0x10000>;
1198+
#address-cells = <1>;
1199+
#size-cells = <1>;
1200+
ranges = <0 0xc0 0x40400000 0x10000>;
1201+
1202+
rp1_fw_shmem: shmem@ff00 {
1203+
compatible = "raspberrypi,rp1-shmem";
1204+
reg = <0xff00 0x100>; // firmware mailbox buffer
1205+
};
1206+
};
11861207
};
11871208
};
11881209

@@ -1281,6 +1302,12 @@
12811302
};
12821303

12831304
/ {
1305+
rp1_firmware: rp1_firmware {
1306+
compatible = "raspberrypi,rp1-firmware", "simple-mfd";
1307+
mboxes = <&rp1_mbox 0>;
1308+
shmem = <&rp1_fw_shmem>;
1309+
};
1310+
12841311
rp1_vdd_3v3: rp1_vdd_3v3 {
12851312
compatible = "regulator-fixed";
12861313
regulator-name = "vdd-3v3";

0 commit comments

Comments
 (0)