diff mbox series

[v2,1/2] dt-bindings: mtd: spi-nor: Add reset-gpios property

Message ID 20220901072914.30205-2-sai.krishna.potthuri@amd.com
State Superseded
Delegated to: Ambarus Tudor
Headers show
Series mtd: spi-nor: Add flash device reset support | expand

Commit Message

Sai Krishna Potthuri Sept. 1, 2022, 7:29 a.m. UTC
SPI-NOR flashes have RESET pin which can be toggled using GPIO
controller, for those platforms reset-gpios property can be used to
reset the flash device.

Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
---
 Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Krzysztof Kozlowski Sept. 1, 2022, 7:56 a.m. UTC | #1
On 01/09/2022 10:29, Sai Krishna Potthuri wrote:
> SPI-NOR flashes have RESET pin which can be toggled using GPIO
> controller, for those platforms reset-gpios property can be used to
> reset the flash device.
> 
> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
> ---

You still miss the user (DTS) of this change... The JEDEC spec did not
mention a reset pin. Can you provide the user?

Best regards,
Krzysztof
Sai Krishna Potthuri Sept. 1, 2022, 10:18 a.m. UTC | #2
Hi Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Thursday, September 1, 2022 1:26 PM
> To: Potthuri, Sai Krishna <sai.krishna.potthuri@amd.com>; Tudor Ambarus
> <tudor.ambarus@microchip.com>; Pratyush Yadav <pratyush@kernel.org>;
> Michael Walle <michael@walle.cc>; Miquel Raynal
> <miquel.raynal@bootlin.com>; Richard Weinberger <richard@nod.at>;
> Vignesh Raghavendra <vigneshr@ti.com>; Rob Herring
> <robh+dt@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>
> Cc: devicetree@vger.kernel.org; linux-mtd@lists.infradead.org; linux-
> kernel@vger.kernel.org; saikrishna12468@gmail.com; git (AMD-Xilinx)
> <git@amd.com>
> Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: spi-nor: Add reset-gpios
> property
> 
> On 01/09/2022 10:29, Sai Krishna Potthuri wrote:
> > SPI-NOR flashes have RESET pin which can be toggled using GPIO
> > controller, for those platforms reset-gpios property can be used to
> > reset the flash device.
> >
> > Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
> > ---
> 
> You still miss the user (DTS) of this change...
Do you mean to have this property in example DTS in this yaml?

> The JEDEC spec did not mention
> a reset pin. Can you provide the user?
Xilinx Octal SPI (cdns,qspi-nor.yaml) is using this reset pin to reset the
flash device on Versal platform.
Do you want me to update the example dts in cdns,qspi-nor.yaml file
to reflect this property in this patch?

Regards
Sai Krishna
Krzysztof Kozlowski Sept. 1, 2022, 10:28 a.m. UTC | #3
On 01/09/2022 13:18, Potthuri, Sai Krishna wrote:
> Hi Krzysztof,
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: Thursday, September 1, 2022 1:26 PM
>> To: Potthuri, Sai Krishna <sai.krishna.potthuri@amd.com>; Tudor Ambarus
>> <tudor.ambarus@microchip.com>; Pratyush Yadav <pratyush@kernel.org>;
>> Michael Walle <michael@walle.cc>; Miquel Raynal
>> <miquel.raynal@bootlin.com>; Richard Weinberger <richard@nod.at>;
>> Vignesh Raghavendra <vigneshr@ti.com>; Rob Herring
>> <robh+dt@kernel.org>; Krzysztof Kozlowski
>> <krzysztof.kozlowski+dt@linaro.org>
>> Cc: devicetree@vger.kernel.org; linux-mtd@lists.infradead.org; linux-
>> kernel@vger.kernel.org; saikrishna12468@gmail.com; git (AMD-Xilinx)
>> <git@amd.com>
>> Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: spi-nor: Add reset-gpios
>> property
>>
>> On 01/09/2022 10:29, Sai Krishna Potthuri wrote:
>>> SPI-NOR flashes have RESET pin which can be toggled using GPIO
>>> controller, for those platforms reset-gpios property can be used to
>>> reset the flash device.
>>>
>>> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
>>> ---
>>
>> You still miss the user (DTS) of this change...
> Do you mean to have this property in example DTS in this yaml?

