openwrt/target/linux/bcm27xx/patches-6.1/950-1223-overlays-Add-always-on-parameter-to-imx477-and-imx29.patch
Marty Jones 2e715fb4fc bcm27xx: update 6.1 patches to latest version
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y

Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-25 17:46:45 +01:00

100 lines
3.5 KiB
Diff

From 3ed57f25f3074f6abfe570fc11aa7d370fdc499a Mon Sep 17 00:00:00 2001
From: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Date: Wed, 6 Dec 2023 14:38:03 +0000
Subject: [PATCH] overlays: Add "always-on" parameter to imx477 and imx296
Leave the camera's power supplies up, to prevent the camera
clamping its 1.8V digital I/Os to ground. This may be useful
when synchronizing multiple camera systems using XVS or XTRIG.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
---
arch/arm/boot/dts/overlays/README | 6 ++++++
arch/arm/boot/dts/overlays/imx296-overlay.dts | 9 +++++++++
arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi | 9 +++++++++
3 files changed, 24 insertions(+)
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2520,6 +2520,8 @@ Params: rotation Mounting
clock-frequency Sets the clock frequency to match that used on
the board, which should be one of 54000000
(the default), 37125000 or 74250000.
+ always-on Leave the regulator powered up, to stop the
+ camera clamping I/Os such as XTRIG to 0V.
Name: imx327
@@ -2558,6 +2560,8 @@ Params: rotation Mounting
configuring the sensor (default on)
cam0 Adopt the default configuration for CAM0 on a
Compute Module (CSI0, i2c_vc, and cam0_reg).
+ always-on Leave the regulator powered up, to stop the
+ camera clamping I/Os such as XVS to 0V.
Name: imx462
@@ -2596,6 +2600,8 @@ Params: rotation Mounting
configuring the sensor (default on)
cam0 Adopt the default configuration for CAM0 on a
Compute Module (CSI0, i2c_vc, and cam0_reg).
+ always-on Leave the regulator powered up, to stop the
+ camera clamping I/Os such as XVS to 0V.
Name: imx519
--- a/arch/arm/boot/dts/overlays/imx296-overlay.dts
+++ b/arch/arm/boot/dts/overlays/imx296-overlay.dts
@@ -37,6 +37,13 @@
};
};
+ reg_alwayson_frag: fragment@99 {
+ target = <&cam1_reg>;
+ __dormant__ {
+ regulator-always-on;
+ };
+ };
+
i2c_frag: fragment@100 {
target = <&i2c_csi_dsi>;
__overlay__ {
@@ -98,8 +105,10 @@
<&csi_frag>, "target:0=",<&csi0>,
<&clk_frag>, "target:0=",<&cam0_clk>,
<&reg_frag>, "target:0=",<&cam0_reg>,
+ <&reg_alwayson_frag>, "target:0=",<&cam0_reg>,
<&imx296>, "clocks:0=",<&cam0_clk>,
<&imx296>, "avdd-supply:0=",<&cam0_reg>;
clock-frequency = <&clk_over>, "clock-frequency:0";
+ always-on = <0>, "+99";
};
};
--- a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
+++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
@@ -33,6 +33,13 @@
};
};
+ reg_alwayson_frag: fragment@99 {
+ target = <&cam1_reg>;
+ __dormant__ {
+ regulator-always-on;
+ };
+ };
+
i2c_frag: fragment@100 {
target = <&i2c_csi_dsi>;
__overlay__ {
@@ -69,8 +76,10 @@
<&csi_frag>, "target:0=",<&csi0>,
<&clk_frag>, "target:0=",<&cam0_clk>,
<&reg_frag>, "target:0=",<&cam0_reg>,
+ <&reg_alwayson_frag>, "target:0=",<&cam0_reg>,
<&cam_node>, "clocks:0=",<&cam0_clk>,
<&cam_node>, "VANA-supply:0=",<&cam0_reg>;
+ always-on = <0>, "+99";
};
};