2022-06-21 15:59:37

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: wireless: ath11k: add new DT entry for board ID

On 21/06/2022 15:53, Robert Marko wrote:
> bus + qmi-chip-id + qmi-board-id and optionally the variant are currently
> used for identifying the correct board data file.
>
> This however is sometimes not enough as all of the IPQ8074 boards that I
> have access to dont have the qmi-board-id properly fused and simply return
> the default value of 0xFF.
>
> So, to provide the correct qmi-board-id add a new DT property that allows
> the qmi-board-id to be overridden from DTS in cases where its not set.
> This is what vendors have been doing in the stock firmwares that were
> shipped on boards I have.
>
> Signed-off-by: Robert Marko <[email protected]>

Thank you for your patch. There is something to discuss/improve.

> ---
> .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> index a677b056f112..fe6aafdab9d4 100644
> --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> @@ -41,6 +41,14 @@ properties:
> * reg
> * reg-names
>
> + qcom,ath11k-board-id:

The "board" a bit confuses me because in the context of entire system it
means the entire hardware running Qualcomm SoC. This is sometimes
encoded as qcom,board-id property.

Is your property exactly the same?

> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + Board ID to override the one returned by the firmware or the default
> + 0xff if it was not set by the vendor at all.
> + It is used along the ath11k-calibration-variant to mach the correct
> + calibration data from board-2.bin.
> +
> qcom,ath11k-calibration-variant:
> $ref: /schemas/types.yaml#/definitions/string
> description:


Best regards,
Krzysztof


2022-06-21 18:51:51

by Robert Marko

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: wireless: ath11k: add new DT entry for board ID

On Tue, 21 Jun 2022 at 17:58, Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 21/06/2022 15:53, Robert Marko wrote:
> > bus + qmi-chip-id + qmi-board-id and optionally the variant are currently
> > used for identifying the correct board data file.
> >
> > This however is sometimes not enough as all of the IPQ8074 boards that I
> > have access to dont have the qmi-board-id properly fused and simply return
> > the default value of 0xFF.
> >
> > So, to provide the correct qmi-board-id add a new DT property that allows
> > the qmi-board-id to be overridden from DTS in cases where its not set.
> > This is what vendors have been doing in the stock firmwares that were
> > shipped on boards I have.
> >
> > Signed-off-by: Robert Marko <[email protected]>
>
> Thank you for your patch. There is something to discuss/improve.
>
> > ---
> > .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> > index a677b056f112..fe6aafdab9d4 100644
> > --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> > +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> > @@ -41,6 +41,14 @@ properties:
> > * reg
> > * reg-names
> >
> > + qcom,ath11k-board-id:
>
> The "board" a bit confuses me because in the context of entire system it
> means the entire hardware running Qualcomm SoC. This is sometimes
> encoded as qcom,board-id property.

Hi Krzysztof,
I agree that the name is a bit confusing, it's not the same as
qcom,board-id AFAIK
and QCA as well as vendors are using a similar property in the wifi
node to override
the default qmi-board-id to the correct one as its rarely properly fused.

I assume it would be better-called qcom,ath11k-qmi-board-id as you
dont even have
to be using a Qualcomm SoC as the same is used by PCI ath11k cards as well.

Regards,
Robert
>
> Is your property exactly the same?
>
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
> > + Board ID to override the one returned by the firmware or the default
> > + 0xff if it was not set by the vendor at all.
> > + It is used along the ath11k-calibration-variant to mach the correct
> > + calibration data from board-2.bin.
> > +
> > qcom,ath11k-calibration-variant:
> > $ref: /schemas/types.yaml#/definitions/string
> > description:
>
>
> Best regards,
> Krzysztof

2022-06-22 15:01:57

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: wireless: ath11k: add new DT entry for board ID

