diff mbox

[PATCHv3,2/2] bindings: spi: Add clock entries for spi-xilinx

Message ID 1457611865-40120-2-git-send-email-shubhraj@xilinx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shubhrajyoti Datta March 10, 2016, 12:11 p.m. UTC
Add clock description for spi-xilinx

Signed-off-by: Shubhrajyoti Datta <shubhraj@xilinx.com>
---
v3
Add a clock name

 .../devicetree/bindings/spi/spi-xilinx.txt         |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Lars-Peter Clausen March 10, 2016, 12:39 p.m. UTC | #1
On 03/10/2016 01:11 PM, Shubhrajyoti Datta wrote:
[...]
> @@ -7,6 +7,9 @@ Required properties:
>  - interrupts		: Property with a value describing the interrupt
>  			  number.
>  - interrupt-parent	: Must be core interrupt controller
> +- clocks: Input clock specifier. Refer to common clock bindings.
> +- clock-names: tuple listing input clock names.
> +	Required elements: "spi_fclk"

Sorry for being pedantic, but the core has two clock input "s_axi_aclk" and
"ext_spi_clk". Which one is "spi_fclk"?

- Lars

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shubhrajyoti Datta March 11, 2016, 5:20 a.m. UTC | #2
> -----Original Message-----
> From: Lars-Peter Clausen [mailto:lars@metafoo.de]
> Sent: Thursday, March 10, 2016 6:10 PM
> To: Shubhrajyoti Datta; linux-spi@vger.kernel.org
> Cc: Soren Brinkmann; devicetree@vger.kernel.org; Michal Simek;
> broonie@kernel.org; Shubhrajyoti Datta
> Subject: Re: [PATCHv3 2/2] bindings: spi: Add clock entries for spi-xilinx
> 
> On 03/10/2016 01:11 PM, Shubhrajyoti Datta wrote:
> [...]
> > @@ -7,6 +7,9 @@ Required properties:
> >  - interrupts		: Property with a value describing the interrupt
> >  			  number.
> >  - interrupt-parent	: Must be core interrupt controller
> > +- clocks: Input clock specifier. Refer to common clock bindings.
> > +- clock-names: tuple listing input clock names.
> > +	Required elements: "spi_fclk"
> 
> Sorry for being pedantic, but the core has two clock input "" and
> "ext_spi_clk". Which one is "spi_fclk"?

However for all my designs I adhere to the recommendation see below both are from the same clock source.
I  named it spi_fclk.

Do you think I should have 2 clocks requests on the same clock.


http://www.xilinx.com/support/documentation/ip_documentation/axi_quad_spi/v2_00_a/ds843_axi_quad_spi.pdf

page 12

15. It is recommended that the AXI4 interface clock and EXT_SPI_CLK clock originate from the same clock source.
> 
> - Lars

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Soren Brinkmann March 11, 2016, 6:21 a.m. UTC | #3
On Thu, 2016-03-10 at 21:20:39 -0800, Shubhrajyoti Datta wrote:
> 
> 
> > -----Original Message-----
> > From: Lars-Peter Clausen [mailto:lars@metafoo.de]
> > Sent: Thursday, March 10, 2016 6:10 PM
> > To: Shubhrajyoti Datta; linux-spi@vger.kernel.org
> > Cc: Soren Brinkmann; devicetree@vger.kernel.org; Michal Simek;
> > broonie@kernel.org; Shubhrajyoti Datta
> > Subject: Re: [PATCHv3 2/2] bindings: spi: Add clock entries for spi-xilinx
> > 
> > On 03/10/2016 01:11 PM, Shubhrajyoti Datta wrote:
> > [...]
> > > @@ -7,6 +7,9 @@ Required properties:
> > >  - interrupts		: Property with a value describing the interrupt
> > >  			  number.
> > >  - interrupt-parent	: Must be core interrupt controller
> > > +- clocks: Input clock specifier. Refer to common clock bindings.
> > > +- clock-names: tuple listing input clock names.
> > > +	Required elements: "spi_fclk"
> > 
> > Sorry for being pedantic, but the core has two clock input "" and
> > "ext_spi_clk". Which one is "spi_fclk"?
> 
> However for all my designs I adhere to the recommendation see below both are from the same clock source.
> I  named it spi_fclk.
> 
> Do you think I should have 2 clocks requests on the same clock.
> 
> 
> http://www.xilinx.com/support/documentation/ip_documentation/axi_quad_spi/v2_00_a/ds843_axi_quad_spi.pdf
> 
> page 12
> 
> 15. It is recommended that the AXI4 interface clock and EXT_SPI_CLK clock originate from the same clock source.

