* [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface
@ 2026-09-04 9:24 Gregor Herburger
2026-09-04 10:33 ` Andrea della Porta
2026-09-04 22:27 ` Florian Fainelli
0 siblings, 2 replies; 5+ messages in thread
From: Gregor Herburger @ 2026-09-04 9:24 UTC (permalink / raw)
To: Andrea della Porta, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list
Cc: devicetree, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Gregor Herburger
The Raspberry Pi 5 routes the spi0 of the rp1 chip to the pin header.
Add the rp1_spi0 node and its pinctrl node to the devicetree to enable
the spi interface.
Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
---
The RP1 chip, found on the raspberry Pi 5, has nine spi controllers. The
spi0 is routed to the pin header. Add the rp1 nodes and enable it for
the Raspberry Pi 5.
---
Changes in v2:
- Drop first patch as it got already applied: https://lore.kernel.org/lkml/20260903194624.2038562-1-florian.fainelli@broadcom.com/
- add cs gpios to rp1_gpio for pinctrl
- Link to v1: https://patch.msgid.link/20260811-bcm2712-spi-v1-0-4c1708d354bb@linutronix.de
---
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
index 0fc57e72632ed..0de3d78100a5d 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
@@ -69,6 +69,20 @@ usb_vbus_default_state: usb-vbus-default-state {
groups = "vbus1";
};
+ rp1_spi0_default_state: rp1-spi0-default-state {
+ function = "spi0";
+ groups = "spi0";
+ bias-disable;
+ drive-strength = <12>;
+ slew-rate = <1>;
+ };
+
+ rp1_spi0_cs_default_state: rp1-spi0-cs-default-state {
+ function = "gpio";
+ pins = "gpio7", "gpio8";
+ bias-pull-up;
+ };
+
rp1_i2c4_default_state: rp1-i2c4-default-state {
function = "i2c4";
groups = "i2c4_2";
@@ -94,6 +108,14 @@ &rp1_i2c6 {
pinctrl-names = "default";
};
+&rp1_spi0 {
+ pinctrl-0 = <&rp1_spi0_default_state &rp1_spi0_cs_default_state>;
+ pinctrl-names = "default";
+
+ num-cs = <2>;
+ cs-gpios = <&rp1_gpio 8 GPIO_ACTIVE_LOW &rp1_gpio 7 GPIO_ACTIVE_LOW>;
+};
+
&rp1_usb0 {
pinctrl-0 = <&usb_vbus_default_state>;
pinctrl-names = "default";
---
base-commit: db2ddb87143519e20a95aa36c60b36107b736a58
change-id: 20260811-bcm2712-spi-644b70fee3bf
Best regards,
--
Gregor Herburger <gregor.herburger@linutronix.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface
2026-09-04 9:24 [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface Gregor Herburger
@ 2026-09-04 10:33 ` Andrea della Porta
2026-09-04 10:54 ` Gregor Herburger
2026-09-04 22:27 ` Florian Fainelli
1 sibling, 1 reply; 5+ messages in thread
From: Andrea della Porta @ 2026-09-04 10:33 UTC (permalink / raw)
To: Gregor Herburger
Cc: Andrea della Porta, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, devicetree, linux-kernel,
linux-rpi-kernel, linux-arm-kernel
Hi Gregor,
On 11:24 Fri 04 Sep , Gregor Herburger wrote:
> The Raspberry Pi 5 routes the spi0 of the rp1 chip to the pin header.
> Add the rp1_spi0 node and its pinctrl node to the devicetree to enable
> the spi interface.
Just a nit-pick: in the comment it's stated that the spi interface is enabled,
which is not true since rp1_usb inherit status="disabled" from its node
definition. This is fine because the user would probably want to enable the
spi interface through some overlay, so no need to resend the patch (at least
for me), so:
Reviewed-by: Andrea della Porta <andrea.porta@suse.com>
Thanks!
Andrea
>
> Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
> ---
> The RP1 chip, found on the raspberry Pi 5, has nine spi controllers. The
> spi0 is routed to the pin header. Add the rp1 nodes and enable it for
> the Raspberry Pi 5.
> ---
> Changes in v2:
> - Drop first patch as it got already applied: https://lore.kernel.org/lkml/20260903194624.2038562-1-florian.fainelli@broadcom.com/
> - add cs gpios to rp1_gpio for pinctrl
> - Link to v1: https://patch.msgid.link/20260811-bcm2712-spi-v1-0-4c1708d354bb@linutronix.de
> ---
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
> index 0fc57e72632ed..0de3d78100a5d 100644
> --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
> +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
> @@ -69,6 +69,20 @@ usb_vbus_default_state: usb-vbus-default-state {
> groups = "vbus1";
> };
>
> + rp1_spi0_default_state: rp1-spi0-default-state {
> + function = "spi0";
> + groups = "spi0";
> + bias-disable;
> + drive-strength = <12>;
> + slew-rate = <1>;
> + };
> +
> + rp1_spi0_cs_default_state: rp1-spi0-cs-default-state {
> + function = "gpio";
> + pins = "gpio7", "gpio8";
> + bias-pull-up;
> + };
> +
> rp1_i2c4_default_state: rp1-i2c4-default-state {
> function = "i2c4";
> groups = "i2c4_2";
> @@ -94,6 +108,14 @@ &rp1_i2c6 {
> pinctrl-names = "default";
> };
>
> +&rp1_spi0 {
> + pinctrl-0 = <&rp1_spi0_default_state &rp1_spi0_cs_default_state>;
> + pinctrl-names = "default";
> +
> + num-cs = <2>;
> + cs-gpios = <&rp1_gpio 8 GPIO_ACTIVE_LOW &rp1_gpio 7 GPIO_ACTIVE_LOW>;
> +};
> +
> &rp1_usb0 {
> pinctrl-0 = <&usb_vbus_default_state>;
> pinctrl-names = "default";
>
> ---
> base-commit: db2ddb87143519e20a95aa36c60b36107b736a58
> change-id: 20260811-bcm2712-spi-644b70fee3bf
>
> Best regards,
> --
> Gregor Herburger <gregor.herburger@linutronix.de>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface
2026-09-04 10:33 ` Andrea della Porta
@ 2026-09-04 10:54 ` Gregor Herburger
2026-09-04 22:31 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Gregor Herburger @ 2026-09-04 10:54 UTC (permalink / raw)
To: Andrea della Porta
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, devicetree, linux-kernel,
linux-rpi-kernel, linux-arm-kernel
Hi Andrea,
On Fri, Sep 04, 2026 at 12:33:51PM +0200, Andrea della Porta wrote:
> Hi Gregor,
>
> On 11:24 Fri 04 Sep , Gregor Herburger wrote:
> > The Raspberry Pi 5 routes the spi0 of the rp1 chip to the pin header.
> > Add the rp1_spi0 node and its pinctrl node to the devicetree to enable
> > the spi interface.
>
> Just a nit-pick: in the comment it's stated that the spi interface is enabled,
> which is not true since rp1_usb inherit status="disabled" from its node
> definition. This is fine because the user would probably want to enable the
> spi interface through some overlay, so no need to resend the patch (at least
> for me), so:
Indeed. It could be rephrased to:
Add the rp1_spi0 node and its pinctrl nodes to the devicetree to make
the spi interface available.
@Florian: Should I send another version or do you want to change it yourself?
Best regards,
--
Gregor Herburger
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 35; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/legal/data-protection.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Dr. Wilfried Wessner,
Katharina Kopp, Alexander Gieringer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface
2026-09-04 9:24 [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface Gregor Herburger
2026-09-04 10:33 ` Andrea della Porta
@ 2026-09-04 22:27 ` Florian Fainelli
1 sibling, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2026-09-04 22:27 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Gregor Herburger, Andrea della Porta,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli
Cc: Florian Fainelli, devicetree, linux-kernel, linux-rpi-kernel,
linux-arm-kernel
From: Florian Fainelli <f.fainelli@gmail.com>
On Fri, 04 Sep 2026 11:24:24 +0200, Gregor Herburger <gregor.herburger@linutronix.de> wrote:
> The Raspberry Pi 5 routes the spi0 of the rp1 chip to the pin header.
> Add the rp1_spi0 node and its pinctrl node to the devicetree to enable
> the spi interface.
>
> Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree-arm64/next, thanks!
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface
2026-09-04 10:54 ` Gregor Herburger
@ 2026-09-04 22:31 ` Florian Fainelli
0 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2026-09-04 22:31 UTC (permalink / raw)
To: Gregor Herburger, Andrea della Porta
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Broadcom internal kernel review list, devicetree, linux-kernel,
linux-rpi-kernel, linux-arm-kernel
On 9/4/26 03:54, Gregor Herburger wrote:
> Hi Andrea,
>
> On Fri, Sep 04, 2026 at 12:33:51PM +0200, Andrea della Porta wrote:
>> Hi Gregor,
>>
>> On 11:24 Fri 04 Sep , Gregor Herburger wrote:
>>> The Raspberry Pi 5 routes the spi0 of the rp1 chip to the pin header.
>>> Add the rp1_spi0 node and its pinctrl node to the devicetree to enable
>>> the spi interface.
>>
>> Just a nit-pick: in the comment it's stated that the spi interface is enabled,
>> which is not true since rp1_usb inherit status="disabled" from its node
>> definition. This is fine because the user would probably want to enable the
>> spi interface through some overlay, so no need to resend the patch (at least
>> for me), so:
> Indeed. It could be rephrased to:
>
> Add the rp1_spi0 node and its pinctrl nodes to the devicetree to make
> the spi interface available.
>
> @Florian: Should I send another version or do you want to change it yourself?
I used that as the new version of your second paragraph, please let me
know if I should be making further adjustments.
Thanks!
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-04 22:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-04 9:24 [PATCH v2] arm64: dts: broadcom: bcm2712-rpi-5-b: add spi0 interface Gregor Herburger
2026-09-04 10:33 ` Andrea della Porta
2026-09-04 10:54 ` Gregor Herburger
2026-09-04 22:31 ` Florian Fainelli
2026-09-04 22:27 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®