Dear Maxime and Danny
I also have an A20, the Olimex SOM + EVB and would like to output a 6MHz clock
on pin PI12
I did follow the thread and I am obviously doing something wrong but so far I
cannot guess what.
Let me tell you what I have found working
1) Testing the GPIO pin with the shell script works, I can actually see the
square wave on the scope
2) Creating and loading a "custom" dts having the following
cemi_clk_out_dev {
compatible = "cemi_clk_out";
clocks = <&clk_out_a>;
pinctrl-0 = <&clk_out_a_pins_a>;
pinctrl-names = "default";
};
actually works, I can find the info in /sys under the following
./bus/platform/devices/cemi_clk_out_dev
./devices/platform/cemi_clk_out_dev
./firmware/devicetree/base/cemi_clk_out_dev
3) Made a "driver" module for the "compatible" that is basically what Danny did
with a few names change to match the different HW name
Once I load the module I notice the following changes in /sys
./bus/platform/devices/cemi_clk_out_dev
./bus/platform/drivers/cemi_clk_out
./bus/platform/drivers/cemi_clk_out/cemi_clk_out_dev
./devices/platform/cemi_clk_out_dev
./firmware/devicetree/base/cemi_clk_out_dev
./module/cemi_clk_out
the file /sys/kernel/debug/clk/clk_summary has the following
clock enable_cnt prepare_cnt rate accuracy phase
-----------------------------------------------------------------------------
gmac_int_tx 1 1 125000000 0 0
gmac_tx 1 1 125000000 0 0
mii_phy_tx 0 0 25000000 0 0
osc32k 0 0 32768 0 0
osc24M 4 4 24000000 0 0
clk_out_a 1 1 6000000 0 0
the file /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins
report
pin 268 (PI12): cemi_clk_out_dev (GPIO UNCLAIMED) function clk_out_a group PI12
But I cannot see the desired square wave
Any suggestion on where to look for the error ?
Thanks, Damiano
--
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.