From 531f8723c990ecb8727ae40716db3069d954acd7 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Thu, 15 Dec 2022 15:59:28 +0000
Subject: [PATCH] dt: Correct cam_reg GPIO assignments for CM1&3.

The standard instructions for wiring up cameras on CM1&3
assign GPIOs for both the shutdown and LED pins on the
camera connectors.
The assignment in DT matched the LED wiring, not the shutdown
line, so didn't control the camera power correctly.

Update the base DT accordingly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 arch/arm/boot/dts/bcm2708-rpi-cm.dts  | 4 ++--
 arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 4 ++--
 arch/arm/boot/dts/overlays/README     | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts
@@ -11,12 +11,12 @@
 };
 
 &cam1_reg {
-	gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
+	gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
 	status = "disabled";
 };
 
 cam0_reg: &cam0_regulator {
-	gpio = <&gpio 30 GPIO_ACTIVE_HIGH>;
+	gpio = <&gpio 31 GPIO_ACTIVE_HIGH>;
 };
 
 &uart0 {
--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
@@ -11,12 +11,12 @@
 };
 
 &cam1_reg {
-	gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
+	gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
 	status = "disabled";
 };
 
 cam0_reg: &cam0_regulator {
-	gpio = <&gpio 30 GPIO_ACTIVE_HIGH>;
+	gpio = <&gpio 31 GPIO_ACTIVE_HIGH>;
 };
 
 &uart0 {
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -146,12 +146,12 @@ Params:
 
         cam0_reg                Enables CAM 0 regulator. CM1 & 3 only.
 
-        cam0_reg_gpio           Set GPIO for CAM 0 regulator. Default 30.
+        cam0_reg_gpio           Set GPIO for CAM 0 regulator. Default 31.
                                 CM1 & 3 only.
 
         cam1_reg                Enables CAM 1 regulator. CM1 & 3 only.
 
-        cam1_reg_gpio           Set GPIO for CAM 1 regulator. Default 2.
+        cam1_reg_gpio           Set GPIO for CAM 1 regulator. Default 3.
                                 CM1 & 3 only.
 
         eee                     Enable Energy Efficient Ethernet support for
