diff mbox series

[v2,1/2] dt-bindings: net: broadcom-bluetooth: Add property for autobaud mode

Message ID cb20a6f49c91521d54c847ee4dc14451b0ee91dd.1653057480.git.hakan.jansson@infineon.com (mailing list archive)
State Superseded
Headers show
Series Bluetooth: hci_bcm: Autobaud mode support | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/subjectprefix fail "Bluetooth: " is not specified in the subject
tedd_an/buildkernel success Build Kernel PASS
tedd_an/buildkernel32 success Build Kernel32 PASS
tedd_an/incremental_build success Pass
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 493, Passed: 493 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 10, Passed: 10 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

Hakan Jansson May 20, 2022, 3:07 p.m. UTC
Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading.
Autobaud mode can also be required on some boards where the controller
device is using a non-standard baud rate when first powered on.

This patch adds a property, "brcm,uses-autobaud-mode", to enable autobaud
mode selection.

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
---
V1 -> V2: Modify property description

 .../devicetree/bindings/net/broadcom-bluetooth.yaml      | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

bluez.test.bot@gmail.com May 20, 2022, 4:09 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=643647

---Test result---

Test Summary:
CheckPatch                    PASS      3.61 seconds
GitLint                       PASS      1.98 seconds
SubjectPrefix                 FAIL      0.89 seconds
BuildKernel                   PASS      35.16 seconds
BuildKernel32                 PASS      31.24 seconds
Incremental Build with patchesPASS      51.57 seconds
TestRunner: Setup             PASS      512.66 seconds
TestRunner: l2cap-tester      PASS      18.90 seconds
TestRunner: bnep-tester       PASS      7.01 seconds
TestRunner: mgmt-tester       PASS      113.17 seconds
TestRunner: rfcomm-tester     PASS      10.72 seconds
TestRunner: sco-tester        PASS      10.46 seconds
TestRunner: smp-tester        PASS      10.39 seconds
TestRunner: userchan-tester   PASS      7.18 seconds

Details
##############################
Test: SubjectPrefix - FAIL - 0.89 seconds
Check subject contains "Bluetooth" prefix
"Bluetooth: " is not specified in the subject



---
Regards,
Linux Bluetooth
Krzysztof Kozlowski May 22, 2022, 8:14 a.m. UTC | #2
On 20/05/2022 17:07, Hakan Jansson wrote:
> Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading.

Which devices support this? You probably need allOf:if:then.

> Autobaud mode can also be required on some boards where the controller
> device is using a non-standard baud rate when first powered on.
> 
> This patch adds a property, "brcm,uses-autobaud-mode", to enable autobaud
> mode selection.

Don't use "This patch":
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

> 
> Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
> ---
> V1 -> V2: Modify property description
> 
>  .../devicetree/bindings/net/broadcom-bluetooth.yaml      | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
> index 5aac094fd217..a29f059c21cc 100644
> --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
> +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
> @@ -92,6 +92,15 @@ properties:
>         pcm-sync-mode: slave, master
>         pcm-clock-mode: slave, master
>  
> +  brcm,uses-autobaud-mode:

Based on description, I understand the host triggers using autobaud.
However here you word it as "uses", so it is independent of host, it
looks like property of a device. The commit msg describes it even
different - "require autobaud".

This leads to second issue - it looks like there is some hardware
property (requiring to use autobaud) which should be described by
bindings. But instead you describe desired operational feature.

> +    type: boolean
> +    description: >

No need for '>'.

> +      Setting this property will make the host (driver) assert the controller
> +      chip's BT_UART_CTS_N prior to asserting BT_REG_ON. This will make the
> +      controller start up in autobaud mode. The controller will then detect the
> +      baud rate of the first incoming (HCI Reset) command from the host and
> +      subsequently use that baud rate.
> +
>    interrupts:
>      items:
>        - description: Handle to the line HOST_WAKE used to wake


Best regards,
Krzysztof
Hakan Jansson May 23, 2022, 9:21 a.m. UTC | #3
Hi Krzysztof,

Thanks for responding.

On 5/22/2022 10:14 AM, Krzysztof Kozlowski wrote:
>> Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading.
> Which devices support this? You probably need allOf:if:then.

Most devices _support_ autobaud mode but I don't have a definitive list. 
The CYW5557x is the first device family to _require_ autobaud mode for 
FW loading as far as I know.

>> Autobaud mode can also be required on some boards where the controller
>> device is using a non-standard baud rate when first powered on.
>>
>> This patch adds a property, "brcm,uses-autobaud-mode", to enable autobaud
>> mode selection.
> Don't use "This patch":
> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

Sorry, will change in next rev.

>> Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
>> ---
>> V1 -> V2: Modify property description
>>
>>   .../devicetree/bindings/net/broadcom-bluetooth.yaml      | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
>> index 5aac094fd217..a29f059c21cc 100644
>> --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
>> +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
>> @@ -92,6 +92,15 @@ properties:
>>          pcm-sync-mode: slave, master
>>          pcm-clock-mode: slave, master
>>
>> +  brcm,uses-autobaud-mode:
> Based on description, I understand the host triggers using autobaud.

Correct, the host triggers using autobaud.

> However here you word it as "uses", so it is independent of host, it
> looks like property of a device.

