[alsa-devel] DT soundcard driver with special clock routing

Petr Kulhavy petr at barix.com
Wed Dec 16 08:54:19 CET 2015


Hi Sylwester,

Currently I'm struggling with the clocks on the DaVinci platform as the 
clock tree is defined in the platform driver and not in DT.
Is there a way to reference the clocks by names from DT, or does the 
DaVinci clock driver need to be rewritten for DT support?

There is one more thing I came across using the simple soundcard driver. 
The codec needs to be set to generate the clock via PLL.
Unfortunately the simple soundcard always passes clock ID 0 to 
snd_soc_dai_set_sysclk() - I need a different value for the internal PLL.

What is the preferred approach here? On one hand the simple soundcard 
driver could be extended with a DT parameter "clock ID".
Or does a dedicated soundcard driver need to be written?

Thanks
Petr

On 14.12.2015 13:28, Sylwester Nawrocki wrote:
> Yes, you need the clock provider somewhere. In my case it was the I2S 
> driver that registered a clock provider. Probably you can add your 
> output clock provider to your SoC's main clock controller driver, and 
> perhaps use pinctrl API for the pin function mux setup. You can place 
> assigned-clock* DT properties in the clock provider node and the PLL's 
> will be configured by the kernel's clk subsystem. Grep for 
> of_clk_set_defaults or see last chapter of 
> Documentation/devicetree/bindings/clock/clock-bindings.txt. 



More information about the Alsa-devel mailing list