public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [RFC LINUX PATCH] dt: xilinx: xadc: provision to control clock frequency
@ 2015-12-23 10:28 Ranjit Waghmode
  2015-12-23 11:49 ` Sören Brinkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Ranjit Waghmode @ 2015-12-23 10:28 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds parameter to the xilinx-xadc node for controlling
clock frequency.

Following are the possible options for user to control the frequency:
	* 00 : 1/2 of clock frequency
	* 01 : 1/4 of clock frequency
	* 10 : 1/8 of clock frequency
	* 11 : 1/16 of clock frequency

So this patch adds parameter tck-rate to set user defined values from
above pool to control the clock frequency.

Signed-off-by: Ranjit Waghmode <ranjit.waghmode@xilinx.com>
---
 Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt b/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
index d71258e..2cabb9b 100644
--- a/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
@@ -20,6 +20,11 @@ Required properties:
 	- clocks: When using the ZYNQ this must be the ZYNQ PCAP clock,
 	  when using the AXI-XADC pcore this must be the clock that provides the
 	  clock to the AXI bus interface of the core.
+	- tck-rate: clock frequency control
+		* 0x0: 1/2  of clock frequency
+		* 0x1: 1/4  of clock frequency
+		* 0x2: 1/8  of clock frequency
+		* 0x3: 1/16 of clock frequency

 Optional properties:
 	- interrupt-parent: phandle to the parent interrupt controller
@@ -79,6 +84,7 @@ Examples:
 		interrupts = <0 7 4>;
 		interrupt-parent = <&gic>;
 		clocks = <&pcap_clk>;
+		tck-rate = <0x3>;

 		xlnx,channels {
 			#address-cells = <1>;
@@ -101,6 +107,7 @@ Examples:
 		interrupts = <0 53 4>;
 		interrupt-parent = <&gic>;
 		clocks = <&fpga1_clk>;
+		tck-rate = <0x3>;

 		xlnx,channels {
 			#address-cells = <1>;
--
2.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [RFC LINUX PATCH] dt: xilinx: xadc: provision to control clock frequency
  2015-12-23 10:28 [RFC LINUX PATCH] dt: xilinx: xadc: provision to control clock frequency Ranjit Waghmode
@ 2015-12-23 11:49 ` Sören Brinkmann
  0 siblings, 0 replies; 2+ messages in thread
From: Sören Brinkmann @ 2015-12-23 11:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2015-12-23 at 03:58PM +0530, Ranjit Waghmode wrote:
> This patch adds parameter to the xilinx-xadc node for controlling
> clock frequency.
> 
> Following are the possible options for user to control the frequency:
> 	* 00 : 1/2 of clock frequency
> 	* 01 : 1/4 of clock frequency
> 	* 10 : 1/8 of clock frequency
> 	* 11 : 1/16 of clock frequency

How is this chosen? Are these just arbitrary values that you need for
some use-case? Or are these the options HW allows?

> 
> So this patch adds parameter tck-rate to set user defined values from
> above pool to control the clock frequency.

This is no longer describing HW, but configuring driver/HW. Why does
this have to be in DT? Why can't the driver request/set the frequency as
operation requires it?

	Thanks,
	S?ren

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-23 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 10:28 [RFC LINUX PATCH] dt: xilinx: xadc: provision to control clock frequency Ranjit Waghmode
2015-12-23 11:49 ` Sören Brinkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox