diff mbox series

[v3,2/2] dt-bindings: net: bluetooth: Add device property firmware-name for QCA6174

Message ID 1554888476-17560-1-git-send-email-rjliao@codeaurora.org (mailing list archive)
State Not Applicable, archived
Headers show
Series [v3,1/2] Bluetooth: hci_qca: Load customized NVM based on the device property | expand

Commit Message

Rocky Liao April 10, 2019, 9:27 a.m. UTC
This patch adds an optional device property "firmware-name" to allow the
driver to load customized nvm firmware file based on this property.

Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
---
Changes in v3:
  * added firmware-name instead of nvm-postfix to specify full firmware name
---
 Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
 1 file changed, 2 insertions(+)

Comments

Marcel Holtmann April 23, 2019, 5:06 p.m. UTC | #1
Hi Rocky,

> This patch adds an optional device property "firmware-name" to allow the
> driver to load customized nvm firmware file based on this property.
> 
> Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
> ---
> Changes in v3:
>  * added firmware-name instead of nvm-postfix to specify full firmware name
> ---
> Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
> index 824c0e2..2bcea50 100644
> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
> @@ -16,6 +16,7 @@ Optional properties for compatible string qcom,qca6174-bt:
> 
>  - enable-gpios: gpio specifier used to enable chip
>  - clocks: clock provided to the controller (SUSCLK_32KHZ)
> + - firmware-name: specify the name of nvm firmware to load
> 
> Required properties for compatible string qcom,wcn3990-bt:
> 
> @@ -39,6 +40,7 @@ serial@7570000 {
> 
> 		enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
> 		clocks = <&divclk4>;
> +		firmware-name = "nvm_00440302.bin";
> 	};

and how is this a firmware-name property. Wouldn’t this be more like nvm-file or something along these lines. This really needs to be cleared with Rob to pick the right property name.

Regards

Marcel
Rocky Liao April 24, 2019, 6:19 a.m. UTC | #2
On 2019-04-24 01:06, Marcel Holtmann wrote:
> Hi Rocky,
> 
>> This patch adds an optional device property "firmware-name" to allow 
>> the
>> driver to load customized nvm firmware file based on this property.
>> 
>> Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
>> ---
>> Changes in v3:
>>  * added firmware-name instead of nvm-postfix to specify full firmware 
>> name
>> ---
>> Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
>> 1 file changed, 2 insertions(+)
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt 
>> b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>> index 824c0e2..2bcea50 100644
>> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>> @@ -16,6 +16,7 @@ Optional properties for compatible string 
>> qcom,qca6174-bt:
>> 
>>  - enable-gpios: gpio specifier used to enable chip
>>  - clocks: clock provided to the controller (SUSCLK_32KHZ)
>> + - firmware-name: specify the name of nvm firmware to load
>> 
>> Required properties for compatible string qcom,wcn3990-bt:
>> 
>> @@ -39,6 +40,7 @@ serial@7570000 {
>> 
>> 		enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
>> 		clocks = <&divclk4>;
>> +		firmware-name = "nvm_00440302.bin";
>> 	};
> 
> and how is this a firmware-name property. Wouldn’t this be more like
> nvm-file or something along these lines. This really needs to be
> cleared with Rob to pick the right property name.
> 
> Regards
> 
> Marcel

Hi Rob,

Are you OK to use a property name "nvm-file" or "firmware-nvm-file"? 
Actually we have two firmware files, one is the patch file which is 
common to all of the products, the other is the nvm file which is 
customized. Using a "nvm-file" or "firmware-nvm-file" property name 
would be more clear.
Rob Herring April 26, 2019, 5:45 p.m. UTC | #3
On Wed, Apr 24, 2019 at 1:19 AM Rocky Liao <rjliao@codeaurora.org> wrote:
>
> On 2019-04-24 01:06, Marcel Holtmann wrote:
> > Hi Rocky,
> >
> >> This patch adds an optional device property "firmware-name" to allow
> >> the
> >> driver to load customized nvm firmware file based on this property.
> >>
> >> Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
> >> ---
> >> Changes in v3:
> >>  * added firmware-name instead of nvm-postfix to specify full firmware
> >> name
> >> ---
> >> Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git
> >> a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
> >> b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
> >> index 824c0e2..2bcea50 100644
> >> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
> >> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
> >> @@ -16,6 +16,7 @@ Optional properties for compatible string
> >> qcom,qca6174-bt:
> >>
> >>  - enable-gpios: gpio specifier used to enable chip
> >>  - clocks: clock provided to the controller (SUSCLK_32KHZ)
> >> + - firmware-name: specify the name of nvm firmware to load
> >>
> >> Required properties for compatible string qcom,wcn3990-bt:
> >>
> >> @@ -39,6 +40,7 @@ serial@7570000 {
> >>
> >>              enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
> >>              clocks = <&divclk4>;
> >> +            firmware-name = "nvm_00440302.bin";
> >>      };
> >
> > and how is this a firmware-name property. Wouldn’t this be more like
> > nvm-file or something along these lines. This really needs to be
> > cleared with Rob to pick the right property name.
> >
> > Regards
> >
> > Marcel
>
> Hi Rob,
>
> Are you OK to use a property name "nvm-file" or "firmware-nvm-file"?
> Actually we have two firmware files, one is the patch file which is
> common to all of the products, the other is the nvm file which is
> customized. Using a "nvm-file" or "firmware-nvm-file" property name
> would be more clear.