No, I want to see in-tree DTS using it.

> 
>> The JEDEC spec did not mention
>> a reset pin. Can you provide the user?
> Xilinx Octal SPI (cdns,qspi-nor.yaml) is using this reset pin to reset the
> flash device on Versal platform.> Do you want me to update the example dts in cdns,qspi-nor.yaml file
> to reflect this property in this patch?
> 


Best regards,
Krzysztof
Sai Krishna Potthuri Sept. 7, 2022, 9:49 a.m. UTC | #4
Hi Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Thursday, September 1, 2022 3:58 PM
> To: Potthuri, Sai Krishna <sai.krishna.potthuri@amd.com>; Tudor Ambarus
> <tudor.ambarus@microchip.com>; Pratyush Yadav <pratyush@kernel.org>;
> Michael Walle <michael@walle.cc>; Miquel Raynal
> <miquel.raynal@bootlin.com>; Richard Weinberger <richard@nod.at>;
> Vignesh Raghavendra <vigneshr@ti.com>; Rob Herring
> <robh+dt@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>
> Cc: devicetree@vger.kernel.org; linux-mtd@lists.infradead.org; linux-
> kernel@vger.kernel.org; saikrishna12468@gmail.com; git (AMD-Xilinx)
> <git@amd.com>
> Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: spi-nor: Add reset-gpios
> property
> 
> On 01/09/2022 13:18, Potthuri, Sai Krishna wrote:
> > Hi Krzysztof,
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> Sent: Thursday, September 1, 2022 1:26 PM
> >> To: Potthuri, Sai Krishna <sai.krishna.potthuri@amd.com>; Tudor
> >> Ambarus <tudor.ambarus@microchip.com>; Pratyush Yadav
> >> <pratyush@kernel.org>; Michael Walle <michael@walle.cc>; Miquel
> >> Raynal <miquel.raynal@bootlin.com>; Richard Weinberger
> >> <richard@nod.at>; Vignesh Raghavendra <vigneshr@ti.com>; Rob Herring
> >> <robh+dt@kernel.org>; Krzysztof Kozlowski
> >> <krzysztof.kozlowski+dt@linaro.org>
> >> Cc: devicetree@vger.kernel.org; linux-mtd@lists.infradead.org; linux-
> >> kernel@vger.kernel.org; saikrishna12468@gmail.com; git (AMD-Xilinx)
> >> <git@amd.com>
> >> Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: spi-nor: Add
> >> reset-gpios property
> >>
> >> On 01/09/2022 10:29, Sai Krishna Potthuri wrote:
> >>> SPI-NOR flashes have RESET pin which can be toggled using GPIO
> >>> controller, for those platforms reset-gpios property can be used to
> >>> reset the flash device.
> >>>
> >>> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
> >>> ---
> >>
> >> You still miss the user (DTS) of this change...
> > Do you mean to have this property in example DTS in this yaml?
> 
> No, I want to see in-tree DTS using it.
As Michal Simek talked to you about this over IRC, as of now we don’t have
a DTS in the mainline tree for Xilinx Versal platform but we have a plan to do it.
For time being i will add this property in the example dts in this yaml file.

Regards
Sai Krishna
Krzysztof Kozlowski Sept. 7, 2022, 10:24 a.m. UTC | #5
On 07/09/2022 11:49, Potthuri, Sai Krishna wrote:
>>>>>
>>>>> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
>>>>> ---
>>>>
>>>> You still miss the user (DTS) of this change...
>>> Do you mean to have this property in example DTS in this yaml?
>>
>> No, I want to see in-tree DTS using it.
> As Michal Simek talked to you about this over IRC, as of now we don’t have
> a DTS in the mainline tree for Xilinx Versal platform but we have a plan to do it.
> For time being i will add this property in the example dts in this yaml file.

Sure, sounds good.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
index 7149784a36ac..4e98f78be750 100644
--- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
+++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
@@ -70,6 +70,12 @@  properties:
       be used on such systems, to denote the absence of a reliable reset
       mechanism.
 
+  reset-gpios:
+    description:
+      A GPIO line connected to the RESET (active low) signal of the device.
+      If "broken-flash-reset" is present then having this property does not
+      make any difference.
+
   partitions:
     type: object