* [PATCH 0/3] Add support for Fujitsu MB85RS128TY
@ 2024-12-02 16:35 Jonas Rebmann
2024-12-02 16:35 ` [PATCH 1/3] mtd: mchp48l640: make WEL behaviour configurable Jonas Rebmann
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jonas Rebmann @ 2024-12-02 16:35 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Schocher
Cc: linux-mtd, linux-kernel, devicetree, David Jander, kernel,
Jonas Rebmann
The Fujitsu MB85RS128TY FRAM chips behave almost identically to the
Microchip 48L640. This series adds their support to the mchp48l640
driver.
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
David Jander (2):
mtd: mchp48l640: make WEL behaviour configurable
mtd: mchp48l640: add support for Fujitsu MB85RS128TY FRAM
Jonas Rebmann (1):
dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible
.../bindings/mtd/microchip,mchp48l640.yaml | 1 +
drivers/mtd/devices/mchp48l640.c | 28 +++++++++++++++++++---
2 files changed, 26 insertions(+), 3 deletions(-)
---
base-commit: 7af08b57bcb9ebf78675c50069c54125c0a8b795
change-id: 20241129-mb85rs128ty-659e81900957
Best regards,
--
Jonas Rebmann <jre@pengutronix.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] mtd: mchp48l640: make WEL behaviour configurable
2024-12-02 16:35 [PATCH 0/3] Add support for Fujitsu MB85RS128TY Jonas Rebmann
@ 2024-12-02 16:35 ` Jonas Rebmann
2024-12-02 16:35 ` [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible Jonas Rebmann
2024-12-02 16:35 ` [PATCH 3/3] mtd: mchp48l640: add support for Fujitsu MB85RS128TY FRAM Jonas Rebmann
2 siblings, 0 replies; 7+ messages in thread
From: Jonas Rebmann @ 2024-12-02 16:35 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Schocher
Cc: linux-mtd, linux-kernel, devicetree, David Jander, kernel,
Jonas Rebmann
From: David Jander <david@protonic.nl>
The 48L640 resets the WEL bit (the Write Enable Latch bit in the status
register) to zero on the completion of write operations. In preparation
to support chips behaving differently, introduce .auto_disable_wel
capability, and, if it's missing, explicitly reset the WEL bit after
writes.
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
drivers/mtd/devices/mchp48l640.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/devices/mchp48l640.c b/drivers/mtd/devices/mchp48l640.c
index f576e6a890e859e7d20aeeb2ede4ca0acf4850fc..4cdd24aaed416fc7e40a8060b5c7eaf6684fc6d5 100644
--- a/drivers/mtd/devices/mchp48l640.c
+++ b/drivers/mtd/devices/mchp48l640.c
@@ -27,6 +27,7 @@
struct mchp48_caps {
unsigned int size;
unsigned int page_size;
+ bool auto_disable_wel;
};
struct mchp48l640_flash {
@@ -194,9 +195,15 @@ static int mchp48l640_write_page(struct mtd_info *mtd, loff_t to, size_t len,
else
goto fail;
- ret = mchp48l640_waitforbit(flash, MCHP48L640_STATUS_WEL, false);
- if (ret)
- goto fail;
+ if (flash->caps->auto_disable_wel) {
+ ret = mchp48l640_waitforbit(flash, MCHP48L640_STATUS_WEL, false);
+ if (ret)
+ goto fail;
+ } else {
+ ret = mchp48l640_write_prepare(flash, false);
+ if (ret)
+ goto fail;
+ }
kfree(cmd);
return 0;
@@ -293,6 +300,7 @@ static int mchp48l640_read(struct mtd_info *mtd, loff_t from, size_t len,
static const struct mchp48_caps mchp48l640_caps = {
.size = SZ_8K,
.page_size = 32,
+ .auto_disable_wel = true,
};
static int mchp48l640_probe(struct spi_device *spi)
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible
2024-12-02 16:35 [PATCH 0/3] Add support for Fujitsu MB85RS128TY Jonas Rebmann
2024-12-02 16:35 ` [PATCH 1/3] mtd: mchp48l640: make WEL behaviour configurable Jonas Rebmann
@ 2024-12-02 16:35 ` Jonas Rebmann
2024-12-02 16:53 ` Marc Kleine-Budde
2024-12-02 17:32 ` Rob Herring (Arm)
2024-12-02 16:35 ` [PATCH 3/3] mtd: mchp48l640: add support for Fujitsu MB85RS128TY FRAM Jonas Rebmann
2 siblings, 2 replies; 7+ messages in thread
From: Jonas Rebmann @ 2024-12-02 16:35 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Schocher
Cc: linux-mtd, linux-kernel, devicetree, David Jander, kernel,
Jonas Rebmann
Add a compatible string to support Fujitsu MB85RS128TY.
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml b/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
index 0ff32bd00bf6aee279fa78c624d8d47c6162f7f1..973f06b665dbbcb9ea1090418eb18fbe2285acef 100644
--- a/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
+++ b/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
@@ -18,6 +18,7 @@ properties:
compatible:
items:
- const: microchip,48l640
+ - const: fujitsu,mb85rs128ty
reg:
maxItems: 1
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] mtd: mchp48l640: add support for Fujitsu MB85RS128TY FRAM
2024-12-02 16:35 [PATCH 0/3] Add support for Fujitsu MB85RS128TY Jonas Rebmann
2024-12-02 16:35 ` [PATCH 1/3] mtd: mchp48l640: make WEL behaviour configurable Jonas Rebmann
2024-12-02 16:35 ` [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible Jonas Rebmann
@ 2024-12-02 16:35 ` Jonas Rebmann
2 siblings, 0 replies; 7+ messages in thread
From: Jonas Rebmann @ 2024-12-02 16:35 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Schocher
Cc: linux-mtd, linux-kernel, devicetree, David Jander, kernel,
Jonas Rebmann
From: David Jander <david@protonic.nl>
The Fujitsu FRAM chips use the same command set as Microchip EERAM.
The only differences are that the Fujitsu FRAM chips don't really have a
page size limit, nor do they automatically reset the WEL bit.
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
drivers/mtd/devices/mchp48l640.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/mtd/devices/mchp48l640.c b/drivers/mtd/devices/mchp48l640.c
index 4cdd24aaed416fc7e40a8060b5c7eaf6684fc6d5..7584d0ba93969d79ba3d9c7a97bc63bd0e5ef327 100644
--- a/drivers/mtd/devices/mchp48l640.c
+++ b/drivers/mtd/devices/mchp48l640.c
@@ -303,6 +303,12 @@ static const struct mchp48_caps mchp48l640_caps = {
.auto_disable_wel = true,
};
+static const struct mchp48_caps mb85rs128ty_caps = {
+ .size = SZ_16K,
+ .page_size = 256,
+ .auto_disable_wel = false,
+};
+
static int mchp48l640_probe(struct spi_device *spi)
{
struct mchp48l640_flash *flash;
@@ -361,6 +367,10 @@ static const struct of_device_id mchp48l640_of_table[] = {
.compatible = "microchip,48l640",
.data = &mchp48l640_caps,
},
+ {
+ .compatible = "fujitsu,mb85rs128ty",
+ .data = &mb85rs128ty_caps,
+ },
{}
};
MODULE_DEVICE_TABLE(of, mchp48l640_of_table);
@@ -370,6 +380,10 @@ static const struct spi_device_id mchp48l640_spi_ids[] = {
.name = "48l640",
.driver_data = (kernel_ulong_t)&mchp48l640_caps,
},
+ {
+ .name = "mb85rs128ty",
+ .driver_data = (kernel_ulong_t)&mb85rs128ty_caps,
+ },
{}
};
MODULE_DEVICE_TABLE(spi, mchp48l640_spi_ids);
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible
2024-12-02 16:35 ` [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible Jonas Rebmann
@ 2024-12-02 16:53 ` Marc Kleine-Budde
2024-12-02 20:59 ` Rob Herring
2024-12-02 17:32 ` Rob Herring (Arm)
1 sibling, 1 reply; 7+ messages in thread
From: Marc Kleine-Budde @ 2024-12-02 16:53 UTC (permalink / raw)
To: Jonas Rebmann
Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Schocher,
devicetree, linux-kernel, linux-mtd, kernel, David Jander
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
On 02.12.2024 17:35:21, Jonas Rebmann wrote:
> Add a compatible string to support Fujitsu MB85RS128TY.
>
> Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
> ---
> Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml b/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
> index 0ff32bd00bf6aee279fa78c624d8d47c6162f7f1..973f06b665dbbcb9ea1090418eb18fbe2285acef 100644
> --- a/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
> +++ b/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
> @@ -18,6 +18,7 @@ properties:
> compatible:
> items:
^^^^^
I think you need to change to "oneOf"
> - const: microchip,48l640
> + - const: fujitsu,mb85rs128ty
>
> reg:
> maxItems: 1
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible
2024-12-02 16:35 ` [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible Jonas Rebmann
2024-12-02 16:53 ` Marc Kleine-Budde
@ 2024-12-02 17:32 ` Rob Herring (Arm)
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring (Arm) @ 2024-12-02 17:32 UTC (permalink / raw)
To: Jonas Rebmann
Cc: Conor Dooley, linux-mtd, devicetree, David Jander,
Richard Weinberger, kernel, Vignesh Raghavendra, Miquel Raynal,
Krzysztof Kozlowski, Heiko Schocher, linux-kernel
On Mon, 02 Dec 2024 17:35:21 +0100, Jonas Rebmann wrote:
> Add a compatible string to support Fujitsu MB85RS128TY.
>
> Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
> ---
> Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.example.dtb: eeram@0: compatible: ['microchip,48l640'] is too short
from schema $id: http://devicetree.org/schemas/mtd/microchip,mchp48l640.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.example.dtb: eeram@0: Unevaluated properties are not allowed ('compatible' was unexpected)
from schema $id: http://devicetree.org/schemas/mtd/microchip,mchp48l640.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241202-mb85rs128ty-v1-2-a660b6490dc8@pengutronix.de
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible
2024-12-02 16:53 ` Marc Kleine-Budde
@ 2024-12-02 20:59 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2024-12-02 20:59 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: Jonas Rebmann, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Krzysztof Kozlowski, Conor Dooley,
Heiko Schocher, devicetree, linux-kernel, linux-mtd, kernel,
David Jander
On Mon, Dec 02, 2024 at 05:53:18PM +0100, Marc Kleine-Budde wrote:
> On 02.12.2024 17:35:21, Jonas Rebmann wrote:
> > Add a compatible string to support Fujitsu MB85RS128TY.
> >
> > Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
> > ---
> > Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml b/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
> > index 0ff32bd00bf6aee279fa78c624d8d47c6162f7f1..973f06b665dbbcb9ea1090418eb18fbe2285acef 100644
> > --- a/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/microchip,mchp48l640.yaml
> > @@ -18,6 +18,7 @@ properties:
> > compatible:
> > items:
> ^^^^^
> I think you need to change to "oneOf"
"enum" rather than oneOf plus const entries.
>
> > - const: microchip,48l640
> > + - const: fujitsu,mb85rs128ty
> >
> > reg:
> > maxItems: 1
>
> regards,
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Embedded Linux | https://www.pengutronix.de |
> Vertretung Nürnberg | Phone: +49-5121-206917-129 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-02 20:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 16:35 [PATCH 0/3] Add support for Fujitsu MB85RS128TY Jonas Rebmann
2024-12-02 16:35 ` [PATCH 1/3] mtd: mchp48l640: make WEL behaviour configurable Jonas Rebmann
2024-12-02 16:35 ` [PATCH 2/3] dt-bindings: mtd: mchp48l640 add mb85rs128ty compatible Jonas Rebmann
2024-12-02 16:53 ` Marc Kleine-Budde
2024-12-02 20:59 ` Rob Herring
2024-12-02 17:32 ` Rob Herring (Arm)
2024-12-02 16:35 ` [PATCH 3/3] mtd: mchp48l640: add support for Fujitsu MB85RS128TY FRAM Jonas Rebmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox