Page 1 of 1

GPIO3_B0 to GPIO3_C3 always reads 0 on Luckfox Pico Pro/Max (even as input)

Posted: 2025-12-31 5:28
by Soheil_Jbbr
Hello Luckfox team and community,

I am trying to use GPIO3_B0 ~ GPIO3_C3 pins as input on a Luckfox Pico Pro/Max (RV1106).

I understand that GPIO3_B0 to GPIO3_C3 are input-only and cannot be used as output. My question is specifically about reading their input value.

What I observe
  • The pins measure about 0.8 V when floating

    When I externally drive them with 1.8 V, the voltage level changes correctly on the pin

    However, Linux always reports the value as 0
Example:

root@rv1106:~# cat /sys/class/gpio/gpio115/direction
in
root@rv1106:~# cat /sys/class/gpio/gpio115/value
0

What I have already tried

1.Removed pinctrl ownership by commenting out MIPI/LVDS pinctrl:

&rkcif_mipi_lvds {
pinctrl-0 = <>;
};


2.Disabled the full MIPI / ISP / CIF pipeline in config/dts_config:

&mipi0_csi2_hw { status = "disabled"; };
&mipi1_csi2_hw { status = "disabled"; };
&csi2_dphy_hw { status = "disabled"; };
&csi2_dphy0 { status = "disabled"; };
&mipi0_csi2 { status = "disabled"; };
&rkcif { status = "disabled"; };
&rkcif_mipi_lvds { status = "disabled"; pinctrl-0 = <>; };
&rkcif_mipi_lvds_sditf { status = "disabled"; };
&rkisp { status = "disabled"; };
&rkisp_vir0 { status = "disabled"; };


Recompiled the kernel and reflashed the board

Exported GPIO correctly using Linux sysfs (GPIO numbering verified)

My question

Is commenting out / disabling the MIPI-related pinctrl and nodes sufficient to read GPIO3_Bx / GPIO3_Cx inputs?

Or is there any additional configuration required, such as:

Special IO domain / voltage configuration

Pull-up / pull-down settings

GRF / PMU register configuration

Or a known hardware limitation where these pins cannot be read reliably by GPIO even as inputs?

Any clarification or reference to documentation would be greatly appreciated.

Thank you for your time and support.

Re: GPIO3_B0 to GPIO3_C3 always reads 0 on Luckfox Pico Pro/Max (even as input)

Posted: 2025-12-31 6:49
by Crocodile
Hello, it is recommended to first use the command "iomux 3 8 0 (GPIO=3 B0=8*1+0 GPIO_MODE=0)" to configure the CSI pin as GPIO mode, and then conduct the GPIO input test.

Re: GPIO3_B0 to GPIO3_C3 always reads 0 on Luckfox Pico Pro/Max (even as input)

Posted: 2025-12-31 7:41
by Soheil_Jbbr
Hello @Crocodile,

Thank you for the suggestion. I already tried configuring the CSI pin as GPIO using the iomux command:

root@rv1106:~# echo 115 > /sys/class/gpio/unexport
root@rv1106:~# ./iomux 3 19
mux get (GPIO3-19) = 0
root@rv1106:~# ./iomux 3 19 0
root@rv1106:~# ./iomux 3 19
mux get (GPIO3-19) = 0
root@rv1106:~# echo 115 > /sys/class/gpio/export
root@rv1106:~# cat /sys/class/gpio/gpio115/value
0
root@rv1106:~# cat /sys/class/gpio/gpio115/value
0
root@rv1106:~# cat /sys/class/gpio/gpio115/value
0
root@rv1106:~# cat /sys/class/gpio/gpio115/value
0
root@rv1106:~# cat /sys/class/gpio/gpio115/value
0

I verified multiple times, but the value is always 0. The pin is floating at around 0.8 V, and when I drive it to 1.8 V externally, the voltage is correct, but the GPIO still reads 0.

I also have a doubt regarding GPIO numbering: does GPIO115 actually correspond to GPIO3_C3_D (pin number 128)? Could there be a mismatch in the mapping that causes this behavior?

Could you please clarify whether this pin can actually be used as a GPIO input, or if there is some limitation that prevents it?

Thanks for your guidance.

Re: GPIO3_B0 to GPIO3_C3 always reads 0 on Luckfox Pico Pro/Max (even as input)

Posted: 2025-12-31 7:59
by Crocodile
GPIO3_C3_D corresponds to GPIO115 (32*3 + 16 + 3).
We have previously tested that by outputting a high level from the 1.8V voltage domain pin to the GPI pin, the high level can be correctly recognized. It is recommended to confirm whether the externally connected 1.8V pull-up resistor and the Luckfox Pico Pro are grounded together.