diff mbox series

[2/5] dt-bindings: net: Add Broadcom BCM4377 family PCI Bluetooth

Message ID 20220801103633.27772-3-sven@svenpeter.dev (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series Broadcom/Apple Bluetooth driver for Apple Silicon | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 12 of 12 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 84 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sven Peter Aug. 1, 2022, 10:36 a.m. UTC
These chips are combined Wi-Fi/Bluetooth radios which expose a
PCI subfunction for the Bluetooth part.
They are found in Apple machines such as the x86 models with the T2
chip or the arm64 models with the M1 or M2 chips.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
 .../bindings/net/brcm,bcm4377-bluetooth.yaml  | 77 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml

Comments

Rob Herring (Arm) Aug. 1, 2022, 3:39 p.m. UTC | #1
On Mon, Aug 01, 2022 at 12:36:30PM +0200, Sven Peter wrote:
> These chips are combined Wi-Fi/Bluetooth radios which expose a
> PCI subfunction for the Bluetooth part.
> They are found in Apple machines such as the x86 models with the T2
> chip or the arm64 models with the M1 or M2 chips.
> 
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
>  .../bindings/net/brcm,bcm4377-bluetooth.yaml  | 77 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 78 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> new file mode 100644
> index 000000000000..afe6ecebd939
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/brcm,bcm4377-bluetooth.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom BCM4377 family PCI Bluetooth Chips
> +
> +allOf:
> +  - $ref: bluetooth-controller.yaml#
> +
> +maintainers:
> +  - Sven Peter <sven@svenpeter.dev>
> +
> +description:
> +  This binding describes Broadcom BCM4377 family PCI-attached bluetooth chips

s/PCI/PCIe/

> +  usually found in Apple machines. The Wi-Fi part of the chip is described in
> +  bindings/net/wireless/brcm,bcm4329-fmac.yaml.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - pci14e4,5fa0 # BCM4377
> +      - pci14e4,5f69 # BCM4378
> +      - pci14e4,5f71 # BCM4387
> +
> +  reg:
> +    description: PCI device identifier.
> +
> +  brcm,board-type:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Board type of the Bluetooth chip. This is used to decouple
> +      the overall system board from the Bluetooth module and used to construct
> +      firmware and calibration data filenames.
> +      On Apple platforms, this should be the Apple module-instance codename
> +      prefixed by "apple,", e.g. "apple,atlantisb".

pattern: '^apple,.*'

And when there's other known vendors we can add them.

Really, I'm not all that crazy about this property. 'firmware-name' 
doesn't work? Or perhaps this should just be a more specific compatible 
string.

> +
> +  brcm,taurus-cal-blob:
> +    $ref: /schemas/types.yaml#/definitions/uint8-array
> +    description: A per-device calibration blob for the Bluetooth radio. This
> +      should be filled in by the bootloader from platform configuration
> +      data, if necessary, and will be uploaded to the device.
> +      This blob is used if the chip stepping of the Bluetooth module does not
> +      support beamforming.
> +
> +  brcm,taurus-bf-cal-blob:
> +    $ref: /schemas/types.yaml#/definitions/uint8-array
> +    description: A per-device calibration blob for the Bluetooth radio. This
> +      should be filled in by the bootloader from platform configuration
> +      data, if necessary, and will be uploaded to the device.
> +      This blob is used if the chip stepping of the Bluetooth module supports
> +      beamforming.
> +
> +  local-bd-address: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - local-bd-address
> +  - brcm,board-type
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    pci0 {

pcie {

> +      #address-cells = <3>;
> +      #size-cells = <2>;
> +
> +      bluetooth@0,1 {
> +        compatible = "pci14e4,5f69";
> +        reg = <0x10100 0x0 0x0 0x0 0x0>;

reg should not have the bus number here as that is dynamic. So 0x100 for 
the 1st cell.

> +        brcm,board-type = "apple,honshu";
> +        /* To be filled by the bootloader */
> +        local-bd-address = [00 00 00 00 00 00];
> +      };
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a6d3bd9d2a8d..8965556bace8 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1837,6 +1837,7 @@ F:	Documentation/devicetree/bindings/interrupt-controller/apple,*
>  F:	Documentation/devicetree/bindings/iommu/apple,dart.yaml
>  F:	Documentation/devicetree/bindings/iommu/apple,sart.yaml
>  F:	Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
> +F:	Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
>  F:	Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml
>  F:	Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
>  F:	Documentation/devicetree/bindings/pci/apple,pcie.yaml
> -- 
> 2.25.1
> 
>
Mark Kettenis Aug. 1, 2022, 3:51 p.m. UTC | #2
> Date: Mon, 1 Aug 2022 09:39:21 -0600
> From: Rob Herring <robh@kernel.org>
> 
> On Mon, Aug 01, 2022 at 12:36:30PM +0200, Sven Peter wrote:
> > These chips are combined Wi-Fi/Bluetooth radios which expose a
> > PCI subfunction for the Bluetooth part.
> > They are found in Apple machines such as the x86 models with the T2
> > chip or the arm64 models with the M1 or M2 chips.
> > 
> > Signed-off-by: Sven Peter <sven@svenpeter.dev>
> > ---
> >  .../bindings/net/brcm,bcm4377-bluetooth.yaml  | 77 +++++++++++++++++++
> >  MAINTAINERS                                   |  1 +
> >  2 files changed, 78 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> > new file mode 100644
> > index 000000000000..afe6ecebd939
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> > @@ -0,0 +1,77 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/brcm,bcm4377-bluetooth.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Broadcom BCM4377 family PCI Bluetooth Chips
> > +
> > +allOf:
> > +  - $ref: bluetooth-controller.yaml#
> > +
> > +maintainers:
> > +  - Sven Peter <sven@svenpeter.dev>
> > +
> > +description:
> > +  This binding describes Broadcom BCM4377 family PCI-attached bluetooth chips
> 
> s/PCI/PCIe/
> 
> > +  usually found in Apple machines. The Wi-Fi part of the chip is described in
> > +  bindings/net/wireless/brcm,bcm4329-fmac.yaml.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - pci14e4,5fa0 # BCM4377
> > +      - pci14e4,5f69 # BCM4378
> > +      - pci14e4,5f71 # BCM4387
> > +
> > +  reg:
> > +    description: PCI device identifier.
> > +
> > +  brcm,board-type:
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    description: Board type of the Bluetooth chip. This is used to decouple
> > +      the overall system board from the Bluetooth module and used to construct
> > +      firmware and calibration data filenames.
> > +      On Apple platforms, this should be the Apple module-instance codename
> > +      prefixed by "apple,", e.g. "apple,atlantisb".
> 
> pattern: '^apple,.*'
> 
> And when there's other known vendors we can add them.
> 
> Really, I'm not all that crazy about this property. 'firmware-name' 
> doesn't work? Or perhaps this should just be a more specific compatible 
> string.

This matches the property proposed here:

  https://patchwork.kernel.org/project/linux-wireless/patch/20220104072658.69756-2-marcan@marcan.st/

Unfortunately that series didn't make progress for other reasons...

There was some significant bikeshedding in the original version of that series already:

  https://patchwork.kernel.org/project/linux-wireless/patch/20211226153624.162281-2-marcan@marcan.st/

Are you sure you want to repeat that? ;)

> > +
> > +  brcm,taurus-cal-blob:
> > +    $ref: /schemas/types.yaml#/definitions/uint8-array
> > +    description: A per-device calibration blob for the Bluetooth radio. This
> > +      should be filled in by the bootloader from platform configuration
> > +      data, if necessary, and will be uploaded to the device.
> > +      This blob is used if the chip stepping of the Bluetooth module does not
> > +      support beamforming.
> > +
> > +  brcm,taurus-bf-cal-blob:
> > +    $ref: /schemas/types.yaml#/definitions/uint8-array
> > +    description: A per-device calibration blob for the Bluetooth radio. This
> > +      should be filled in by the bootloader from platform configuration
> > +      data, if necessary, and will be uploaded to the device.
> > +      This blob is used if the chip stepping of the Bluetooth module supports
> > +      beamforming.
> > +
> > +  local-bd-address: true
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - local-bd-address
> > +  - brcm,board-type
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    pci0 {
> 
> pcie {
> 
> > +      #address-cells = <3>;
> > +      #size-cells = <2>;
> > +
> > +      bluetooth@0,1 {
> > +        compatible = "pci14e4,5f69";
> > +        reg = <0x10100 0x0 0x0 0x0 0x0>;
> 
> reg should not have the bus number here as that is dynamic. So 0x100 for 
> the 1st cell.
> 
> > +        brcm,board-type = "apple,honshu";
> > +        /* To be filled by the bootloader */
> > +        local-bd-address = [00 00 00 00 00 00];
> > +      };
> > +    };
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index a6d3bd9d2a8d..8965556bace8 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1837,6 +1837,7 @@ F:	Documentation/devicetree/bindings/interrupt-controller/apple,*
> >  F:	Documentation/devicetree/bindings/iommu/apple,dart.yaml
> >  F:	Documentation/devicetree/bindings/iommu/apple,sart.yaml
> >  F:	Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
> > +F:	Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> >  F:	Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml
> >  F:	Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
> >  F:	Documentation/devicetree/bindings/pci/apple,pcie.yaml
> > -- 
> > 2.25.1
> > 
> > 
> 
>
Rob Herring (Arm) Aug. 10, 2022, 6:10 p.m. UTC | #3
On Mon, Aug 01, 2022 at 05:51:23PM +0200, Mark Kettenis wrote:
> > Date: Mon, 1 Aug 2022 09:39:21 -0600
> > From: Rob Herring <robh@kernel.org>
> > 
> > On Mon, Aug 01, 2022 at 12:36:30PM +0200, Sven Peter wrote:
> > > These chips are combined Wi-Fi/Bluetooth radios which expose a
> > > PCI subfunction for the Bluetooth part.
> > > They are found in Apple machines such as the x86 models with the T2
> > > chip or the arm64 models with the M1 or M2 chips.
> > > 
> > > Signed-off-by: Sven Peter <sven@svenpeter.dev>
> > > ---
> > >  .../bindings/net/brcm,bcm4377-bluetooth.yaml  | 77 +++++++++++++++++++
> > >  MAINTAINERS                                   |  1 +
> > >  2 files changed, 78 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> > > 
> > > diff --git a/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> > > new file mode 100644
> > > index 000000000000..afe6ecebd939
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
> > > @@ -0,0 +1,77 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/net/brcm,bcm4377-bluetooth.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Broadcom BCM4377 family PCI Bluetooth Chips
> > > +
> > > +allOf:
> > > +  - $ref: bluetooth-controller.yaml#
> > > +
> > > +maintainers:
> > > +  - Sven Peter <sven@svenpeter.dev>
> > > +
> > > +description:
> > > +  This binding describes Broadcom BCM4377 family PCI-attached bluetooth chips
> > 
> > s/PCI/PCIe/
> > 
> > > +  usually found in Apple machines. The Wi-Fi part of the chip is described in
> > > +  bindings/net/wireless/brcm,bcm4329-fmac.yaml.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - pci14e4,5fa0 # BCM4377
> > > +      - pci14e4,5f69 # BCM4378
> > > +      - pci14e4,5f71 # BCM4387
> > > +
> > > +  reg:
> > > +    description: PCI device identifier.
> > > +
> > > +  brcm,board-type:
> > > +    $ref: /schemas/types.yaml#/definitions/string
> > > +    description: Board type of the Bluetooth chip. This is used to decouple
> > > +      the overall system board from the Bluetooth module and used to construct
> > > +      firmware and calibration data filenames.
> > > +      On Apple platforms, this should be the Apple module-instance codename
> > > +      prefixed by "apple,", e.g. "apple,atlantisb".
> > 
> > pattern: '^apple,.*'
> > 
> > And when there's other known vendors we can add them.
> > 
> > Really, I'm not all that crazy about this property. 'firmware-name' 
> > doesn't work? Or perhaps this should just be a more specific compatible 
> > string.
> 
> This matches the property proposed here:
> 
>   https://patchwork.kernel.org/project/linux-wireless/patch/20220104072658.69756-2-marcan@marcan.st/
> 
> Unfortunately that series didn't make progress for other reasons...
> 
> There was some significant bikeshedding in the original version of that series already:
> 
>   https://patchwork.kernel.org/project/linux-wireless/patch/20211226153624.162281-2-marcan@marcan.st/
> 
> Are you sure you want to repeat that? ;)

No, it's fine. :)

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
new file mode 100644
index 000000000000..afe6ecebd939
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
@@ -0,0 +1,77 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/brcm,bcm4377-bluetooth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM4377 family PCI Bluetooth Chips
+
+allOf:
+  - $ref: bluetooth-controller.yaml#
+
+maintainers:
+  - Sven Peter <sven@svenpeter.dev>
+
+description:
+  This binding describes Broadcom BCM4377 family PCI-attached bluetooth chips
+  usually found in Apple machines. The Wi-Fi part of the chip is described in
+  bindings/net/wireless/brcm,bcm4329-fmac.yaml.
+
+properties:
+  compatible:
+    enum:
+      - pci14e4,5fa0 # BCM4377
+      - pci14e4,5f69 # BCM4378
+      - pci14e4,5f71 # BCM4387
+
+  reg:
+    description: PCI device identifier.
+
+  brcm,board-type:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Board type of the Bluetooth chip. This is used to decouple
+      the overall system board from the Bluetooth module and used to construct
+      firmware and calibration data filenames.
+      On Apple platforms, this should be the Apple module-instance codename
+      prefixed by "apple,", e.g. "apple,atlantisb".
+
+  brcm,taurus-cal-blob:
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    description: A per-device calibration blob for the Bluetooth radio. This
+      should be filled in by the bootloader from platform configuration
+      data, if necessary, and will be uploaded to the device.
+      This blob is used if the chip stepping of the Bluetooth module does not
+      support beamforming.
+
+  brcm,taurus-bf-cal-blob:
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    description: A per-device calibration blob for the Bluetooth radio. This
+      should be filled in by the bootloader from platform configuration
+      data, if necessary, and will be uploaded to the device.
+      This blob is used if the chip stepping of the Bluetooth module supports
+      beamforming.
+
+  local-bd-address: true
+
+required:
+  - compatible
+  - reg
+  - local-bd-address
+  - brcm,board-type
+
+additionalProperties: false
+
+examples:
+  - |
+    pci0 {
+      #address-cells = <3>;
+      #size-cells = <2>;
+
+      bluetooth@0,1 {
+        compatible = "pci14e4,5f69";
+        reg = <0x10100 0x0 0x0 0x0 0x0>;
+        brcm,board-type = "apple,honshu";
+        /* To be filled by the bootloader */
+        local-bd-address = [00 00 00 00 00 00];
+      };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index a6d3bd9d2a8d..8965556bace8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1837,6 +1837,7 @@  F:	Documentation/devicetree/bindings/interrupt-controller/apple,*
 F:	Documentation/devicetree/bindings/iommu/apple,dart.yaml
 F:	Documentation/devicetree/bindings/iommu/apple,sart.yaml
 F:	Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
+F:	Documentation/devicetree/bindings/net/brcm,bcm4377-bluetooth.yaml
 F:	Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml
 F:	Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
 F:	Documentation/devicetree/bindings/pci/apple,pcie.yaml