Skip to contentSkip to conversation

dt-bindings: mtd: gpmc-onenand: Update properties description

PATCH Superseded Ladislav Michl 4 participants 6 messages Nov 11, 2017 – Nov 15, 2017

Subsystems (2)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/16 dt-bindings: mtd: gpmc-onenand: Update properties description

Compatible property is required for OMAP2+ mtd driver. Also add R/B pin gpio description and delete unused dma-channel property.

---
Changes:
-v4: new patch

 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +4 -2
index b6e8bfd024f4..9d7b1409deab 100644
@@ -9,13 +9,14 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
 
 Required properties:
 
+ - compatible:		"ti,omap2-onenand"
  - reg:			The CS line the peripheral is connected to
- - gpmc,device-width	Width of the ONENAND device connected to the GPMC
+ - gpmc,device-width:	Width of the ONENAND device connected to the GPMC
 			in bytes. Must be 1 or 2.
 
 Optional properties:
 
- - dma-channel:		DMA Channel index
+ - rb-gpios:		GPIO specifier for the ready/busy# pin.
 
 For inline partition table parsing (optional):
 
@@ -35,6 +36,7 @@ Example for an OMAP3430 board:
 		#size-cells = <1>;
 
 		onenand@0 {
+			compatible = "ti,omap2-onenand";
 			reg = <0 0 0>; /* CS0, offset 0 */
 			gpmc,device-width = <2>;
 
Signature · 6 lines
2.11.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Acked-by on v4 1/16
#1 lore raw
Quoted 20 lines · Ladislav Michl

Compatible property is required for OMAP2+ mtd driver. Also add R/B pin gpio description and delete unused dma-channel property.

---
Changes:
-v4: new patch

 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +0 -0
index b6e8bfd024f4..9d7b1409deab 100644
@@ -9,13 +9,14 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
 
 Required properties:
 

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt · line 19

Quoted 10 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +3 -2
+ - compatible:		"ti,omap2-onenand"
  - reg:			The CS line the peripheral is connected to
- - gpmc,device-width	Width of the ONENAND device connected to the GPMC
+ - gpmc,device-width:	Width of the ONENAND device connected to the GPMC
 			in bytes. Must be 1 or 2.
 
 Optional properties:
 
- - dma-channel:		DMA Channel index
+ - rb-gpios:		GPIO specifier for the ready/busy# pin.

As agreed let's call this int-gpios as this is really the INT pin. RDY pin is something different.

Then you can add my

Quoted 12 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
 For inline partition table parsing (optional):
 
@@ -35,6 +36,7 @@ Example for an OMAP3430 board:
 		#size-cells = <1>;
 
 		onenand@0 {
+			compatible = "ti,omap2-onenand";
 			reg = <0 0 0>; /* CS0, offset 0 */
 			gpmc,device-width = <2>;
 
Signature · 8 lines
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#2 lore raw
In reply to Ladislav Michl

Hi,

Quoted 17 lines · Ladislav Michl

Compatible property is required for OMAP2+ mtd driver. Also add R/B pin gpio description and delete unused dma-channel property.

---
Changes:
-v4: new patch

 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +0 -0
index b6e8bfd024f4..9d7b1409deab 100644

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt · line 12

Quoted 4 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
@@ -9,13 +9,14 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
 
 Required properties:
 
+ - compatible:		"ti,omap2-onenand"

I suggest to also add more specific compatible values (i.e. "ti,omap3-onenand") in case it is needed later. They don't hurt much and may prevent ugly hacks in the future.

Quoted 13 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +2 -2
  - reg:			The CS line the peripheral is connected to
- - gpmc,device-width	Width of the ONENAND device connected to the GPMC
+ - gpmc,device-width:	Width of the ONENAND device connected to the GPMC
 			in bytes. Must be 1 or 2.
 
 Optional properties:
 
- - dma-channel:		DMA Channel index
+ - rb-gpios:		GPIO specifier for the ready/busy# pin.
 
 For inline partition table parsing (optional):
 

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Example for an OMAP3430 board: · line 42

Quoted 7 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
@@ -35,6 +36,7 @@ Example for an OMAP3430 board:
 		#size-cells = <1>;
 
 		onenand@0 {
+			compatible = "ti,omap2-onenand";
 			reg = <0 0 0>; /* CS0, offset 0 */
 			gpmc,device-width = <2>;
 

-- Sebastian

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#3 lore raw
Quoted 21 lines · Sebastian Reichel

Hi,

Quoted 18 lines · Ladislav Michl

Compatible property is required for OMAP2+ mtd driver. Also add R/B pin gpio description and delete unused dma-channel property.

---
Changes:
-v4: new patch

 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +0 -0
index b6e8bfd024f4..9d7b1409deab 100644
@@ -9,13 +9,14 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
 
Quoted 7 lines

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt · line 12

Quoted 3 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
 Required properties:
 
+ - compatible:		"ti,omap2-onenand"

I suggest to also add more specific compatible values (i.e. "ti,omap3-onenand") in case it is needed later. They don't hurt much and may prevent ugly hacks in the future.

We tried hard to avoid anything omap3 specific (it was present in earlier versions of this patchset). And NAND driver is also okay with "ti,omap3-nand" (I know it is a poor argument). So far all OMAP2/3 differences seems to come from both devices unavailable to the person who did the code change.

While I agree it is in general good idea, I have personal problem with that as there are devices in field with "ti,omap2-onenand" compatible and OMAP3530.

See this function:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/isee/igep00x0/igep00x0.c;h=5c7f2567118a1e17bdb6f76f29a7161628776bf7;hb=HEAD#l158
Board comes either with NAND or OneNAND, bootloader detects that and enables proper node. Updating bootloader is potentially dangerous, so I'd like to avoid that.

However, if you insist on idea above, I'm okay with keeping some of tree patches for a while...

Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +2 -2
  - reg:			The CS line the peripheral is connected to
- - gpmc,device-width	Width of the ONENAND device connected to the GPMC
+ - gpmc,device-width:	Width of the ONENAND device connected to the GPMC
 			in bytes. Must be 1 or 2.
 
 Optional properties:
 
- - dma-channel:		DMA Channel index
+ - rb-gpios:		GPIO specifier for the ready/busy# pin.
 
 For inline partition table parsing (optional):
 
@@ -35,6 +36,7 @@ Example for an OMAP3430 board:
 		#size-cells = <1>;
 
Quoted 7 lines

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Example for an OMAP3430 board: · line 42

Quoted 5 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
 		onenand@0 {
+			compatible = "ti,omap2-onenand";
 			reg = <0 0 0>; /* CS0, offset 0 */
 			gpmc,device-width = <2>;
 

-- Sebastian

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#4 lore raw

Hi,

Quoted 38 lines · Ladislav Michl
Quoted 21 lines · Sebastian Reichel

Hi,

Quoted 18 lines · Ladislav Michl

Compatible property is required for OMAP2+ mtd driver. Also add R/B pin gpio description and delete unused dma-channel property.

---
Changes:
-v4: new patch

 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +0 -0
index b6e8bfd024f4..9d7b1409deab 100644
@@ -9,13 +9,14 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
 
Quoted 7 lines

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt · line 12

Quoted 3 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
 Required properties:
 
+ - compatible:		"ti,omap2-onenand"

I suggest to also add more specific compatible values (i.e. "ti,omap3-onenand") in case it is needed later. They don't hurt much and may prevent ugly hacks in the future.

We tried hard to avoid anything omap3 specific (it was present in earlier versions of this patchset). And NAND driver is also okay with "ti,omap3-nand" (I know it is a poor argument). So far all OMAP2/3 differences seems to come from both devices unavailable to the person who did the code change.

While I agree it is in general good idea, I have personal problem with that as there are devices in field with "ti,omap2-onenand" compatible and OMAP3530.

Quoted 8 lines

See this function:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/isee/igep00x0/igep00x0.c;h=5c7f2567118a1e17bdb6f76f29a7161628776bf7;hb=HEAD#l158
Board comes either with NAND or OneNAND, bootloader detects that and enables proper node. Updating bootloader is potentially dangerous, so I'd like to avoid that.

However, if you insist on idea above, I'm okay with keeping some of tree patches for a while...

The best practice for DT bindings is to have a specific compatible and a generic fallback. Something like

compatible = "ti,omap3-onenand", "ti,omap2-onenand";

You can just ignore the "ti,omap3-onenand" in the driver for now. Just add it to the bindings and the DTS files. Then it is there in case it is needed at some point.

-- Sebastian

Quoted 24 lines
Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +2 -2
  - reg:			The CS line the peripheral is connected to
- - gpmc,device-width	Width of the ONENAND device connected to the GPMC
+ - gpmc,device-width:	Width of the ONENAND device connected to the GPMC
 			in bytes. Must be 1 or 2.
 
 Optional properties:
 
- - dma-channel:		DMA Channel index
+ - rb-gpios:		GPIO specifier for the ready/busy# pin.
 
 For inline partition table parsing (optional):
 
@@ -35,6 +36,7 @@ Example for an OMAP3430 board:
 		#size-cells = <1>;
 
Quoted 7 lines

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Example for an OMAP3430 board: · line 42

Quoted 5 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
 		onenand@0 {
+			compatible = "ti,omap2-onenand";
 			reg = <0 0 0>; /* CS0, offset 0 */
 			gpmc,device-width = <2>;
 

-- Sebastian

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#5 lore raw
Quoted 50 lines · Sebastian Reichel

Hi,

Quoted 38 lines · Ladislav Michl
Quoted 21 lines · Sebastian Reichel

Hi,

Quoted 18 lines · Ladislav Michl

Compatible property is required for OMAP2+ mtd driver. Also add R/B pin gpio description and delete unused dma-channel property.

---
Changes:
-v4: new patch

 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +0 -0
index b6e8bfd024f4..9d7b1409deab 100644
@@ -9,13 +9,14 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
 
Quoted 7 lines

Documentation/devicetree/bindings/mtd/gpmc-onenand.txt Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt · line 12

Quoted 3 lines
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +1 -0
 Required properties:
 
+ - compatible:		"ti,omap2-onenand"

I suggest to also add more specific compatible values (i.e. "ti,omap3-onenand") in case it is needed later. They don't hurt much and may prevent ugly hacks in the future.

We tried hard to avoid anything omap3 specific (it was present in earlier versions of this patchset). And NAND driver is also okay with "ti,omap3-nand" (I know it is a poor argument). So far all OMAP2/3 differences seems to come from both devices unavailable to the person who did the code change.

While I agree it is in general good idea, I have personal problem with that as there are devices in field with "ti,omap2-onenand" compatible and OMAP3530.

Quoted 8 lines

See this function:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/isee/igep00x0/igep00x0.c;h=5c7f2567118a1e17bdb6f76f29a7161628776bf7;hb=HEAD#l158
Board comes either with NAND or OneNAND, bootloader detects that and enables proper node. Updating bootloader is potentially dangerous, so I'd like to avoid that.

However, if you insist on idea above, I'm okay with keeping some of tree patches for a while...

Quoted 8 lines

The best practice for DT bindings is to have a specific compatible and a generic fallback. Something like

compatible = "ti,omap3-onenand", "ti,omap2-onenand";

You can just ignore the "ti,omap3-onenand" in the driver for now. Just add it to the bindings and the DTS files. Then it is there in case it is needed at some point.

I understood it, but it missed my point. I already have "ti,omap2-onenand" in OMAP3 DTB. So once driver starts doing something different for OMAP2, it will break my setup.

ladis

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/