Dear Community,
I expect to use EXP_IO8 and EXP_IO9 of PCA6416 on iMX8MM EVK as POWER-DOWN and RESET control for a camera sensor :

I imitated the use of PCA6416's outputs #1, #3, #4, #5 in arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi as below :
reg_audio_board: regulator-audio-board {
...
gpio = <&pca6416 1 GPIO_ACTIVE_HIGH>;
regulator-always-on;
};
sound-ak4458 {
...
reset-gpios = <&pca6416 4 GPIO_ACTIVE_LOW>;
};
ak5558: ak5558@13 {
compatible = "asahi-kasei,ak5558";
reg = <0x13>;
reset-gpios = <&pca6416 3 GPIO_ACTIVE_LOW>;
...
};
ak4497: ak4497@11 {
compatible = "asahi-kasei,ak4497";
reg = <0x11>;
reset-gpios = <&pca6416 5 GPIO_ACTIVE_LOW>;
...
};
And used the output #8, #9 for my sensor's node in the custom dts :
+&i2c3 {
+ /delete-node/ov5640_mipi@3c;
+
+ adv728x_mipi1: adv728x_mipi1@21 {
+ compatible = "adi,adv7280-m";
+ reg = <0x21>;
+ csi_id = <0x00>;
+ status = "okay";
+
+ pwn-gpios = <&pca6416 8 GPIO_ACTIVE_LOW>;
+ rst-gpios = <&pca6416 9 GPIO_ACTIVE_LOW>;
+
+ port {
+ adv728x_mipi1_ep: endpoint {
+ remote-endpoint = <&mipi1_sensor_ep>;
+
+ data-lanes = <1>;
+ clock-lanes = <0>;
+ };
+ };
+ };
+};
I always got the following error :
[ 6.706860] adv7180 2-0021: request for power pin failed: -517
[ 7.539305] adv7180 2-0021: request for power pin failed: -517
for the below code snippet :
state->pwdn_gpio = devm_gpiod_get_optional(&client->dev, "pwn",
GPIOD_OUT_HIGH);
if (IS_ERR(state->pwdn_gpio)) {
ret = PTR_ERR(state->pwdn_gpio);
v4l_err(client, "request for power pin failed: %d\n", ret);
return ret;
}
Could someone tell me how I would be able to use the mentioned outputs, please ?
Thanks in advance and best regards,
Khang