diff mbox series

[1/4] dt-bindings: at25: add Fujitsu MB85RS4MT

Message ID 20210309220014.22205-1-tharvey@gateworks.com
State New
Delegated to: Ambarus Tudor
Headers show
Series [1/4] dt-bindings: at25: add Fujitsu MB85RS4MT | expand

Commit Message

Tim Harvey March 9, 2021, 10 p.m. UTC
Document the compatible value for the Fujitsu MB85RS4MT SPI
FRAM EEPROM device so that it can be used in DTS files.

This is a 512KiB FRAM EEPROM.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 Documentation/devicetree/bindings/eeprom/at25.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Walle March 9, 2021, 10:59 p.m. UTC | #1
Hi Tim,

Am 2021-03-09 23:00, schrieb Tim Harvey:
> Document the compatible value for the Fujitsu MB85RS4MT SPI
> FRAM EEPROM device so that it can be used in DTS files.
> 
> This is a 512KiB FRAM EEPROM.
> 
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>  Documentation/devicetree/bindings/eeprom/at25.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml
> b/Documentation/devicetree/bindings/eeprom/at25.yaml
> index 6a2dc8b3ed14..f594db72b711 100644
> --- a/Documentation/devicetree/bindings/eeprom/at25.yaml
> +++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
> @@ -26,6 +26,7 @@ properties:
>                - anvo,anv32e61w
>                - atmel,at25256B
>                - fujitsu,mb85rs1mt
> +              - fujitsu,mb85rs4mt
>                - fujitsu,mb85rs64
>                - microchip,at25160bn
>                - microchip,25lc040

Hm, the driver is spi-nor but this is for the at25 driver. Is
this correct? Doesn't it work if you just add the ID to
spi-nor/fujitsu.c and use 'compatible = "jedec,spi-nor' ?

-michael
Tudor Ambarus March 10, 2021, 5:33 a.m. UTC | #2
On 3/10/21 12:59 AM, Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Hi Tim,
> 
> Am 2021-03-09 23:00, schrieb Tim Harvey:
>> Document the compatible value for the Fujitsu MB85RS4MT SPI
>> FRAM EEPROM device so that it can be used in DTS files.
>>
>> This is a 512KiB FRAM EEPROM.
>>
>> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>> ---
>>  Documentation/devicetree/bindings/eeprom/at25.yaml | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml
>> b/Documentation/devicetree/bindings/eeprom/at25.yaml
>> index 6a2dc8b3ed14..f594db72b711 100644
>> --- a/Documentation/devicetree/bindings/eeprom/at25.yaml
>> +++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
>> @@ -26,6 +26,7 @@ properties:
>>                - anvo,anv32e61w
>>                - atmel,at25256B
>>                - fujitsu,mb85rs1mt
>> +              - fujitsu,mb85rs4mt
>>                - fujitsu,mb85rs64
>>                - microchip,at25160bn
>>                - microchip,25lc040
> 
> Hm, the driver is spi-nor but this is for the at25 driver. Is
> this correct? Doesn't it work if you just add the ID to
> spi-nor/fujitsu.c and use 'compatible = "jedec,spi-nor' ?
> 

Tim,

Can you try and see if you can work with this flash by setting "atmel,at25"
compatible?

There are some SPI NOR-like flashes MRAMs, FRAMs, even EEPROMs, that share
a part of opcodes of SPI NORs, but have slightly different characteristics
(ex. no erase, no wait times for writes on FRAMs).
See the patch series submitted by Richard, that I have stalled:
https://patchwork.ozlabs.org/project/linux-mtd/list/?series=208584&state=*

I now have time to allocate for this, I'll study all and come up with a proposal
in one or two weeks.

