[SRU][N:raspi][PATCH 5/7] dts: bcm2712: cm5: Add antenna controls

Juerg Haefliger juerg.haefliger at canonical.com
Wed Mar 19 09:58:29 UTC 2025


From: Phil Elwell <phil at raspberrypi.com>

BugLink: https://bugs.launchpad.net/bugs/2089555

Use the same ant1/ant2/noant controls as CM4.

Signed-off-by: Phil Elwell <phil at raspberrypi.com>
(cherry picked from commit 2de0a8c2a3c721cc6aa71fb0fac8780059920b85 rpi-6.8.y)
Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
---
 .../boot/dts/broadcom/bcm2712-rpi-cm5.dtsi    | 29 +++++++++++++++++++
 arch/arm/boot/dts/overlays/README             |  6 ++--
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi b/arch/arm/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
index b1498db091e7..b6fa6115d45e 100644
--- a/arch/arm/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
@@ -670,6 +670,22 @@ rp1_run_hog {
 		output-high;
 		line-name = "RP1 RUN pin";
 	};
+
+	ant1: ant1-hog {
+		gpio-hog;
+		gpios = <5 GPIO_ACTIVE_HIGH>;
+		/* internal antenna enabled */
+		output-high;
+		line-name = "ant1";
+	};
+
+	ant2: ant2-hog {
+		gpio-hog;
+		gpios = <6 GPIO_ACTIVE_HIGH>;
+		/* external antenna disabled */
+		output-low;
+		line-name = "ant2";
+	};
 };
 
 &rp1_gpio {
@@ -839,6 +855,19 @@ __overrides__ {
 		drm_fb2_rp1_dpi = <&aliases>, "drm-fb2=",&dpi;
 		drm_fb2_vc4 = <&aliases>, "drm-fb2=",&vc4;
 
+		ant1 =  <&ant1>,"output-high?=on",
+			<&ant1>, "output-low?=off",
+			<&ant2>, "output-high?=off",
+			<&ant2>, "output-low?=on";
+		ant2 =  <&ant1>,"output-high?=off",
+			<&ant1>, "output-low?=on",
+			<&ant2>, "output-high?=on",
+			<&ant2>, "output-low?=off";
+		noant = <&ant1>,"output-high?=off",
+			<&ant1>, "output-low?=on",
+			<&ant2>, "output-high?=off",
+			<&ant2>, "output-low?=on";
+
 		fan_temp0 = <&cpu_tepid>,"temperature:0";
 		fan_temp1 = <&cpu_warm>,"temperature:0";
 		fan_temp2 = <&cpu_hot>,"temperature:0";
diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
index 7d45421bff63..aaea53113736 100644
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -130,11 +130,11 @@ Name:   <The base DTB>
 Info:   Configures the base Raspberry Pi hardware
 Load:   <loaded automatically>
 Params:
-        ant1                    Select antenna 1 (default). CM4 only.
+        ant1                    Select antenna 1 (default). CM4/5 only.
 
-        ant2                    Select antenna 2. CM4 only.
+        ant2                    Select antenna 2. CM4/5 only.
 
-        noant                   Disable both antennas. CM4 only.
+        noant                   Disable both antennas. CM4/5 only.
 
         audio                   Set to "on" to enable the onboard ALSA audio
                                 interface (default "off")
-- 
2.43.0




More information about the kernel-team mailing list