Hello,
I am doing the setup of our design based on am3352 processor.
I use kernel 4.4.19 from TI SDK 03.01.00.06 and compile it with "omap2plus_defconfig" configuration file.
I checked that some GPIOS are fine by activating them with this source code in the kernel:
#define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
#define GPIO_USR_0 GPIO_TO_PIN(2, 20)
gpio_request(GPIO_USR_0, "mii1_rxd1");
gpio_direction_output(GPIO_USR_0, 0);
gpio_set_value_cansleep( GPIO_USR_0, 1);
I want to set initial value to 1 on my .dts file, but it is not working. This is what I added ti my .dts file
gpio_buttons: gpio_buttons@0 {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
switch@1 {
label = "IO0";
gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
};
&am33xx_pinmux {
pinctrl-names = "default";
pinctrl-0 = <&gpio_keys_def>;
gpio_keys_def: gpio_keys_def {
pinctrl-single,pins = <
0x13c ( PIN_OUTPUT | MUX_MODE7 ) /* (L15) gmii1_rxd1.gpio2_20 */
>;
};
Do I need to add anything else in this file? or am I missing something in kernel configuration?
Best regards