'firmware-name' is the standard name for specifying firmware file names.

Rob
Rob Herring (Arm) April 26, 2019, 8:50 p.m. UTC | #4
On Wed, 10 Apr 2019 17:27:56 +0800, Rocky Liao wrote:
> This patch adds an optional device property "firmware-name" to allow the
> driver to load customized nvm firmware file based on this property.
> 
> Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
> ---
> Changes in v3:
>   * added firmware-name instead of nvm-postfix to specify full firmware name
> ---
>  Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Marcel Holtmann April 27, 2019, 5:59 a.m. UTC | #5
Hi Rob,

>>>> This patch adds an optional device property "firmware-name" to allow
>>>> the
>>>> driver to load customized nvm firmware file based on this property.
>>>> 
>>>> Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
>>>> ---
>>>> Changes in v3:
>>>> * added firmware-name instead of nvm-postfix to specify full firmware
>>>> name
>>>> ---
>>>> Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>> 
>>>> diff --git
>>>> a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>> b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>> index 824c0e2..2bcea50 100644
>>>> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>> @@ -16,6 +16,7 @@ Optional properties for compatible string
>>>> qcom,qca6174-bt:
>>>> 
>>>> - enable-gpios: gpio specifier used to enable chip
>>>> - clocks: clock provided to the controller (SUSCLK_32KHZ)
>>>> + - firmware-name: specify the name of nvm firmware to load
>>>> 
>>>> Required properties for compatible string qcom,wcn3990-bt:
>>>> 
>>>> @@ -39,6 +40,7 @@ serial@7570000 {
>>>> 
>>>>             enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
>>>>             clocks = <&divclk4>;
>>>> +            firmware-name = "nvm_00440302.bin";
>>>>     };
>>> 
>>> and how is this a firmware-name property. Wouldn’t this be more like
>>> nvm-file or something along these lines. This really needs to be
>>> cleared with Rob to pick the right property name.
>>> 
>>> Regards
>>> 
>>> Marcel
>> 
>> Hi Rob,
>> 
>> Are you OK to use a property name "nvm-file" or "firmware-nvm-file"?
>> Actually we have two firmware files, one is the patch file which is
>> common to all of the products, the other is the nvm file which is
>> customized. Using a "nvm-file" or "firmware-nvm-file" property name
>> would be more clear.
> 
> 'firmware-name' is the standard name for specifying firmware file names.

but it is not a firmware file, it is a NVM file. What happens if in the future they need a firmware file and a NVM file?

Regards

Marcel
Rocky Liao May 3, 2019, 7:56 a.m. UTC | #6
Hi Marcel,

