diff mbox series

[1/2] dt-bindings: mtd: brcmnand: add "no-wp" property

Message ID 20211103151117.18690-1-zajec5@gmail.com
State Changes Requested
Headers show
Series [1/2] dt-bindings: mtd: brcmnand: add "no-wp" property | expand

Commit Message

Rafał Miłecki Nov. 3, 2021, 3:11 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

It's required to properly describe boards without connected WP pin (e.g.
Asus GT-AC5300).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Rafał Miłecki Nov. 9, 2021, 7:49 a.m. UTC | #1
On 03.11.2021 16:11, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> It's required to properly describe boards without connected WP pin (e.g.
> Asus GT-AC5300).
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>   Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> index dd5a64969e37..49c7860c0dad 100644
> --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> @@ -111,6 +111,11 @@ properties:
>         earlier versions of this core that include WP
>       type: boolean
>   
> +  no-wp:
> +    description:
> +      This property marks boards with WP pin not connected to the NAND chip.
> +    type: boolean

I started rethinking this. Since we already hav "brcm,nand-has-wp"
(boolean), would makes more sense:
1. Add "no-wp" boolean (as proposed in this patch)
2. Add "wp" (or similar) with [0, 1] and deprecate "brcm,nand-has-wp"
Miquel Raynal Nov. 9, 2021, 10:52 a.m. UTC | #2
Hello,

rafal@milecki.pl wrote on Tue, 9 Nov 2021 08:49:36 +0100:

> On 03.11.2021 16:11, Rafał Miłecki wrote:
> > From: Rafał Miłecki <rafal@milecki.pl>
> > 
> > It's required to properly describe boards without connected WP pin (e.g.
> > Asus GT-AC5300).
> > 
> > Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> > ---
> >   Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 5 +++++
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > index dd5a64969e37..49c7860c0dad 100644
> > --- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
> > @@ -111,6 +111,11 @@ properties:
> >         earlier versions of this core that include WP
> >       type: boolean  
> >   > +  no-wp:  
> > +    description:
> > +      This property marks boards with WP pin not connected to the NAND chip.
> > +    type: boolean  
> 
> I started rethinking this. Since we already hav "brcm,nand-has-wp"
> (boolean), would makes more sense:
> 1. Add "no-wp" boolean (as proposed in this patch)
> 2. Add "wp" (or similar) with [0, 1] and deprecate "brcm,nand-has-wp"

Maybe this should be a raw NAND wide property, at least in the bindings
for now: nand-wp (such as nand-rb) and this property should contain the
wp line id.

For me, brcm,nand-has-wp means that the nand wp is connected, not that
it "can be" connected. The fact that the controller has a wp pin or not
should be internal to the controller driver (different compatible or hw
version check).

Thanks,
Miquèl
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
index dd5a64969e37..49c7860c0dad 100644
--- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
+++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
@@ -111,6 +111,11 @@  properties:
       earlier versions of this core that include WP
     type: boolean
 
+  no-wp:
+    description:
+      This property marks boards with WP pin not connected to the NAND chip.
+    type: boolean
+
 patternProperties:
   "^nand@[a-f0-9]$":
     type: object