Cheers,
ta
Tim Harvey March 11, 2021, 1:52 a.m. UTC | #3
On Tue, Mar 9, 2021 at 2:59 PM Michael Walle <michael@walle.cc> wrote:
>
> Hi Tim,
>
> Am 2021-03-09 23:00, schrieb Tim Harvey:
> > Document the compatible value for the Fujitsu MB85RS4MT SPI
> > FRAM EEPROM device so that it can be used in DTS files.
> >
> > This is a 512KiB FRAM EEPROM.
> >
> > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > ---
> >  Documentation/devicetree/bindings/eeprom/at25.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml
> > b/Documentation/devicetree/bindings/eeprom/at25.yaml
> > index 6a2dc8b3ed14..f594db72b711 100644
> > --- a/Documentation/devicetree/bindings/eeprom/at25.yaml
> > +++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
> > @@ -26,6 +26,7 @@ properties:
> >                - anvo,anv32e61w
> >                - atmel,at25256B
> >                - fujitsu,mb85rs1mt
> > +              - fujitsu,mb85rs4mt
> >                - fujitsu,mb85rs64
> >                - microchip,at25160bn
> >                - microchip,25lc040
>
> Hm, the driver is spi-nor but this is for the at25 driver. Is
> this correct? Doesn't it work if you just add the ID to
> spi-nor/fujitsu.c and use 'compatible = "jedec,spi-nor' ?
>

Michael,

Yes it works just fine as 'compatible = "jedec,spi-nor"' and that
makes sense. I'll drop this patch and update my device-tree
accordingly.

Thanks,

Tim
Tim Harvey March 11, 2021, 10:39 p.m. UTC | #4
'On Tue, Mar 9, 2021 at 9:34 PM <Tudor.Ambarus@microchip.com> wrote:
>
> On 3/10/21 12:59 AM, Michael Walle wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> > Hi Tim,
> >
> > Am 2021-03-09 23:00, schrieb Tim Harvey:
> >> Document the compatible value for the Fujitsu MB85RS4MT SPI
> >> FRAM EEPROM device so that it can be used in DTS files.
> >>
> >> This is a 512KiB FRAM EEPROM.
> >>
> >> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> >> ---
> >>  Documentation/devicetree/bindings/eeprom/at25.yaml | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml
> >> b/Documentation/devicetree/bindings/eeprom/at25.yaml
> >> index 6a2dc8b3ed14..f594db72b711 100644
> >> --- a/Documentation/devicetree/bindings/eeprom/at25.yaml
> >> +++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
> >> @@ -26,6 +26,7 @@ properties:
> >>                - anvo,anv32e61w
> >>                - atmel,at25256B
> >>                - fujitsu,mb85rs1mt
> >> +              - fujitsu,mb85rs4mt
> >>                - fujitsu,mb85rs64
> >>                - microchip,at25160bn
> >>                - microchip,25lc040
> >
> > Hm, the driver is spi-nor but this is for the at25 driver. Is
> > this correct? Doesn't it work if you just add the ID to
> > spi-nor/fujitsu.c and use 'compatible = "jedec,spi-nor' ?
> >
>
> Tim,
>
> Can you try and see if you can work with this flash by setting "atmel,at25"
> compatible?

It does not work with 'atmel,at25'. I was fooled into adding it to
at25.yaml because that is where the mb85rs1mt compatible was. I
suppose at some time the drivers were split as mb85rs1mt is clearly in
the spi-nor driver now.

I will drop the patch to at25.yaml and now that I realize all I need
is 'jedec,spi-nor' I won't need any bindings patch.

>
> There are some SPI NOR-like flashes MRAMs, FRAMs, even EEPROMs, that share
> a part of opcodes of SPI NORs, but have slightly different characteristics
> (ex. no erase, no wait times for writes on FRAMs).
> See the patch series submitted by Richard, that I have stalled:
> https://patchwork.ozlabs.org/project/linux-mtd/list/?series=208584&state=*
>

This series makes sense to me. I tested it and indeed it provides a
vast performance improvement. Richards patch would collide with my
patch that adds the mb85rs4mt detection. Let me know what you're going
to do there and if you need me to rebase 'mtd: spi-nor: fujitsu: add
support for MB85RS4MT' on top of it.

Best regards,

Tim
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documentation/devicetree/bindings/eeprom/at25.yaml
index 6a2dc8b3ed14..f594db72b711 100644
--- a/Documentation/devicetree/bindings/eeprom/at25.yaml
+++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
@@ -26,6 +26,7 @@  properties:
               - anvo,anv32e61w
               - atmel,at25256B
               - fujitsu,mb85rs1mt
+              - fujitsu,mb85rs4mt
               - fujitsu,mb85rs64
               - microchip,at25160bn
               - microchip,25lc040