On 2019-04-27 13:59, Marcel Holtmann wrote:
> Hi Rob,
> 
>>>>> This patch adds an optional device property "firmware-name" to 
>>>>> allow
>>>>> the
>>>>> driver to load customized nvm firmware file based on this property.
>>>>> 
>>>>> Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
>>>>> ---
>>>>> Changes in v3:
>>>>> * added firmware-name instead of nvm-postfix to specify full 
>>>>> firmware
>>>>> name
>>>>> ---
>>>>> Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
>>>>> 1 file changed, 2 insertions(+)
>>>>> 
>>>>> diff --git
>>>>> a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>> b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>> index 824c0e2..2bcea50 100644
>>>>> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>> @@ -16,6 +16,7 @@ Optional properties for compatible string
>>>>> qcom,qca6174-bt:
>>>>> 
>>>>> - enable-gpios: gpio specifier used to enable chip
>>>>> - clocks: clock provided to the controller (SUSCLK_32KHZ)
>>>>> + - firmware-name: specify the name of nvm firmware to load
>>>>> 
>>>>> Required properties for compatible string qcom,wcn3990-bt:
>>>>> 
>>>>> @@ -39,6 +40,7 @@ serial@7570000 {
>>>>> 
>>>>>             enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
>>>>>             clocks = <&divclk4>;
>>>>> +            firmware-name = "nvm_00440302.bin";
>>>>>     };
>>>> 
>>>> and how is this a firmware-name property. Wouldn’t this be more like
>>>> nvm-file or something along these lines. This really needs to be
>>>> cleared with Rob to pick the right property name.
>>>> 
>>>> Regards
>>>> 
>>>> Marcel
>>> 
>>> Hi Rob,
>>> 
>>> Are you OK to use a property name "nvm-file" or "firmware-nvm-file"?
>>> Actually we have two firmware files, one is the patch file which is
>>> common to all of the products, the other is the nvm file which is
>>> customized. Using a "nvm-file" or "firmware-nvm-file" property name
>>> would be more clear.
>> 
>> 'firmware-name' is the standard name for specifying firmware file 
>> names.
> 
> but it is not a firmware file, it is a NVM file. What happens if in
> the future they need a firmware file and a NVM file?
> 
> Regards
> 
> Marcel

We won't need to specify a rampatch firmware file in future as it's a 
same file for all the boards with same chip, only the NVM firmware file 
may have board differences. NVM file is also one of the firmware files 
so I think it should be OK to use "firmware-name" property to specify 
it.
Marcel Holtmann May 5, 2019, 5:32 p.m. UTC | #7
Hi Rocky,

>>>>>> This patch adds an optional device property "firmware-name" to allow
>>>>>> the
>>>>>> driver to load customized nvm firmware file based on this property.
>>>>>> Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
>>>>>> ---
>>>>>> Changes in v3:
>>>>>> * added firmware-name instead of nvm-postfix to specify full firmware
>>>>>> name
>>>>>> ---
>>>>>> Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++
>>>>>> 1 file changed, 2 insertions(+)
>>>>>> diff --git
>>>>>> a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>>> b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>>> index 824c0e2..2bcea50 100644
>>>>>> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>>> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
>>>>>> @@ -16,6 +16,7 @@ Optional properties for compatible string
>>>>>> qcom,qca6174-bt:
>>>>>> - enable-gpios: gpio specifier used to enable chip
>>>>>> - clocks: clock provided to the controller (SUSCLK_32KHZ)
>>>>>> + - firmware-name: specify the name of nvm firmware to load
>>>>>> Required properties for compatible string qcom,wcn3990-bt:
>>>>>> @@ -39,6 +40,7 @@ serial@7570000 {
>>>>>>            enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
>>>>>>            clocks = <&divclk4>;
>>>>>> +            firmware-name = "nvm_00440302.bin";
>>>>>>    };
>>>>> and how is this a firmware-name property. Wouldn’t this be more like
>>>>> nvm-file or something along these lines. This really needs to be
>>>>> cleared with Rob to pick the right property name.
>>>>> Regards
>>>>> Marcel
>>>> Hi Rob,
>>>> Are you OK to use a property name "nvm-file" or "firmware-nvm-file"?
>>>> Actually we have two firmware files, one is the patch file which is
>>>> common to all of the products, the other is the nvm file which is
>>>> customized. Using a "nvm-file" or "firmware-nvm-file" property name
>>>> would be more clear.
>>> 'firmware-name' is the standard name for specifying firmware file names.
>> but it is not a firmware file, it is a NVM file. What happens if in
>> the future they need a firmware file and a NVM file?
>> Regards
>> Marcel
> 
> We won't need to specify a rampatch firmware file in future as it's a same file for all the boards with same chip, only the NVM firmware file may have board differences. NVM file is also one of the firmware files so I think it should be OK to use "firmware-name" property to specify it.

ok then, but I need patches that apply cleanly against bluetooth-next.

Regards

Marcel
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
index 824c0e2..2bcea50 100644
--- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
+++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt
@@ -16,6 +16,7 @@  Optional properties for compatible string qcom,qca6174-bt:
 
  - enable-gpios: gpio specifier used to enable chip
  - clocks: clock provided to the controller (SUSCLK_32KHZ)
+ - firmware-name: specify the name of nvm firmware to load
 
 Required properties for compatible string qcom,wcn3990-bt:
 
@@ -39,6 +40,7 @@  serial@7570000 {
 
 		enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
 		clocks = <&divclk4>;
+		firmware-name = "nvm_00440302.bin";
 	};
 };