2011-08-18 18:08:12 How i can disable GPIO request for Push Buttons(PB1 PB2 PB3 PB4 on BF548)
barreh walid (TUNISIA)
Message: 103007
HI
I have a BF548 ezkit and I am using the latest trunk kernel/uboot/filesystem ( 2010R1 ).
How i can disable GPIO request for Push Buttons(PB1 PB2 PB3 PB4 on BF548) from uClinux kernel ?
QuoteReplyEditDelete
2011-08-18 22:54:50 Re: How i can disable GPIO request for Push Buttons(PB1 PB2 PB3 PB4 on BF548)
Sonic Zhang (CHINA)
Message: 103009
Acquire these GPIO at early kernel boot up by your own code.
or
Mark these GPIO port P_UNDEF in bf548 machine portmux head file.
QuoteReplyEditDelete
2011-08-18 22:57:33 Re: How i can disable GPIO request for Push Buttons(PB1 PB2 PB3 PB4 on BF548)
Sonic Zhang (CHINA)
Message: 103011
Look GPIO PIN can't be marked P_UNDEF.
So, you only choice is to acquire early by yourself.
QuoteReplyEditDelete
2011-08-18 22:58:24 Re: How i can disable GPIO request for Push Buttons(PB1 PB2 PB3 PB4 on BF548)
Sonic Zhang (CHINA)
Message: 103013
Look GPIO PIN can't be marked P_UNDEF.
So, you only choice is to acquire early by yourself.
QuoteReplyEditDelete
2011-08-19 03:59:22 Re: How i can disable GPIO request for PushButtons(PB1 PB2 PB3 PB4 on BF548)
Michael Hennerich (GERMANY)
Message: 103028 Keep it simple...
Either disable CONFIG_KEYBOARD_GPIO during kernel config -
or modify bfin_gpio_keys_table[] in arch/Blackfin/mach-bf548/boards/ezkit.c
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
#include <linux/gpio_keys.h>
static struct gpio_keys_button bfin_gpio_keys_table[] = {
{BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"},
{BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"},
{BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"},
{BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"},
};
static struct gpio_keys_platform_data bfin_gpio_keys_data = {
.buttons = bfin_gpio_keys_table,
.nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
};
static struct platform_device bfin_device_gpiokeys = {
.name = "gpio-keys",
.dev = {
.platform_data = &bfin_gpio_keys_data,
},
};
#endif
-Michael
QuoteReplyEditDelete
2011-08-19 04:29:58 Re: How i can disable GPIO request for PushButtons(PB1 PB2 PB3 PB4 on BF548)
barreh walid (TUNISIA)
Message: 103030
THANKS MICHEAL and ZHANG
QuoteReplyEditDelete
2011-08-19 06:21:19 Re: How i can disable GPIO request for PushButtons(PB1 PB2 PB3 PB4 on BF548)
barreh walid (TUNISIA)
Message: 103034
Hi MICHEAL
From kernel config i disable BF548 keyboard , but after kernel boot still request for PB GPIO.
Any idea how i can disable CONFIG_KEYBOARD_GPIO during kernel config ( using make menuconfig ) ???
THANKS
QuoteReplyEditDelete
2011-08-19 06:58:19 Re: How i can disable GPIO request forPushButtons(PB1 PB2 PB3 PB4 on BF548)
Michael Hennerich (GERMANY)
Message: 103036 I think you disabled CONFIG_KEYBOARD_BFIN...
However you need to disable the gpio_keys driver, which is CONFIG_KEYBOARD_GPIO!
In case you disable the right thing -
Are you sure you use the freshly build uImage?
QuoteReplyEditDelete
2011-08-19 07:48:02 Re: How i can disable GPIO request forPushButtons(PB1 PB2 PB3 PB4 on BF548)
barreh walid (TUNISIA)
Message: 103038
Hi MICHEAL.
Yes i disable CONFIG_KEYBOARD_BFIN.
under device drivers we can enable/disable only BF548 keyboard, but gpio keys driver is not exist in config kernel.
QuoteReplyEditDelete
2011-08-19 08:22:18 Re: How i can disable GPIO request forPushButtons(PB1PB2 PB3 PB4 on BF548)
Michael Hennerich (GERMANY)
Message: 103039 On you booted system - try to run
root:/> cat /proc/gpio
And post the output
QuoteReplyEditDelete
2011-08-19 08:55:04 Re: How i can disable GPIO request forPushButtons(PB1PB2 PB3 PB4 on BF548)
barreh walid (TUNISIA)
Message: 103040
Hi MICHAEL
the output:
GPIO_16: i2c-bfin-twi Peripheral
GPIO_17: i2c-bfin-twi Peripheral
GPIO_19: BFIN-GPIO GPIO OUTPUT
GPIO_20: bfin-uart Peripheral
GPIO_21: bfin-uart Peripheral
GPIO_22: bfin-uart Peripheral
GPIO_23: bfin-uart Peripheral
GPIO_32: soc-audio Peripheral
GPIO_34: soc-audio Peripheral
GPIO_35: soc-audio Peripheral
GPIO_36: soc-audio Peripheral
GPIO_38: soc-audio Peripheral
GPIO_39: soc-audio Peripheral
GPIO_48: bf54x-lq043 Peripheral
GPIO_49: bf54x-lq043 Peripheral
GPIO_50: bf54x-lq043 Peripheral
GPIO_51: bf54x-lq043 Peripheral
GPIO_52: bf54x-lq043 Peripheral
GPIO_53: bf54x-lq043 Peripheral
GPIO_56: bf54x-keys Peripheral
GPIO_57: bf54x-keys Peripheral
GPIO_58: bf54x-keys Peripheral
GPIO_59: bf54x-keys Peripheral
GPIO_60: bf54x-keys Peripheral
GPIO_61: bf54x-keys Peripheral
GPIO_62: bf54x-keys Peripheral
GPIO_63: bf54x-keys Peripheral
GPIO_64: bfin-spi Peripheral
GPIO_65: bfin-spi Peripheral
GPIO_66: bfin-spi Peripheral
GPIO_67: BFIN-GPIO GPIO OUTPUT
GPIO_68: m25p80 Peripheral
GPIO_69: ad7877 Peripheral
GPIO_70: spidev Peripheral
GPIO_71: BFIN-GPIO GPIO OUTPUT
GPIO_72: gpio-irq175 GPIO INPUT
GPIO_75: bfin-uart Peripheral
GPIO_76: bfin-uart Peripheral
GPIO_78: i2c-bfin-twi Peripheral
GPIO_79: i2c-bfin-twi Peripheral
GPIO_80: bf54x-lq043 Peripheral
GPIO_81: bf54x-lq043 Peripheral
GPIO_82: bf54x-lq043 Peripheral
GPIO_83: bf54x-lq043 Peripheral
GPIO_84: bf54x-lq043 Peripheral
GPIO_85: bf54x-lq043 Peripheral
GPIO_86: bf54x-lq043 Peripheral
GPIO_87: bf54x-lq043 Peripheral
GPIO_88: bf54x-lq043 Peripheral
GPIO_89: bf54x-lq043 Peripheral
GPIO_90: bf54x-lq043 Peripheral
GPIO_91: bf54x-lq043 Peripheral
GPIO_92: bf54x-lq043 Peripheral
GPIO_93: bf54x-lq043 Peripheral
GPIO_94: bf54x-lq043 Peripheral
GPIO_95: bf54x-lq043 Peripheral
GPIO_96: bf54x-lq043 Peripheral
GPIO_97: bf54x-lq043 Peripheral
GPIO_98: bf54x-lq043 Peripheral
GPIO_99: bf54x-lq043 Peripheral
GPIO_100: bf54x-lq043 Peripheral
GPIO_104: bfin-spi Peripheral
GPIO_105: bfin-spi Peripheral
GPIO_106: bfin-spi Peripheral
GPIO_112: bfin-uart Peripheral
GPIO_113: bfin-uart Peripheral
GPIO_114: atapi-io-port Peripheral
GPIO_145: bf5xx-nand Peripheral
GPIO_146: bf5xx-nand Peripheral
GPIO_147: atapi-io-port Peripheral
GPIO_148: atapi-io-port Peripheral
GPIO_149: atapi-io-port Peripheral
GPIO_150: atapi-io-port Peripheral
GPIO_151: atapi-io-port Peripheral
GPIO_152: atapi-io-port Peripheral
GPIO_153: atapi-io-port Peripheral
GPIO_154: atapi-io-port Peripheral
QuoteReplyEditDelete
2011-08-22 05:20:38 Re: How i can disable GPIO requestforPushButtons(PB1PB2 PB3 PB4 on BF548)
Michael Hennerich (GERMANY)
Message: 103074 In your initial post you said: "How i can disable GPIO request for Push Buttons(PB1 PB2 PB3 PB4 on BF548)" ?
According to the EZKIT manual - these for buttons map to GPIO_PB8.. GPIO_PB11
PB1 (SW13) PUSHBUTTON1 1 (ON) PB8
PB2 (SW12) PUSHBUTTON2 2 (ON) PB9
PB3 (SW11) PUSHBUTTON3 3 (ON) PB10
PB4 (SW10) PUSHBUTTON4/HPWAIT 4 (ON) PB11
From include/mach/gpio.h:
#define GPIO_PB8 24
#define GPIO_PB9 25
#define GPIO_PB10 26
#define GPIO_PB11 27
In the output provided by you GPIO_24..GPIO_27 are not reserved.
So I don't understand where the problem is.
Can you provide the error message when you try to request these?
QuoteReplyEditDelete
2011-08-22 06:02:43 Re: How i can disable GPIO requestforPushButtons(PB1PB2 PB3 PB4 on BF548)
barreh walid (TUNISIA)
Message: 103075
Hi MICHEAL
I need to diasble 4 Push Buttons(PB1 PB2 PB3 PB4 on BF548, because when i enable uarts3 RTS/CTS using the same GPIO pin GPIO_PB2/GPIO_PB3. -> GPIO request failed and kerenel hang.
I tried to do it from make menuconfig, but it is failed.