dt-bindings: mt76: support pointing to EEPROM using NVMEM cell
Subsystems (6)
PATCH 1/1 dt-bindings: mt76: support pointing to EEPROM using NVMEM cell
From: Rafał Miłecki <[email protected]>
All kind of calibration data should be described as NVMEM cells of NVMEM devices. That is more generic solution than "mediatek,mtd-eeprom" which is MTD specific.
Add support for EEPROM NVMEM cells and deprecate existing MTD-based property.
---
Ansuel is working on mt76 driver support for NVMEM based EEPROM access:
https://github.com/openwrt/mt76/pull/765
I took the liberty to propose this binding patch.
One important difference: my binding uses "eeprom" while Ansuel went with "precal". I found a lot of "eeprom" references and only one "precal". If you think however "precal" fits better please comment.
--- .../bindings/net/wireless/mediatek,mt76.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +11 -1
@@ -71,6 +71,14 @@ properties: ieee80211-freq-limit: true + nvmem-cells: + items: + - description: NVMEM cell with EEPROM + + nvmem-cell-names: + items: + - const: eeprom + mediatek,eeprom-data: $ref: /schemas/types.yaml#/definitions/uint32-array description:
@@ -84,6 +92,7 @@ properties: - description: offset containing EEPROM data description: Phandle to a MTD partition + offset containing EEPROM data + deprecated: true big-endian: $ref: /schemas/types.yaml#/definitions/flag
@@ -258,7 +267,8 @@ examples: interrupt-parent = <&cpuintc>; interrupts = <6>; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom>; + nvmem-cell-names = "eeprom"; }; - |
Signature · 1 line
2.35.3
Quoted 15 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
All kind of calibration data should be described as NVMEM cells of NVMEM devices. That is more generic solution than "mediatek,mtd-eeprom" which is MTD specific.
Add support for EEPROM NVMEM cells and deprecate existing MTD-based property.
Cc Christian Marangi <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>---
Ansuel is working on mt76 driver support for NVMEM based EEPROM access:
https://github.com/openwrt/mt76/pull/765
Quoted 5 lines
I took the liberty to propose this binding patch.
One important difference: my binding uses "eeprom" while Ansuel went with "precal". I found a lot of "eeprom" references and only one "precal". If you think however "precal" fits better please comment.
The name is totally "to decide". I feel eeprom might be also way too much generic...
I was thinking to something like cal or precal following ath10k or ath11k pattern.
Also in the code itself I notice there can be different calibration hence the idea of precal and cal... (currently we define the entire mtd partition and call it eeprom but on some card different data are referenced with an offset... that will be dropped since nvmem cell will reference directly the data without using offset, which seems an hack to me)
Signature · 1 line
Ansuel
Quoted 11 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
All kind of calibration data should be described as NVMEM cells of NVMEM devices. That is more generic solution than "mediatek,mtd-eeprom" which is MTD specific.
Add support for EEPROM NVMEM cells and deprecate existing MTD-based property.
Cc Christian Marangi <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>
Best regards,
Krzysztof