diff mbox series

[2/2] dt: bindings: ath10k: Document qcom,ath10k-pre-calibration-data-mtd

Message ID 20200918162928.14335-2-ansuelsmth@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series ath10k: Introduce download cal from mtd | expand

Commit Message

Christian Marangi Sept. 18, 2020, 4:29 p.m. UTC
Document use of qcom,ath10k-pre-calibration-data-mtd bindings used to
define from where the driver will load the pre-cal data in the defined
mtd partition.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 .../devicetree/bindings/net/wireless/qcom,ath10k.txt | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Christian Lamparter Sept. 18, 2020, 4:53 p.m. UTC | #1
On 2020-09-18 18:29, Ansuel Smith wrote:
> Document use of qcom,ath10k-pre-calibration-data-mtd bindings used to
> define from where the driver will load the pre-cal data in the defined
> mtd partition.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

Q: Doesn't mtd now come with nvmem support from the get go? So
the MAC-Addresses and pre-caldata could be specified as a
nvmem-node in the devicetree? I remember seeing that this was
worked on or was this mtd->nvmem dropped?

Cheers,
Christian
Christian Marangi Sept. 18, 2020, 6:08 p.m. UTC | #2
> -----Messaggio originale-----
> Da: Christian Lamparter <chunkeey@gmail.com>
> Inviato: venerdì 18 settembre 2020 18:54
> A: Ansuel Smith <ansuelsmth@gmail.com>; Kalle Valo
> <kvalo@codeaurora.org>
> Cc: devicetree@vger.kernel.org; netdev@vger.kernel.org; linux-
> wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> ath10k@lists.infradead.org; David S. Miller <davem@davemloft.net>; Rob
> Herring <robh+dt@kernel.org>; Jakub Kicinski <kuba@kernel.org>; linux-
> mtd@lists.infradead.org; Srinivas Kandagatla
> <srinivas.kandagatla@linaro.org>; Bartosz Golaszewski
> <bgolaszewski@baylibre.com>
> Oggetto: Re: [PATCH 2/2] dt: bindings: ath10k: Document qcom, ath10k-
> pre-calibration-data-mtd
> 
> On 2020-09-18 18:29, Ansuel Smith wrote:
> > Document use of qcom,ath10k-pre-calibration-data-mtd bindings used to
> > define from where the driver will load the pre-cal data in the defined
> > mtd partition.
> >
> > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> 
> Q: Doesn't mtd now come with nvmem support from the get go? So
> the MAC-Addresses and pre-caldata could be specified as a
> nvmem-node in the devicetree? I remember seeing that this was
> worked on or was this mtd->nvmem dropped?
> 
> Cheers,
> Christian

Can you give me some example where this is used? I can't find any reference.
Christian Marangi Sept. 18, 2020, 6:31 p.m. UTC | #3
> -----Messaggio originale-----
> Da: Christian Lamparter <chunkeey@gmail.com>
> Inviato: venerdì 18 settembre 2020 18:54
> A: Ansuel Smith <ansuelsmth@gmail.com>; Kalle Valo
> <kvalo@codeaurora.org>
> Cc: devicetree@vger.kernel.org; netdev@vger.kernel.org; linux-
> wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> ath10k@lists.infradead.org; David S. Miller <davem@davemloft.net>; Rob
> Herring <robh+dt@kernel.org>; Jakub Kicinski <kuba@kernel.org>; linux-
> mtd@lists.infradead.org; Srinivas Kandagatla
> <srinivas.kandagatla@linaro.org>; Bartosz Golaszewski
> <bgolaszewski@baylibre.com>
> Oggetto: Re: [PATCH 2/2] dt: bindings: ath10k: Document qcom, ath10k-
> pre-calibration-data-mtd
> 
> On 2020-09-18 18:29, Ansuel Smith wrote:
> > Document use of qcom,ath10k-pre-calibration-data-mtd bindings used to
> > define from where the driver will load the pre-cal data in the defined
> > mtd partition.
> >
> > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> 
> Q: Doesn't mtd now come with nvmem support from the get go? So
> the MAC-Addresses and pre-caldata could be specified as a
> nvmem-node in the devicetree? I remember seeing that this was
> worked on or was this mtd->nvmem dropped?
> 
> Cheers,
> Christian

Sorry a lot for the double email... I think I found what you are talking about.
It looks like the code was merged but not the documentation.
Will do some test and check if this works.

