Colibri iMX6 is using PWM3 for LCD backlight control. But it conflicts with camera interface. SODIMM67/59 are configured as MX6QDL_PAD_EIM_A21__IPU1_CSI1_DATA16 and MX6QDL_PAD_EIM_A22__IPU1_CSI1_DATA17. 1 Multiplexed pins are set MX6QDL_PAD_SD4_DAT1__GPIO2_IO09 0x40 and MX6QDL_PAD_GPIO_1__GPIO1_IO01 0x40. There are only PWM1 and PWM4 are available. I try to use PWM1 as backlight and make some changes in device tree.
you actually keep the status for pwm1 in ‘disabled’ and thus the backlight property will not be able to claim pwm1 with ‘pwms = <&pwm1 0 5000000 1>;’. I expect that you see some kernel output to that effect.
What does dmesg | grep -i -e pwm -e backlight show?
Hi Max
The backlight will be ok if pwm1’s status is set to ‘okay’. Meanwhile, camera input doesn’t work.
root@colibri-imx6:~# gst-launch-1.0 imxv4l2src ! deinterlace mode=1 ! autovideosink
====== IMXV4L2SRC: 4.1.4 build on Oct 4 2017 23:51:30. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (800x480).
====== OVERLAYSINK: 4.1.4 build [ 871.615583] mxc_v4l2_output v4l2_out: Bypass IC.
on Oct 4 2017 23:51:36. ======
[ 871.621736] mxc_v4l2_output v4l2_out: Bypass IC.
display(/dev/fb0) resolution is (800x480).
display(/dev/fb0) resolution is (800x480).
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 881.708597] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 891.719730] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 901.730815] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 911.741874] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 921.772901] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 931.783888] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 941.794852] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 951.805791] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 961.816701] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
ADV7280 only works when pwm1’s status is disabled. That is strange because SODIMM28 PWM1 is not used as camera input interface. SODIMM59 and SODIMM67 are correctly configured.
I assume you are using the ACA together with a Colibri Evaluation Board.
I don’t believe that enabling pwm1 does have any effects on the camera interface.
My guess is that you have changes in the device tree sources, e.g. in the pinctrl_pwm1 node which now changes additional pins.
Could you provide a git diff of what you actually changed for all files in arch/arm/boot/dts/?
Hi Max. I am sorry for the delay. Since I have modified other files within dts folder, it is now way different from it should be. I will restore them and give the git diff.
@max.tx , the default imx6dl-colibri-cam-eval-v3.dts sets pwm3(GPIO2_IO09) as backlight control and it is exported on SODIMM59. However, SODIMM59 is multiplexed with GPIO2_IO16 which is set to CIF_D_7 by pinctrl_ipu1_csi0. So there is a conflict on SODIMM59 and it makes LCD display and ACA not work at the same time with default imx6dl-colibri-cam-eval-v3.dtb.
When I set pwm1 as backlight control, ACA and LCD display can work together. However, there is not backlight sysfs.
root@colibri-imx6:/sys/class/backlight# ls -lha
drwxr-xr-x 2 root root 0 Mar 21 13:07 .
drwxr-xr-x 49 root root 0 Mar 21 13:07 ..
root@colibri-imx6:/sys/class/backlight# dmesg|grep pwm
root@colibri-imx6:/sys/class/backlight# dmesg|grep backlight
[ 0.195857] backlight supply power not found, using dummy regulator
[ 2.238996] backlight supply power not found, using dummy regulator
[ 2.314375] backlight supply power not found, using dummy regulator
[ 2.332497] backlight supply power not found, using dummy regulator
[ 3.765445] backlight supply power not found, using dummy regulator
[ 5.184664] backlight supply power not found, using dummy regulator
[ 5.246261] backlight supply power not found, using dummy regulator
@max.tx , after enable pwm1 , there is backlight node in /sys/class/backlight
&pwm1 {
status = "okay";
};
root@colibri-imx6:~# ls /sys/class/backlight/backlight
actual_brightness brightness max_brightness subsystem uevent
bl_power device power type
But now, ACA fails to work with below error. X11.26 is removed to make sure that SOIDMM59 is connected to ACA module.
root@colibri-imx6:~# gst-launch-1.0 imxv4l2src ! imxv4l2sink
====== IMXV4L2SRC: 4.1.4 build on Oct 4 2017 23:51:30. ======
====== IMXV4L2SINK: 4.1.4 build on Oct 4 2017 23:51:30. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (800x480).
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 322.144899] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 332.155066] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
I had a quick look at it. It is the BL_ON GPIO which you forgot about. As long as the backlight’s PWM node was deactivated also the backlight on GPIO did not get activated but now with you having changed it to the really available PWM1 the backlight becomes activated and with it the BL_ON GPIO which is also shared with a camera signal.
SODIMM71 is shared between BL_ON and RESET of ADV7280. It will be pulled low before Linux desktop is launched. Unfortunately ADV7280 have been initialized then. The reset signal just cleans all ADV7280’ configuration via I2C. So one needs to reinstall ADV780 driver.