linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Enable SPI flash support on da850-evm DT kernel
@ 2013-03-04 12:59 Manjunathappa, Prakash
  2013-03-04 12:59 ` [PATCH v2 2/4] ARM: davinci: da850: add SPI1 DT node Manjunathappa, Prakash
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-04 12:59 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/
  Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ, rob-VoJi6FS/r0vR7s880joybQ,
	hs-ynQEQJNshbs,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Patch enables support for m25p64 SPI flash support on
da850-EVM.

Testing information:
da850-evm comes with partitions specified in DT blob.
Able to mount/umount and create/delete files on filesystem partition.

Depends on below patch in spi-next branch of git://git.secretlab.ca/git/linux-2.6.git.
"spi/davinci: add OF support for the spi controller"

Applies on top of v3.9/dt-2 branch of linux_davinci tree:
git://gitorious.org/linux-davinci/linux-davinci.git

Since v1:
Look for m25p64 instead of m25p80 flash chip and correct partition information.

Dropping below accepted patch:
"spi/davinci: fix module build error"

Considered below missed out patch:
spi/davinci: add DT binding documentation

Manjunathappa, Prakash (3):
  ARM: davinci: da850: add SPI1 DT node
  ARM: davinci: da850: override SPI DT node device name
  ARM: davinci: da850-evm: add SPI flash support

Murali Karicheri (1):
  spi/davinci: add DT binding documentation

 .../devicetree/bindings/spi/spi-davinci.txt        |   51 ++++++++++++++++++++
 arch/arm/boot/dts/da850-evm.dts                    |   40 +++++++++++++++
 arch/arm/boot/dts/da850.dtsi                       |   18 +++++++
 arch/arm/mach-davinci/da8xx-dt.c                   |    1 +
 4 files changed, 110 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-davinci.txt

-- 
1.7.4.1

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

* [PATCH v2 1/4] spi/davinci: add DT binding documentation
       [not found] ` <1362401955-9616-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
@ 2013-03-04 12:59   ` Manjunathappa, Prakash
  2013-03-04 16:29     ` Arnd Bergmann
  2013-03-04 12:59   ` [PATCH v2 4/4] ARM: davinci: da850-evm: add SPI flash support Manjunathappa, Prakash
  1 sibling, 1 reply; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-04 12:59 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/
  Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ, rob-VoJi6FS/r0vR7s880joybQ,
	hs-ynQEQJNshbs,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

From: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>

Get back missed out binding documentation submitted along
with below patch:
"spi/davinci: add OF support for the spi controller"

Signed-off-by: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
Reviewed-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org>
---
Resubmitting it as it is missed out while merging.

 .../devicetree/bindings/spi/spi-davinci.txt        |   51 ++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-davinci.txt

diff --git a/Documentation/devicetree/bindings/spi/spi-davinci.txt b/Documentation/devicetree/bindings/spi/spi-davinci.txt
new file mode 100644
index 0000000..a62d7a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-davinci.txt
@@ -0,0 +1,51 @@
+Davinci SPI controller device bindings
+
+Required properties:
+- #address-cells: number of cells required to define a chip select
+	address on the SPI bus. Should be set to 1.
+- #size-cells: should be zero.
+- compatible:
+	- "ti,dm644x-spi" for SPI used similar to that on DM644x SoC family
+	- "ti,da8xx-spi" for SPI used similar to that on DA8xx SoC family
+- reg: Offset and length of SPI controller register space
+- num-cs: Number of chip selects
+- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
+	IP to the interrupt controller withn the SoC. Possible values
+	are 0 and 1. Manual says one of the two possible interrupt
+	lines can be tied to the interrupt controller. Set this
+	based on a specifc SoC configuration.
+- interrupts: interrupt number offset at the irq parent
+- clocks: spi clk phandle
+
+Example of a NOR flash slave device (n25q032) connected to DaVinci
+SPI controller device over the SPI bus.
+
+spi0:spi@20BF0000 {
+	#address-cells	 = <1>;
+	#size-cells	 = <0>;
+	compatible	 = "ti,dm644x-spi";
+	reg	 = <0x20BF0000 0x1000>;
+	num-cs	 = <4>;
+	ti,davinci-spi-intr-line	= <0>;
+	interrupts	 = <338>;
+	clocks	 = <&clkspi>;
+
+	flash: n25q032@0 {
+	 #address-cells = <1>;
+	 #size-cells = <1>;
+	 compatible = "st,m25p32";
+	 spi-max-frequency = <25000000>;
+	 reg = <0>;
+
+	 partition@0 {
+	 label = "u-boot-spl";
+	 reg = <0x0 0x80000>;
+	 read-only;
+	 };
+
+	 partition@1 {
+	 label = "test";
+	 reg = <0x80000 0x380000>;
+	 };
+	};
+};
-- 
1.7.4.1

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

* [PATCH v2 2/4] ARM: davinci: da850: add SPI1 DT node
  2013-03-04 12:59 [PATCH v2 0/4] Enable SPI flash support on da850-evm DT kernel Manjunathappa, Prakash
@ 2013-03-04 12:59 ` Manjunathappa, Prakash
  2013-03-04 12:59 ` [PATCH v2 3/4] ARM: davinci: da850: override SPI DT node device name Manjunathappa, Prakash
       [not found] ` <1362401955-9616-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
  2 siblings, 0 replies; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-04 12:59 UTC (permalink / raw)
  To: spi-devel-general, davinci-linux-open-source
  Cc: grant.likely, rob.herring, linux, nsekhar, hs,
	devicetree-discuss, linux-arm-kernel, rob, linux-doc,
	Manjunathappa, Prakash