This should be the related patch.
https://patchwork.ozlabs.org/project/linux-mtd/patch/1521933899-362-4-git-send-email-albeu@free.fr/
Christian Lamparter Sept. 18, 2020, 6:55 p.m. UTC | #4
On 2020-09-18 20:31, ansuelsmth@gmail.com wrote:
> 
> 
>> -----Messaggio originale-----
>> Da: Christian Lamparter <chunkeey@gmail.com>
>> Inviato: venerdì 18 settembre 2020 18:54
>> A: Ansuel Smith <ansuelsmth@gmail.com>; Kalle Valo
>> <kvalo@codeaurora.org>
>> Cc: devicetree@vger.kernel.org; netdev@vger.kernel.org; linux-
>> wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
>> ath10k@lists.infradead.org; David S. Miller <davem@davemloft.net>; Rob
>> Herring <robh+dt@kernel.org>; Jakub Kicinski <kuba@kernel.org>; linux-
>> mtd@lists.infradead.org; Srinivas Kandagatla
>> <srinivas.kandagatla@linaro.org>; Bartosz Golaszewski
>> <bgolaszewski@baylibre.com>
>> Oggetto: Re: [PATCH 2/2] dt: bindings: ath10k: Document qcom, ath10k-
>> pre-calibration-data-mtd
>>
>> On 2020-09-18 18:29, Ansuel Smith wrote:
>>> Document use of qcom,ath10k-pre-calibration-data-mtd bindings used to
>>> define from where the driver will load the pre-cal data in the defined
>>> mtd partition.
>>>
>>> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
>>
>> Q: Doesn't mtd now come with nvmem support from the get go? So
>> the MAC-Addresses and pre-caldata could be specified as a
>> nvmem-node in the devicetree? I remember seeing that this was
>> worked on or was this mtd->nvmem dropped?
>>
>> Cheers,
>> Christian
> 
> Sorry a lot for the double email... I think I found what you are talking about.
> It looks like the code was merged but not the documentation.
> Will do some test and check if this works.
> 
> This should be the related patch.
> https://patchwork.ozlabs.org/project/linux-mtd/patch/1521933899-362-4-git-send-email-albeu@free.fr/
> 

Well, I guess the version that was merged:

|commit c4dfa25ab307a277eafa7067cd927fbe4d9be4ba
|Author: Alban Bedel <albeu@free.fr>
|Date:   Tue Nov 13 15:01:10 2018 +0100
|
|    mtd: add support for reading MTD devices via the nvmem API
|
|    Allow drivers that use the nvmem API to read data stored on MTD devices.
|    For this the mtd devices are registered as read-only NVMEM providers.
|
| >>>We don't support device tree systems for now.<<<

answers this. Sorry for the noise. Yee, this likely isn't going to work
as it is still disabled on purpose.

Regards,
Christian
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index b61c2d5a0..568364243 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -15,9 +15,9 @@  and also uses most of the properties defined in this doc (except
 "qcom,ath10k-calibration-data"). It uses "qcom,ath10k-pre-calibration-data"
 to carry pre calibration data.
 
-In general, entry "qcom,ath10k-pre-calibration-data" and
-"qcom,ath10k-calibration-data" conflict with each other and only one
-can be provided per device.
+In general, entry "qcom,ath10k-pre-calibration-data",
+"qcom,ath10k-calibration-data-mtd" and "qcom,ath10k-calibration-data" conflict with
+each other and only one can be provided per device.
 
 SNOC based devices (i.e. wcn3990) uses compatible string "qcom,wcn3990-wifi".
 
@@ -63,6 +63,12 @@  Optional properties:
 				 hw versions.
 - qcom,ath10k-pre-calibration-data : pre calibration data as an array,
 				     the length can vary between hw versions.
+- qcom,ath10k-pre-calibration-data-mtd :
+	Usage: optional
+	Value type: <phandle offset size>
+	Definition: pre calibration data read from mtd partition. Take 3 value, the
+		    mtd to read data from, the offset in the mtd partition and the
+		    size of data to read.
 - <supply-name>-supply: handle to the regulator device tree node
 			   optional "supply-name" are "vdd-0.8-cx-mx",
 			   "vdd-1.8-xo", "vdd-1.3-rfa", "vdd-3.3-ch0",