* [PATCH] dt-bindings: mt76: support pointing to EEPROM using NVMEM cell
@ 2023-05-08 15:58 Rafał Miłecki
2023-05-08 16:02 ` Christian Marangi
2023-05-08 19:41 ` Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Rafał Miłecki @ 2023-05-08 15:58 UTC (permalink / raw)
To: Felix Fietkau, Rob Herring, Krzysztof Kozlowski
Cc: Lorenzo Bianconi, Ryder Lee, Shayne Chen, Sean Wang, Kalle Valo,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, linux-wireless,
netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rafał Miłecki, Christian Marangi
From: Rafał Miłecki <rafal@milecki.pl>
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 <ansuelsmth@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
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(-)
diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
index 67b63f119f64..0500caa4107c 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
@@ -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";
};
- |
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] dt-bindings: mt76: support pointing to EEPROM using NVMEM cell
2023-05-08 15:58 [PATCH] dt-bindings: mt76: support pointing to EEPROM using NVMEM cell Rafał Miłecki
@ 2023-05-08 16:02 ` Christian Marangi
2023-05-08 19:41 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Christian Marangi @ 2023-05-08 16:02 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Felix Fietkau, Rob Herring, Krzysztof Kozlowski, Lorenzo Bianconi,
Ryder Lee, Shayne Chen, Sean Wang, Kalle Valo, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, linux-wireless, netdev, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek,
Rafał Miłecki
On Mon, May 08, 2023 at 05:58:20PM +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> 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 <ansuelsmth@gmail.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> 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.
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)
--
Ansuel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: mt76: support pointing to EEPROM using NVMEM cell
2023-05-08 15:58 [PATCH] dt-bindings: mt76: support pointing to EEPROM using NVMEM cell Rafał Miłecki
2023-05-08 16:02 ` Christian Marangi
@ 2023-05-08 19:41 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-08 19:41 UTC (permalink / raw)
To: Rafał Miłecki, Felix Fietkau, Rob Herring,
Krzysztof Kozlowski
Cc: Lorenzo Bianconi, Ryder Lee, Shayne Chen, Sean Wang, Kalle Valo,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, linux-wireless,
netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rafał Miłecki, Christian Marangi
On 08/05/2023 17:58, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> 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 <ansuelsmth@gmail.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-08 19:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-08 15:58 [PATCH] dt-bindings: mt76: support pointing to EEPROM using NVMEM cell Rafał Miłecki
2023-05-08 16:02 ` Christian Marangi
2023-05-08 19:41 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).