linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT
@ 2025-08-11 15:19 Andrea della Porta
  2025-08-11 15:19 ` [PATCH 1/6] dt-bindings: mmc: Add support for capabilities to Broadcom SDHCI controller Andrea della Porta
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Andrea della Porta @ 2025-08-11 15:19 UTC (permalink / raw)
  To: linus.walleij, robh, krzk+dt, conor+dt, florian.fainelli,
	wahrenst, linux-gpio, devicetree, linux-arm-kernel,
	Catalin Marinas, Will Deacon, iivanov, svarbanov, mbrugger,
	Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial
  Cc: Andrea della Porta

Hi,

The following patches add a few peripheral DT nodes and related pin/gpio
nodes for Raspberry Pi 5.

This brand new patchset (hence it's a V1) is the second part of the split-up
of the patchset [1]. It tooks patches 3 to 6 from there and adds a couple
of new patches that amend the DT bindings.
As a result, patchset [2] is a prerequisite for this patchset.

- Patch 1 and 2: Amend the bindings to avoid DT compiler warnings.

- Patch 3: Adds core pinctrl nodes and defines SD pins as a first appliance
  for the pinctrl.  

- Patch 4: Wires the gpio-key for power button and related gpio controller.

- Patch 5: Adds DT node for WiFi.

- Patch 6: Adds Bluetooth DT node.

All comments and suggestions are welcome!

Happy hacking!
Ivan and Andrea

Links:
[1] - https://lore.kernel.org/all/cover.1752584387.git.andrea.porta@suse.com/
[2] - https://lore.kernel.org/all/cover.1754922935.git.andrea.porta@suse.com/


CHANGES since [1]:

--- PATCHES ---

- Add two new patches (1 and 2) that amend the DT bindings.


--- DTS ---

- bcm2712.dtsi: Added 'interrupt-names' and dropped 'reg-shift' and
  'reg-io-width' properties in uarta DT node. The latter two are
  just overridden by driver code so setting them in DT is useless.

- bcm2712-rpi-5-b-ovl-rp1.dts: dropped 'auto-flow-control' property
  since it's not parsed in driver code.


--- DT BINDINGS ---

- brcm,sdhci-brcmstb.yaml: added SDHCI capabilities by including
  sdhci-common.yaml.

- serial/brcm,bcm7271-uart.yaml: let clock-frequency be an alternative way
  to specify the clock speed instead of clocks/clock-names.


Andrea della Porta (2):
  dt-bindings: mmc: Add support for capabilities to Broadcom SDHCI
    controller
  dt-bindings: serial: Add clock-frequency property as an alternative to
    clocks

Ivan T. Ivanov (4):
  arm64: dts: broadcom: bcm2712: Add pin controller nodes
  arm64: dts: broadcom: bcm2712: Add one more GPIO node
  arm64: dts: broadcom: bcm2712: Add second SDHCI controller node
  arm64: dts: broadcom: bcm2712: Add UARTA controller node

 .../bindings/mmc/brcm,sdhci-brcmstb.yaml      |   2 +-
 .../bindings/serial/brcm,bcm7271-uart.yaml    |  19 ++-
 .../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts  | 133 ++++++++++++++++++
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi     |  47 +++++++
 4 files changed, 198 insertions(+), 3 deletions(-)

-- 
2.35.3



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/6] dt-bindings: mmc: Add support for capabilities to Broadcom SDHCI controller
  2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
@ 2025-08-11 15:19 ` Andrea della Porta
  2025-08-11 15:19 ` [PATCH 2/6] dt-bindings: serial: Add clock-frequency property as an alternative to clocks Andrea della Porta
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Andrea della Porta @ 2025-08-11 15:19 UTC (permalink / raw)
  To: linus.walleij, robh, krzk+dt, conor+dt, florian.fainelli,
	wahrenst, linux-gpio, devicetree, linux-arm-kernel,
	Catalin Marinas, Will Deacon, iivanov, svarbanov, mbrugger,
	Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial
  Cc: Andrea della Porta

The Broadcom BRCMSTB SDHCI Controller device supports Common
properties in terms of Capabilities.

Reference sdhci-common schema instead of mmc-controller in order
for capabilities to be specified in DT nodes avoiding warnings
from the DT compiler.

Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
index eee6be7a7867..493655a38b37 100644
--- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
+++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml
@@ -61,7 +61,7 @@ properties:
     description: Specifies that controller should use auto CMD12
 
 allOf:
-  - $ref: mmc-controller.yaml#
+  - $ref: sdhci-common.yaml#
   - if:
       properties:
         clock-names:
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/6] dt-bindings: serial: Add clock-frequency property as an alternative to clocks
  2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
  2025-08-11 15:19 ` [PATCH 1/6] dt-bindings: mmc: Add support for capabilities to Broadcom SDHCI controller Andrea della Porta