If they can be separate they should both be modeled in the CCF. There is
no issue of them coming from the same source.
Also, the name should map to the name from the spec, as Lars pointed out
already. You should not invent new names for clocks that are clearly
defined in the data sheet.

	Sören
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shubhrajyoti Datta March 11, 2016, 6:27 a.m. UTC | #4
DQo+DQo+IElmIHRoZXkgY2FuIGJlIHNlcGFyYXRlIHRoZXkgc2hvdWxkIGJvdGggYmUgbW9kZWxl
ZCBpbiB0aGUgQ0NGLiBUaGVyZSBpcyBubw0KPiBpc3N1ZSBvZiB0aGVtIGNvbWluZyBmcm9tIHRo
ZSBzYW1lIHNvdXJjZS4NCj4gQWxzbywgdGhlIG5hbWUgc2hvdWxkIG1hcCB0byB0aGUgbmFtZSBm
cm9tIHRoZSBzcGVjLCBhcyBMYXJzIHBvaW50ZWQgb3V0DQo+IGFscmVhZHkuIFlvdSBzaG91bGQg
bm90IGludmVudCBuZXcgbmFtZXMgZm9yIGNsb2NrcyB0aGF0IGFyZSBjbGVhcmx5IGRlZmluZWQN
Cj4gaW4gdGhlIGRhdGEgc2hlZXQuDQoNCldpbGwgZml4IGluIHRoZSBuZXh0IHZlcnNpb24NCg0K
Pg0KPiAgICAgICBTw7ZyZW4NCg0KDQpUaGlzIGVtYWlsIGFuZCBhbnkgYXR0YWNobWVudHMgYXJl
IGludGVuZGVkIGZvciB0aGUgc29sZSB1c2Ugb2YgdGhlIG5hbWVkIHJlY2lwaWVudChzKSBhbmQg
Y29udGFpbihzKSBjb25maWRlbnRpYWwgaW5mb3JtYXRpb24gdGhhdCBtYXkgYmUgcHJvcHJpZXRh
cnksIHByaXZpbGVnZWQgb3IgY29weXJpZ2h0ZWQgdW5kZXIgYXBwbGljYWJsZSBsYXcuIElmIHlv
dSBhcmUgbm90IHRoZSBpbnRlbmRlZCByZWNpcGllbnQsIGRvIG5vdCByZWFkLCBjb3B5LCBvciBm
b3J3YXJkIHRoaXMgZW1haWwgbWVzc2FnZSBvciBhbnkgYXR0YWNobWVudHMuIERlbGV0ZSB0aGlz
IGVtYWlsIG1lc3NhZ2UgYW5kIGFueSBhdHRhY2htZW50cyBpbW1lZGlhdGVseS4NCg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.txt b/Documentation/devicetree/bindings/spi/spi-xilinx.txt
index c7b7856..71bd464 100644
--- a/Documentation/devicetree/bindings/spi/spi-xilinx.txt
+++ b/Documentation/devicetree/bindings/spi/spi-xilinx.txt
@@ -7,6 +7,9 @@  Required properties:
 - interrupts		: Property with a value describing the interrupt
 			  number.
 - interrupt-parent	: Must be core interrupt controller
+- clocks: Input clock specifier. Refer to common clock bindings.
+- clock-names: tuple listing input clock names.
+	Required elements: "spi_fclk"
 
 Optional properties:
 - xlnx,num-ss-bits	: Number of chip selects used.
@@ -14,6 +17,8 @@  Optional properties:
 Example:
 	axi_quad_spi@41e00000 {
 			compatible = "xlnx,xps-spi-2.00.a";
+			clocks = <&clkc 15>;
+			clock-names = "spi_fclk";
 			interrupt-parent = <&intc>;
 			interrupts = <0 31 1>;
 			reg = <0x41e00000 0x10000>;