[PATCH 4/7] clk: add clk-asm9260 driver

Alexandre Belloni alexandre.belloni at free-electrons.com
Sat Sep 20 11:43:14 PDT 2014


On 20/09/2014 at 20:06:21 +0200, Oleksij Rempel wrote :
> Am 18.09.2014 um 09:56 schrieb Alexandre Belloni:
> > You can have a look at how it has been done for the berlin SoCs to see
> > how you can easily reuse code between drivers.
> 
> What is the correct way to handle/define i2s MCLK input? I have I2S mux
> clock with choice of 3 sources: Xtal, PLL and MCLK. One of pins can be
> configured as MCLK src. Should i define fixedrate-clk?
> 

It depends on where is your mux, if it is in the I2S controller adress
range, I would simply give 3 parent clocks to your I2S controller, like:

i2s at 8fffffff {
 compatible = "...";
 reg = <0x8fffffff 0x100>;
 clocks = <&xtal, &clkc CLKID_MCK, &clkc CLKID_PLL>;
}

If it is part of your clock generator, then simply register a clock mux
with 3 parents as part of your clock controller binding. And use
something like:
 clocks = <&clck CLKID_I2S>;

Have a look at how this is done for berlin2, search for
clk_register_mux()

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the linux-arm-kernel mailing list