devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] ARM: dts: Add some BCM6846 device tree
@ 2024-10-10 22:06 Linus Walleij
  2024-10-10 22:06 ` [PATCH 1/8] ARM: dts: bcm6846: Add iproc rng Linus Walleij
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:06 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, 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 <linus.walleij@linaro.org>
---
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,
-- 
Linus Walleij <linus.walleij@linaro.org>


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

* [PATCH 1/8] ARM: dts: bcm6846: Add iproc rng
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
@ 2024-10-10 22:06 ` Linus Walleij
  2024-10-10 22:07 ` [PATCH 2/8] ARM: dts: bcm6846: Enable watchdog Linus Walleij
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:06 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, Linus Walleij

The bcm6846 has a standard iproc 200 RNG which is already
fully supported by bindings, so just add it to the DTS file.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/broadcom/bcm6846.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/broadcom/bcm6846.dtsi b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
index ee361cb00b7c..c2a8deef150a 100644
--- a/arch/arm/boot/dts/broadcom/bcm6846.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
@@ -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>;

-- 
2.46.2


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

* [PATCH 2/8] ARM: dts: bcm6846: Enable watchdog
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
  2024-10-10 22:06 ` [PATCH 1/8] ARM: dts: bcm6846: Add iproc rng Linus Walleij
@ 2024-10-10 22:07 ` Linus Walleij
  2024-10-10 22:07 ` [PATCH 3/8] ARM: dts: bcm6846: Add GPIO blocks Linus Walleij
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:07 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, Linus Walleij

The BCM6846 has a BCM7038-compatible watchdog timer, just
add it to the device tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/broadcom/bcm6846.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/broadcom/bcm6846.dtsi b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
index c2a8deef150a..f4f1f3a06eac 100644
--- a/arch/arm/boot/dts/broadcom/bcm6846.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
@@ -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>;

-- 
2.46.2


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

* [PATCH 3/8] ARM: dts: bcm6846: Add GPIO blocks
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
  2024-10-10 22:06 ` [PATCH 1/8] ARM: dts: bcm6846: Add iproc rng Linus Walleij
  2024-10-10 22:07 ` [PATCH 2/8] ARM: dts: bcm6846: Enable watchdog Linus Walleij
