Skip to content

Instantly share code, notes, and snippets.

@ikwzm ikwzm/fclk-install
Created Apr 13, 2017

Embed
What would you like to do?
shell# dtbocfg.rb --install --dts fclk0-zynq-zybo.dts fclk0
[ 371.455932] fclkcfg amba:fclk0: device name : fclk0
[ 371.460953] fclkcfg amba:fclk0: clock name : fclk0
[ 371.465753] fclkcfg amba:fclk0: clock rate : 100000000
shell# dtbocfg.rb --install --dts fclk1-zynq-zybo.dts fclk1
[ 495.989728] fclkcfg amba:fclk1: driver installed.
[ 495.994373] fclkcfg amba:fclk1: device name : fclk1
[ 496.000970] fclkcfg amba:fclk1: clock name : fclk1
[ 496.005776] fclkcfg amba:fclk1: clock rate : 142857143
shell# dtbocfg.rb --install --dts fclk2-zynq-zybo.dts fclk2
[ 516.025890] fclkcfg amba:fclk2: driver installed.
[ 516.030606] fclkcfg amba:fclk2: device name : fclk2
[ 516.035420] fclkcfg amba:fclk2: clock name : fclk2
[ 516.042501] fclkcfg amba:fclk2: clock rate : 200000000
shell# dtbocfg.rb --install --dts fclk3-zynq-zybo.dts fclk3
[ 528.442941] fclkcfg amba:fclk3: driver installed.
[ 528.447586] fclkcfg amba:fclk3: device name : fclk3
[ 528.453606] fclkcfg amba:fclk3: clock name : fclk3
[ 528.458516] fclkcfg amba:fclk3: clock rate : 166666667
/dts-v1/;
/ {
fragment@0 {
target-path = "/amba";
__overlay__ {
fclk0 {
compatible = "ikwzm,fclkcfg-0.10.a";
clocks = <1 15>;
};
};
};
};
shell# echo 25000000 >/sys/class/fclkcfg/fclk1/round_rate
shell# cat /sys/class/fclkcfg/fclk1/round_rate
25000000 => 25000000
shell# echo 25000000 >/sys/class/fclkcfg/fclk1/rate
shell# cat /sys/class/fclkcfg/fclk1/rate
25000000
/dts-v1/;
/ {
fragment@0 {
target-path = "/amba";
__overlay__ {
fclk1 {
compatible = "ikwzm,fclkcfg-0.10.a";
clocks = <1 16>;
};
};
};
};
shell# echo 72000000 >/sys/class/fclkcfg/fclk2/round_rate
shell# cat /sys/class/fclkcfg/fclk2/round_rate
72000000 => 71428572
shell# echo 72000000 >/sys/class/fclkcfg/fclk2/rate
shell# cat /sys/class/fclkcfg/fclk2/rate
71428572
/dts-v1/;
/ {
fragment@0 {
target-path = "/amba";
__overlay__ {
fclk2 {
compatible = "ikwzm,fclkcfg-0.10.a";
clocks = <1 17>;
};
};
};
};
/dts-v1/;
/ {
fragment@0 {
target-path = "/amba";
__overlay__ {
fclk3 {
compatible = "ikwzm,fclkcfg-0.10.a";
clocks = <1 18>;
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.