I've been thinking of it as a a property of a specific board HW, 
inherited either from a property of the device being used or from a 
property of the HW design (e.g. a PCB using an alternate crystal 
frequency yielding a non-standard baud rate).

>   The commit msg describes it even
> different - "require autobaud".

Yes, the commit message describes two separate reasons why autobaud mode 
would be required:

1. Requirement coming from Device: "Some devices (e.g. CYW5557x) require 
autobaud mode to enable FW loading."

2. Requirement coming from HW design: "Autobaud mode can also be 
required on some boards where the controller device is using a 
non-standard baud rate when first powered on."

> This leads to second issue - it looks like there is some hardware
> property (requiring to use autobaud) which should be described by
> bindings. But instead you describe desired operational feature.

Sorry about that. I've really been struggling with what should go into 
the description. Any suggestions or hints would be much appreciated.

How about, changing the property name to "brcm,requires-autobaud-mode" 
and the description to:
"Set this property if autobaud mode is required. Autobaud mode is 
required if the device's baud rate in normal mode is not supported by 
the host or if the device requires autobaud mode startup before loading FW."

Would that be an appropriate name and description?

>> +    type: boolean
>> +    description: >
> No need for '>'.

Ok, will remove in next rev.

>> +      Setting this property will make the host (driver) assert the controller
>> +      chip's BT_UART_CTS_N prior to asserting BT_REG_ON. This will make the
>> +      controller start up in autobaud mode. The controller will then detect the
>> +      baud rate of the first incoming (HCI Reset) command from the host and
>> +      subsequently use that baud rate.
>> +
>>     interrupts:
>>       items:
>>         - description: Handle to the line HOST_WAKE used to wake
>

Thanks,
Håkan
Krzysztof Kozlowski May 30, 2022, 7:44 a.m. UTC | #4
On 23/05/2022 11:21, Hakan Jansson wrote:
> Hi Krzysztof,
> 
> Thanks for responding.
> 
> On 5/22/2022 10:14 AM, Krzysztof Kozlowski wrote:
>>> Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading.
>> Which devices support this? You probably need allOf:if:then.
> 
> Most devices _support_ autobaud mode but I don't have a definitive list. 
> The CYW5557x is the first device family to _require_ autobaud mode for 
> FW loading as far as I know.
> 
>>> Autobaud mode can also be required on some boards where the controller
>>> device is using a non-standard baud rate when first powered on.
>>>
>>> This patch adds a property, "brcm,uses-autobaud-mode", to enable autobaud
>>> mode selection.
>> Don't use "This patch":
>> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> 
> Sorry, will change in next rev.
> 
>>> Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
>>> ---
>>> V1 -> V2: Modify property description
>>>
>>>   .../devicetree/bindings/net/broadcom-bluetooth.yaml      | 9 +++++++++
>>>   1 file changed, 9 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
>>> index 5aac094fd217..a29f059c21cc 100644
>>> --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
>>> +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
>>> @@ -92,6 +92,15 @@ properties:
>>>          pcm-sync-mode: slave, master
>>>          pcm-clock-mode: slave, master
>>>
>>> +  brcm,uses-autobaud-mode:
>> Based on description, I understand the host triggers using autobaud.
> 
> Correct, the host triggers using autobaud.
> 
>> However here you word it as "uses", so it is independent of host, it
>> looks like property of a device.
> 
> I've been thinking of it as a a property of a specific board HW, 
> inherited either from a property of the device being used or from a 
> property of the HW design (e.g. a PCB using an alternate crystal 
> frequency yielding a non-standard baud rate).
> 
>>   The commit msg describes it even
>> different - "require autobaud".
> 
> Yes, the commit message describes two separate reasons why autobaud mode 
> would be required:
> 
> 1. Requirement coming from Device: "Some devices (e.g. CYW5557x) require 
> autobaud mode to enable FW loading."
> 
> 2. Requirement coming from HW design: "Autobaud mode can also be 
> required on some boards where the controller device is using a 
> non-standard baud rate when first powered on."
> 
>> This leads to second issue - it looks like there is some hardware
>> property (requiring to use autobaud) which should be described by
>> bindings. But instead you describe desired operational feature.
> 
> Sorry about that. I've really been struggling with what should go into 
> the description. Any suggestions or hints would be much appreciated.
> 
> How about, changing the property name to "brcm,requires-autobaud-mode" 
> and the description to:
> "Set this property if autobaud mode is required. Autobaud mode is 
> required if the device's baud rate in normal mode is not supported by 
> the host or if the device requires autobaud mode startup before loading FW."
> 
> Would that be an appropriate name and description?

Yes, sounds good. I also have trouble to name it nicely.

Sorry for late reply.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
index 5aac094fd217..a29f059c21cc 100644
--- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
+++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml
@@ -92,6 +92,15 @@  properties:
        pcm-sync-mode: slave, master
        pcm-clock-mode: slave, master
 
+  brcm,uses-autobaud-mode:
+    type: boolean
+    description: >
+      Setting this property will make the host (driver) assert the controller
+      chip's BT_UART_CTS_N prior to asserting BT_REG_ON. This will make the
+      controller start up in autobaud mode. The controller will then detect the
+      baud rate of the first incoming (HCI Reset) command from the host and
+      subsequently use that baud rate.
+
   interrupts:
     items:
       - description: Handle to the line HOST_WAKE used to wake