ARM: dts: Add some BCM6846 device tree
Subsystems (2)
cover ARM: dts: Add some BCM6846 device tree
This adds some silicon blocks to the BCM6846 DTSI file and adds a device tree for the Genexis XG6846B device that make use of it.
This is mainly so as to get this off my hard drive and share the basics with others who want to work on the BCM6846.
I think most of the DTSI changes can be just copied verbatim to the rest of the BCMBCA family (maybe extracted into a common bcbca.dtsi?) but let's think about that later. This will do for now.
The XG6846B device tree uses the new shift register bits property of the BCM63138 LEDs, which is ACKed by the DT maintainers albeit not yet merged in the LED tree.
---
Linus Walleij (8):
ARM: dts: bcm6846: Add iproc rng
ARM: dts: bcm6846: Enable watchdog
ARM: dts: bcm6846: Add GPIO blocks
ARM: dts: bcm6846: Add MDIO control block
ARM: dts: bcm6846: Add LED controller
dt-bindings: vendor-prefixes: Add Genexis
dt-bindings: arm: bcmbca: Add Genexis XG6846B
ARM: dts: broadcom: Add Genexis XG6846B DTS file
.../devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + arch/arm/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm6846-genexis-xg6846b.dts | 244 +++++++++++++++++++++ arch/arm/boot/dts/broadcom/bcm6846.dtsi | 107 +++++++++ 5 files changed, 355 insertions(+)
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241010-genexis-xg6846b-base-ef3fbec0be01
Best regards,
Signature · 1 line
Linus Walleij <[email protected]>
PATCH 1/8 ARM: dts: bcm6846: Add iproc rng
The bcm6846 has a standard iproc 200 RNG which is already fully supported by bindings, so just add it to the DTS file.
--- arch/arm/boot/dts/broadcom/bcm6846.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/broadcom/bcm6846.dtsi +5 -0
@@ -108,6 +108,11 @@ uart0: serial@640 { status = "disabled"; }; + rng@b80 { + compatible = "brcm,iproc-rng200"; + reg = <0xb80 0x28>; + }; + hsspi: spi@1000 { #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.46.2
PATCH 2/8 ARM: dts: bcm6846: Enable watchdog
In reply to Linus WalleijThe BCM6846 has a BCM7038-compatible watchdog timer, just add it to the device tree.
--- arch/arm/boot/dts/broadcom/bcm6846.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/broadcom/bcm6846.dtsi +5 -0
@@ -99,6 +99,11 @@ bus@ff800000 { #size-cells = <1>; ranges = <0 0xff800000 0x800000>; + watchdog@480 { + compatible = "brcm,bcm6345-wdt"; + reg = <0x480 0x10>; + }; + uart0: serial@640 { compatible = "brcm,bcm6345-uart"; reg = <0x640 0x1b>;
Signature · 1 line
2.46.2
PATCH 3/8 ARM: dts: bcm6846: Add GPIO blocks
In reply to Linus WalleijThe BCM6846 has the same simplistic GPIOs as some other Broadcom SoCs: plain memory-mapped registers with up to 8 blocks of 32 GPIOs each totalling 256 GPIOs.
Users of the SoC can selectively enable the GPIO blocks actually used with a certain design.
--- arch/arm/boot/dts/broadcom/bcm6846.dtsi | 80 +++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+)
arch/arm/boot/dts/broadcom/bcm6846.dtsi +80 -0
@@ -104,6 +104,86 @@ watchdog@480 { reg = <0x480 0x10>; }; + /* GPIOs 0 .. 31 */ + gpio0: gpio@500 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x500 0x04>, <0x520 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 32 .. 63 */ + gpio1: gpio@504 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x504 0x04>, <0x524 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 64 .. 95 */ + gpio2: gpio@508 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x508 0x04>, <0x528 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 96 .. 127 */ + gpio3: gpio@50c { + compatible = "brcm,bcm6345-gpio"; + reg = <0x50c 0x04>, <0x52c 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 128 .. 159 */ + gpio4: gpio@510 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x510 0x04>, <0x530 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 160 .. 191 */ + gpio5: gpio@514 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x514 0x04>, <0x534 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 192 .. 223 */ + gpio6: gpio@518 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x518 0x04>, <0x538 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 224 .. 255 */ + gpio7: gpio@51c { + compatible = "brcm,bcm6345-gpio"; + reg = <0x51c 0x04>, <0x53c 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + uart0: serial@640 { compatible = "brcm,bcm6345-uart"; reg = <0x640 0x1b>;
Signature · 1 line
2.46.2
PATCH 4/8 ARM: dts: bcm6846: Add MDIO control block
In reply to Linus WalleijThis adds the MDIO block found in the BCM6846. The vendor tree calls it "mdio5" so we assume the right compatible for this particular version is "brcm,genet-mdio-v5".
--- arch/arm/boot/dts/broadcom/bcm6846.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/broadcom/bcm6846.dtsi +9 -0
@@ -223,5 +223,14 @@ nandcs: nand@0 { reg = <0>; }; }; + + mdio: mdio@2060 { + compatible = "brcm,genet-mdio-v5"; + reg = <0x02060 0x10>, <0x5a068 0x4>; + reg-names = "mdio", "mdio_indir_rw"; + #size-cells = <1>; + #address-cells = <0>; + status = "disabled"; + }; }; };
Signature · 1 line
2.46.2
Florian Fainelli
maintainerRe: [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block
Quoted 3 lines · Linus Walleij
This adds the MDIO block found in the BCM6846. The vendor tree calls it "mdio5" so we assume the right compatible for this particular version is "brcm,genet-mdio-v5".
That the same IP block be present on systems using GENET and BCMBCA routers, absolutely, but it is not really the same. The one present on BCM6846 has an extra pair of registers adjacent to it:
LVL_IRQ_CLEARLVL_IRQ_MASK
There are other differences like bit 13 defining a "free running" MDIO clock, that has never been present in any of the GENET or ASP variants of mdio-bcm-unimac.
Therefore an updated compatible string would be in order IMHO, thanks!
Signature · 1 line
Florian
Re: [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block
Quoted 10 lines · Florian Fainelli
Quoted 3 lines · Linus Walleij
This adds the MDIO block found in the BCM6846. The vendor tree calls it "mdio5" so we assume the right compatible for this particular version is "brcm,genet-mdio-v5".
That the same IP block be present on systems using GENET and BCMBCA routers, absolutely, but it is not really the same. The one present on BCM6846 has an extra pair of registers adjacent to it:
Quoted 8 lines
LVL_IRQ_CLEARLVL_IRQ_MASKThere are other differences like bit 13 defining a "free running" MDIO clock, that has never been present in any of the GENET or ASP variants of mdio-bcm-unimac.
Therefore an updated compatible string would be in order IMHO, thanks!
OK I fix!
Is it the same block on all the BCMBCA variants so I should call it "brcm,bcmbca-mdio" or is it bcm6846-specific so I should call it "brcm,bcm6846-mdio"?
Yours,
Linus Walleij
PATCH 5/8 ARM: dts: bcm6846: Add LED controller
In reply to Linus WalleijAdd the BCMBCA LED controller to the BCM6846 DTSI.
--- arch/arm/boot/dts/broadcom/bcm6846.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/broadcom/bcm6846.dtsi +8 -0
@@ -198,6 +198,14 @@ rng@b80 { reg = <0xb80 0x28>; }; + leds: led-controller@800 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "brcm,bcm63138-leds"; + reg = <0x800 0xdc>; + status = "disabled"; + }; + hsspi: spi@1000 { #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.46.2
PATCH 6/8 dt-bindings: vendor-prefixes: Add Genexis
In reply to Linus WalleijGenexis is Swedish/Dutch company producing broadband access equipment.
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -567,6 +567,8 @@ patternProperties: description: Gemtek Technology Co., Ltd. "^genesys,.*": description: Genesys Logic, Inc. + "^genexis,.*": + description: Genexis BV/AB "^geniatech,.*": description: Geniatech, Inc. "^giantec,.*":
Signature · 1 line
2.46.2
Re: [PATCH 6/8] dt-bindings: vendor-prefixes: Add Genexis
Quoted 9 lines · Linus Walleij
Genexis is Swedish/Dutch company producing broadband access equipment.
Link https://genexis.eu/Signed-off-by Linus Walleij <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
PATCH 7/8 dt-bindings: arm: bcmbca: Add Genexis XG6846B
In reply to Linus WalleijThis adds the device tree bindings for the Genexis XG6846B router/gateway/broadband modem.
--- Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml +1 -0
@@ -115,6 +115,7 @@ properties: items: - enum: - brcm,bcm96846 + - genexis,xg6846b - const: brcm,bcm6846 - const: brcm,bcmbca
Signature · 1 line
2.46.2
Re: [PATCH 7/8] dt-bindings: arm: bcmbca: Add Genexis XG6846B
Quoted 8 lines · Linus Walleij
This adds the device tree bindings for the Genexis XG6846B router/gateway/broadband modem.
Signed-off-by Linus Walleij <[email protected]>--- Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH 8/8 ARM: dts: broadcom: Add Genexis XG6846B DTS file
In reply to Linus WalleijThis adds a device tree for the Genexis XG6846B router.
--- arch/arm/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm6846-genexis-xg6846b.dts | 244 +++++++++++++++++++++ 2 files changed, 245 insertions(+)
arch/arm/boot/dts/broadcom/Makefile +1 -0
@@ -36,6 +36,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-zero.dtb \ bcm2835-rpi-zero-w.dtb dtb-$(CONFIG_ARCH_BCMBCA) += \ + bcm6846-genexis-xg6846b.dtb \ bcm947622.dtb \ bcm963138.dtb \ bcm963138dvt.dtb \
arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts new file +244 -0
244 lines not on this page · raw message
Signature · 1 line
2.46.2
Rob Herring (Arm)
maintainerQuoted 35 lines · Linus Walleij
This adds some silicon blocks to the BCM6846 DTSI file and adds a device tree for the Genexis XG6846B device that make use of it.
This is mainly so as to get this off my hard drive and share the basics with others who want to work on the BCM6846.
I think most of the DTSI changes can be just copied verbatim to the rest of the BCMBCA family (maybe extracted into a common
bcbca.dtsi?) but let's think about that later. This will do for now.The XG6846B device tree uses the new shift register bits property of the BCM63138 LEDs, which is ACKed by the DT maintainers albeit not yet merged in the LED tree.
Signed-off-by Linus Walleij <[email protected]>---
Linus Walleij (8):
ARM: dts: bcm6846: Add iproc rng
ARM: dts: bcm6846: Enable watchdog
ARM: dts: bcm6846: Add GPIO blocks
ARM: dts: bcm6846: Add MDIO control block
ARM: dts: bcm6846: Add LED controller
dt-bindings: vendor-prefixes: Add Genexis
dt-bindings: arm: bcmbca: Add Genexis XG6846B
ARM: dts: broadcom: Add Genexis XG6846B DTS file.../devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + arch/arm/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm6846-genexis-xg6846b.dts | 244 +++++++++++++++++++++ arch/arm/boot/dts/broadcom/bcm6846.dtsi | 107 +++++++++ 5 files changed, 355 insertions(+)
Quoted 10 lines
---
base-commit:9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241010-genexis-xg6846b-base-ef3fbec0be01Best regards,
--
Linus Walleij <[email protected]>
My bot found new DTB warnings on the .dts files added or changed in this series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:
pip3 install dtschema --upgrade
New warnings running 'make CHECK_DTBS=y broadcom/bcm6846-genexis-xg6846b.dtb' for [email protected]:
arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dtb: gpio@508: 'ngpios' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml#arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dtb: mdio@2060: #address-cells: 1 was expected
from schema $id: http://devicetree.org/schemas/net/brcm,unimac-mdio.yaml#arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dtb: mdio@2060: #size-cells: 0 was expected
from schema $id: http://devicetree.org/schemas/net/brcm,unimac-mdio.yaml#arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dtb: mdio@2060: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'ethernet-phy@1', 'ethernet-phy@2', 'ethernet-phy@21', 'ethernet-phy@3', 'ethernet-phy@4' were unexpected)
from schema $id: http://devicetree.org/schemas/net/brcm,unimac-mdio.yaml#arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dtb: mdio@2060: #address-cells: 1 was expected
from schema $id: http://devicetree.org/schemas/net/mdio.yaml#arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dtb: mdio@2060: #size-cells: 0 was expected
from schema $id: http://devicetree.org/schemas/net/mdio.yaml#