On 21/06/2022 20:47, Robert Marko wrote:
> On Tue, 21 Jun 2022 at 17:58, Krzysztof Kozlowski
> <[email protected]> wrote:
>>
>> On 21/06/2022 15:53, Robert Marko wrote:
>>> bus + qmi-chip-id + qmi-board-id and optionally the variant are currently
>>> used for identifying the correct board data file.
>>>
>>> This however is sometimes not enough as all of the IPQ8074 boards that I
>>> have access to dont have the qmi-board-id properly fused and simply return
>>> the default value of 0xFF.
>>>
>>> So, to provide the correct qmi-board-id add a new DT property that allows
>>> the qmi-board-id to be overridden from DTS in cases where its not set.
>>> This is what vendors have been doing in the stock firmwares that were
>>> shipped on boards I have.
>>>
>>> Signed-off-by: Robert Marko <[email protected]>
>>
>> Thank you for your patch. There is something to discuss/improve.
>>
>>> ---
>>> .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
>>> index a677b056f112..fe6aafdab9d4 100644
>>> --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
>>> +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
>>> @@ -41,6 +41,14 @@ properties:
>>> * reg
>>> * reg-names
>>>
>>> + qcom,ath11k-board-id:
>>
>> The "board" a bit confuses me because in the context of entire system it
>> means the entire hardware running Qualcomm SoC. This is sometimes
>> encoded as qcom,board-id property.
>
> Hi Krzysztof,
> I agree that the name is a bit confusing, it's not the same as
> qcom,board-id AFAIK
> and QCA as well as vendors are using a similar property in the wifi
> node to override
> the default qmi-board-id to the correct one as its rarely properly fused.
>
> I assume it would be better-called qcom,ath11k-qmi-board-id as you
> dont even have
> to be using a Qualcomm SoC as the same is used by PCI ath11k cards as well.
>

Thanks for the explanation. What is the "board" in that context? The
card/hardware with ath11k? Then maybe qcom,ath11k-qmi-id or
qcom,ath11k-qmi-hw-id?

Best regards,
Krzysztof

2022-06-23 20:18:42

by Robert Marko

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: net: wireless: ath11k: add new DT entry for board ID

On Wed, 22 Jun 2022 at 16:55, Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 21/06/2022 20:47, Robert Marko wrote:
> > On Tue, 21 Jun 2022 at 17:58, Krzysztof Kozlowski
> > <[email protected]> wrote:
> >>
> >> On 21/06/2022 15:53, Robert Marko wrote:
> >>> bus + qmi-chip-id + qmi-board-id and optionally the variant are currently
> >>> used for identifying the correct board data file.
> >>>
> >>> This however is sometimes not enough as all of the IPQ8074 boards that I
> >>> have access to dont have the qmi-board-id properly fused and simply return
> >>> the default value of 0xFF.
> >>>
> >>> So, to provide the correct qmi-board-id add a new DT property that allows
> >>> the qmi-board-id to be overridden from DTS in cases where its not set.
> >>> This is what vendors have been doing in the stock firmwares that were
> >>> shipped on boards I have.
> >>>
> >>> Signed-off-by: Robert Marko <[email protected]>
> >>
> >> Thank you for your patch. There is something to discuss/improve.
> >>
> >>> ---
> >>> .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 8 ++++++++
> >>> 1 file changed, 8 insertions(+)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> >>> index a677b056f112..fe6aafdab9d4 100644
> >>> --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> >>> +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
> >>> @@ -41,6 +41,14 @@ properties:
> >>> * reg
> >>> * reg-names
> >>>
> >>> + qcom,ath11k-board-id:
> >>
> >> The "board" a bit confuses me because in the context of entire system it
> >> means the entire hardware running Qualcomm SoC. This is sometimes
> >> encoded as qcom,board-id property.
> >
> > Hi Krzysztof,
> > I agree that the name is a bit confusing, it's not the same as
> > qcom,board-id AFAIK
> > and QCA as well as vendors are using a similar property in the wifi
> > node to override
> > the default qmi-board-id to the correct one as its rarely properly fused.
> >
> > I assume it would be better-called qcom,ath11k-qmi-board-id as you
> > dont even have
> > to be using a Qualcomm SoC as the same is used by PCI ath11k cards as well.
> >
>
> Thanks for the explanation. What is the "board" in that context? The
> card/hardware with ath11k? Then maybe qcom,ath11k-qmi-id or
> qcom,ath11k-qmi-hw-id?

Hi,

I assume it started off as a numerical value to match the board design and was
then simply carried off to the PCI cards as well.

qcom,ath11k-qmi-hw-id is fine by me, will just expand the description to make
it clear.

Regards,
Robert

>
> Best regards,
> Krzysztof