All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Rafał Miłecki" <rafal@milecki.pl>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Brian Norris" <computersforpeace@gmail.com>,
	"Kamal Dasu" <kdasu.kdev@gmail.com>,
	linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 1/2] dt-bindings: mtd: brcmnand: add "no-wp" property
Date: Tue, 9 Nov 2021 11:52:15 +0100	[thread overview]
Message-ID: <20211109115215.5bcef0db@xps13> (raw)
In-Reply-To: <48cb0c8c-c752-0832-1e1a-836303926ed3@milecki.pl>

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

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

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Rafał Miłecki" <rafal@milecki.pl>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Brian Norris" <computersforpeace@gmail.com>,
	"Kamal Dasu" <kdasu.kdev@gmail.com>,
	linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 1/2] dt-bindings: mtd: brcmnand: add "no-wp" property
Date: Tue, 9 Nov 2021 11:52:15 +0100	[thread overview]
Message-ID: <20211109115215.5bcef0db@xps13> (raw)
In-Reply-To: <48cb0c8c-c752-0832-1e1a-836303926ed3@milecki.pl>

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

  reply	other threads:[~2021-11-09 10:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 15:11 [PATCH 1/2] dt-bindings: mtd: brcmnand: add "no-wp" property Rafał Miłecki
2021-11-03 15:11 ` Rafał Miłecki
2021-11-03 15:11 ` [PATCH 2/2] mtd: rawnand: brcmnand: support "no-wp" DT property Rafał Miłecki
2021-11-03 15:11   ` Rafał Miłecki
2021-11-03 17:50   ` Florian Fainelli
2021-11-03 17:50     ` Florian Fainelli
2021-11-03 18:03     ` Rafał Miłecki
2021-11-03 18:03       ` Rafał Miłecki
2021-11-03 18:08       ` Florian Fainelli
2021-11-03 18:08         ` Florian Fainelli
2021-11-09  7:49 ` [PATCH 1/2] dt-bindings: mtd: brcmnand: add "no-wp" property Rafał Miłecki
2021-11-09  7:49   ` Rafał Miłecki
2021-11-09 10:52   ` Miquel Raynal [this message]
2021-11-09 10:52     ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211109115215.5bcef0db@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kdasu.kdev@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rafal@milecki.pl \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.