Android Buttons - IOMUX - safeMode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Android Buttons - IOMUX - safeMode

1,001 Views
jeromeolivier
Contributor II

Hello everybody,

I am now working on the BD-SL-i.MX6.

I need to use the GPIO_19 PAD for another use than KEY_VOLUME_DOWN and that is why I changed the IOMUX config of this pad in the kernel (arch/arm/mach-mx6/pads-mx6_sabrelite.h).
Since then Android start on Safe Mode and I haven't since yet something useful in the logcat. Moreover, according to the Android Compatibility Definition for ICS/4.0.4, VOLUME DOWN key is not mandatory.
So I decided to move the VOLUME DOWN function to another GPIO on another PAD. I chose :

MX6PAD(EIM_A24__GPIO_5_4),   /* GPIO5[4] - unused */

And in arch/arm/mach-mx6/board-mx6q_sabrelite.c I've done :

-#define MX6_SABRELITE_VOL_DOWN_KEY    IMX_GPIO_NR(4, 5)

+//#define MX6_SABRELITE_VOL_DOWN_KEY    IMX_GPIO_NR(4, 5)

+#define MX6_SABRELITE_VOL_DOWN_KEY    IMX_GPIO_NR(5, 4)


Eventually there is a need for PAD control in arch/arm/plat-mxc/include/mach/iomux-mx6q.h (although for the original GPIO_19 there is no control) :

+#define MX6Q_EIM_24_PAD_CTRL PAD_CTL_PUS_47K_UP

#define  MX6Q_PAD_EIM_A24__GPIO_5_4   \
-   (_MX6Q_PAD_EIM_A24__GPIO_5_4 | MUX_PAD_CTRL(NO_PAD_CTRL))
+   (_MX6Q_PAD_EIM_A24__GPIO_5_4 | MUX_PAD_CTRL(MX6Q_EIM_24_PAD_CTRL)

Then Android STILL boot in Safe Mode.

I wonder how Android can be aware that the VOLUME_DOWN is linked on another PADS...

I looked into U-boot configuration and I changed  : board/boundary/nitrogen6x/nitrogen6x.c

@@ -228,7 +228,8 @@ static iomux_v3_cfg_t const button_pads[] = {
        /* Home */
        MX6_PAD_NANDF_D4__GPIO_2_4      | MUX_PAD_CTRL(BUTTON_PAD_CTRL),
        /* Volume Down */
-       MX6_PAD_GPIO_19__GPIO_4_5       | MUX_PAD_CTRL(BUTTON_PAD_CTRL),
+//     MX6_PAD_GPIO_19__GPIO_4_5       | MUX_PAD_CTRL(BUTTON_PAD_CTRL),
+       MX6_PAD_EIM_A24__GPIO_5_4       | MUX_PAD_CTRL(BUTTON_PAD_CTRL),

But still Safe Mode.

So I looked up in /proc/cmdline but U-boot give nothing to the kernel about GPIO-keys

I am quite lost about in which case Android boot into safeMode by itself and how Android "knows" that I changed the IOMUX-ing.m

I hope I was enough clear about the problem I am encountering,
Thanks
Jerome Olivier

Labels (3)
0 Kudos
0 Replies