From 7f8327bd376c54e205d98885a0ba9a31c053faeb Mon Sep 17 00:00:00 2001
From: Richard Oliver <richard.oliver@raspberrypi.com>
Date: Tue, 25 Feb 2025 15:06:23 +0000
Subject: [PATCH] dts: Add hogs for RP1 GPIO 46/48 on CM5

On Pi5 5, GPIOs 46/48 are made available on the 'CAM/DISP 1' connector as
'CD1_IO0_MICCLK'/'CD1_IO1_MICDAT1'. These GPIOs are not connected on
CM5.

Add hogs for GPIO 46/48 on CM5 to prevent camera drivers from
inadvertently using them when connected to 'CAM/DISP 1'

Signed-off-by: Richard Oliver <richard.oliver@raspberrypi.com>
---
 arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
@@ -700,6 +700,18 @@ spi10_cs_pins: &spi10_cs_gpio1 {};
 		function = "vbus1";
 		pins = "gpio42", "gpio43";
 	};
+
+	micclk1_hog {
+		gpio-hog;
+		gpios = <46 GPIO_ACTIVE_HIGH>;
+		output-high;
+	};
+
+	micdat1_hog {
+		gpio-hog;
+		gpios = <48 GPIO_ACTIVE_HIGH>;
+		output-high;
+	};
 };
 
 / {
