Hi Chen-Yu,

indeed, it works now.

In case someone else wants to use it, it works like this:

in the dts file I put:

/ {
     tss463aa {
                compatible = "atmel,tss463aa";
                clocks = <&clk_out_a>;
                pinctrl-0 = <&clk_out_a_pins_a>;
                pinctrl-names = "default";
        };
};

&spi2 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&spi2_pins_a>;
        tss463aax {
                compatible = "atmel,tss463aa";
                reg = <0>;
                spi-max-frequency = <4000000>;
                spi-cpol;
                spi-cpha;
        };
};

Note the differing pinctrl. 
Also note that it doesn't work if I put clk_out_a in the spi slave node.

Then I created a Linux kernel module
http://svn.nomike.com/playground/trunk/Navi/TSS463AA/Linux/tss463aa.c
that basically does

probe {
        clk1 = devm_clk_get(&pdev->dev, NULL);
        rounded_rate = clk_round_rate(clk1, rate); /* Hz */
        clk_set_rate(clk1, rounded_rate);
        clk_prepare_enable(clk1);
}

and a MODULE_DEVICE_TABLE to match the compatible "atmel,tss463aa".

Then I checked the proper operation of the clk_out_a 4000 Hz clock by 
connecting it 
to an audio amplifier. Yup, worked.

Thanks,
   Danny

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to