@ 2025-08-11 15:19 ` Andrea della Porta
  2025-08-12 12:02   ` Krzysztof Kozlowski
  2025-08-11 15:19 ` [PATCH 3/6] arm64: dts: broadcom: bcm2712: Add pin controller nodes Andrea della Porta
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Andrea della Porta @ 2025-08-11 15:19 UTC (permalink / raw)
  To: linus.walleij, robh, krzk+dt, conor+dt, florian.fainelli,
	wahrenst, linux-gpio, devicetree, linux-arm-kernel,
	Catalin Marinas, Will Deacon, iivanov, svarbanov, mbrugger,
	Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial
  Cc: Andrea della Porta

The UARTA controller on BCM2712 connected to Bluetooth chip does not
mandiatorily ask for a clock connected to the high speed baud generator.
This is, in fact, an optional clock in the driver.

As an alternative, the call to uart_read_port_properties() ensures that
just a simple 'clock-frequency' property can be specified for the clock
value.

Amend the bindings to allow to either specify clocks or clock-frequency.

Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 .../bindings/serial/brcm,bcm7271-uart.yaml    | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
index 89c462653e2d..96697b1428bd 100644
--- a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
@@ -40,7 +40,15 @@ properties:
           - const: dma_tx
           - const: dma_intr2
 
+  clock-frequency:
+    description:
+      The input clock frequency for the UART, Either this or clocks must be
+      specified.
+
   clocks:
+    description:
+      High speed baud rate clock. Either this or clock-frequency must be
+      specified.
     minItems: 1
 
   clock-names:
@@ -61,11 +69,18 @@ required:
   - compatible
   - reg
   - reg-names
-  - clocks
-  - clock-names
   - interrupts
   - interrupt-names
 
+oneOf:
+  - allOf:
+      - required:
+          - clocks
+      - required:
+          - clock-names
+  - required:
+      - clock-frequency
+
 unevaluatedProperties: false
 
 examples:
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/6] arm64: dts: broadcom: bcm2712: Add pin controller nodes
  2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
  2025-08-11 15:19 ` [PATCH 1/6] dt-bindings: mmc: Add support for capabilities to Broadcom SDHCI controller Andrea della Porta
  2025-08-11 15:19 ` [PATCH 2/6] dt-bindings: serial: Add clock-frequency property as an alternative to clocks Andrea della Porta
@ 2025-08-11 15:19 ` Andrea della Porta
  2025-08-11 15:19 ` [PATCH 4/6] arm64: dts: broadcom: bcm2712: Add one more GPIO node Andrea della Porta
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Andrea della Porta @ 2025-08-11 15:19 UTC (permalink / raw)
  To: linus.walleij, robh, krzk+dt, conor+dt, florian.fainelli,
	wahrenst, linux-gpio, devicetree, linux-arm-kernel,
	Catalin Marinas, Will Deacon, iivanov, svarbanov, mbrugger,
	Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial
  Cc: Andrea della Porta

From: "Ivan T. Ivanov" <iivanov@suse.de>

Add pin-control devicetree nodes and used them to
explicitly define uSD card interface pin configuration.

Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 .../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts   | 18 ++++++++++++++++++
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi      | 10 ++++++++++
 2 files changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
index 6ea3c102e0d6..6091a1ff365c 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
@@ -53,6 +53,21 @@ sd_vcc_reg: sd-vcc-reg {
 	};
 };
 
+&pinctrl {
+	emmc_sd_default: emmc-sd-default-state {
+		pins = "emmc_cmd", "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3";
+		bias-pull-up;
+	};
+};
+
+&pinctrl_aon {
+	emmc_aon_cd_default: emmc-aon-cd-default-state {
+		function = "sd_card_g";
+		pins = "aon_gpio5";
+		bias-pull-up;
+	};
+};
+
 /* The Debug UART, on Rpi5 it's on JST-SH 1.0mm 3-pin connector
  * labeled "UART", i.e. the interface with the system console.
  */
@@ -62,12 +77,15 @@ &uart10 {
 
 /* SDIO1 is used to drive the SD card */
 &sdio1 {
+	pinctrl-0 = <&emmc_sd_default>, <&emmc_aon_cd_default>;
+	pinctrl-names = "default";
 	vqmmc-supply = <&sd_io_1v8_reg>;
 	vmmc-supply = <&sd_vcc_reg>;
 	bus-width = <4>;
 	sd-uhs-sdr50;
 	sd-uhs-ddr50;
 	sd-uhs-sdr104;
+	cd-gpios = <&gio_aon 5 GPIO_ACTIVE_LOW>;
 };
 
 &soc {
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index 0a9212d3106f..8a517261841d 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -243,6 +243,16 @@ uart10: serial@7d001000 {
 			status = "disabled";
 		};
 
+		pinctrl: pinctrl@7d504100 {
+			compatible = "brcm,bcm2712c0-pinctrl";
+			reg = <0x7d504100 0x30>;
+		};
+
+		pinctrl_aon: pinctrl@7d510700 {
+			compatible = "brcm,bcm2712c0-aon-pinctrl";
+			reg = <0x7d510700 0x20>;
+		};
+
 		interrupt-controller@7d517000 {
 			compatible = "brcm,bcm7271-l2-intc";
 			reg = <0x7d517000 0x10>;
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/6] arm64: dts: broadcom: bcm2712: Add one more GPIO node
  2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
                   ` (2 preceding siblings ...)
  2025-08-11 15:19 ` [PATCH 3/6] arm64: dts: broadcom: bcm2712: Add pin controller nodes Andrea della Porta
@ 2025-08-11 15:19 ` Andrea della Porta
  2025-08-11 15:19 ` [PATCH 5/6] arm64: dts: broadcom: bcm2712: Add second SDHCI controller node Andrea della Porta
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Andrea della Porta @ 2025-08-11 15:19 UTC (permalink / raw)
  To: linus.walleij, robh, krzk+dt, conor+dt, florian.fainelli,
	wahrenst, linux-gpio, devicetree, linux-arm-kernel,
	Catalin Marinas, Will Deacon, iivanov, svarbanov, mbrugger,
	Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial
  Cc: Andrea della Porta

From: "Ivan T. Ivanov" <iivanov@suse.de>

Add GPIO and related interrupt controller nodes and wire one
of the lines to power button.

Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 .../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts  | 21 +++++++++++++++++++
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 12 +++++++++++
 2 files changed, 33 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
index 6091a1ff365c..f0883c903527 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
@@ -2,6 +2,7 @@
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include "bcm2712.dtsi"
 
 / {
@@ -29,6 +30,20 @@ memory@0 {
 		reg = <0 0 0 0x28000000>;
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pwr_button_default>;
+		status = "okay";
+
+		power_button: power-button {
+			label = "pwr_button";
+			linux,code = <KEY_POWER>;
+			gpios = <&gio 20 GPIO_ACTIVE_LOW>;
+			debounce-interval = <50>;
+		};
+	};
+
 	sd_io_1v8_reg: sd-io-1v8-reg {
 		compatible = "regulator-gpio";
 		regulator-name = "vdd-sd-io";
@@ -58,6 +73,12 @@ emmc_sd_default: emmc-sd-default-state {
 		pins = "emmc_cmd", "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3";
 		bias-pull-up;
 	};
+
+	pwr_button_default: pwr-button-default-state {
+		function = "gpio";
+		pins = "gpio20";
+		bias-pull-up;
+	};
 };
 
 &pinctrl_aon {
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index 8a517261841d..f70ec8d3dc4d 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -248,6 +248,18 @@ pinctrl: pinctrl@7d504100 {
 			reg = <0x7d504100 0x30>;
 		};
 
+		gio: gpio@7d508500 {
+			compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio";
+			reg = <0x7d508500 0x40>;
+			interrupt-parent = <&main_irq>;
+			interrupts = <0>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			brcm,gpio-bank-widths = <32 22>;
+		};
+
 		pinctrl_aon: pinctrl@7d510700 {
 			compatible = "brcm,bcm2712c0-aon-pinctrl";
 			reg = <0x7d510700 0x20>;
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/6] arm64: dts: broadcom: bcm2712: Add second SDHCI controller node
  2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
                   ` (3 preceding siblings ...)
  2025-08-11 15:19 ` [PATCH 4/6] arm64: dts: broadcom: bcm2712: Add one more GPIO node Andrea della Porta
@ 2025-08-11 15:19 ` Andrea della Porta
  2025-08-11 15:19 ` [PATCH 6/6] arm64: dts: broadcom: bcm2712: Add UARTA " Andrea della Porta
  2025-08-12 12:12 ` [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Rob Herring (Arm)
  6 siblings, 0 replies; 10+ messages in thread
From: Andrea della Porta @ 2025-08-11 15:19 UTC (permalink / raw)
  To: linus.walleij, robh, krzk+dt, conor+dt, florian.fainelli,
	wahrenst, linux-gpio, devicetree, linux-arm-kernel,
	Catalin Marinas, Will Deacon, iivanov, svarbanov, mbrugger,
	Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial
  Cc: Andrea della Porta

From: "Ivan T. Ivanov" <iivanov@suse.de>

Add SDIO2 node. On RPi5 it is connected to WiFi chip.
Add related pin, gpio and regulator definitions and
add WiFi node. With this and firmware already provided by
distributions, at least on openSUSE Tumbleweed, this is
sufficient to make WiFi operational on RPi5 \o/.

Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 .../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts  | 52 +++++++++++++++++++
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 15 ++++++
 2 files changed, 67 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
index f0883c903527..411b58c1dddf 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
@@ -66,6 +66,18 @@ sd_vcc_reg: sd-vcc-reg {
 		enable-active-high;
 		gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>;
 	};
+
+	wl_on_reg: wl-on-reg {
+		compatible = "regulator-fixed";
+		regulator-name = "wl-on-regulator";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		pinctrl-0 = <&wl_on_default>;
+		pinctrl-names = "default";
+		gpio = <&gio 28 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <150000>;
+		enable-active-high;
+	};
 };
 
 &pinctrl {
@@ -79,6 +91,29 @@ pwr_button_default: pwr-button-default-state {
 		pins = "gpio20";
 		bias-pull-up;
 	};
+
+	sdio2_30_default: sdio2-30-default-state {
+		clk-pins {
+			function = "sd2";
+			pins = "gpio30";
+			bias-disable;
+		};
+		cmd-pins {
+			function = "sd2";
+			pins = "gpio31";
+			bias-pull-up;
+		};
+		dat-pins {
+			function = "sd2";
+			pins = "gpio32", "gpio33", "gpio34", "gpio35";
+			bias-pull-up;
+		};
+	};
+
+	wl_on_default: wl-on-default-state {
+		function = "gpio";
+		pins = "gpio28";
+	};
 };
 
 &pinctrl_aon {
@@ -109,6 +144,23 @@ &sdio1 {
 	cd-gpios = <&gio_aon 5 GPIO_ACTIVE_LOW>;
 };
 
+&sdio2 {
+	pinctrl-0 = <&sdio2_30_default>;
+	pinctrl-names = "default";
+	bus-width = <4>;
+	vmmc-supply = <&wl_on_reg>;
+	sd-uhs-ddr50;
+	non-removable;
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	wifi: wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
 &soc {
 	firmware: firmware {
 		compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index f70ec8d3dc4d..871537366e96 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -285,6 +285,21 @@ gio_aon: gpio@7d517c00 {
 			 */
 		};
 
+		sdio2: mmc@1100000 {
+			compatible = "brcm,bcm2712-sdhci",
+				     "brcm,sdhci-brcmstb";
+			reg = <0x01100000  0x260>,
+			      <0x01100400  0x200>;
+			reg-names = "host", "cfg";
+			interrupts = <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk_emmc2>;
+			clock-names = "sw_sdio";
+			sdhci-caps-mask = <0x0000C000 0x0>;
+			sdhci-caps = <0x0 0x0>;
+			mmc-ddr-3_3v;
+			status = "disabled";
+		};
+
 		gicv2: interrupt-controller@7fff9000 {
 			compatible = "arm,gic-400";
 			reg = <0x7fff9000 0x1000>,
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/6] arm64: dts: broadcom: bcm2712: Add UARTA controller node
  2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
                   ` (4 preceding siblings ...)
  2025-08-11 15:19 ` [PATCH 5/6] arm64: dts: broadcom: bcm2712: Add second SDHCI controller node Andrea della Porta
@ 2025-08-11 15:19 ` Andrea della Porta
  2025-08-12 12:12 ` [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Rob Herring (Arm)
  6 siblings, 0 replies; 10+ messages in thread
From: Andrea della Porta @ 2025-08-11 15:19 UTC (permalink / raw)
  To: linus.walleij, robh, krzk+dt, conor+dt, florian.fainelli,
	wahrenst, linux-gpio, devicetree, linux-arm-kernel,
	Catalin Marinas, Will Deacon, iivanov, svarbanov, mbrugger,
	Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial
  Cc: Andrea della Porta

From: "Ivan T. Ivanov" <iivanov@suse.de>

On RPi5 device Bluetooth chips is connected to UARTA
port. Add Bluetooth chips and related pin definitions.

With this and firmware already provided by distributions,
at least on openSUSE Tumbleweed, this is sufficient to make
Bluetooth operational on RPi5 \o/.

Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
---
 .../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts  | 42 +++++++++++++++++++
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 10 +++++
 2 files changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
index 411b58c1dddf..04738bf281eb 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
@@ -81,6 +81,11 @@ wl_on_reg: wl-on-reg {
 };
 
 &pinctrl {
+	bt_shutdown_default: bt-shutdown-default-state {
+		function = "gpio";
+		pins = "gpio29";
+	};
+
 	emmc_sd_default: emmc-sd-default-state {
 		pins = "emmc_cmd", "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3";
 		bias-pull-up;
@@ -110,6 +115,29 @@ dat-pins {
 		};
 	};
 
+	uarta_24_default: uarta-24-default-state {
+		rts-pins {
+			function = "uart0";
+			pins = "gpio24";
+			bias-disable;
+		};
+		cts-pins {
+			function = "uart0";
+			pins = "gpio25";
+			bias-pull-up;
+		};
+		txd-pins {
+			function = "uart0";
+			pins = "gpio26";
+			bias-disable;
+		};
+		rxd-pins {
+			function = "uart0";
+			pins = "gpio27";
+			bias-pull-up;
+		};
+	};
+
 	wl_on_default: wl-on-default-state {
 		function = "gpio";
 		pins = "gpio28";
@@ -188,6 +216,20 @@ power: power {
 	};
 };
 
+/* uarta communicates with the BT module */
+&uarta {
+	uart-has-rtscts;
+	pinctrl-0 = <&uarta_24_default &bt_shutdown_default>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	bluetooth: bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <3000000>;
+		shutdown-gpios = <&gio 29 GPIO_ACTIVE_HIGH>;
+	};
+};
+
 &hvs {
 	clocks = <&firmware_clocks 4>, <&firmware_clocks 16>;
 	clock-names = "core", "disp";
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index 871537366e96..1ed26a211ed5 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -260,6 +260,16 @@ gio: gpio@7d508500 {
 			brcm,gpio-bank-widths = <32 22>;
 		};
 
+		uarta: serial@7d50c000 {
+			compatible = "brcm,bcm7271-uart";
+			reg = <0x7d50c000 0x20>;
+			reg-names = "uart";
+			clock-frequency = <96000000>;
+			interrupts = <GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uart";
+			status = "disabled";
+		};
+
 		pinctrl_aon: pinctrl@7d510700 {
 			compatible = "brcm,bcm2712c0-aon-pinctrl";
 			reg = <0x7d510700 0x20>;
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/6] dt-bindings: serial: Add clock-frequency property as an alternative to clocks
  2025-08-11 15:19 ` [PATCH 2/6] dt-bindings: serial: Add clock-frequency property as an alternative to clocks Andrea della Porta
@ 2025-08-12 12:02   ` Krzysztof Kozlowski
  2025-08-21 15:14     ` Andrea della Porta
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-12 12:02 UTC (permalink / raw)
  To: Andrea della Porta, linus.walleij, robh, krzk+dt, conor+dt,
	florian.fainelli, wahrenst, linux-gpio, devicetree,
	linux-arm-kernel, Catalin Marinas, Will Deacon, iivanov,
	svarbanov, mbrugger, Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial

On 11/08/2025 17:19, Andrea della Porta wrote:
> The UARTA controller on BCM2712 connected to Bluetooth chip does not

Bluetooth chip does not ask...

> mandiatorily ask for a clock connected to the high speed baud generator.
> This is, in fact, an optional clock in the driver.

... or driver does not ask?

Please describe here hardware.


> 
> As an alternative, the call to uart_read_port_properties() ensures that
> just a simple 'clock-frequency' property can be specified for the clock
> value.

Don't describe drivers. Describe hardware.

> 
> Amend the bindings to allow to either specify clocks or clock-frequency.
> 
> Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
> ---
>  .../bindings/serial/brcm,bcm7271-uart.yaml    | 19 +++++++++++++++++--

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching. For bindings, the preferred subjects are
explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters


>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
> index 89c462653e2d..96697b1428bd 100644
> --- a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
> +++ b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
> @@ -40,7 +40,15 @@ properties:
>            - const: dma_tx
>            - const: dma_intr2
>  
> +  clock-frequency:
> +    description:
> +      The input clock frequency for the UART, Either this or clocks must be
> +      specified.

Anyway, don't open-code schema in free form text.

That's legacy property. You need clear explanation why.

> +
>    clocks:
> +    description:
> +      High speed baud rate clock. Either this or clock-frequency must be
> +      specified.

Drop last sentence, Anyway, don't open-code schema in free form text.
First sentence seems redundant anyway.


>      minItems: 1

I'll fix this.

>  
>    clock-names:
> @@ -61,11 +69,18 @@ required:
>    - compatible
>    - reg
>    - reg-names
> -  - clocks
> -  - clock-names
>    - interrupts
>    - interrupt-names
>  
> +oneOf:
> +  - allOf:
> +      - required:
> +          - clocks
> +      - required:
> +          - clock-names
> +  - required:
> +      - clock-frequency
> +
>  unevaluatedProperties: false
>  
>  examples:


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT
  2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
                   ` (5 preceding siblings ...)
  2025-08-11 15:19 ` [PATCH 6/6] arm64: dts: broadcom: bcm2712: Add UARTA " Andrea della Porta
@ 2025-08-12 12:12 ` Rob Herring (Arm)
  6 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2025-08-12 12:12 UTC (permalink / raw)
  To: Andrea della Porta
  Cc: iivanov, florian.fainelli, Catalin Marinas, linux-mmc,
	Ulf Hansson, linus.walleij, Jonathan Bell, linux-serial, conor+dt,
	Broadcom internal kernel review list, devicetree, krzk+dt,
	linux-arm-kernel, svarbanov, Phil Elwell, Jiri Slaby, Will Deacon,
	linux-gpio, mbrugger, wahrenst, Al Cooper


On Mon, 11 Aug 2025 17:19:44 +0200, Andrea della Porta wrote:
> Hi,
> 
> The following patches add a few peripheral DT nodes and related pin/gpio
> nodes for Raspberry Pi 5.
> 
> This brand new patchset (hence it's a V1) is the second part of the split-up
> of the patchset [1]. It tooks patches 3 to 6 from there and adds a couple
> of new patches that amend the DT bindings.
> As a result, patchset [2] is a prerequisite for this patchset.
> 
> - Patch 1 and 2: Amend the bindings to avoid DT compiler warnings.
> 
> - Patch 3: Adds core pinctrl nodes and defines SD pins as a first appliance
>   for the pinctrl.
> 
> - Patch 4: Wires the gpio-key for power button and related gpio controller.
> 
> - Patch 5: Adds DT node for WiFi.
> 
> - Patch 6: Adds Bluetooth DT node.
> 
> All comments and suggestions are welcome!
> 
> Happy hacking!
> Ivan and Andrea
> 
> Links:
> [1] - https://lore.kernel.org/all/cover.1752584387.git.andrea.porta@suse.com/
> [2] - https://lore.kernel.org/all/cover.1754922935.git.andrea.porta@suse.com/
> 
> 
> CHANGES since [1]:
> 
> --- PATCHES ---
> 
> - Add two new patches (1 and 2) that amend the DT bindings.
> 
> 
> --- DTS ---
> 
> - bcm2712.dtsi: Added 'interrupt-names' and dropped 'reg-shift' and
>   'reg-io-width' properties in uarta DT node. The latter two are
>   just overridden by driver code so setting them in DT is useless.
> 
> - bcm2712-rpi-5-b-ovl-rp1.dts: dropped 'auto-flow-control' property
>   since it's not parsed in driver code.
> 
> 
> --- DT BINDINGS ---
> 
> - brcm,sdhci-brcmstb.yaml: added SDHCI capabilities by including
>   sdhci-common.yaml.
> 
> - serial/brcm,bcm7271-uart.yaml: let clock-frequency be an alternative way
>   to specify the clock speed instead of clocks/clock-names.
> 
> 
> Andrea della Porta (2):
>   dt-bindings: mmc: Add support for capabilities to Broadcom SDHCI
>     controller
>   dt-bindings: serial: Add clock-frequency property as an alternative to
>     clocks
> 
> Ivan T. Ivanov (4):
>   arm64: dts: broadcom: bcm2712: Add pin controller nodes
>   arm64: dts: broadcom: bcm2712: Add one more GPIO node
>   arm64: dts: broadcom: bcm2712: Add second SDHCI controller node
>   arm64: dts: broadcom: bcm2712: Add UARTA controller node
> 
>  .../bindings/mmc/brcm,sdhci-brcmstb.yaml      |   2 +-
>  .../bindings/serial/brcm,bcm7271-uart.yaml    |  19 ++-
>  .../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts  | 133 ++++++++++++++++++
>  arch/arm64/boot/dts/broadcom/bcm2712.dtsi     |  47 +++++++
>  4 files changed, 198 insertions(+), 3 deletions(-)
> 
> --
> 2.35.3
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


This patch series was applied (using b4) to base:
 Base: attempting to guess base-commit...
 Base: tags/next-20250808 (exact match)

If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/broadcom/' for cover.1754924348.git.andrea.porta@suse.com:

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dtb: /soc@107c000000/pinctrl@7d504100: failed to match any schema with compatible: ['brcm,bcm2712c0-pinctrl']
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dtb: /soc@107c000000/pinctrl@7d504100: failed to match any schema with compatible: ['brcm,bcm2712c0-pinctrl']
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: /soc@107c000000/pinctrl@7d504100: failed to match any schema with compatible: ['brcm,bcm2712c0-pinctrl']
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dtb: /soc@107c000000/pinctrl@7d510700: failed to match any schema with compatible: ['brcm,bcm2712c0-aon-pinctrl']
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dtb: /soc@107c000000/pinctrl@7d510700: failed to match any schema with compatible: ['brcm,bcm2712c0-aon-pinctrl']
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: /soc@107c000000/pinctrl@7d510700: failed to match any schema with compatible: ['brcm,bcm2712c0-aon-pinctrl']
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dtb: hvs@107c580000 (brcm,bcm2712-hvs): clocks: [[27, 4], [27, 16]] is too long
	from schema $id: http://devicetree.org/schemas/display/brcm,bcm2835-hvs.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dtb: hvs@107c580000 (brcm,bcm2712-hvs): clocks: [[27, 4], [27, 16]] is too long
	from schema $id: http://devicetree.org/schemas/display/brcm,bcm2835-hvs.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: hvs@107c580000 (brcm,bcm2712-hvs): clocks: [[27, 4], [27, 16]] is too long
	from schema $id: http://devicetree.org/schemas/display/brcm,bcm2835-hvs.yaml#







^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/6] dt-bindings: serial: Add clock-frequency property as an alternative to clocks
  2025-08-12 12:02   ` Krzysztof Kozlowski
@ 2025-08-21 15:14     ` Andrea della Porta
  0 siblings, 0 replies; 10+ messages in thread
From: Andrea della Porta @ 2025-08-21 15:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andrea della Porta, linus.walleij, robh, krzk+dt, conor+dt,
	florian.fainelli, wahrenst, linux-gpio, devicetree,
	linux-arm-kernel, Catalin Marinas, Will Deacon, iivanov,
	svarbanov, mbrugger, Jonathan Bell, Phil Elwell, Ulf Hansson,
	Broadcom internal kernel review list, Al Cooper, linux-mmc,
	Jiri Slaby, linux-serial

Hi Krzysztof,

On 14:02 Tue 12 Aug     , Krzysztof Kozlowski wrote:
> On 11/08/2025 17:19, Andrea della Porta wrote:
> > The UARTA controller on BCM2712 connected to Bluetooth chip does not
> 
> Bluetooth chip does not ask...
> 
> > mandiatorily ask for a clock connected to the high speed baud generator.
> > This is, in fact, an optional clock in the driver.
> 
> ... or driver does not ask?
> 
> Please describe here hardware.
> 
> 
> > 
> > As an alternative, the call to uart_read_port_properties() ensures that
> > just a simple 'clock-frequency' property can be specified for the clock
> > value.
> 
> Don't describe drivers. Describe hardware.

I will try to test whether the driver can just work specifying clock instead of
clock-frequency in teh DTS, so there will be no need to amend the bindings.

Many thanks,
Andrea

> 
> > 
> > Amend the bindings to allow to either specify clocks or clock-frequency.
> > 
> > Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
> > ---
> >  .../bindings/serial/brcm,bcm7271-uart.yaml    | 19 +++++++++++++++++--
> 
> Please use subject prefixes matching the subsystem. You can get them for
> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
> your patch is touching. For bindings, the preferred subjects are
> explained here:
> https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
> 
> 
> >  1 file changed, 17 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
> > index 89c462653e2d..96697b1428bd 100644
> > --- a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
> > +++ b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
> > @@ -40,7 +40,15 @@ properties:
> >            - const: dma_tx
> >            - const: dma_intr2
> >  
> > +  clock-frequency:
> > +    description:
> > +      The input clock frequency for the UART, Either this or clocks must be
> > +      specified.
> 
> Anyway, don't open-code schema in free form text.
> 
> That's legacy property. You need clear explanation why.
> 
> > +
> >    clocks:
> > +    description:
> > +      High speed baud rate clock. Either this or clock-frequency must be
> > +      specified.
> 
> Drop last sentence, Anyway, don't open-code schema in free form text.
> First sentence seems redundant anyway.
> 
> 
> >      minItems: 1
> 
> I'll fix this.
> 
> >  
> >    clock-names:
> > @@ -61,11 +69,18 @@ required:
> >    - compatible
> >    - reg
> >    - reg-names
> > -  - clocks
> > -  - clock-names
> >    - interrupts
> >    - interrupt-names
> >  
> > +oneOf:
> > +  - allOf:
> > +      - required:
> > +          - clocks
> > +      - required:
> > +          - clock-names
> > +  - required:
> > +      - clock-frequency
> > +
> >  unevaluatedProperties: false
> >  
> >  examples:
> 
> 
> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-08-21 19:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 15:19 [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Andrea della Porta
2025-08-11 15:19 ` [PATCH 1/6] dt-bindings: mmc: Add support for capabilities to Broadcom SDHCI controller Andrea della Porta
2025-08-11 15:19 ` [PATCH 2/6] dt-bindings: serial: Add clock-frequency property as an alternative to clocks Andrea della Porta
2025-08-12 12:02   ` Krzysztof Kozlowski
2025-08-21 15:14     ` Andrea della Porta
2025-08-11 15:19 ` [PATCH 3/6] arm64: dts: broadcom: bcm2712: Add pin controller nodes Andrea della Porta
2025-08-11 15:19 ` [PATCH 4/6] arm64: dts: broadcom: bcm2712: Add one more GPIO node Andrea della Porta
2025-08-11 15:19 ` [PATCH 5/6] arm64: dts: broadcom: bcm2712: Add second SDHCI controller node Andrea della Porta
2025-08-11 15:19 ` [PATCH 6/6] arm64: dts: broadcom: bcm2712: Add UARTA " Andrea della Porta
2025-08-12 12:12 ` [PATCH 0/6] Add peripheral nodes to RaspberryPi 5 DT Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).