dt-bindings: at24: add ST M24C32-D Additional Write lockable page
Subsystems (4)
PATCH 1/2 dt-bindings: at24: add ST M24C32-D Additional Write lockable page
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Document compatible string for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
---
Cc: Arnd Bergmann <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- Documentation/devicetree/bindings/eeprom/at24.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/eeprom/at24.yaml +2 -0
@@ -67,6 +67,8 @@ properties: pattern: cs16$ - items: pattern: c32$ + - items: + pattern: c32d-wl$ - items: pattern: cs32$ - items:
Signature · 1 line
2.40.1
PATCH 2/2 eeprom: at24: add ST M24C32-D Additional Write lockable page support
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Add entry for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
---
Cc: Arnd Bergmann <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/misc/eeprom/at24.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/misc/eeprom/at24.c +4 -0
@@ -191,6 +191,8 @@ AT24_CHIP_DATA(at24_data_24c16, 16384 / 8, 0);AT24_CHIP_DATA (at24_data_24cs16,16 ,AT24_FLAG_SERIAL |AT24_FLAG_READONLY );AT24_CHIP_DATA (at24_data_24c32,32768 /8 ,AT24_FLAG_ADDR16 ); +/* M24C32-D Additional Write lockable page (M24C32-D order codes) */ +AT24_CHIP_DATA (at24_data_24c32d_wlp,32 ,AT24_FLAG_ADDR16 );AT24_CHIP_DATA (at24_data_24cs32,16 ,AT24_FLAG_ADDR16 |AT24_FLAG_SERIAL |AT24_FLAG_READONLY );AT24_CHIP_DATA (at24_data_24c64,65536 /8 ,AT24_FLAG_ADDR16 );
@@ -222,6 +224,7 @@ static const struct i2c_device_id at24_ids[] = { { "24c16", (kernel_ulong_t)&at24_data_24c16 }, { "24cs16", (kernel_ulong_t)&at24_data_24cs16 }, { "24c32", (kernel_ulong_t)&at24_data_24c32 }, + { "24c32d-wl", (kernel_ulong_t)&at24_data_24c32d_wlp }, { "24cs32", (kernel_ulong_t)&at24_data_24cs32 }, { "24c64", (kernel_ulong_t)&at24_data_24c64 }, { "24cs64", (kernel_ulong_t)&at24_data_24cs64 },
@@ -252,6 +255,7 @@ static const struct of_device_id at24_of_match[] = { { .compatible = "atmel,24c16", .data = &at24_data_24c16 }, { .compatible = "atmel,24cs16", .data = &at24_data_24cs16 }, { .compatible = "atmel,24c32", .data = &at24_data_24c32 }, + { .compatible = "atmel,24c32d-wl", .data = &at24_data_24c32d_wlp }, { .compatible = "atmel,24cs32", .data = &at24_data_24cs32 }, { .compatible = "atmel,24c64", .data = &at24_data_24c64 }, { .compatible = "atmel,24cs64", .data = &at24_data_24cs64 },
Signature · 1 line
2.40.1
Bartosz Golaszewski
AppliedRe: [PATCH 2/2] eeprom: at24: add ST M24C32-D Additional Write lockable page support
Quoted 10 lines · Marek Vasut
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Add entry for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
Signed-off-by Marek Vasut <[email protected]>---
Applied, thanks!
Bart
Quoted 8 lines · Marek Vasut
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Document compatible string for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
Signed-off-by Marek Vasut <[email protected]>
Oh and Bartosz, this binding seems to have a baylibre email address for you in it. I'm sure it's mailmap'ed to the right place, but just FYI.
Thanks,
Conor.
Quoted 29 lines
---
Cc: Arnd Bergmann <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]--- Documentation/devicetree/bindings/eeprom/at24.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/eeprom/at24.yaml +2
-0@@ -67,6 +67,8 @@ properties: pattern: cs16$ - items: pattern: c32$ + - items: + pattern: c32d-wl$ - items: pattern: cs32$ - items:Signature · 1 line
2.40.1
Quoted 9 lines · Conor Dooley
Quoted 7 lines · Marek Vasut
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Document compatible string for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
Quoted 7 lines
Quoted 1 line
Signed-off-by Marek Vasut <[email protected]>Acked-by Conor Dooley <[email protected]>Oh and Bartosz, this binding seems to have a baylibre email address for you in it. I'm sure it's mailmap'ed to the right place, but just FYI.
It isn't actually. :(
Thanks for the heads-up, I'll send a patch for .mailmap.
Bartosz
Quoted 32 lines
Thanks,
Conor.Quoted 29 lines
---
Cc: Arnd Bergmann <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]--- Documentation/devicetree/bindings/eeprom/at24.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/eeprom/at24.yaml +2
-1@@ -67,6 +67,8 @@ properties: pattern: cs16$ - items: pattern: c32$ + - items: + pattern: c32d-wl$ - items: pattern: cs32$ - items: --2.40.1
Bartosz Golaszewski
AppliedQuoted 36 lines · Marek Vasut
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Document compatible string for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
Signed-off-by Marek Vasut <[email protected]>---
Cc: Arnd Bergmann <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]--- Documentation/devicetree/bindings/eeprom/at24.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/eeprom/at24.yaml +2
-1@@ -67,6 +67,8 @@ properties: pattern: cs16$ - items: pattern: c32$ + - items: + pattern: c32d-wl$ - items: pattern: cs32$ - items: --
Quoted 2 lines
2.40.1
Applied, thanks!
Bart
Rob Herring
maintainerQuoted 6 lines · Marek Vasut
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Document compatible string for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
So 2 nodes for 1 device? Wouldn't it make more sense for the 1 node to have 2 addresses?
Quoted 31 lines
Signed-off-by Marek Vasut <[email protected]>---
Cc: Arnd Bergmann <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]--- Documentation/devicetree/bindings/eeprom/at24.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/eeprom/at24.yaml +2
-0@@ -67,6 +67,8 @@ properties: pattern: cs16$ - items: pattern: c32$ + - items: + pattern: c32d-wl$ - items: pattern: cs32$ - items:Signature · 1 line
2.40.1
Quoted 10 lines · Rob Herring
Quoted 6 lines · Marek Vasut
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Document compatible string for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
So 2 nodes for 1 device? Wouldn't it make more sense for the 1 node to have 2 addresses?
It would, if the 32 Byte Additional Write lockable page was somehow related to the main area, but it doesn't seem to be, except that they are both on single chip.
Quoted 9 lines · Rob Herring
Quoted 6 lines · Marek Vasut
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Document compatible string for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page.
Quoted 3 lines
So 2 nodes for 1 device? Wouldn't it make more sense for the 1 node to have 2 addresses?
This is in line with what we have been doing so far for 24cs and 24mac variants. Here[1] is the series that first added support for those special areas.
The way nvmem works, we'd need to register two nvmem devices anyway as children of the i2c device associated with the at24 chip. Not worth the additional complexity this would entail if you ask me.
Bartosz
[1] https://lore.kernel.org/lkml/[email protected]/
Quoted 31 lines
Quoted 31 lines
Signed-off-by Marek Vasut <[email protected]>---
Cc: Arnd Bergmann <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]--- Documentation/devicetree/bindings/eeprom/at24.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/eeprom/at24.yaml +2
-1@@ -67,6 +67,8 @@ properties: pattern: cs16$ - items: pattern: c32$ + - items: + pattern: c32d-wl$ - items: pattern: cs32$ - items: --2.40.1