2022-09-08 07:17:44

by Potthuri, Sai Krishna

[permalink] [raw]
Subject: [PATCH v3 0/2] mtd: spi-nor: Add flash device reset support

Update spi-nor dt-binding and spi-nor core to support flash device reset
using reset-gpios property.

changes in v3:
-> 1/2 - Add reset-gpios property in the example dts.

changes in v2:
-> 1/2 - Updated the description of the 'reset-gpios' property.
-> 2/2 - Updated the reset sequence to match with "active low" flag in
device-tree, also removed unwanted comments.
-> 2/2 - Updated the logic to perform the flash reset unconditionally.
-> 2/2 - Updated the delay values to support more number of flash devices.


Sai Krishna Potthuri (2):
dt-bindings: mtd: spi-nor: Add reset-gpios property
mtd: spi-nor: Add support for flash reset

.../bindings/mtd/jedec,spi-nor.yaml | 8 ++++++
drivers/mtd/spi-nor/core.c | 25 +++++++++++++++++++
2 files changed, 33 insertions(+)

--
2.17.1


2022-09-08 07:30:56

by Potthuri, Sai Krishna

[permalink] [raw]
Subject: [PATCH v3 1/2] dt-bindings: mtd: spi-nor: Add reset-gpios property

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 <[email protected]>
---
Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
index 7149784a36ac..8a843b9b8673 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

@@ -88,6 +94,7 @@ unevaluatedProperties: false

examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -97,6 +104,7 @@ examples:
reg = <0>;
spi-max-frequency = <40000000>;
m25p,fast-read;
+ reset-gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
};
...
--
2.17.1

2022-09-08 11:12:03

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] dt-bindings: mtd: spi-nor: Add reset-gpios property

On 08/09/2022 08:44, 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 <[email protected]>


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof

2022-10-25 02:51:47

by Tudor Ambarus

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] mtd: spi-nor: Add flash device reset support

On Thu, 8 Sep 2022 12:14:26 +0530, Sai Krishna Potthuri wrote:
> Update spi-nor dt-binding and spi-nor core to support flash device reset
> using reset-gpios property.
>
> changes in v3:
> -> 1/2 - Add reset-gpios property in the example dts.
>
> changes in v2:
> -> 1/2 - Updated the description of the 'reset-gpios' property.
> -> 2/2 - Updated the reset sequence to match with "active low" flag in
> device-tree, also removed unwanted comments.
> -> 2/2 - Updated the logic to perform the flash reset unconditionally.
> -> 2/2 - Updated the delay values to support more number of flash devices.
>
> [...]

Applied to spi-nor/next, thanks!

[1/2] dt-bindings: mtd: spi-nor: Add reset-gpios property
https://git.kernel.org/mtd/c/7f2937efe186
[2/2] mtd: spi-nor: Add support for flash reset
https://git.kernel.org/mtd/c/8f1ee9ef71d0

Best regards,
--
Tudor Ambarus <[email protected]>