From: Conor Dooley <conor@kernel.org>
To: William Zhang <william.zhang@broadcom.com>
Cc: David Regan <dregan@broadcom.com>,
dregan@mail.com, miquel.raynal@bootlin.com, richard@nod.at,
vigneshr@ti.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
computersforpeace@gmail.com, kdasu.kdev@gmail.com,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, joel.peshkin@broadcom.com,
tomer.yacoby@broadcom.com, dan.beygelman@broadcom.com,
anand.gore@broadcom.com, kursad.oney@broadcom.com,
florian.fainelli@broadcom.com, rafal@milecki.pl,
bcm-kernel-feedback-list@broadcom.com, andre.przywara@arm.com,
baruch@tkos.co.il, linux-arm-kernel@lists.infradead.org,
dan.carpenter@linaro.org
Subject: Re: [PATCH v3 01/10] dt-bindings: mtd: brcmnand: Updates for bcmbca SoCs
Date: Fri, 26 Jan 2024 16:46:46 +0000 [thread overview]
Message-ID: <20240126-armadillo-clean-e3509ed23ed5@spud> (raw)
In-Reply-To: <b2bc0948-7039-4dbd-8152-08a51e744c59@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 3958 bytes --]
On Thu, Jan 25, 2024 at 05:55:29PM -0800, William Zhang wrote:
> On 1/25/24 11:51, Conor Dooley wrote:
> > On Wed, Jan 24, 2024 at 07:01:48PM -0800, William Zhang wrote:
> > > On 1/24/24 09:24, Conor Dooley wrote:
> > > > On Tue, Jan 23, 2024 at 07:04:49PM -0800, David Regan wrote:
> > > > > From: William Zhang <william.zhang@broadcom.com>
> > > And the reason I keep it as int is because there could be a potential value
> > > of 2 for another mode that the current driver could set the wp_on to.
> >
> > Can you explain, in driver independent terms, what this other mode has
> > to do with how the WP is connected?
> > Either you've got the standard scenario where apparently "NAND_WPb" and
> > "WP_L" are connected and another situation where they are not.
> > Is there another pin configuration in addition to that, that this 3rd
> > mode represents?
> >
> The 3rd mode is WP pin connected but wp feature is disabled in the
> controller.
What does "disabled" mean? The controller itself is not capable of using
the WP pin because of hardware modifications? Or there's a bit in a
register that disables it and that bit has been set by software?
If it is a hardware difference for that controller, why does it not have
a dedicated compatible? If it's a software decision, then it shouldn't
be in the DT in the first place ;)
We've gone back here a bunch trying to figure stuff out, and you give me
a vague one sentence answer. Please.
> > > I
> > > don't see it is being used in BCMBCA product but I am not sure about other
> > > SoC family. So I don't want to completely close the door here just in case.
> >
> > If you ever need it, you could have a "brcm,wp-in-wacky-configuration"
> > property that indicates that the hardware is configured in that way
> > (providing that this hardware configuration is not just "NAND_WPb" and
> > "WP_L" pins connected. The property can very easily be made mutually
> > exclusive with "brcm,wp-not-connected" iff it ever comes to be.
> Yes we could have a new property but if we can have a single int property to
> cover all, IMHO it is better to just have one property as these three modes
> are related. I would really like to have it as an int property to keep
> things simple.
It is "better" because it is easier for you perhaps, but ripe for abuse.
> But if you think this is absolutely against the dts rule, I will switch to
> the "brcm,wp-not-connected" boolean property as you suggested.
I'll answer this when you describe the mode better, right now I cannot
really comment, but I have not yet seen a justification for the non-flag
version of the property. Even if there's a justification for documenting
that other mode in the DT, I'm likely to still think boolean properties
are a better fit.
> > > > > If ecc
> > > > > + strength and spare area size are set by nand-ecc-strength
> > > > > + and brcm,nand-oob-sector-size in the dts, these settings
> > > > > + have precedence and override this flag.
> > > >
> > > > Again, IMO, this is not for the binding to decide. That is a decision
> > > > for the operating system to make.
> > > >
> > > Again this is just for historic reason and BCMBCA as late player does not
> > > want to break any existing dts setting. So I thought it is useful to
> > > explain here. I can remove this text if you don't think it should be in the
> > > binding document.
> >
> > I don't, at least not in that form. I think it is reasonable to explain
> > why these values are better though.
> I understand the decision is for OS/driver to make. If we were to write
> another driver for other OS, the same precedence will apply too so the
> binding works the same way across all the OS. So I am not sure what better
> explanation or form I can put up here. I am open to any suggestion or I just
> delete it.
I would just delete it tbh.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-01-26 16:46 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 3:04 [PATCH v3 00/10] mtd: rawnand: brcmnand: driver and doc updates David Regan
2024-01-24 3:04 ` [PATCH v3 01/10] dt-bindings: mtd: brcmnand: Updates for bcmbca SoCs David Regan
2024-01-24 17:24 ` Conor Dooley
2024-01-25 3:01 ` William Zhang
2024-01-25 19:51 ` Conor Dooley
2024-01-26 1:55 ` William Zhang
2024-01-26 16:46 ` Conor Dooley [this message]
2024-01-26 18:09 ` William Zhang
2024-01-24 17:24 ` Conor Dooley
2024-01-24 17:34 ` Miquel Raynal
2024-01-25 3:14 ` William Zhang
2024-01-24 3:04 ` [PATCH v3 02/10] ARM: dts: broadcom: bcmbca: Add NAND controller node David Regan
2024-01-24 17:30 ` Miquel Raynal
2024-01-25 3:09 ` William Zhang
2024-01-25 3:34 ` Florian Fainelli
2024-01-25 5:53 ` William Zhang
2024-01-25 9:20 ` Miquel Raynal
2024-01-25 18:14 ` William Zhang
2024-01-24 3:04 ` [PATCH v3 03/10] arm64: " David Regan
2024-01-24 3:04 ` [PATCH v3 04/10] mtd: rawnand: brcmnand: Rename bcm63138 nand driver David Regan
2024-01-24 3:04 ` [PATCH v3 05/10] mtd: rawnand: brcmnand: Add BCMBCA read data bus interface David Regan
2024-01-24 3:04 ` [PATCH v3 06/10] mtd: rawnand: brcmnand: Add support for getting ecc setting from strap David Regan
2024-01-24 17:32 ` Miquel Raynal
2024-01-25 3:13 ` William Zhang
2024-01-24 3:04 ` [PATCH v3 07/10] mtd: rawnand: brcmnand: Support write protection setting from dts David Regan
2024-01-24 3:04 ` [PATCH v3 08/10] mtd: rawnand: brcmnand: exec_op helper functions return type fixes David Regan
2024-01-24 17:35 ` Miquel Raynal
2024-01-24 3:04 ` [PATCH v3 09/10] mtd: rawnand: brcmnand: update log level messages David Regan
2024-01-24 17:37 ` Miquel Raynal
2024-01-25 18:47 ` David Regan
2024-01-24 3:04 ` [PATCH v3 10/10] mtd: rawnand: brcmnand: allow for on-die ecc David Regan
2024-01-24 17:40 ` Miquel Raynal
2024-01-25 19:47 ` David Regan
2024-01-26 6:19 ` Miquel Raynal
2024-01-26 19:57 ` David Regan
2024-01-29 10:52 ` Miquel Raynal
2024-01-30 8:11 ` William Zhang
2024-01-30 11:01 ` Miquel Raynal
2024-01-30 15:26 ` David Regan
2024-01-30 18:55 ` Miquel Raynal
2024-02-01 6:48 ` William Zhang
2024-02-01 8:25 ` Miquel Raynal
2024-02-01 18:53 ` William Zhang
2024-02-02 17:38 ` David Regan
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=20240126-armadillo-clean-e3509ed23ed5@spud \
--to=conor@kernel.org \
--cc=anand.gore@broadcom.com \
--cc=andre.przywara@arm.com \
--cc=baruch@tkos.co.il \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=computersforpeace@gmail.com \
--cc=conor+dt@kernel.org \
--cc=dan.beygelman@broadcom.com \
--cc=dan.carpenter@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dregan@broadcom.com \
--cc=dregan@mail.com \
--cc=florian.fainelli@broadcom.com \
--cc=joel.peshkin@broadcom.com \
--cc=kdasu.kdev@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kursad.oney@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=rafal@milecki.pl \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=tomer.yacoby@broadcom.com \
--cc=vigneshr@ti.com \
--cc=william.zhang@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).