Hello All,
I am using customized am335x_sk, i need to set the vibration for our customized board. So, is there any procedure to do that?
Thanks in advance.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello All,
I am using customized am335x_sk, i need to set the vibration for our customized board. So, is there any procedure to do that?
Thanks in advance.
Hello Sir,
I am setting vibration externally to our board.So, i need procedure to do that and also to enable it in the kernel .
Thanks in advance.
Hello Sir,
Is there any document to refer Sir?
*********************Thanks in advance*****************************
Hi Kala,
You should provide more info:
1. About your hardware. What do you mean by "vibration"? Some external vibro motor? How is it connected to the am335x_sk board?
2. About your software: What platform do you use? Linux? Android? SYS/BIOS? Starterware?
Best,
Vasili
Hello Sir,
Thanks for your reply. Can we connect vibrator motor with any GPIO or its should need to connect with EHRPWM pins? Because in GP evm's kernel it was configured as GPIO1_20.
****************** Thanks in advance*******************
Hi,
From the am335x board config file I can see this:
static struct pinmux_config haptics_pin_mux[] = {
{"gpmc_ad9.ehrpwm2B", OMAP_MUX_MODE4 |
AM33XX_PIN_OUTPUT},
{NULL, 0},
};
Where did you see the haptics vibrator being connected to gpio1_20?
You can probably drive the vibrator from a gpio pin, but you would have to use a software pwm, which is extra work.
Best regards,
Miroslav
Hello Sir,
Thanks for your reply. I saw in board-am335xevm-vibrator.c in
Hi,
What software and which version are you using?
I'm using the latest Sitara AM335x SDK version 06.00.00.00 and there is no such file or function.
Best regards,
Miroslav
Hi,
I don't currently have the Android kernel sources in front of me but it seems like the Android board config file is different than the Linux board config file.
This line:
omap_mux_init_signal("gpmc_a4.gpio1_20", OMAP_MUX_MODE7 | OMAP_PIN_OUTPUT);
means that the gpmc_a4 pin is pinmuxed as a gpio1_20 signal (which is mux mode 7) and is also configured as output. Seems like the vibrator is driven through a GPIO pin, I guess using software PWM. As I already said, this is viable although it would be better to use the dedicated hardware PWM.
Please try to ask your question in the Android forums. They will provide a better explanation as to why this is done this way. Perhaps the PWM pins are used for something else?
Best regards,
Miroslav
Hello Miroslav,
But in Android kernel both
static struct pinmux_config haptics_pin_mux[] = {
{"gpmc_ad9.ehrpwm2B", OMAP_MUX_MODE4 |
AM33XX_PIN_OUTPUT},
{NULL, 0},
};
and
omap_mux_init_signal("gpmc_a4.gpio1_20", OMAP_MUX_MODE7 | OMAP_PIN_OUTPUT) available.
We can find the omap_mux_init_signal in am335xevm_vibrator_init under arch/mach-omap2/ directory.
We are confusing due to this two pins. In schematic just one pin is connected but in kernel both GPIO1_20 & EHRPWM2B is initiated. Any idea?
Hi,
From the linux board config file:
static struct evm_dev_cfg gen_purp_evm_dev_cfg[] = {
{am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{clkout2_enable, DEV_ON_BASEBOARD, PROFILE_ALL},
{enable_ecap0, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 |
PROFILE_2 | PROFILE_7) },
{lcdc_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 |
PROFILE_2 | PROFILE_7) },
{mfd_tscadc_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 |
PROFILE_2 | PROFILE_7) },
{rgmii1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{rgmii2_init, DEV_ON_DGHTR_BRD, (PROFILE_1 | PROFILE_2 |
PROFILE_4 | PROFILE_6) },
{usb0_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{usb1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{evm_nand_init, DEV_ON_DGHTR_BRD,
(PROFILE_ALL & ~PROFILE_2 & ~PROFILE_3)},
{i2c1_init, DEV_ON_DGHTR_BRD, (PROFILE_ALL & ~PROFILE_2)},
{lis331dlh_init, DEV_ON_DGHTR_BRD, (PROFILE_ALL & ~PROFILE_2)},
{mcasp1_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_3 | PROFILE_7)},
{mmc1_init, DEV_ON_DGHTR_BRD, PROFILE_2},
{mmc2_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 |
PROFILE_5)},
{mmc0_init, DEV_ON_BASEBOARD, (PROFILE_ALL & ~PROFILE_5)},
{mmc0_no_cd_init, DEV_ON_BASEBOARD, PROFILE_5},
{spi0_init, DEV_ON_DGHTR_BRD, PROFILE_2},
{uart1_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 |
PROFILE_5)},
{wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | PROFILE_5)},
{d_can_init, DEV_ON_DGHTR_BRD, PROFILE_1},
{matrix_keypad_init, DEV_ON_DGHTR_BRD, PROFILE_0},
{volume_keys_init, DEV_ON_DGHTR_BRD, PROFILE_0},
{uart2_init, DEV_ON_DGHTR_BRD, PROFILE_3},
{haptics_init, DEV_ON_DGHTR_BRD, (PROFILE_4)},
{sgx_init, DEV_ON_BASEBOARD, PROFILE_ALL},
{NULL, 0, 0},
};
The gpmc_ad0.ehrpwm2B is only initialized in CPLD profile 4.
Please check the excel spreadsheet at the end of this paragraph: http://processors.wiki.ti.com/index.php/AM335x_General_Purpose_EVM_HW_User_Guide#Pin_Use_Description
Pin Use Assignment - Assignment list of pin functions
There you can see that for the GP(Haptics) signal gpmc_ad9 pin is assigned in Profile#4 and gpmc_a4 pin is assigned in all other profiles except for Profile#3.
The vibrator is connected to the AM335x processor through the CPLD, which means that depending on the profile you have chosen, the vibrator will be connected to either pin gpmc_ad9, gpmc_a4 or lcd_pclk, which in turn are multiplexed to a particular mode inside the board config code, but are never used simultaneously.
Best regards,
Miroslav
Hello All,
Right now i am working under BBB. It is possible to initialize any gpio pin present in the header to use it in haptics_pin_mux (in board file)and
am335xevm_vibrator_init(in board-am335xevm-vibrator) for vibrator.
Thanks in advance.