Skip to content

Commit

Permalink
ARM: zynq: add clk binding support to the ttc
Browse files Browse the repository at this point in the history
Add support for retrieving TTC configuration from device tree.  This
includes the ability to pull information about the driving clocks from
the of_clk bindings.

Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
  • Loading branch information
Josh Cartwright authored and Michal Simek committed Nov 14, 2012
1 parent 0f586fb commit 91dc985
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 122 deletions.
53 changes: 53 additions & 0 deletions arch/arm/boot/dts/zynq-7000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,58 @@
};
};
};

ttc0: ttc0@f8001000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "xlnx,ttc";
reg = <0xF8001000 0x1000>;
clocks = <&cpu_clk 3>;
clock-names = "cpu_1x";
clock-ranges;

ttc0_0: ttc0.0 {
status = "disabled";
reg = <0>;
interrupts = <0 10 4>;
};
ttc0_1: ttc0.1 {
status = "disabled";
reg = <1>;
interrupts = <0 11 4>;
};
ttc0_2: ttc0.2 {
status = "disabled";
reg = <2>;
interrupts = <0 12 4>;
};
};

ttc1: ttc1@f8002000 {
#interrupt-parent = <&intc>;
#address-cells = <1>;
#size-cells = <0>;
compatible = "xlnx,ttc";
reg = <0xF8002000 0x1000>;
clocks = <&cpu_clk 3>;
clock-names = "cpu_1x";
clock-ranges;

ttc1_0: ttc1.0 {
status = "disabled";
reg = <0>;
interrupts = <0 37 4>;
};
ttc1_1: ttc1.1 {
status = "disabled";
reg = <1>;
interrupts = <0 38 4>;
};
ttc1_2: ttc1.2 {
status = "disabled";
reg = <2>;
interrupts = <0 39 4>;
};
};
};
};
10 changes: 10 additions & 0 deletions arch/arm/boot/dts/zynq-zc702.dts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@
&ps_clk {
clock-frequency = <33333330>;
};

&ttc0_0 {
status = "ok";
compatible = "xlnx,ttc-counter-clocksource";
};

&ttc0_1 {
status = "ok";
compatible = "xlnx,ttc-counter-clockevent";
};
Loading

0 comments on commit 91dc985

Please sign in to comment.