From 33b96fbad23c38fecf082869bf01149caf2e0690 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 20 Dec 2024 15:08:52 +0000 Subject: [PATCH] dts: Add noanthogs parameter to CM4 and CM5 By default, the antenna selection on CM4 and CM5 is fixed at boot time, with the dtparams ant1, ant2 and noant selecting which should be enabled. Add a new dtparam - noanthogs - which leaves the GPIOs free to be controlled at runtime by the OS. N.B. Using this parameter without suitable OS support will leave both antennae disabled, resulting in attenuated WiFi and Bluetooth signals. Signed-off-by: Phil Elwell --- arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts | 2 ++ arch/arm/boot/dts/overlays/README | 6 ++++++ arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi | 2 ++ 3 files changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts index 668e31d67cf8ea..ddc33bbe872fb5 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4.dts @@ -493,6 +493,8 @@ i2c_csi_dsi0: &i2c0 { <&ant1>, "output-low?=on", <&ant2>, "output-high?=off", <&ant2>, "output-low?=on"; + noanthogs = <&ant1>,"status=disabled", + <&ant2>, "status=disabled"; pcie_tperst_clk_ms = <&pcie0>,"brcm,tperst-clk-ms:0"; }; diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index b0c43018ed74e1..45bad461249bc4 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -153,6 +153,12 @@ Params: noant Disable both antennas. CM4/5 only. + noanthogs Disable the GPIO hogs on the antenna controls + so they can be controlled at runtime. Note that + using this parameter without suitable OS + support will result in attenuated WiFi and + Bluetooth signals. CM4/5 only. + audio Set to "on" to enable the onboard ALSA audio interface (default "off") diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi index 6fbf8292d587df..79666d85c31a24 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi @@ -708,5 +708,7 @@ spi10_cs_pins: &spi10_cs_gpio1 {}; <&ant1>, "output-low?=on", <&ant2>, "output-high?=off", <&ant2>, "output-low?=on"; + noanthogs = <&ant1>,"status=disabled", + <&ant2>, "status=disabled"; }; };