ARM: tegra: add "nor-jedec" flash compatible binding
Subsystems (5)
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Starting with commits
8ff16cf ("Documentation: devicetree: m25p80: add "nor-jedec" binding") 1103b85 ("mtd: m25p80: bind to "nor-jedec" ID, for auto-detection") we have "nor-jedec" binding indicating support for JEDEC identification.
--- arch/arm/boot/dts/tegra114-dalmore.dts | 2 +- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 2 +- arch/arm/boot/dts/tegra124-nyan.dtsi | 2 +- arch/arm/boot/dts/tegra124-venice2.dts | 2 +- arch/arm/boot/dts/tegra20-trimslice.dts | 2 +- arch/arm/boot/dts/tegra30-beaver.dts | 2 +- arch/arm/boot/dts/tegra30-cardhu.dtsi | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +1 -1
@@ -1082,7 +1082,7 @@ status = "okay"; spi-max-frequency = <25000000>; spi-flash at 0 { - compatible = "winbond,w25q32dw"; + compatible = "winbond,w25q32dw", "nor-jedec"; reg = <0>; spi-max-frequency = <20000000>; };
arch/arm/boot/dts/tegra124-jetson-tk1.dts +1 -1
@@ -1611,7 +1611,7 @@ status = "okay"; spi-max-frequency = <25000000>; spi-flash at 0 { - compatible = "winbond,w25q32dw"; + compatible = "winbond,w25q32dw", "nor-jedec"; reg = <0>; spi-max-frequency = <20000000>; };
arch/arm/boot/dts/tegra124-nyan.dtsi +1 -1
@@ -343,7 +343,7 @@ spi-max-frequency = <25000000>; flash at 0 { - compatible = "winbond,w25q32dw"; + compatible = "winbond,w25q32dw", "nor-jedec"; spi-max-frequency = <25000000>; reg = <0>; };
arch/arm/boot/dts/tegra124-venice2.dts +1 -1
@@ -866,7 +866,7 @@ status = "okay"; spi-max-frequency = <25000000>; spi-flash at 0 { - compatible = "winbond,w25q32dw"; + compatible = "winbond,w25q32dw", "nor-jedec"; reg = <0>; spi-max-frequency = <20000000>; };
arch/arm/boot/dts/tegra20-trimslice.dts +1 -1
@@ -282,7 +282,7 @@ status = "okay"; spi-max-frequency = <48000000>; spi-flash at 0 { - compatible = "winbond,w25q80bl"; + compatible = "winbond,w25q80bl", "nor-jedec"; reg = <0>; spi-max-frequency = <48000000>; };
arch/arm/boot/dts/tegra30-beaver.dts +1 -1
@@ -1884,7 +1884,7 @@ status = "okay"; spi-max-frequency = <25000000>; spi-flash at 1 { - compatible = "winbond,w25q32"; + compatible = "winbond,w25q32", "nor-jedec"; reg = <1>; spi-max-frequency = <20000000>; };
arch/arm/boot/dts/tegra30-cardhu.dtsi +1 -1
@@ -353,7 +353,7 @@ status = "okay"; spi-max-frequency = <25000000>; spi-flash at 1 { - compatible = "winbond,w25q32"; + compatible = "winbond,w25q32", "nor-jedec"; reg = <1>; spi-max-frequency = <20000000>; };
Signature · 1 line
1.8.4.5
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Quoted 4 lines · Rafa? Mi?ecki
Starting with commits
8ff16cf ("Documentation: devicetree: m25p80: add "nor-jedec" binding") 1103b85 ("mtd: m25p80: bind to "nor-jedec" ID, for auto-detection") we have "nor-jedec" binding indicating support for JEDEC identification.
The documentation looks quite incomplete. "nor-jedec" sounds like it's intended to be something generic. As such, it should be documented in e.g. Documentation/devicetree/bindings/mtd/nor-jedec.txt, not buried in one particular flash device's binding. If it's not intended to be generic, why isn't the existing "winbond,w25q32dw" enough?
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Rafa? Mi?ecki
Starting with commits
8ff16cf ("Documentation: devicetree: m25p80: add "nor-jedec" binding") 1103b85 ("mtd: m25p80: bind to "nor-jedec" ID, for auto-detection") we have "nor-jedec" binding indicating support for JEDEC identification.
Quoted 6 lines
The documentation looks quite incomplete. "nor-jedec" sounds like it's intended to be something generic. As such, it should be documented in e.g.
Documentation/devicetree/bindings/mtd/nor-jedec.txt, not buried in one particular flash device's binding. If it's not intended to be generic, why isn't the existing "winbond,w25q32dw" enough?
It is generic, though there are plenty of additional manufacturer/device pairs that could go on top of it. m25p80 was (one of?) the first supported, so the naming has been based on legacy, and we're in the process of unwinding a bit of that. If it helps, we could move the doc to .../mtd/spi-nor,nor-jedec.txt or something like that.
Quoted 5 lines
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
I'm open to change, as this binding is new in 4.1-rc1.
Brian
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Quoted 1 line · Brian Norris
I'm open to change, as this binding is new in 4.1-rc1.
Though we'd need to make sure any change to "nor-jedec" gets applied to the shmobile platforms that have started using this string in linux-next.
Brian
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
In reply to Brian NorrisQuoted 14 lines · Brian Norris
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Rafa? Mi?ecki
Starting with commits
8ff16cf ("Documentation: devicetree: m25p80: add "nor-jedec" binding") 1103b85 ("mtd: m25p80: bind to "nor-jedec" ID, for auto-detection") we have "nor-jedec" binding indicating support for JEDEC identification.Quoted 6 lines
The documentation looks quite incomplete. "nor-jedec" sounds like it's intended to be something generic. As such, it should be documented in e.g.
Documentation/devicetree/bindings/mtd/nor-jedec.txt, not buried in one particular flash device's binding. If it's not intended to be generic, why isn't the existing "winbond,w25q32dw" enough?
Quoted 5 lines
It is generic, though there are plenty of additional manufacturer/device pairs that could go on top of it. m25p80 was (one of?) the first supported, so the naming has been based on legacy, and we're in the process of unwinding a bit of that. If it helps, we could move the doc to
.../mtd/spi-nor,nor-jedec.txtor something like that.
Yes, moving the documentation to a generic location would be appropriate in my opinion.
Quoted 6 lines
Quoted 5 lines
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
Quoted 7 lines
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
I'm open to change, as this binding is new in 4.1-rc1.
I don't believe compatible values should be interpreted according to context; compatible value matching isn't implemented that way AFAIK, and I'm not aware of any precedent for it to work that way.
Did the discussion involve the core DT maintainers? If so, whatever they decided can stick. Otherwise, the discussion should be rubn by them.
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Quoted 14 lines · Stephen Warren
Quoted 13 lines · Brian Norris
Quoted 5 lines · Stephen Warren
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
Quoted 5 lines
Quoted 1 line
I'm open to change, as this binding is new in 4.1-rc1.
I don't believe compatible values should be interpreted according to context; compatible value matching isn't implemented that way AFAIK, and I'm not aware of any precedent for it to work that way.
For SPI slaves, they are always nested within their SPI master/bus node. The master driver chooses how to probe its children. So there is some context-sensitivity.
Quoted 3 lines
Did the discussion involve the core DT maintainers? If so, whatever they decided can stick. Otherwise, the discussion should be rubn by them.
Yes. I never got an "ack", but Mark Rutland commented a few times and didn't seem to object to the name. e.g.:
http://lists.infradead.org/pipermail/linux-mtd/2015-March/058275.html
Brian
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Quoted 17 lines · Brian Norris
Quoted 16 lines · Stephen Warren
Quoted 14 lines · Brian Norris
Quoted 5 lines · Stephen Warren
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
I'm open to change, as this binding is new in 4.1-rc1.
Quoted 7 lines
Quoted 3 lines
I don't believe compatible values should be interpreted according to context; compatible value matching isn't implemented that way AFAIK, and I'm not aware of any precedent for it to work that way.
For SPI slaves, they are always nested within their SPI master/bus node. The master driver chooses how to probe its children. So there is some context-sensitivity.
That means it might be possible to implement context-sensitivity. However, it does not mean context-sensitivity is or should be implemented.
Quoted 8 lines
Quoted 3 lines
Did the discussion involve the core DT maintainers? If so, whatever they decided can stick. Otherwise, the discussion should be rubn by them.
Yes. I never got an "ack", but Mark Rutland commented a few times and didn't seem to object to the name. e.g.:
http://lists.infradead.org/pipermail/linux-mtd/2015-March/058275.html
Nobody pointed out in that thread the "jedec-nor" isn't remotely SPI-specific.
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
In reply to Brian NorrisQuoted 26 lines · Brian Norris
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Rafa? Mi?ecki
Starting with commits
8ff16cf ("Documentation: devicetree: m25p80: add "nor-jedec" binding") 1103b85 ("mtd: m25p80: bind to "nor-jedec" ID, for auto-detection") we have "nor-jedec" binding indicating support for JEDEC identification.Quoted 6 lines
The documentation looks quite incomplete. "nor-jedec" sounds like it's intended to be something generic. As such, it should be documented in e.g.
Documentation/devicetree/bindings/mtd/nor-jedec.txt, not buried in one particular flash device's binding. If it's not intended to be generic, why isn't the existing "winbond,w25q32dw" enough?It is generic, though there are plenty of additional manufacturer/device pairs that could go on top of it. m25p80 was (one of?) the first supported, so the naming has been based on legacy, and we're in the process of unwinding a bit of that. If it helps, we could move the doc to
.../mtd/spi-nor,nor-jedec.txtor something like that.Quoted 5 lines
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
Quoted 5 lines
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
What about "jedec,spi-nor"?
Is this "SERIAL FLASH DISCOVERABLE PARAMETERS (SFDP)"?
https://www.jedec.org/standards-documents/docs/jesd216b
(Don't have time to register with jedec now...)
If yes, "jedec,sfdp"? "jedec,jesd216b"?
Quoted 1 line
I'm open to change, as this binding is new in 4.1-rc1.
Indeed, as long as all users are fixed before 4.1 is released.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Quoted 28 lines · Geert Uytterhoeven
Quoted 26 lines · Brian Norris
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Rafa? Mi?ecki
Starting with commits
8ff16cf ("Documentation: devicetree: m25p80: add "nor-jedec" binding") 1103b85 ("mtd: m25p80: bind to "nor-jedec" ID, for auto-detection") we have "nor-jedec" binding indicating support for JEDEC identification.Quoted 6 lines
The documentation looks quite incomplete. "nor-jedec" sounds like it's intended to be something generic. As such, it should be documented in e.g.
Documentation/devicetree/bindings/mtd/nor-jedec.txt, not buried in one particular flash device's binding. If it's not intended to be generic, why isn't the existing "winbond,w25q32dw" enough?It is generic, though there are plenty of additional manufacturer/device pairs that could go on top of it. m25p80 was (one of?) the first supported, so the naming has been based on legacy, and we're in the process of unwinding a bit of that. If it helps, we could move the doc to
.../mtd/spi-nor,nor-jedec.txtor something like that.Quoted 5 lines
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
Quoted 7 lines
Quoted 5 lines
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
What about "jedec,spi-nor"?
That seems unique enough to me, or the options below if they're actually applicable.
Quoted 5 lines
Is this "SERIAL FLASH DISCOVERABLE PARAMETERS (SFDP)"?
https://www.jedec.org/standards-documents/docs/jesd216b
(Don't have time to register with jedec now...)If yes, "jedec,sfdp"? "jedec,jesd216b"?
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Quoted 35 lines · Stephen Warren
Quoted 34 lines · Geert Uytterhoeven
Quoted 31 lines · Brian Norris
Quoted 6 lines · Stephen Warren
Quoted 4 lines · Rafa? Mi?ecki
Starting with commits
8ff16cf ("Documentation: devicetree: m25p80: add "nor-jedec" binding") 1103b85 ("mtd: m25p80: bind to "nor-jedec" ID, for auto-detection") we have "nor-jedec" binding indicating support for JEDEC identification.Quoted 6 lines
The documentation looks quite incomplete. "nor-jedec" sounds like it's intended to be something generic. As such, it should be documented in e.g.
Documentation/devicetree/bindings/mtd/nor-jedec.txt, not buried in one particular flash device's binding. If it's not intended to be generic, why isn't the existing "winbond,w25q32dw" enough?It is generic, though there are plenty of additional manufacturer/device pairs that could go on top of it. m25p80 was (one of?) the first supported, so the naming has been based on legacy, and we're in the process of unwinding a bit of that. If it helps, we could move the doc to
.../mtd/spi-nor,nor-jedec.txtor something like that.Quoted 5 lines
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
Quoted 4 lines
Quoted 1 line
What about "jedec,spi-nor"?
That seems unique enough to me, or the options below if they're actually applicable.
That could be OK with me. If I can get the magic blessing from the DT folks, then I'll send patches to update everything.
Quoted 5 lines
Quoted 5 lines
Is this "SERIAL FLASH DISCOVERABLE PARAMETERS (SFDP)"?
https://www.jedec.org/standards-documents/docs/jesd216b
(Don't have time to register with jedec now...)If yes, "jedec,sfdp"? "jedec,jesd216b"?
It's not SFDP. We're looking at SPI flash that are detected simply by the READ ID (9Fh) opcode. SFDP is on newer SPI flash which support the 5Ah opcode, for reading a parameter table. (I'd like to support this soon, actually, and one of those sorts of strings might work.)
Brian
PATCH 1/1 ARM: tegra: add "nor-jedec" flash compatible binding
Hi DT maintainers,
Quoted 16 lines · Brian Norris
Quoted 15 lines · Stephen Warren
Quoted 14 lines · Geert Uytterhoeven
Quoted 12 lines · Brian Norris
Quoted 5 lines · Stephen Warren
Equally, "nor-jedec" doesn't sound like the right name. It doesn't differentiate between SPI and parallel NOR flash, which presumably need different compatible values, since the programming model is quite different, and the compatible value is supposed to define/imply the SW-visible programming model.
It's definitely for SPI only. There was much discussion about this a few months back. Somewhere along the way, it was mentioned that the context (SPI slave is a child of SPI master) would make this clear. I'm still not sure why we didn't end up with something more descriptive, though, like "spi-nor,nor-jedec".
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
What about "jedec,spi-nor"?
That seems unique enough to me, or the options below if they're actually applicable.
That could be OK with me. If I can get the magic blessing from the DT folks, then I'll send patches to update everything.
Can I get an 'ack' for this change? We merged a binding for "nor-jedec" in 4.1-rc1, with review (but no explicit 'ack') from Mark, and a few DTS's are starting to use it. But we're now seeing objections, with a request to change this to "jedec,spi-nor". I don't care too much, but I can understand Stephen's point.
Anyway, I don't want to go through too many more patch cycles without an explicit ack here on the "jedec,spi-nor" binding (i.e., s/nor-jedec/jedec,spi-nor/g). With an ack, then I can make sure the binding and current users get changed before 4.1 is minted, and prevent other ARM subarchitectures from pulling in the "wrong" binding for 4.2.
Brian