logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.
Question

UART2 and TWL4030 relationship?

posted in Linux Kernel
Wednesday, December 10 2014, 06:41 AM
tlwest
tlwest
Offline
0
Under the 2.6.37.6 stock kernel I have UART 2 working properly (as /dev/ttyO1) after manually setting the appropriate MUX's, disabling the WiFi, etc. as mentioned in instructions elsewhere.

However, I would like to "take over" the "sound card" for some custom hardware.

Unfortunately, if I comment out the line that creates the sound card in igep0020.c
// ret = platform_device_add(igep2_snd_device);

in igep2_soc_init, UART2 stops working (I can open the device /dev/ttyO1, but pause forever when reading) under exactly the same circumstances as before.

Can anyone explain why or how the operation of UART2 depends on the existence of the igep sound card?
Responses (3)
  • Accepted Answer

    Friday, December 12 2014, 02:22 PM - #permalink
    0
    Hi,

    However, I would like to "take over" the "sound card" for some custom hardware.

    Why do you need to disable sound card? Which pins do you need to free?

    Cheers!
    The reply is currently minimized Show
  • Accepted Answer

    tlwest
    tlwest
    Offline
    Friday, December 12 2014, 02:50 PM - #permalink
    0
    We use the ALSA interface to access DAC/ADCs attached to other mcbsp's. The easiest way to do this was to essentially take over the current sound card.

    However, I suspect that I'm barking up the wrong tree here. I've put another post that I hope is closer to the actual problem.
    The reply is currently minimized Show
  • Accepted Answer

    tlwest
    tlwest
    Offline
    Monday, December 15 2014, 11:21 PM - #permalink
    0
    Just to add the solution here for future reference.

    If you do not instantiate the "sound card" in igep0020.c, then the call path of

    twl4030_soc_probe -> twl4030_init_chip -> twl4030_reset_registers (all found in sound/soc/codecs/twl4030.c)

    never gets called and the TPS65950 never gets turned off. (The value to go in the register (twl4030_reg) is set appropriately as

    0x04, /* REG_VOICE_IF (0xF) */

    but the value is never actually written to the register.)

    With the TPS65950 active, pins 4, 6 and 8 are pulled down, preventing GPIO 140 and UART2 from functioning.
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat