Devicetree
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: bus: brcm,bus-axi: Convert binding to YAML
@ 2026-07-26 20:55 Rosen Penev
  2026-07-26 21:01 ` sashiko-bot
  2026-07-26 22:28 ` Rob Herring (Arm)
  0 siblings, 2 replies; 3+ messages in thread
From: Rosen Penev @ 2026-07-26 20:55 UTC (permalink / raw)
  To: devicetree
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hauke Mehrtens,
	Rafał Miłecki, open list

Convert the Broadcom AXI bus (bcma) binding from legacy .txt format
to dt-schema YAML format. This resolves dtbs_check schema validation
warnings for the brcm,bus-axi compatible string across all BCM47xx
and BCM53xx ARM SoC board DTBs.

The schema documents the AXI bus node with its required compatible
and reg properties, address/size/interrupt cell configurations, and
interrupt-map for assigning IRQ numbers on BCM47xx/BCM53xx platforms
where automatic detection is not available.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 .../devicetree/bindings/bus/brcm,bus-axi.txt  | 53 -------------
 .../devicetree/bindings/bus/brcm,bus-axi.yaml | 77 +++++++++++++++++++
 2 files changed, 77 insertions(+), 53 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/bus/brcm,bus-axi.txt
 create mode 100644 Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml

diff --git a/Documentation/devicetree/bindings/bus/brcm,bus-axi.txt b/Documentation/devicetree/bindings/bus/brcm,bus-axi.txt
deleted file mode 100644
index edd44d802139..000000000000
--- a/Documentation/devicetree/bindings/bus/brcm,bus-axi.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-Driver for ARM AXI Bus with Broadcom Plugins (bcma)
-
-Required properties:
-
-- compatible : brcm,bus-axi
-
-- reg : iomem address range of chipcommon core
-
-The cores on the AXI bus are automatically detected by bcma with the
-memory ranges they are using and they get registered afterwards.
-Automatic detection of the IRQ number is not working on
-BCM47xx/BCM53xx ARM SoCs. To assign IRQ numbers to the cores, provide
-them manually through device tree. Use an interrupt-map to specify the
-IRQ used by the devices on the bus. The first address is just an index,
-because we do not have any special register.
-
-The top-level axi bus may contain children representing attached cores
-(devices). This is needed since some hardware details can't be auto
-detected (e.g. IRQ numbers). Also some of the cores may be responsible
-for extra things, e.g. ChipCommon providing access to the GPIO chip.
-
-Example:
-
-	axi@18000000 {
-		compatible = "brcm,bus-axi";
-		reg = <0x18000000 0x1000>;
-		ranges = <0x00000000 0x18000000 0x00100000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		#interrupt-cells = <1>;
-		interrupt-map-mask = <0x000fffff 0xffff>;
-		interrupt-map =
-			/* Ethernet Controller 0 */
-			<0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
-
-			/* Ethernet Controller 1 */
-			<0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
-
-			/* PCIe Controller 0 */
-			<0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
-
-		chipcommon {
-			reg = <0x00000000 0x1000>;
-
-			gpio-controller;
-			#gpio-cells = <2>;
-		};
-	};
diff --git a/Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml b/Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml
new file mode 100644
index 000000000000..951aa139dd98
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/brcm,bus-axi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom AXI Bus with bcma driver
+
+maintainers:
+  - Hauke Mehrtens <hauke@hauke-mehrtens.de>
+  - Rafał Miłecki <rafal@milecki.pl>
+
+description: |
+  Driver for ARM AXI Bus with Broadcom Plugins (bcma).
+
+  The cores on the AXI bus are automatically detected by bcma with the
+  memory ranges they are using and they get registered afterwards.
+  Automatic detection of the IRQ number is not working on
+  BCM47xx/BCM53xx ARM SoCs. To assign IRQ numbers to the cores, provide
+  them manually through device tree. Use an interrupt-map to specify the
+  IRQ used by the devices on the bus. The first address is just an index,
+  because we do not have any special register.
+
+properties:
+  compatible:
+    const: brcm,bus-axi
+
+  reg:
+    description: IOMEM address range of chipcommon core.
+    maxItems: 1
+
+  ranges: true
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  "#interrupt-cells":
+    const: 1
+
+  interrupt-map-mask: true
+  interrupt-map: true
+
+patternProperties:
+  "@[0-9a-f]+$":
+    type: object
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    axi@18000000 {
+        compatible = "brcm,bus-axi";
+        reg = <0x18000000 0x1000>;
+        ranges = <0x00000000 0x18000000 0x00100000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        #interrupt-cells = <1>;
+        interrupt-map-mask = <0x000fffff 0xffff>;
+        interrupt-map =
+            /* Ethernet Controller 0 */
+            <0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+            /* Ethernet Controller 1 */
+            <0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+
+        chipcommon {
+            reg = <0x00000000 0x1000>;
+            gpio-controller;
+            #gpio-cells = <2>;
+        };
+    };
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: bus: brcm,bus-axi: Convert binding to YAML
  2026-07-26 20:55 [PATCH] dt-bindings: bus: brcm,bus-axi: Convert binding to YAML Rosen Penev
@ 2026-07-26 21:01 ` sashiko-bot
  2026-07-26 22:28 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-26 21:01 UTC (permalink / raw)
  To: Rosen Penev; +Cc: conor+dt, devicetree, robh

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] DT Example Compilation Failure due to missing includes and undefined phandle.
- [Low] DT Schema Validation Failure & DTC Warning due to missing unit-address in child node.
--

--- Patch [1]: [PATCH] dt-bindings: bus: brcm,bus-axi: Convert binding to YAML ---
commit afe32a853f1abd5449035c850043c368de3892be
Author: Rosen Penev <rosenp@gmail.com>

dt-bindings: bus: brcm,bus-axi: Convert binding to YAML

Convert the Broadcom AXI bus (bcma) binding from legacy .txt format
to dt-schema YAML format. This resolves dtbs_check schema validation
warnings for the brcm,bus-axi compatible string across all BCM47xx
and BCM53xx ARM SoC board DTBs.

> diff --git a/Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml b/Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml
> new file mode 100644
> index 0000000000000..951aa139dd987
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml

[ ... ]

> +examples:
> +  - |
> +    axi@18000000 {
> +        compatible = "brcm,bus-axi";
> +        reg = <0x18000000 0x1000>;
> +        ranges = <0x00000000 0x18000000 0x00100000>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        #interrupt-cells = <1>;
> +        interrupt-map-mask = <0x000fffff 0xffff>;
> +        interrupt-map =
> +            /* Ethernet Controller 0 */
> +            <0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
> +            /* Ethernet Controller 1 */
> +            <0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;

[Severity: Low]
Will this example fail to compile during make dt_binding_check?

The example uses macros like GIC_SPI and IRQ_TYPE_LEVEL_HIGH, but seems to be
missing the required includes:
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>

Additionally, is the &gic phandle defined anywhere in the example scope? If
not, it might cause a reference to non-existent node or label dtc error.

> +
> +        chipcommon {

[Severity: Low]
Does this child node need a unit address to pass schema validation?

The schema defines valid children using patternProperties: "@[0-9a-f]+$". Since
this node contains a reg property, the Devicetree specification requires a
unit address (e.g., chipcommon@0). Without it, make dt_binding_check might
reject this as an undocumented property and emit a unit_address_vs_reg
warning.

> +            reg = <0x00000000 0x1000>;
> +            gpio-controller;
> +            #gpio-cells = <2>;
> +        };
> +    };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260726205518.6698-1-rosenp@gmail.com?part=1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: bus: brcm,bus-axi: Convert binding to YAML
  2026-07-26 20:55 [PATCH] dt-bindings: bus: brcm,bus-axi: Convert binding to YAML Rosen Penev
  2026-07-26 21:01 ` sashiko-bot
@ 2026-07-26 22:28 ` Rob Herring (Arm)
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2026-07-26 22:28 UTC (permalink / raw)
  To: Rosen Penev
  Cc: Hauke Mehrtens, Krzysztof Kozlowski, Rafał Miłecki,
	Conor Dooley, linux-kernel, devicetree


On Sun, 26 Jul 2026 13:55:14 -0700, Rosen Penev wrote:
> Convert the Broadcom AXI bus (bcma) binding from legacy .txt format
> to dt-schema YAML format. This resolves dtbs_check schema validation
> warnings for the brcm,bus-axi compatible string across all BCM47xx
> and BCM53xx ARM SoC board DTBs.
> 
> The schema documents the AXI bus node with its required compatible
> and reg properties, address/size/interrupt cell configurations, and
> interrupt-map for assigning IRQ numbers on BCM47xx/BCM53xx platforms
> where automatic detection is not available.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  .../devicetree/bindings/bus/brcm,bus-axi.txt  | 53 -------------
>  .../devicetree/bindings/bus/brcm,bus-axi.yaml | 77 +++++++++++++++++++
>  2 files changed, 77 insertions(+), 53 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/bus/brcm,bus-axi.txt
>  create mode 100644 Documentation/devicetree/bindings/bus/brcm,bus-axi.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Lexical error: Documentation/devicetree/bindings/bus/brcm,bus-axi.example.dts:28.36-43 Unexpected 'GIC_SPI'
Lexical error: Documentation/devicetree/bindings/bus/brcm,bus-axi.example.dts:28.48-67 Unexpected 'IRQ_TYPE_LEVEL_HIGH'
Lexical error: Documentation/devicetree/bindings/bus/brcm,bus-axi.example.dts:30.36-43 Unexpected 'GIC_SPI'
Lexical error: Documentation/devicetree/bindings/bus/brcm,bus-axi.example.dts:30.48-67 Unexpected 'IRQ_TYPE_LEVEL_HIGH'
FATAL ERROR: Syntax error parsing input tree
make[2]: *** [scripts/Makefile.dtbs:140: Documentation/devicetree/bindings/bus/brcm,bus-axi.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1705: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/20260726205518.6698-1-rosenp@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-26 22:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 20:55 [PATCH] dt-bindings: bus: brcm,bus-axi: Convert binding to YAML Rosen Penev
2026-07-26 21:01 ` sashiko-bot
2026-07-26 22:28 ` Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox