* [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-03 10:12 ` Priyanka Jain
0 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-03 10:12 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
scottwood-KZfg59tc24xl57MIdRCFDg
Cc: Priyanka Jain
-Micron n25q512a memory is supported by m25p80 driver.
Add compatible field required to support n25q512a in m25p80.txt
-Add micron to the vendor-prefixes.txt file
Signed-off-by: Priyanka Jain <Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
.../devicetree/bindings/vendor-prefixes.txt | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
index 4611aa8..ce02e81 100644
--- a/Documentation/devicetree/bindings/mtd/m25p80.txt
+++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
@@ -7,6 +7,7 @@ Required properties:
the DT binding is not Linux-only, but in case of Linux, see the
"spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
of supported chips.
+ example: "micron,n25q512a"
- reg : Chip-Select number
- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 4d7f375..a44cfee 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -79,6 +79,7 @@ marvell Marvell Technology Group Ltd.
maxim Maxim Integrated Products
micrel Micrel Inc.
microchip Microchip Technology Inc.
+micron Micron Technology Inc.
mosaixtech Mosaix Technologies, Inc.
moxa Moxa
mpl MPL AG
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-03 10:12 ` Priyanka Jain
0 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-03 10:12 UTC (permalink / raw)
To: devicetree, linuxppc-dev, scottwood; +Cc: Priyanka Jain
-Micron n25q512a memory is supported by m25p80 driver.
Add compatible field required to support n25q512a in m25p80.txt
-Add micron to the vendor-prefixes.txt file
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
---
Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
.../devicetree/bindings/vendor-prefixes.txt | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
index 4611aa8..ce02e81 100644
--- a/Documentation/devicetree/bindings/mtd/m25p80.txt
+++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
@@ -7,6 +7,7 @@ Required properties:
the DT binding is not Linux-only, but in case of Linux, see the
"spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
of supported chips.
+ example: "micron,n25q512a"
- reg : Chip-Select number
- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 4d7f375..a44cfee 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -79,6 +79,7 @@ marvell Marvell Technology Group Ltd.
maxim Maxim Integrated Products
micrel Micrel Inc.
microchip Microchip Technology Inc.
+micron Micron Technology Inc.
mosaixtech Mosaix Technologies, Inc.
moxa Moxa
mpl MPL AG
--
1.7.4.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
[not found] ` <1404382376-3115-1-git-send-email-Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-07-03 22:10 ` Scott Wood
@ 2014-07-03 22:10 ` Scott Wood
0 siblings, 0 replies; 17+ messages in thread
From: Scott Wood @ 2014-07-03 22:10 UTC (permalink / raw)
To: Priyanka Jain
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> -Micron n25q512a memory is supported by m25p80 driver.
> Add compatible field required to support n25q512a in m25p80.txt
> -Add micron to the vendor-prefixes.txt file
>
> Signed-off-by: Priyanka Jain <Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
> Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> .../devicetree/bindings/vendor-prefixes.txt | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
Why did you send this to the ppc list but not the spi or mtd lists?
I'm having a hard time following the flow of how these SPI devices get
bound -- is the compatible involved at all? I don't see this string
(with vendor prefix included) in the driver. I do see a table that
contains what looks like device IDs. If the device can report its id,
shouldn't we rely on that rather than device tree compatible?
-Scott
> diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
> index 4611aa8..ce02e81 100644
> --- a/Documentation/devicetree/bindings/mtd/m25p80.txt
> +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
> @@ -7,6 +7,7 @@ Required properties:
> the DT binding is not Linux-only, but in case of Linux, see the
> "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
> of supported chips.
> + example: "micron,n25q512a"
> - reg : Chip-Select number
> - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 4d7f375..a44cfee 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -79,6 +79,7 @@ marvell Marvell Technology Group Ltd.
> maxim Maxim Integrated Products
> micrel Micrel Inc.
> microchip Microchip Technology Inc.
> +micron Micron Technology Inc.
> mosaixtech Mosaix Technologies, Inc.
> moxa Moxa
> mpl MPL AG
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-03 22:10 ` Scott Wood
0 siblings, 0 replies; 17+ messages in thread
From: Scott Wood @ 2014-07-03 22:10 UTC (permalink / raw)
To: Priyanka Jain
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> -Micron n25q512a memory is supported by m25p80 driver.
> Add compatible field required to support n25q512a in m25p80.txt
> -Add micron to the vendor-prefixes.txt file
>
> Signed-off-by: Priyanka Jain <Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
> Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> .../devicetree/bindings/vendor-prefixes.txt | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
Why did you send this to the ppc list but not the spi or mtd lists?
I'm having a hard time following the flow of how these SPI devices get
bound -- is the compatible involved at all? I don't see this string
(with vendor prefix included) in the driver. I do see a table that
contains what looks like device IDs. If the device can report its id,
shouldn't we rely on that rather than device tree compatible?
-Scott
> diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
> index 4611aa8..ce02e81 100644
> --- a/Documentation/devicetree/bindings/mtd/m25p80.txt
> +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
> @@ -7,6 +7,7 @@ Required properties:
> the DT binding is not Linux-only, but in case of Linux, see the
> "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
> of supported chips.
> + example: "micron,n25q512a"
> - reg : Chip-Select number
> - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 4d7f375..a44cfee 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -79,6 +79,7 @@ marvell Marvell Technology Group Ltd.
> maxim Maxim Integrated Products
> micrel Micrel Inc.
> microchip Microchip Technology Inc.
> +micron Micron Technology Inc.
> mosaixtech Mosaix Technologies, Inc.
> moxa Moxa
> mpl MPL AG
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-03 22:10 ` Scott Wood
0 siblings, 0 replies; 17+ messages in thread
From: Scott Wood @ 2014-07-03 22:10 UTC (permalink / raw)
To: Priyanka Jain; +Cc: devicetree, linuxppc-dev, linux-mtd, linux-spi
On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> -Micron n25q512a memory is supported by m25p80 driver.
> Add compatible field required to support n25q512a in m25p80.txt
> -Add micron to the vendor-prefixes.txt file
>
> Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> ---
> Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> .../devicetree/bindings/vendor-prefixes.txt | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
Why did you send this to the ppc list but not the spi or mtd lists?
I'm having a hard time following the flow of how these SPI devices get
bound -- is the compatible involved at all? I don't see this string
(with vendor prefix included) in the driver. I do see a table that
contains what looks like device IDs. If the device can report its id,
shouldn't we rely on that rather than device tree compatible?
-Scott
> diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
> index 4611aa8..ce02e81 100644
> --- a/Documentation/devicetree/bindings/mtd/m25p80.txt
> +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
> @@ -7,6 +7,7 @@ Required properties:
> the DT binding is not Linux-only, but in case of Linux, see the
> "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
> of supported chips.
> + example: "micron,n25q512a"
> - reg : Chip-Select number
> - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 4d7f375..a44cfee 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -79,6 +79,7 @@ marvell Marvell Technology Group Ltd.
> maxim Maxim Integrated Products
> micrel Micrel Inc.
> microchip Microchip Technology Inc.
> +micron Micron Technology Inc.
> mosaixtech Mosaix Technologies, Inc.
> moxa Moxa
> mpl MPL AG
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
2014-07-03 22:10 ` Scott Wood
(?)
@ 2014-07-04 4:08 ` Priyanka Jain
-1 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-04 4:08 UTC (permalink / raw)
To: Scott Wood
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3021 bytes --]
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Friday, July 04, 2014 3:40 AM
> To: Jain Priyanka-B32167
> Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> spi@vger.kernel.org; linux-mtd@lists.infradead.org
> Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> memory
>
> On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > -Micron n25q512a memory is supported by m25p80 driver.
> > Add compatible field required to support n25q512a in m25p80.txt -Add
> > micron to the vendor-prefixes.txt file
> >
> > Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> > ---
> > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > 2 files changed, 2 insertions(+), 0 deletions(-)
>
> Why did you send this to the ppc list but not the spi or mtd lists?
>
[Jain Priyanka-B32167] Sorry, I missed that
> I'm having a hard time following the flow of how these SPI devices get
> bound -- is the compatible involved at all? I don't see this string
> (with vendor prefix included) in the driver. I do see a table that
> contains what looks like device IDs. If the device can report its id,
> shouldn't we rely on that rather than device tree compatible?
>
> -Scott
[Jain Priyanka-B32167]
Spi driver has a check to device name corresponding to device-id and compare to what is passed in dts string.
New checkpatch script search for exact string match in binding folder. So, I have added this in example.
>
>
> > diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt
> > b/Documentation/devicetree/bindings/mtd/m25p80.txt
> > index 4611aa8..ce02e81 100644
> > --- a/Documentation/devicetree/bindings/mtd/m25p80.txt
> > +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
> > @@ -7,6 +7,7 @@ Required properties:
> > the DT binding is not Linux-only, but in case of Linux,
> see the
> > "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c
> for the list
> > of supported chips.
> > + example: "micron,n25q512a"
> > - reg : Chip-Select number
> > - spi-max-frequency : Maximum frequency of the SPI bus the chip can
> > operate at
> >
> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > index 4d7f375..a44cfee 100644
> > --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > @@ -79,6 +79,7 @@ marvell Marvell Technology Group Ltd.
> > maxim Maxim Integrated Products
> > micrel Micrel Inc.
> > microchip Microchip Technology Inc.
> > +micron Micron Technology Inc.
> > mosaixtech Mosaix Technologies, Inc.
> > moxa Moxa
> > mpl MPL AG
>
N§²æìr¸yúèØb²X¬¶Ç§vØ^)Þº{.nÇ+·¥{±²¢Ø^nr¡ö¦zË\x1aëh¨èÚ&¢îý»\x05ËÛÔØï¦v¬Îf\x1dp)¹¹br ê+Ê+zf£¢·h§~Ûiÿûàz¹\x1e®w¥¢¸?¨èÚ&¢)ߢ^[f
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-04 4:08 ` Priyanka Jain
0 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-04 4:08 UTC (permalink / raw)
To: Scott Wood; +Cc: devicetree, linuxppc-dev, linux-mtd, linux-spi
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogV29vZCBTY290dC1CMDc0
MjENCj4gU2VudDogRnJpZGF5LCBKdWx5IDA0LCAyMDE0IDM6NDAgQU0NCj4gVG86IEphaW4gUHJp
eWFua2EtQjMyMTY3DQo+IENjOiBkZXZpY2V0cmVlQHZnZXIua2VybmVsLm9yZzsgbGludXhwcGMt
ZGV2QGxpc3RzLm96bGFicy5vcmc7IGxpbnV4LQ0KPiBzcGlAd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dzL3ZlbmRvci1wcmVmaXhlcy50eHQNCj4gPiBAQCAtNzksNiArNzks
NyBAQCBtYXJ2ZWxsCU1hcnZlbGwgVGVjaG5vbG9neSBHcm91cCBMdGQuDQo+ID4gIG1heGltCU1h
eGltIEludGVncmF0ZWQgUHJvZHVjdHMNCj4gPiAgbWljcmVsCU1pY3JlbCBJbmMuDQo+ID4gIG1p
Y3JvY2hpcAlNaWNyb2NoaXAgVGVjaG5vbG9neSBJbmMuDQo+ID4gK21pY3JvbglNaWNyb24gVGVj
aG5vbG9neSBJbmMuDQo+ID4gIG1vc2FpeHRlY2gJTW9zYWl4IFRlY2hub2xvZ2llcywgSW5jLg0K
PiA+ICBtb3hhCU1veGENCj4gPiAgbXBsCU1QTCBBRw0KPiANCg0K
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-04 4:08 ` Priyanka Jain
0 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-04 4:08 UTC (permalink / raw)
To: Scott Wood; +Cc: devicetree, linuxppc-dev, linux-mtd, linux-spi
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Friday, July 04, 2014 3:40 AM
> To: Jain Priyanka-B32167
> Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> spi@vger.kernel.org; linux-mtd@lists.infradead.org
> Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> memory
>
> On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > -Micron n25q512a memory is supported by m25p80 driver.
> > Add compatible field required to support n25q512a in m25p80.txt -Add
> > micron to the vendor-prefixes.txt file
> >
> > Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> > ---
> > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > 2 files changed, 2 insertions(+), 0 deletions(-)
>
> Why did you send this to the ppc list but not the spi or mtd lists?
>
[Jain Priyanka-B32167] Sorry, I missed that
> I'm having a hard time following the flow of how these SPI devices get
> bound -- is the compatible involved at all? I don't see this string
> (with vendor prefix included) in the driver. I do see a table that
> contains what looks like device IDs. If the device can report its id,
> shouldn't we rely on that rather than device tree compatible?
>
> -Scott
[Jain Priyanka-B32167]
Spi driver has a check to device name corresponding to device-id and compare to what is passed in dts string.
New checkpatch script search for exact string match in binding folder. So, I have added this in example.
>
>
> > diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt
> > b/Documentation/devicetree/bindings/mtd/m25p80.txt
> > index 4611aa8..ce02e81 100644
> > --- a/Documentation/devicetree/bindings/mtd/m25p80.txt
> > +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
> > @@ -7,6 +7,7 @@ Required properties:
> > the DT binding is not Linux-only, but in case of Linux,
> see the
> > "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c
> for the list
> > of supported chips.
> > + example: "micron,n25q512a"
> > - reg : Chip-Select number
> > - spi-max-frequency : Maximum frequency of the SPI bus the chip can
> > operate at
> >
> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > index 4d7f375..a44cfee 100644
> > --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > @@ -79,6 +79,7 @@ marvell Marvell Technology Group Ltd.
> > maxim Maxim Integrated Products
> > micrel Micrel Inc.
> > microchip Microchip Technology Inc.
> > +micron Micron Technology Inc.
> > mosaixtech Mosaix Technologies, Inc.
> > moxa Moxa
> > mpl MPL AG
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
2014-07-04 4:08 ` Priyanka Jain
@ 2014-07-07 21:25 ` Scott Wood
-1 siblings, 0 replies; 17+ messages in thread
From: Scott Wood @ 2014-07-07 21:25 UTC (permalink / raw)
To: Jain Priyanka-B32167
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Friday, July 04, 2014 3:40 AM
> > To: Jain Priyanka-B32167
> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; linux-
> > spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> > memory
> >
> > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > -Micron n25q512a memory is supported by m25p80 driver.
> > > Add compatible field required to support n25q512a in m25p80.txt -Add
> > > micron to the vendor-prefixes.txt file
> > >
> > > Signed-off-by: Priyanka Jain <Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> > > ---
> > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > 2 files changed, 2 insertions(+), 0 deletions(-)
> >
> > Why did you send this to the ppc list but not the spi or mtd lists?
> >
> [Jain Priyanka-B32167] Sorry, I missed that
> > I'm having a hard time following the flow of how these SPI devices get
> > bound -- is the compatible involved at all? I don't see this string
> > (with vendor prefix included) in the driver. I do see a table that
> > contains what looks like device IDs. If the device can report its id,
> > shouldn't we rely on that rather than device tree compatible?
> >
> > -Scott
> [Jain Priyanka-B32167]
> Spi driver has a check to device name corresponding to device-id and compare to what is passed in dts string.
Please go into more detail. I don't see where the string
"micron,n25q512a" appears in the current kernel. I do see "n25q512a",
but how does that compare successfully with the version of the string
that has a vendor compatible?
Again, is there a device ID that can be read at runtime? Is there a
compatible string that represents a common programming interface?
> New checkpatch script search for exact string match in binding folder. So, I have added this in example.
That check has a lot of false positives when it comes to compatible
strings for specific chips that don't need to be specifically mentioned
in a more generic binding.
-Scott
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-07 21:25 ` Scott Wood
0 siblings, 0 replies; 17+ messages in thread
From: Scott Wood @ 2014-07-07 21:25 UTC (permalink / raw)
To: Jain Priyanka-B32167; +Cc: devicetree, linuxppc-dev, linux-mtd, linux-spi
On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Friday, July 04, 2014 3:40 AM
> > To: Jain Priyanka-B32167
> > Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> > spi@vger.kernel.org; linux-mtd@lists.infradead.org
> > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> > memory
> >
> > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > -Micron n25q512a memory is supported by m25p80 driver.
> > > Add compatible field required to support n25q512a in m25p80.txt -Add
> > > micron to the vendor-prefixes.txt file
> > >
> > > Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> > > ---
> > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > 2 files changed, 2 insertions(+), 0 deletions(-)
> >
> > Why did you send this to the ppc list but not the spi or mtd lists?
> >
> [Jain Priyanka-B32167] Sorry, I missed that
> > I'm having a hard time following the flow of how these SPI devices get
> > bound -- is the compatible involved at all? I don't see this string
> > (with vendor prefix included) in the driver. I do see a table that
> > contains what looks like device IDs. If the device can report its id,
> > shouldn't we rely on that rather than device tree compatible?
> >
> > -Scott
> [Jain Priyanka-B32167]
> Spi driver has a check to device name corresponding to device-id and compare to what is passed in dts string.
Please go into more detail. I don't see where the string
"micron,n25q512a" appears in the current kernel. I do see "n25q512a",
but how does that compare successfully with the version of the string
that has a vendor compatible?
Again, is there a device ID that can be read at runtime? Is there a
compatible string that represents a common programming interface?
> New checkpatch script search for exact string match in binding folder. So, I have added this in example.
That check has a lot of false positives when it comes to compatible
strings for specific chips that don't need to be specifically mentioned
in a more generic binding.
-Scott
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
2014-07-07 21:25 ` Scott Wood
(?)
@ 2014-07-08 4:41 ` Priyanka Jain
-1 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-08 4:41 UTC (permalink / raw)
To: Scott Wood
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Tuesday, July 08, 2014 2:56 AM
> To: Jain Priyanka-B32167
> Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> spi@vger.kernel.org; linux-mtd@lists.infradead.org
> Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> memory
>
> On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
> >
> > > -----Original Message-----
> > > From: Wood Scott-B07421
> > > Sent: Friday, July 04, 2014 3:40 AM
> > > To: Jain Priyanka-B32167
> > > Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
> > > linux- spi@vger.kernel.org; linux-mtd@lists.infradead.org
> > > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron
> > > n25q512a memory
> > >
> > > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > > -Micron n25q512a memory is supported by m25p80 driver.
> > > > Add compatible field required to support n25q512a in m25p80.txt
> > > > -Add micron to the vendor-prefixes.txt file
> > > >
> > > > Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> > > > ---
> > > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > > 2 files changed, 2 insertions(+), 0 deletions(-)
> > >
> > > Why did you send this to the ppc list but not the spi or mtd lists?
> > >
> > [Jain Priyanka-B32167] Sorry, I missed that
> > > I'm having a hard time following the flow of how these SPI devices
> > > get bound -- is the compatible involved at all? I don't see this
> > > string (with vendor prefix included) in the driver. I do see a
> > > table that contains what looks like device IDs. If the device can
> > > report its id, shouldn't we rely on that rather than device tree
> compatible?
> > >
> > > -Scott
> > [Jain Priyanka-B32167]
> > Spi driver has a check to device name corresponding to device-id and
> compare to what is passed in dts string.
>
> Please go into more detail. I don't see where the string
> "micron,n25q512a" appears in the current kernel. I do see "n25q512a",
> but how does that compare successfully with the version of the string
> that has a vendor compatible?
>
> Again, is there a device ID that can be read at runtime? Is there a
> compatible string that represents a common programming interface?
[Jain Priyanka-B32167]
Spi driver (of_register_spi_devices()) search for compatible string in device-tree. It selects the flash device driver based on the compatible string (n25q512a). This compatible string is essential, else device probe wont continue. Then Device-id of flash is read at runtime in probe and compared with the corresponding device-id of flash (n25q512a). Device-id (maintained as first element in INFO string in spi_nor_ids[] in drivers/mtd/spi-nor/spi-nor.c file)
Only if both device-ids match, the device is taken as successfully detected.
Regarding vendor "micron", you are right currently the vendor information is not maintained as such in device-id, but the convention that is followed for compatible string is "vendor-id, device-id"
>
> > New checkpatch script search for exact string match in binding folder.
> So, I have added this in example.
>
> That check has a lot of false positives when it comes to compatible
> strings for specific chips that don't need to be specifically mentioned
> in a more generic binding.
>
> -Scott
>
[Jain Priyanka-B32167] Even though "micron,n25q512a" is in sync with binding mentioned in " Documentation/devicetree/bindings/mtd/m25p80.txt ", I have to add this as an a example, just to avoid checkpatch error. What should be the approach going forward: Should such checkpatch warnings be ignored?
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-08 4:41 ` Priyanka Jain
0 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-08 4:41 UTC (permalink / raw)
To: Scott Wood; +Cc: devicetree, linuxppc-dev, linux-mtd, linux-spi
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogV29vZCBTY290dC1CMDc0
MjENCj4gU2VudDogVHVlc2RheSwgSnVseSAwOCwgMjAxNCAyOjU2IEFNDQo+IFRvOiBKYWluIFBy
aXlhbmthLUIzMjE2Nw0KPiBDYzogZGV2aWNldHJlZUB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV4cHBj
LWRldkBsaXN0cy5vemxhYnMub3JnOyBsaW51eC0NCj4gc3BpQHZnZXIua2VybmVsLm9yZzsgbGlu
dXgtbXRkQGxpc3RzLmluZnJhZGVhZC5vcmcNCj4gU3ViamVjdDogUmU6IFtQQVRDSF0gZGV2aWNl
dHJlZS9iaW5kaW5nczogQWRkIGJpbmRpbmcgZm9yIG1pY3JvbiBuMjVxNTEyYQ0KPiBtZW1vcnkN
Cj4gDQo+IE9uIFRodSwgMjAxNC0wNy0wMyBhdCAyMzowOCAtMDUwMCwgSmFpbiBQcml5YW5rYS1C
MzIxNjcgd3JvdGU6DQo+ID4NCj4gPiA+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+ID4g
PiBGcm9tOiBXb29kIFNjb3R0LUIwNzQyMQ0KPiA+ID4gU2VudDogRnJpZGF5LCBKdWx5IDA0LCAy
MDE0IDM6NDAgQU0NCj4gPiA+IFRvOiBKYWluIFByaXlhbmthLUIzMjE2Nw0KPiA+ID4gQ2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Jyb3Iu
IFdoYXQgc2hvdWxkIGJlIHRoZSBhcHByb2FjaCBnb2luZyBmb3J3YXJkOiBTaG91bGQgc3VjaCBj
aGVja3BhdGNoIHdhcm5pbmdzIGJlIGlnbm9yZWQ/DQoNCg0KDQoNCg==
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-08 4:41 ` Priyanka Jain
0 siblings, 0 replies; 17+ messages in thread
From: Priyanka Jain @ 2014-07-08 4:41 UTC (permalink / raw)
To: Scott Wood; +Cc: devicetree, linuxppc-dev, linux-mtd, linux-spi
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Tuesday, July 08, 2014 2:56 AM
> To: Jain Priyanka-B32167
> Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> spi@vger.kernel.org; linux-mtd@lists.infradead.org
> Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> memory
>
> On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
> >
> > > -----Original Message-----
> > > From: Wood Scott-B07421
> > > Sent: Friday, July 04, 2014 3:40 AM
> > > To: Jain Priyanka-B32167
> > > Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
> > > linux- spi@vger.kernel.org; linux-mtd@lists.infradead.org
> > > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron
> > > n25q512a memory
> > >
> > > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > > -Micron n25q512a memory is supported by m25p80 driver.
> > > > Add compatible field required to support n25q512a in m25p80.txt
> > > > -Add micron to the vendor-prefixes.txt file
> > > >
> > > > Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> > > > ---
> > > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > > 2 files changed, 2 insertions(+), 0 deletions(-)
> > >
> > > Why did you send this to the ppc list but not the spi or mtd lists?
> > >
> > [Jain Priyanka-B32167] Sorry, I missed that
> > > I'm having a hard time following the flow of how these SPI devices
> > > get bound -- is the compatible involved at all? I don't see this
> > > string (with vendor prefix included) in the driver. I do see a
> > > table that contains what looks like device IDs. If the device can
> > > report its id, shouldn't we rely on that rather than device tree
> compatible?
> > >
> > > -Scott
> > [Jain Priyanka-B32167]
> > Spi driver has a check to device name corresponding to device-id and
> compare to what is passed in dts string.
>
> Please go into more detail. I don't see where the string
> "micron,n25q512a" appears in the current kernel. I do see "n25q512a",
> but how does that compare successfully with the version of the string
> that has a vendor compatible?
>
> Again, is there a device ID that can be read at runtime? Is there a
> compatible string that represents a common programming interface?
[Jain Priyanka-B32167]
Spi driver (of_register_spi_devices()) search for compatible string in device-tree. It selects the flash device driver based on the compatible string (n25q512a). This compatible string is essential, else device probe wont continue. Then Device-id of flash is read at runtime in probe and compared with the corresponding device-id of flash (n25q512a). Device-id (maintained as first element in INFO string in spi_nor_ids[] in drivers/mtd/spi-nor/spi-nor.c file)
Only if both device-ids match, the device is taken as successfully detected.
Regarding vendor "micron", you are right currently the vendor information is not maintained as such in device-id, but the convention that is followed for compatible string is "vendor-id, device-id"
>
> > New checkpatch script search for exact string match in binding folder.
> So, I have added this in example.
>
> That check has a lot of false positives when it comes to compatible
> strings for specific chips that don't need to be specifically mentioned
> in a more generic binding.
>
> -Scott
>
[Jain Priyanka-B32167] Even though "micron,n25q512a" is in sync with binding mentioned in " Documentation/devicetree/bindings/mtd/m25p80.txt ", I have to add this as an a example, just to avoid checkpatch error. What should be the approach going forward: Should such checkpatch warnings be ignored?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
2014-07-08 4:41 ` Priyanka Jain
@ 2014-07-09 1:53 ` Scott Wood
-1 siblings, 0 replies; 17+ messages in thread
From: Scott Wood @ 2014-07-09 1:53 UTC (permalink / raw)
To: Jain Priyanka-B32167
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Mon, 2014-07-07 at 23:41 -0500, Jain Priyanka-B32167 wrote:
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, July 08, 2014 2:56 AM
> > To: Jain Priyanka-B32167
> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; linux-
> > spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> > memory
> >
> > On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Friday, July 04, 2014 3:40 AM
> > > > To: Jain Priyanka-B32167
> > > > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org;
> > > > linux- spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> > > > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron
> > > > n25q512a memory
> > > >
> > > > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > > > -Micron n25q512a memory is supported by m25p80 driver.
> > > > > Add compatible field required to support n25q512a in m25p80.txt
> > > > > -Add micron to the vendor-prefixes.txt file
> > > > >
> > > > > Signed-off-by: Priyanka Jain <Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> > > > > ---
> > > > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > > > 2 files changed, 2 insertions(+), 0 deletions(-)
> > > >
> > > > Why did you send this to the ppc list but not the spi or mtd lists?
> > > >
> > > [Jain Priyanka-B32167] Sorry, I missed that
> > > > I'm having a hard time following the flow of how these SPI devices
> > > > get bound -- is the compatible involved at all? I don't see this
> > > > string (with vendor prefix included) in the driver. I do see a
> > > > table that contains what looks like device IDs. If the device can
> > > > report its id, shouldn't we rely on that rather than device tree
> > compatible?
> > > >
> > > > -Scott
> > > [Jain Priyanka-B32167]
> > > Spi driver has a check to device name corresponding to device-id and
> > compare to what is passed in dts string.
> >
> > Please go into more detail. I don't see where the string
> > "micron,n25q512a" appears in the current kernel. I do see "n25q512a",
> > but how does that compare successfully with the version of the string
> > that has a vendor compatible?
> >
> > Again, is there a device ID that can be read at runtime? Is there a
> > compatible string that represents a common programming interface?
> [Jain Priyanka-B32167]
>
> Spi driver (of_register_spi_devices()) search for compatible string in
> device-tree. It selects the flash device driver based on the compatible
> string (n25q512a). This compatible string is essential, else device
> probe wont continue. Then Device-id of flash is read at runtime in
> probe and compared with the corresponding device-id of flash
> (n25q512a). Device-id (maintained as first element in INFO string in
> spi_nor_ids[] in drivers/mtd/spi-nor/spi-nor.c file)
By "device id" I'm talking about 0x20bb20, not "n25q512a". Where does
that come from?
> Only if both device-ids match, the device is taken as successfully
> detected. Regarding vendor "micron", you are right currently the vendor
> information is not maintained as such in device-id, but the convention
> that is followed for compatible string is "vendor-id, device-id"
Is there going to be a patch to the driver to accept the string with
vendor id?
> > > New checkpatch script search for exact string match in binding folder.
> > So, I have added this in example.
> >
> > That check has a lot of false positives when it comes to compatible
> > strings for specific chips that don't need to be specifically mentioned
> > in a more generic binding.
> >
> > -Scott
> >
> [Jain Priyanka-B32167] Even though "micron,n25q512a" is in sync with
> binding mentioned in "
> Documentation/devicetree/bindings/mtd/m25p80.txt ", I have to add
> this as an a example, just to avoid checkpatch error. What should be
> the approach going forward: Should such checkpatch warnings be ignored?
They shouldn't be ignored nor blindly remedied. You should look at the
message and decide whether a binding is needed and whether it is
present. There probably should be a binding here, but I don't have
enough information to say whether it should be specific to n25q512a or
if spi nor can be described more generically.
-Scott
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-09 1:53 ` Scott Wood
0 siblings, 0 replies; 17+ messages in thread
From: Scott Wood @ 2014-07-09 1:53 UTC (permalink / raw)
To: Jain Priyanka-B32167; +Cc: devicetree, linuxppc-dev, linux-mtd, linux-spi
On Mon, 2014-07-07 at 23:41 -0500, Jain Priyanka-B32167 wrote:
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, July 08, 2014 2:56 AM
> > To: Jain Priyanka-B32167
> > Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> > spi@vger.kernel.org; linux-mtd@lists.infradead.org
> > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> > memory
> >
> > On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Friday, July 04, 2014 3:40 AM
> > > > To: Jain Priyanka-B32167
> > > > Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
> > > > linux- spi@vger.kernel.org; linux-mtd@lists.infradead.org
> > > > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron
> > > > n25q512a memory
> > > >
> > > > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > > > -Micron n25q512a memory is supported by m25p80 driver.
> > > > > Add compatible field required to support n25q512a in m25p80.txt
> > > > > -Add micron to the vendor-prefixes.txt file
> > > > >
> > > > > Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> > > > > ---
> > > > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > > > 2 files changed, 2 insertions(+), 0 deletions(-)
> > > >
> > > > Why did you send this to the ppc list but not the spi or mtd lists?
> > > >
> > > [Jain Priyanka-B32167] Sorry, I missed that
> > > > I'm having a hard time following the flow of how these SPI devices
> > > > get bound -- is the compatible involved at all? I don't see this
> > > > string (with vendor prefix included) in the driver. I do see a
> > > > table that contains what looks like device IDs. If the device can
> > > > report its id, shouldn't we rely on that rather than device tree
> > compatible?
> > > >
> > > > -Scott
> > > [Jain Priyanka-B32167]
> > > Spi driver has a check to device name corresponding to device-id and
> > compare to what is passed in dts string.
> >
> > Please go into more detail. I don't see where the string
> > "micron,n25q512a" appears in the current kernel. I do see "n25q512a",
> > but how does that compare successfully with the version of the string
> > that has a vendor compatible?
> >
> > Again, is there a device ID that can be read at runtime? Is there a
> > compatible string that represents a common programming interface?
> [Jain Priyanka-B32167]
>
> Spi driver (of_register_spi_devices()) search for compatible string in
> device-tree. It selects the flash device driver based on the compatible
> string (n25q512a). This compatible string is essential, else device
> probe wont continue. Then Device-id of flash is read at runtime in
> probe and compared with the corresponding device-id of flash
> (n25q512a). Device-id (maintained as first element in INFO string in
> spi_nor_ids[] in drivers/mtd/spi-nor/spi-nor.c file)
By "device id" I'm talking about 0x20bb20, not "n25q512a". Where does
that come from?
> Only if both device-ids match, the device is taken as successfully
> detected. Regarding vendor "micron", you are right currently the vendor
> information is not maintained as such in device-id, but the convention
> that is followed for compatible string is "vendor-id, device-id"
Is there going to be a patch to the driver to accept the string with
vendor id?
> > > New checkpatch script search for exact string match in binding folder.
> > So, I have added this in example.
> >
> > That check has a lot of false positives when it comes to compatible
> > strings for specific chips that don't need to be specifically mentioned
> > in a more generic binding.
> >
> > -Scott
> >
> [Jain Priyanka-B32167] Even though "micron,n25q512a" is in sync with
> binding mentioned in "
> Documentation/devicetree/bindings/mtd/m25p80.txt ", I have to add
> this as an a example, just to avoid checkpatch error. What should be
> the approach going forward: Should such checkpatch warnings be ignored?
They shouldn't be ignored nor blindly remedied. You should look at the
message and decide whether a binding is needed and whether it is
present. There probably should be a binding here, but I don't have
enough information to say whether it should be specific to n25q512a or
if spi nor can be described more generically.
-Scott
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
2014-07-07 21:25 ` Scott Wood
@ 2014-07-29 9:24 ` Mark Rutland
-1 siblings, 0 replies; 17+ messages in thread
From: Mark Rutland @ 2014-07-29 9:24 UTC (permalink / raw)
To: Scott Wood
Cc: Jain Priyanka-B32167, devicetree-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Mon, Jul 07, 2014 at 10:25:54PM +0100, Scott Wood wrote:
> On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
> >
> > > -----Original Message-----
> > > From: Wood Scott-B07421
> > > Sent: Friday, July 04, 2014 3:40 AM
> > > To: Jain Priyanka-B32167
> > > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; linux-
> > > spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> > > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> > > memory
> > >
> > > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > > -Micron n25q512a memory is supported by m25p80 driver.
> > > > Add compatible field required to support n25q512a in m25p80.txt -Add
> > > > micron to the vendor-prefixes.txt file
> > > >
> > > > Signed-off-by: Priyanka Jain <Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> > > > ---
> > > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > > 2 files changed, 2 insertions(+), 0 deletions(-)
> > >
> > > Why did you send this to the ppc list but not the spi or mtd lists?
> > >
> > [Jain Priyanka-B32167] Sorry, I missed that
> > > I'm having a hard time following the flow of how these SPI devices get
> > > bound -- is the compatible involved at all? I don't see this string
> > > (with vendor prefix included) in the driver. I do see a table that
> > > contains what looks like device IDs. If the device can report its id,
> > > shouldn't we rely on that rather than device tree compatible?
> > >
> > > -Scott
> > [Jain Priyanka-B32167]
> > Spi driver has a check to device name corresponding to device-id and compare to what is passed in dts string.
>
> Please go into more detail. I don't see where the string
> "micron,n25q512a" appears in the current kernel. I do see "n25q512a",
> but how does that compare successfully with the version of the string
> that has a vendor compatible?
The spi code has a hack to not require an of_device_id_table:
of_register_spi_devices calls of_modalias_node, which for a given
"foo,bar" compatible string will set spi->modalias to "bar", by cutting
off everything up to and including the comma. Later, spi_match_id can
match a device with an spi_device_id->name of "bar".
Thus "micron,n25q512a" can match one of the entries already in
drivers/mtd/spi-nor/spi-nor.c.
This is a real pain when searching around.
Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a memory
@ 2014-07-29 9:24 ` Mark Rutland
0 siblings, 0 replies; 17+ messages in thread
From: Mark Rutland @ 2014-07-29 9:24 UTC (permalink / raw)
To: Scott Wood
Cc: Jain Priyanka-B32167, linux-spi, linuxppc-dev, linux-mtd, devicetree
On Mon, Jul 07, 2014 at 10:25:54PM +0100, Scott Wood wrote:
> On Thu, 2014-07-03 at 23:08 -0500, Jain Priyanka-B32167 wrote:
> >
> > > -----Original Message-----
> > > From: Wood Scott-B07421
> > > Sent: Friday, July 04, 2014 3:40 AM
> > > To: Jain Priyanka-B32167
> > > Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> > > spi@vger.kernel.org; linux-mtd@lists.infradead.org
> > > Subject: Re: [PATCH] devicetree/bindings: Add binding for micron n25q512a
> > > memory
> > >
> > > On Thu, 2014-07-03 at 15:42 +0530, Priyanka Jain wrote:
> > > > -Micron n25q512a memory is supported by m25p80 driver.
> > > > Add compatible field required to support n25q512a in m25p80.txt -Add
> > > > micron to the vendor-prefixes.txt file
> > > >
> > > > Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
> > > > ---
> > > > Documentation/devicetree/bindings/mtd/m25p80.txt | 1 +
> > > > .../devicetree/bindings/vendor-prefixes.txt | 1 +
> > > > 2 files changed, 2 insertions(+), 0 deletions(-)
> > >
> > > Why did you send this to the ppc list but not the spi or mtd lists?
> > >
> > [Jain Priyanka-B32167] Sorry, I missed that
> > > I'm having a hard time following the flow of how these SPI devices get
> > > bound -- is the compatible involved at all? I don't see this string
> > > (with vendor prefix included) in the driver. I do see a table that
> > > contains what looks like device IDs. If the device can report its id,
> > > shouldn't we rely on that rather than device tree compatible?
> > >
> > > -Scott
> > [Jain Priyanka-B32167]
> > Spi driver has a check to device name corresponding to device-id and compare to what is passed in dts string.
>
> Please go into more detail. I don't see where the string
> "micron,n25q512a" appears in the current kernel. I do see "n25q512a",
> but how does that compare successfully with the version of the string
> that has a vendor compatible?
The spi code has a hack to not require an of_device_id_table:
of_register_spi_devices calls of_modalias_node, which for a given
"foo,bar" compatible string will set spi->modalias to "bar", by cutting
off everything up to and including the comma. Later, spi_match_id can
match a device with an spi_device_id->name of "bar".
Thus "micron,n25q512a" can match one of the entries already in
drivers/mtd/spi-nor/spi-nor.c.
This is a real pain when searching around.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2014-07-29 9:25 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 10:12 [PATCH] devicetree/bindings: Add binding for micron n25q512a memory Priyanka Jain
2014-07-03 10:12 ` Priyanka Jain
[not found] ` <1404382376-3115-1-git-send-email-Priyanka.Jain-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-07-03 22:10 ` Scott Wood
2014-07-03 22:10 ` Scott Wood
2014-07-03 22:10 ` Scott Wood
[not found] ` <1404425400.21434.89.camel-88ow+0ZRuxG2UiBs7uKeOtHuzzzSOjJt@public.gmane.org>
2014-07-04 4:08 ` Priyanka Jain
2014-07-04 4:08 ` Priyanka Jain
2014-07-04 4:08 ` Priyanka Jain
[not found] ` <b7e1d3bf1675492585121d9e7950f05a-GeMU99GfrruZBIYY9rwZPeO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-07-07 21:25 ` Scott Wood
2014-07-07 21:25 ` Scott Wood
[not found] ` <1404768354.21434.191.camel-88ow+0ZRuxG2UiBs7uKeOtHuzzzSOjJt@public.gmane.org>
2014-07-08 4:41 ` Priyanka Jain
2014-07-08 4:41 ` Priyanka Jain
2014-07-08 4:41 ` Priyanka Jain
[not found] ` <a9ac5cbcdb554bedbda35594740e320d-GeMU99GfrruZBIYY9rwZPeO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-07-09 1:53 ` Scott Wood
2014-07-09 1:53 ` Scott Wood
2014-07-29 9:24 ` Mark Rutland
2014-07-29 9:24 ` Mark Rutland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.