Patch adds SPI1 DT node along with pinmux data.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
---
 arch/arm/boot/dts/da850.dtsi |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 3ec1bda..bfd6756 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -62,6 +62,14 @@
 					0x10 0x00002200 0x0000ff00
 				>;
 			};
+			spi1_pins: pinmux_spi_pins {
+				pinctrl-single,bits = <
+					/* SIMO, SOMI, ENA,
+					 * CLK, CS[0], CS[1]
+					 */
+					0x14 0x00111111 0x00ffffff
+				>;
+			};
 		};
 		serial0: serial@1c42000 {
 			compatible = "ns16550a";
@@ -107,6 +115,16 @@
 			reg = <0x21000 0x1000>;
 			status = "disabled";
 		};
+		spi1: spi@1f0e000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "ti,da8xx-spi";
+			reg = <0x30e000 0x1000>;
+			num-cs = <4>;
+			ti,davinci-spi-intr-line = <1>;
+			interrupts = <56>;
+			status = "disabled";
+		};
 	};
 	nand_cs3@62000000 {
 		compatible = "ti,davinci-nand";
-- 
1.7.4.1


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

* [PATCH v2 3/4] ARM: davinci: da850: override SPI DT node device name
  2013-03-04 12:59 [PATCH v2 0/4] Enable SPI flash support on da850-evm DT kernel Manjunathappa, Prakash
  2013-03-04 12:59 ` [PATCH v2 2/4] ARM: davinci: da850: add SPI1 DT node Manjunathappa, Prakash
@ 2013-03-04 12:59 ` Manjunathappa, Prakash
       [not found] ` <1362401955-9616-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
  2 siblings, 0 replies; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-04 12:59 UTC (permalink / raw)
  To: spi-devel-general, davinci-linux-open-source
  Cc: grant.likely, rob.herring, linux, nsekhar, hs,
	devicetree-discuss, linux-arm-kernel, rob, linux-doc,
	Manjunathappa, Prakash

Populate OF_DEV_AUXDATA with desired device name expected by spi-davinci
driver. Without this clk_get of spi-davinci DT driver fails.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
---
 arch/arm/mach-davinci/da8xx-dt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 5404e92..05f142a 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -40,6 +40,7 @@ static void __init da8xx_init_irq(void)
 struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
 	OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
+	OF_DEV_AUXDATA("ti,da8xx-spi", 0x01f0e000, "spi_davinci.1", NULL),
 	{}
 };
 
-- 
1.7.4.1


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

* [PATCH v2 4/4] ARM: davinci: da850-evm: add SPI flash support
       [not found] ` <1362401955-9616-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
  2013-03-04 12:59   ` [PATCH v2 1/4] spi/davinci: add DT binding documentation Manjunathappa, Prakash
@ 2013-03-04 12:59   ` Manjunathappa, Prakash
       [not found]     ` <1362401955-9616-5-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-04 12:59 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/
  Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, nsekhar-l0cyMroinI0,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, Manjunathappa, Prakash,
	hs-ynQEQJNshbs,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Enable m25p64 SPI flash support on da850-EVM. Also
add partition information of SPI flash.

Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org>
---
Since v1:
Look for m25p64 instead of m25p80.
Corrected the filesystem partition information.

 arch/arm/boot/dts/da850-evm.dts |   40 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index c359872..3306d82 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -41,6 +41,46 @@
 		wdt: wdt@1c21000 {
 			status = "okay";
 		};
+		spi1: spi@1f0e000 {
+			status = "okay";
+			pinctrl-names = "default";
+			pinctrl-0 = <&spi1_pins>;
+			flash: m25p80@0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "m25p64";
+				spi-max-frequency = <30000000>;
+				reg = <0>;
+				partition@0 {
+					label = "U-Boot-SPL";
+					reg = <0x00000000 0x00010000>;
+					read-only;
+				};
+				partition@1 {
+					label = "U-Boot";
+					reg = <0x00010000 0x00080000>;
+					read-only;
+				};
+				partition@2 {
+					label = "U-Boot-Env";
+					reg = <0x00090000 0x00010000>;
+					read-only;
+				};
+				partition@3 {
+					label = "Kernel";
+					reg = <0x000a0000 0x00280000>;
+				};
+				partition@4 {
+					label = "Filesystem";
+					reg = <0x00320000 0x00400000>;
+				};
+				partition@5 {
+					label = "MAC-Address";
+					reg = <0x00720000 0x00010000>;
+					read-only;
+				};
+			};
+		};
 	};
 	nand_cs3@62000000 {
 		status = "okay";
-- 
1.7.4.1

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

* RE: [PATCH v2 4/4] ARM: davinci: da850-evm: add SPI flash support
       [not found]     ` <1362401955-9616-5-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
@ 2013-03-04 13:47       ` Manjunathappa, Prakash
  0 siblings, 0 replies; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-04 13:47 UTC (permalink / raw)
  To: Manjunathappa, Prakash,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/
  Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ, rob-VoJi6FS/r0vR7s880joybQ,
	hs-ynQEQJNshbs,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Mar 04, 2013 at 18:29:15, Manjunathappa, Prakash wrote:
> Enable m25p64 SPI flash support on da850-EVM. Also
> add partition information of SPI flash.
> 
> Signed-off-by: Manjunathappa, Prakash <prakash.pm-l0cyMroinI0@public.gmane.org>
> ---
> Since v1:
> Look for m25p64 instead of m25p80.
> Corrected the filesystem partition information.
> 
>  arch/arm/boot/dts/da850-evm.dts |   40 +++++++++++++++++++++++++++++++++++++++
>  1 files changed, 40 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index c359872..3306d82 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -41,6 +41,46 @@
>  		wdt: wdt@1c21000 {
>  			status = "okay";
>  		};
> +		spi1: spi@1f0e000 {
> +			status = "okay";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&spi1_pins>;
> +			flash: m25p80@0 {
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				compatible = "m25p64";
> +				spi-max-frequency = <30000000>;
> +				reg = <0>;
> +				partition@0 {
> +					label = "U-Boot-SPL";
> +					reg = <0x00000000 0x00010000>;
> +					read-only;
> +				};
> +				partition@1 {
> +					label = "U-Boot";
> +					reg = <0x00010000 0x00080000>;
> +					read-only;
> +				};
> +				partition@2 {
> +					label = "U-Boot-Env";
> +					reg = <0x00090000 0x00010000>;
> +					read-only;
> +				};
> +				partition@3 {
> +					label = "Kernel";
> +					reg = <0x000a0000 0x00280000>;
> +				};
> +				partition@4 {
> +					label = "Filesystem";
> +					reg = <0x00320000 0x00400000>;
> +				};
> +				partition@5 {
> +					label = "MAC-Address";
> +					reg = <0x00720000 0x00010000>;

Ah... MAC address is at the end of 8MB flash. Need to change above:
					reg = <0x007f0000 0x00010000>;
Will send v3 for this.

Thanks,
Prakash

> +					read-only;
> +				};
> +			};
> +		};
>  	};
>  	nand_cs3@62000000 {
>  		status = "okay";
> -- 
> 1.7.4.1
> 
> 

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

* Re: [PATCH v2 1/4] spi/davinci: add DT binding documentation
  2013-03-04 12:59   ` [PATCH v2 1/4] spi/davinci: add DT binding documentation Manjunathappa, Prakash
@ 2013-03-04 16:29     ` Arnd Bergmann
  2013-03-05 12:56       ` Manjunathappa, Prakash
  0 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2013-03-04 16:29 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: davinci-linux-open-source, linux, linux-doc, devicetree-discuss,
	nsekhar, rob.herring, grant.likely, Manjunathappa, Prakash,
	Murali Karicheri, rob, spi-devel-general, hs

On Monday 04 March 2013 18:29:12 Manjunathappa, Prakash wrote:
> diff --git a/Documentation/devicetree/bindings/spi/spi-davinci.txt b/Documentation/devicetree/bindings/spi/spi-davinci.txt
> new file mode 100644
> index 0000000..a62d7a8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-davinci.txt
> @@ -0,0 +1,51 @@
> +Davinci SPI controller device bindings
> +
> +Required properties:
> +- #address-cells: number of cells required to define a chip select
> +	address on the SPI bus. Should be set to 1.
> +- #size-cells: should be zero.
> +- compatible:
> +	- "ti,dm644x-spi" for SPI used similar to that on DM644x SoC family
> +	- "ti,da8xx-spi" for SPI used similar to that on DA8xx SoC family

In general, you should avoid wildcards in "compatible" properties.
Better use the number of the first chip that introduced the specific
version of the device.

> +- reg: Offset and length of SPI controller register space
> +- num-cs: Number of chip selects
> +- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
> +	IP to the interrupt controller withn the SoC. Possible values
> +	are 0 and 1. Manual says one of the two possible interrupt
> +	lines can be tied to the interrupt controller. Set this
> +	based on a specifc SoC configuration.
> +- interrupts: interrupt number offset at the irq parent

I would not call this an "offset". It is an interrupt descriptor
which may be something other than a simple number.

Unfortunately, there is no way to provide an "invalid" interrupt,
otherwise you could just list both interrupts, out of which at
least one should be valid, and drop the ti,davinci-spi-intr-line
property.

One thing you could do instead though is to use the "interrupt-names"
property to define "irq0" and "irq1" interrupts, and in the
implementation use the first one you find.

	Arnd

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

* RE: [PATCH v2 1/4] spi/davinci: add DT binding documentation
  2013-03-04 16:29     ` Arnd Bergmann
@ 2013-03-05 12:56       ` Manjunathappa, Prakash
  2013-03-05 13:28         ` Sekhar Nori
       [not found]         ` <A73F36158E33644199EB82C5EC81C7BC3EA4854E-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-05 12:56 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Nori, Sekhar,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	hs-ynQEQJNshbs

Hi Arnd,

On Mon, Mar 04, 2013 at 21:59:16, Arnd Bergmann wrote:
> On Monday 04 March 2013 18:29:12 Manjunathappa, Prakash wrote:
> > diff --git a/Documentation/devicetree/bindings/spi/spi-davinci.txt b/Documentation/devicetree/bindings/spi/spi-davinci.txt
> > new file mode 100644
> > index 0000000..a62d7a8
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/spi/spi-davinci.txt
> > @@ -0,0 +1,51 @@
> > +Davinci SPI controller device bindings
> > +
> > +Required properties:
> > +- #address-cells: number of cells required to define a chip select
> > +	address on the SPI bus. Should be set to 1.
> > +- #size-cells: should be zero.
> > +- compatible:
> > +	- "ti,dm644x-spi" for SPI used similar to that on DM644x SoC family
> > +	- "ti,da8xx-spi" for SPI used similar to that on DA8xx SoC family
> 
> In general, you should avoid wildcards in "compatible" properties.
> Better use the number of the first chip that introduced the specific
> version of the device.
> 

Correct, will accommodate this change.

> > +- reg: Offset and length of SPI controller register space
> > +- num-cs: Number of chip selects
> > +- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
> > +	IP to the interrupt controller withn the SoC. Possible values
> > +	are 0 and 1. Manual says one of the two possible interrupt
> > +	lines can be tied to the interrupt controller. Set this
> > +	based on a specifc SoC configuration.
> > +- interrupts: interrupt number offset at the irq parent
> 
> I would not call this an "offset". It is an interrupt descriptor
> which may be something other than a simple number.
> 

I am planning to drop from this documentation as it is common property.

> Unfortunately, there is no way to provide an "invalid" interrupt,
> otherwise you could just list both interrupts, out of which at
> least one should be valid, and drop the ti,davinci-spi-intr-line
> property.
> 

This is different from interrupt number, this is used to specifies out
of 2 lines from SPI IP which is tied to INTC. Some discussion about it:
https://lkml.org/lkml/2012/11/16/404
	
> One thing you could do instead though is to use the "interrupt-names"
> property to define "irq0" and "irq1" interrupts, and in the
> implementation use the first one you find.
> 

In IP specification it is mentioned as spi-intr-line, I prefer to retain this
property as davinci-spi-intr-line.

Thanks,
Prakash

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

* Re: [PATCH v2 1/4] spi/davinci: add DT binding documentation
  2013-03-05 12:56       ` Manjunathappa, Prakash
@ 2013-03-05 13:28         ` Sekhar Nori
  2013-03-05 13:45           ` Manjunathappa, Prakash
       [not found]         ` <A73F36158E33644199EB82C5EC81C7BC3EA4854E-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Sekhar Nori @ 2013-03-05 13:28 UTC (permalink / raw)
  To: Manjunathappa, Prakash
  Cc: Arnd Bergmann, linux-arm-kernel, spi-devel-general,
	davinci-linux-open-source, linux, linux-doc, devicetree-discuss,
	rob.herring, grant.likely, Karicheri, Muralidharan, rob, hs



On 3/5/2013 6:26 PM, Manjunathappa, Prakash wrote:
> Hi Arnd,
> 
> On Mon, Mar 04, 2013 at 21:59:16, Arnd Bergmann wrote:
>> On Monday 04 March 2013 18:29:12 Manjunathappa, Prakash wrote:
>>> diff --git a/Documentation/devicetree/bindings/spi/spi-davinci.txt b/Documentation/devicetree/bindings/spi/spi-davinci.txt
>>> new file mode 100644
>>> index 0000000..a62d7a8
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/spi/spi-davinci.txt
>>> @@ -0,0 +1,51 @@
>>> +Davinci SPI controller device bindings
>>> +
>>> +Required properties:
>>> +- #address-cells: number of cells required to define a chip select
>>> +	address on the SPI bus. Should be set to 1.
>>> +- #size-cells: should be zero.
>>> +- compatible:
>>> +	- "ti,dm644x-spi" for SPI used similar to that on DM644x SoC family
>>> +	- "ti,da8xx-spi" for SPI used similar to that on DA8xx SoC family
>>
>> In general, you should avoid wildcards in "compatible" properties.
>> Better use the number of the first chip that introduced the specific
>> version of the device.
>>
> 
> Correct, will accommodate this change.

But note that this patch is just documenting bindings already accepted
and part of kernel. You probably need another patch which fixes the
incorrect bindings and this one can then document in fixed bindings.

Thanks,
Sekhar

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

* RE: [PATCH v2 1/4] spi/davinci: add DT binding documentation
  2013-03-05 13:28         ` Sekhar Nori
@ 2013-03-05 13:45           ` Manjunathappa, Prakash
  0 siblings, 0 replies; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-05 13:45 UTC (permalink / raw)
  To: Nori, Sekhar
  Cc: Arnd Bergmann, linux-arm-kernel, spi-devel-general,
	davinci-linux-open-source, linux, linux-doc, devicetree-discuss,
	rob.herring, grant.likely, Karicheri, Muralidharan, rob, hs

On Tue, Mar 05, 2013 at 18:58:54, Nori, Sekhar wrote:
> 
> 
> On 3/5/2013 6:26 PM, Manjunathappa, Prakash wrote:
> > Hi Arnd,
> > 
> > On Mon, Mar 04, 2013 at 21:59:16, Arnd Bergmann wrote:
> >> On Monday 04 March 2013 18:29:12 Manjunathappa, Prakash wrote:
> >>> diff --git a/Documentation/devicetree/bindings/spi/spi-davinci.txt b/Documentation/devicetree/bindings/spi/spi-davinci.txt
> >>> new file mode 100644
> >>> index 0000000..a62d7a8
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/spi/spi-davinci.txt
> >>> @@ -0,0 +1,51 @@
> >>> +Davinci SPI controller device bindings
> >>> +
> >>> +Required properties:
> >>> +- #address-cells: number of cells required to define a chip select
> >>> +	address on the SPI bus. Should be set to 1.
> >>> +- #size-cells: should be zero.
> >>> +- compatible:
> >>> +	- "ti,dm644x-spi" for SPI used similar to that on DM644x SoC family
> >>> +	- "ti,da8xx-spi" for SPI used similar to that on DA8xx SoC family
> >>
> >> In general, you should avoid wildcards in "compatible" properties.
> >> Better use the number of the first chip that introduced the specific
> >> version of the device.
> >>
> > 
> > Correct, will accommodate this change.
> 
> But note that this patch is just documenting bindings already accepted
> and part of kernel. You probably need another patch which fixes the
> incorrect bindings and this one can then document in fixed bindings.
> 

Correct Sekhar I meant the same. I will have patch for driver to accommodate
above change and a patch for missing binding document.

Thanks,
Prakash

> Thanks,
> Sekhar
> 


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

* Re: [PATCH v2 1/4] spi/davinci: add DT binding documentation
       [not found]         ` <A73F36158E33644199EB82C5EC81C7BC3EA4854E-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2013-03-05 19:32           ` Arnd Bergmann
       [not found]             ` <201303051932.41327.arnd-r2nGTMty4D4@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2013-03-05 19:32 UTC (permalink / raw)
  To: Manjunathappa, Prakash
  Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Nori, Sekhar,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, Karicheri, Muralidharan,
	rob-VoJi6FS/r0vR7s880joybQ,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	hs-ynQEQJNshbs,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tuesday 05 March 2013, Manjunathappa, Prakash wrote:
> On Mon, Mar 04, 2013 at 21:59:16, Arnd Bergmann wrote:
> > On Monday 04 March 2013 18:29:12 Manjunathappa, Prakash wrote:
> > > +- reg: Offset and length of SPI controller register space
> > > +- num-cs: Number of chip selects
> > > +- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
> > > +	IP to the interrupt controller withn the SoC. Possible values
> > > +	are 0 and 1. Manual says one of the two possible interrupt
> > > +	lines can be tied to the interrupt controller. Set this
> > > +	based on a specifc SoC configuration.
> > > +- interrupts: interrupt number offset at the irq parent
> > 
> > I would not call this an "offset". It is an interrupt descriptor
> > which may be something other than a simple number.
> > 
> 
> I am planning to drop from this documentation as it is common property.

I think it makese sense to document the fact that there should be exactly
one interrupt listed in the interrupts property, especially since the
hardware has two outputs.

	Arnd

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

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

* RE: [PATCH v2 1/4] spi/davinci: add DT binding documentation
       [not found]             ` <201303051932.41327.arnd-r2nGTMty4D4@public.gmane.org>
@ 2013-03-11  8:53               ` Manjunathappa, Prakash
  0 siblings, 0 replies; 12+ messages in thread
From: Manjunathappa, Prakash @ 2013-03-11  8:53 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ, rob-VoJi6FS/r0vR7s880joybQ,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	hs-ynQEQJNshbs,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Wed, Mar 06, 2013 at 01:02:41, Arnd Bergmann wrote:
> On Tuesday 05 March 2013, Manjunathappa, Prakash wrote:
> > On Mon, Mar 04, 2013 at 21:59:16, Arnd Bergmann wrote:
> > > On Monday 04 March 2013 18:29:12 Manjunathappa, Prakash wrote:
> > > > +- reg: Offset and length of SPI controller register space
> > > > +- num-cs: Number of chip selects
> > > > +- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
> > > > +	IP to the interrupt controller withn the SoC. Possible values
> > > > +	are 0 and 1. Manual says one of the two possible interrupt
> > > > +	lines can be tied to the interrupt controller. Set this
> > > > +	based on a specifc SoC configuration.
> > > > +- interrupts: interrupt number offset at the irq parent
> > > 
> > > I would not call this an "offset". It is an interrupt descriptor
> > > which may be something other than a simple number.
> > > 
> > 
> > I am planning to drop from this documentation as it is common property.
> 
> I think it makese sense to document the fact that there should be exactly
> one interrupt listed in the interrupts property, especially since the
> hardware has two outputs.
> 

Agreed, will consider this property for documenting.

Thanks,
Prakash

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

end of thread, other threads:[~2013-03-11  8:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 12:59 [PATCH v2 0/4] Enable SPI flash support on da850-evm DT kernel Manjunathappa, Prakash
2013-03-04 12:59 ` [PATCH v2 2/4] ARM: davinci: da850: add SPI1 DT node Manjunathappa, Prakash
2013-03-04 12:59 ` [PATCH v2 3/4] ARM: davinci: da850: override SPI DT node device name Manjunathappa, Prakash
     [not found] ` <1362401955-9616-1-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
2013-03-04 12:59   ` [PATCH v2 1/4] spi/davinci: add DT binding documentation Manjunathappa, Prakash
2013-03-04 16:29     ` Arnd Bergmann
2013-03-05 12:56       ` Manjunathappa, Prakash
2013-03-05 13:28         ` Sekhar Nori
2013-03-05 13:45           ` Manjunathappa, Prakash
     [not found]         ` <A73F36158E33644199EB82C5EC81C7BC3EA4854E-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2013-03-05 19:32           ` Arnd Bergmann
     [not found]             ` <201303051932.41327.arnd-r2nGTMty4D4@public.gmane.org>
2013-03-11  8:53               ` Manjunathappa, Prakash
2013-03-04 12:59   ` [PATCH v2 4/4] ARM: davinci: da850-evm: add SPI flash support Manjunathappa, Prakash
     [not found]     ` <1362401955-9616-5-git-send-email-prakash.pm-l0cyMroinI0@public.gmane.org>
2013-03-04 13:47       ` Manjunathappa, Prakash

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).