@ 2024-10-10 22:07 ` Linus Walleij
  2024-10-10 22:07 ` [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block Linus Walleij
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:07 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, Linus Walleij

The 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.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/broadcom/bcm6846.dtsi | 80 +++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/arch/arm/boot/dts/broadcom/bcm6846.dtsi b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
index f4f1f3a06eac..dc0c87c79569 100644
--- a/arch/arm/boot/dts/broadcom/bcm6846.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
@@ -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>;

-- 
2.46.2


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

* [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
                   ` (2 preceding siblings ...)
  2024-10-10 22:07 ` [PATCH 3/8] ARM: dts: bcm6846: Add GPIO blocks Linus Walleij
@ 2024-10-10 22:07 ` Linus Walleij
  2024-10-10 22:11   ` Florian Fainelli
  2024-10-10 22:07 ` [PATCH 5/8] ARM: dts: bcm6846: Add LED controller Linus Walleij
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:07 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, 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".

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/broadcom/bcm6846.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/broadcom/bcm6846.dtsi b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
index dc0c87c79569..2d1c74ce79ac 100644
--- a/arch/arm/boot/dts/broadcom/bcm6846.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
@@ -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";
+		};
 	};
 };

-- 
2.46.2


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

* [PATCH 5/8] ARM: dts: bcm6846: Add LED controller
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
                   ` (3 preceding siblings ...)
  2024-10-10 22:07 ` [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block Linus Walleij
@ 2024-10-10 22:07 ` Linus Walleij
  2024-10-10 22:07 ` [PATCH 6/8] dt-bindings: vendor-prefixes: Add Genexis Linus Walleij
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:07 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, Linus Walleij

Add the BCMBCA LED controller to the BCM6846 DTSI.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/broadcom/bcm6846.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/broadcom/bcm6846.dtsi b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
index 2d1c74ce79ac..e4fe5a2f6952 100644
--- a/arch/arm/boot/dts/broadcom/bcm6846.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm6846.dtsi
@@ -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>;

-- 
2.46.2


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

* [PATCH 6/8] dt-bindings: vendor-prefixes: Add Genexis
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
                   ` (4 preceding siblings ...)
  2024-10-10 22:07 ` [PATCH 5/8] ARM: dts: bcm6846: Add LED controller Linus Walleij
@ 2024-10-10 22:07 ` Linus Walleij
  2024-10-11 14:28   ` Rob Herring (Arm)
  2024-10-10 22:07 ` [PATCH 7/8] dt-bindings: arm: bcmbca: Add Genexis XG6846B Linus Walleij
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:07 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, Linus Walleij

Genexis is Swedish/Dutch company producing broadband access
equipment.

Link: https://genexis.eu/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index b320a39de7fe..43d936361fdd 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -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,.*":

-- 
2.46.2


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

* [PATCH 7/8] dt-bindings: arm: bcmbca: Add Genexis XG6846B
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
                   ` (5 preceding siblings ...)
  2024-10-10 22:07 ` [PATCH 6/8] dt-bindings: vendor-prefixes: Add Genexis Linus Walleij
@ 2024-10-10 22:07 ` Linus Walleij
  2024-10-11 14:29   ` Rob Herring (Arm)
  2024-10-10 22:07 ` [PATCH 8/8] ARM: dts: broadcom: Add Genexis XG6846B DTS file Linus Walleij
  2024-10-14 14:05 ` [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Rob Herring (Arm)
  8 siblings, 1 reply; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:07 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, Linus Walleij

This adds the device tree bindings for the Genexis XG6846B
router/gateway/broadband modem.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml b/Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml
index 07892cbdd23c..2223234be687 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml
@@ -115,6 +115,7 @@ properties:
         items:
           - enum:
               - brcm,bcm96846
+              - genexis,xg6846b
           - const: brcm,bcm6846
           - const: brcm,bcmbca
 

-- 
2.46.2


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

* [PATCH 8/8] ARM: dts: broadcom: Add Genexis XG6846B DTS file
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
                   ` (6 preceding siblings ...)
  2024-10-10 22:07 ` [PATCH 7/8] dt-bindings: arm: bcmbca: Add Genexis XG6846B Linus Walleij
@ 2024-10-10 22:07 ` Linus Walleij
  2024-10-14 14:05 ` [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Rob Herring (Arm)
  8 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2024-10-10 22:07 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Florian Fainelli,
	Rafał Miłecki, Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel, Linus Walleij

This adds a device tree for the Genexis XG6846B router.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/broadcom/Makefile                |   1 +
 .../boot/dts/broadcom/bcm6846-genexis-xg6846b.dts  | 244 +++++++++++++++++++++
 2 files changed, 245 insertions(+)

diff --git a/arch/arm/boot/dts/broadcom/Makefile b/arch/arm/boot/dts/broadcom/Makefile
index 5881bcc95eba..d23cf466127b 100644
--- a/arch/arm/boot/dts/broadcom/Makefile
+++ b/arch/arm/boot/dts/broadcom/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts b/arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts
new file mode 100644
index 000000000000..a3616fb7b3a8
--- /dev/null
+++ b/arch/arm/boot/dts/broadcom/bcm6846-genexis-xg6846b.dts
@@ -0,0 +1,244 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2024 Linus Walleij <linus.walleij@linaro.org>
+ */
+
+/dts-v1/;
+
+#include "bcm6846.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Genexis XG6846B Ethernet layer 2/3 router";
+	compatible = "genexis,xg6846b", "brcm,bcm6846", "brcm,bcmbca";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	/* Micron D9PTK 256 MB RAM */
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x10000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		secondary-boot@0 {
+			no-map;
+			reg = <0x00000000 0x00008000>;
+		};
+		pmc3-firmware@8000 {
+			no-map;
+			reg = <0x00008000 0x00100000>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <20000>;
+
+		/* Called "canyon rescue button" in the vendor DTB */
+		button-restart {
+			label = "Reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio0 41 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&gpio0 {
+	status = "okay";
+};
+
+&gpio1 {
+	status = "okay";
+};
+
+&gpio2 {
+	status = "okay";
+	/* Totally 79 GPIOs are available */
+	ngpios = <15>;
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&leds {
+	status = "okay";
+	brcm,serial-shift-bits = <16>;
+
+	led@0 {
+		reg = <0>;
+		active-low;
+		function = "ext";
+		color = <LED_COLOR_ID_GREEN>;
+	};
+
+	led@1 {
+		reg = <1>;
+		active-low;
+		function = "ext";
+		color = <LED_COLOR_ID_AMBER>;
+	};
+
+	led@3 {
+		reg = <3>;
+		active-low;
+		function = LED_FUNCTION_WAN;
+		color = <LED_COLOR_ID_AMBER>;
+	};
+
+	led@4 {
+		reg = <4>;
+		active-low;
+		function = LED_FUNCTION_WAN;
+		color = <LED_COLOR_ID_GREEN>;
+	};
+
+	led@5 {
+		reg = <5>;
+		active-low;
+		function = LED_FUNCTION_POWER;
+		color = <LED_COLOR_ID_GREEN>;
+	};
+
+	led@6 {
+		reg = <6>;
+		active-low;
+		function = LED_FUNCTION_POWER;
+		color = <LED_COLOR_ID_RED>;
+	};
+
+	led@15 {
+		reg = <15>;
+		active-low;
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_GREEN>;
+	};
+
+	led@7 {
+		/* Activity 03 */
+		reg = <7>;
+		active-low;
+		function = "lan1";
+		color = <LED_COLOR_ID_AMBER>;
+	};
+
+	led@8 {
+		/* Activity 04 */
+		reg = <8>;
+		active-low;
+		function = "lan1";
+		color = <LED_COLOR_ID_GREEN>;
+	};
+
+	led@9 {
+		/* Activity 03 */
+		reg = <9>;
+		active-low;
+		function = "lan2";
+		color = <LED_COLOR_ID_AMBER>;
+	};
+
+	led@10 {
+		/* Activity 04 */
+		reg = <10>;
+		active-low;
+		function = "lan2";
+		color = <LED_COLOR_ID_GREEN>;
+	};
+
+	led@11 {
+		/* Activity 03 */
+		reg = <11>;
+		active-low;
+		function = "lan3";
+		color = <LED_COLOR_ID_AMBER>;
+	};
+
+	led@12 {
+		/* Activity 04 */
+		reg = <12>;
+		active-low;
+		function = "lan3";
+		color = <LED_COLOR_ID_GREEN>;
+	};
+
+	led@13 {
+		/* Activity 03 */
+		reg = <13>;
+		active-low;
+		function = "lan4";
+		color = <LED_COLOR_ID_AMBER>;
+	};
+
+	led@14 {
+		/* Activity 04 */
+		reg = <14>;
+		active-low;
+		function = "lan4";
+		color = <LED_COLOR_ID_GREEN>;
+	};
+};
+
+&hsspi {
+	status = "okay";
+};
+
+&nand_controller {
+	brcm,wp-not-connected;
+	status = "okay";
+};
+
+&nandcs {
+	nand-on-flash-bbt;
+	brcm,nand-ecc-use-strap;
+
+	/* Winbond W29N02GV, 256MB with 128KB erase blocks */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		loader@0 {
+			label = "loader";
+			reg = <0x00000000 0x00400000>;
+		};
+		image@400000 {
+			label = "image";
+			reg = <0x00400000 0x0fb00000>;
+		};
+		/* 0x00ff0000-0x00ffffff: bad block list */
+	};
+};
+
+&mdio {
+	status = "okay";
+
+	phy1: ethernet-phy@1 {
+		reg = <1>;
+	};
+	phy2: ethernet-phy@2 {
+		reg = <2>;
+	};
+	phy3: ethernet-phy@3 {
+		reg = <3>;
+	};
+	phy4: ethernet-phy@4 {
+		reg = <4>;
+	};
+	phy21: ethernet-phy@21 {
+		reg = <21>;
+	};
+};

-- 
2.46.2


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

* Re: [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block
  2024-10-10 22:07 ` [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block Linus Walleij
@ 2024-10-10 22:11   ` Florian Fainelli
  2024-10-11  6:55     ` Linus Walleij
  0 siblings, 1 reply; 14+ messages in thread
From: Florian Fainelli @ 2024-10-10 22:11 UTC (permalink / raw)
  To: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	William Zhang, Anand Gore, Kursad Oney, Rafał Miłecki,
	Broadcom internal kernel review list
  Cc: devicetree, linux-arm-kernel

On 10/10/24 15:07, Linus Walleij wrote:
> 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_CLEAR
LVL_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!
-- 
Florian

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

* Re: [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block
  2024-10-10 22:11   ` Florian Fainelli
@ 2024-10-11  6:55     ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2024-10-11  6:55 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, William Zhang,
	Anand Gore, Kursad Oney, Rafał Miłecki,
	Broadcom internal kernel review list, devicetree,
	linux-arm-kernel

On Fri, Oct 11, 2024 at 12:11 AM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
> On 10/10/24 15:07, Linus Walleij wrote:

> > 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_CLEAR
> LVL_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!

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

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

* Re: [PATCH 6/8] dt-bindings: vendor-prefixes: Add Genexis
  2024-10-10 22:07 ` [PATCH 6/8] dt-bindings: vendor-prefixes: Add Genexis Linus Walleij
@ 2024-10-11 14:28   ` Rob Herring (Arm)
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2024-10-11 14:28 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Conor Dooley, Krzysztof Kozlowski, William Zhang,
	Florian Fainelli, Broadcom internal kernel review list,
	Kursad Oney, devicetree, linux-arm-kernel, Anand Gore,
	Rafał Miłecki


On Fri, 11 Oct 2024 00:07:04 +0200, Linus Walleij wrote:
> Genexis is Swedish/Dutch company producing broadband access
> equipment.
> 
> Link: https://genexis.eu/
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH 7/8] dt-bindings: arm: bcmbca: Add Genexis XG6846B
  2024-10-10 22:07 ` [PATCH 7/8] dt-bindings: arm: bcmbca: Add Genexis XG6846B Linus Walleij
@ 2024-10-11 14:29   ` Rob Herring (Arm)
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2024-10-11 14:29 UTC (permalink / raw)
  To: Linus Walleij
  Cc: devicetree, Conor Dooley, Florian Fainelli, William Zhang,
	Anand Gore, Rafał Miłecki, Krzysztof Kozlowski,
	Kursad Oney, Broadcom internal kernel review list,
	linux-arm-kernel


On Fri, 11 Oct 2024 00:07:05 +0200, Linus Walleij wrote:
> This adds the device tree bindings for the Genexis XG6846B
> router/gateway/broadband modem.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH 0/8] ARM: dts: Add some BCM6846 device tree
  2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
                   ` (7 preceding siblings ...)
  2024-10-10 22:07 ` [PATCH 8/8] ARM: dts: broadcom: Add Genexis XG6846B DTS file Linus Walleij
@ 2024-10-14 14:05 ` Rob Herring (Arm)
  8 siblings, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2024-10-14 14:05 UTC (permalink / raw)
  To: Linus Walleij
  Cc: devicetree, Anand Gore, linux-arm-kernel, Florian Fainelli,
	Krzysztof Kozlowski, Rafał Miłecki, William Zhang,
	Kursad Oney, Conor Dooley, Broadcom internal kernel review list


On Fri, 11 Oct 2024 00:06:58 +0200, Linus Walleij wrote:
> 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 <linus.walleij@linaro.org>
> ---
> 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,
> --
> Linus Walleij <linus.walleij@linaro.org>
> 
> 
> 


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 20241011-genexis-xg6846b-base-v1-0-f04d6f6f93ce@linaro.org:

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#






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

end of thread, other threads:[~2024-10-14 14:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 22:06 [PATCH 0/8] ARM: dts: Add some BCM6846 device tree Linus Walleij
2024-10-10 22:06 ` [PATCH 1/8] ARM: dts: bcm6846: Add iproc rng Linus Walleij
2024-10-10 22:07 ` [PATCH 2/8] ARM: dts: bcm6846: Enable watchdog Linus Walleij
2024-10-10 22:07 ` [PATCH 3/8] ARM: dts: bcm6846: Add GPIO blocks Linus Walleij
2024-10-10 22:07 ` [PATCH 4/8] ARM: dts: bcm6846: Add MDIO control block Linus Walleij
2024-10-10 22:11   ` Florian Fainelli
2024-10-11  6:55     ` Linus Walleij
2024-10-10 22:07 ` [PATCH 5/8] ARM: dts: bcm6846: Add LED controller Linus Walleij
2024-10-10 22:07 ` [PATCH 6/8] dt-bindings: vendor-prefixes: Add Genexis Linus Walleij
2024-10-11 14:28   ` Rob Herring (Arm)
2024-10-10 22:07 ` [PATCH 7/8] dt-bindings: arm: bcmbca: Add Genexis XG6846B Linus Walleij
2024-10-11 14:29   ` Rob Herring (Arm)
2024-10-10 22:07 ` [PATCH 8/8] ARM: dts: broadcom: Add Genexis XG6846B DTS file Linus Walleij
2024-10-14 14:05 ` [PATCH 0/8] ARM: dts: Add some BCM6846 device tree 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;
as well as URLs for NNTP newsgroup(s).