Skip to content

Commit 4574678

Browse files
josuahjhedberg
authored andcommitted
shields: st_b_cams_imx_mb1854: introduce csi_gpio1_hogs
The "gpio-hog;" devicetree property configuring the "power enable" pin at boot was not working, due to being placed on a gpio-nexus. This is not supported and lead the gpio-hog inactive. Instead, let the board specify their CSI_IO0 and CSI_IO1 pin as GPIO hogs with status = "disabled", letting shields enable them and set the direction as needed. Signed-off-by: Josuah Demangeon <[email protected]>
1 parent 40c7c93 commit 4574678

File tree

4 files changed

+39
-7
lines changed

4 files changed

+39
-7
lines changed

boards/shields/st_b_cams_imx_mb1854/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ config VIDEO_STM32_DCMIPP_SENSOR_WIDTH
1414
config VIDEO_STM32_DCMIPP_SENSOR_HEIGHT
1515
default 1944
1616

17+
config GPIO_HOGS
18+
default y
19+
1720
endif # VIDEO_STM32_DCMIPP

boards/shields/st_b_cams_imx_mb1854/st_b_cams_imx_mb1854.overlay

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@
4747
};
4848
};
4949

50-
&csi_connector {
51-
/* Power the camera module */
52-
en-module-gpios {
53-
gpio-hog;
54-
gpios = <CSI_IO1 GPIO_ACTIVE_HIGH>;
55-
output-high;
56-
};
50+
/* Power the camera module */
51+
&csi_gpio1_hog {
52+
status = "okay";
53+
output-high;
5754
};

boards/st/nucleo_n657x0_q/nucleo_n657x0_q_common.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,22 @@
6666
};
6767
};
6868

69+
&gpioo {
70+
csi_gpio0_hog: csi-gpio0-hog {
71+
gpio-hog;
72+
gpios = <5 GPIO_ACTIVE_HIGH>;
73+
status = "disabled";
74+
};
75+
};
76+
77+
&gpioa {
78+
csi_gpio1_hog: csi-gpio1-hog {
79+
gpio-hog;
80+
gpios = <0 GPIO_ACTIVE_HIGH>;
81+
status = "disabled";
82+
};
83+
};
84+
6985
&clk_hse {
7086
hse-div2;
7187
clock-frequency = <DT_FREQ_M(48)>;

boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,22 @@
8686
};
8787
};
8888

89+
&gpioc {
90+
csi_gpio0_hog: csi-gpio0-hog {
91+
gpio-hog;
92+
gpios = <8 GPIO_ACTIVE_HIGH>;
93+
status = "disabled";
94+
};
95+
};
96+
97+
&gpiod {
98+
csi_gpio1_hog: csi-gpio1-hog {
99+
gpio-hog;
100+
gpios = <2 GPIO_ACTIVE_HIGH>;
101+
status = "disabled";
102+
};
103+
};
104+
89105
&i2c2 {
90106
status = "okay";
91107
clocks = <&rcc STM32_CLOCK(APB1, 22)>,

0 commit comments

Comments
 (0)