Linux-ARM-Kernel Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus
@ 2024-04-23 11:02 Rafał Miłecki
  2024-04-23 11:02 ` [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully Rafał Miłecki
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Rafał Miłecki @ 2024-04-23 11:02 UTC (permalink / raw
  To: Florian Fainelli, Hauke Mehrtens
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, bcm-kernel-feedback-list, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

Limiting addresses to 0x18000000 + 0x100000 disallowed describing some
devices (e.g. PCIe controllers).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 146 ++++++++++++-------------
 1 file changed, 73 insertions(+), 73 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
index d0d5f7e52a91..7c8ee2df538f 100644
--- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
@@ -95,7 +95,7 @@ L2: cache-controller@22000 {
 	axi@18000000 {
 		compatible = "brcm,bus-axi";
 		reg = <0x18000000 0x1000>;
-		ranges = <0x00000000 0x18000000 0x00100000>;
+		ranges;
 		#address-cells = <1>;
 		#size-cells = <1>;
 
@@ -103,77 +103,77 @@ axi@18000000 {
 		interrupt-map-mask = <0x000fffff 0xffff>;
 		interrupt-map =
 			/* ChipCommon */
-			<0x00000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* Switch Register Access Block */
-			<0x00007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00007000 12 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18007000 12 &gic GIC_SPI 107 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>,
+			<0x18012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* PCIe Controller 1 */
-			<0x00013000 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00013000 1 &gic GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00013000 2 &gic GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00013000 3 &gic GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00013000 4 &gic GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00013000 5 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18013000 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18013000 1 &gic GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18013000 2 &gic GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18013000 3 &gic GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18013000 4 &gic GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18013000 5 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* PCIe Controller 2 */
-			<0x00014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00014000 5 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18014000 5 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* USB 2.0 Controller */
-			<0x00021000 0 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18021000 0 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* USB 3.0 Controller */
-			<0x00023000 0 &gic GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18023000 0 &gic GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* Ethernet Controller 0 */
-			<0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* Ethernet Controller 1 */
-			<0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* Ethernet Controller 2 */
-			<0x00026000 0 &gic GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18026000 0 &gic GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* Ethernet Controller 3 */
-			<0x00027000 0 &gic GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18027000 0 &gic GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
 
 			/* NAND Controller */
-			<0x00028000 0 &gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00028000 1 &gic GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00028000 2 &gic GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00028000 3 &gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00028000 4 &gic GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00028000 5 &gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00028000 6 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
-			<0x00028000 7 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
-
-		chipcommon: chipcommon@0 {
-			reg = <0x00000000 0x1000>;
+			<0x18028000 0 &gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18028000 1 &gic GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18028000 2 &gic GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18028000 3 &gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18028000 4 &gic GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18028000 5 &gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18028000 6 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+			<0x18028000 7 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+
+		chipcommon: chipcommon@18000000 {
+			reg = <0x18000000 0x1000>;
 
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -181,29 +181,29 @@ chipcommon: chipcommon@0 {
 			#interrupt-cells = <2>;
 		};
 
-		pcie0: pcie@12000 {
-			reg = <0x00012000 0x1000>;
+		pcie0: pcie@18012000 {
+			reg = <0x18012000 0x1000>;
 
 			#address-cells = <3>;
 			#size-cells = <2>;
 		};
 
-		pcie1: pcie@13000 {
-			reg = <0x00013000 0x1000>;
+		pcie1: pcie@18013000 {
+			reg = <0x18013000 0x1000>;
 
 			#address-cells = <3>;
 			#size-cells = <2>;
 		};
 
-		pcie2: pcie@14000 {
-			reg = <0x00014000 0x1000>;
+		pcie2: pcie@18014000 {
+			reg = <0x18014000 0x1000>;
 
 			#address-cells = <3>;
 			#size-cells = <2>;
 		};
 
-		usb2: usb2@21000 {
-			reg = <0x00021000 0x1000>;
+		usb2: usb2@18021000 {
+			reg = <0x18021000 0x1000>;
 
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -211,9 +211,9 @@ usb2: usb2@21000 {
 
 			interrupt-parent = <&gic>;
 
-			ehci: usb@21000 {
+			ehci: usb@18021000 {
 				compatible = "generic-ehci";
-				reg = <0x00021000 0x1000>;
+				reg = <0x18021000 0x1000>;
 				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
 				phys = <&usb2_phy>;
 
@@ -231,9 +231,9 @@ ehci_port2: port@2 {
 				};
 			};
 
-			ohci: usb@22000 {
+			ohci: usb@18022000 {
 				compatible = "generic-ohci";
-				reg = <0x00022000 0x1000>;
+				reg = <0x18022000 0x1000>;
 				interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
 
 				#address-cells = <1>;
@@ -251,8 +251,8 @@ ohci_port2: port@2 {
 			};
 		};
 
-		usb3: usb3@23000 {
-			reg = <0x00023000 0x1000>;
+		usb3: usb3@18023000 {
+			reg = <0x18023000 0x1000>;
 
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -260,9 +260,9 @@ usb3: usb3@23000 {
 
 			interrupt-parent = <&gic>;
 
-			xhci: usb@23000 {
+			xhci: usb@18023000 {
 				compatible = "generic-xhci";
-				reg = <0x00023000 0x1000>;
+				reg = <0x18023000 0x1000>;
 				interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
 				phys = <&usb3_phy>;
 				phy-names = "usb";
@@ -277,8 +277,8 @@ xhci_port1: port@1 {
 			};
 		};
 
-		gmac0: ethernet@24000 {
-			reg = <0x24000 0x800>;
+		gmac0: ethernet@18024000 {
+			reg = <0x18024000 0x800>;
 			phy-mode = "internal";
 
 			fixed-link {
@@ -287,8 +287,8 @@ fixed-link {
 			};
 		};
 
-		gmac1: ethernet@25000 {
-			reg = <0x25000 0x800>;
+		gmac1: ethernet@18025000 {
+			reg = <0x18025000 0x800>;
 			phy-mode = "internal";
 
 			fixed-link {
@@ -297,8 +297,8 @@ fixed-link {
 			};
 		};
 
-		gmac2: ethernet@26000 {
-			reg = <0x26000 0x800>;
+		gmac2: ethernet@18026000 {
+			reg = <0x18026000 0x800>;
 			phy-mode = "internal";
 
 			fixed-link {
@@ -307,7 +307,7 @@ fixed-link {
 			};
 		};
 
-		gmac3: ethernet@27000 {
+		gmac3: ethernet@18027000 {
 			reg = <0x27000 0x800>;
 		};
 	};
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
  2024-04-23 11:02 [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus Rafał Miłecki
@ 2024-04-23 11:02 ` Rafał Miłecki
  2024-04-23 11:46   ` Linus Walleij
  2024-04-23 19:03   ` Florian Fainelli
  2024-04-23 11:45 ` [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus Linus Walleij
  2024-04-23 18:59 ` Florian Fainelli
  2 siblings, 2 replies; 9+ messages in thread
From: Rafał Miłecki @ 2024-04-23 11:02 UTC (permalink / raw
  To: Florian Fainelli, Hauke Mehrtens
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, bcm-kernel-feedback-list, Rafał Miłecki,
	Arınç ÜNAL

From: Rafał Miłecki <rafal@milecki.pl>

This fixes:
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#

Cc: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
index 7c8ee2df538f..fac3e9859b3e 100644
--- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
@@ -182,22 +182,40 @@ chipcommon: chipcommon@18000000 {
 		};
 
 		pcie0: pcie@18012000 {
+			compatible = "brcm,iproc-pcie";
 			reg = <0x18012000 0x1000>;
-
+			ranges = <0x82000000 0 0x08000000 0x08000000 0 0x08000000>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0 0 0 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+			bus-range = <0x00 0xff>;
+			device_type = "pci";
+			#interrupt-cells = <1>;
 			#address-cells = <3>;
 			#size-cells = <2>;
 		};
 
 		pcie1: pcie@18013000 {
+			compatible = "brcm,iproc-pcie";
 			reg = <0x18013000 0x1000>;
-
+			ranges = <0x82000000 0 0x20000000 0x20000000 0 0x08000000>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0 0 0 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+			bus-range = <0x00 0xff>;
+			device_type = "pci";
+			#interrupt-cells = <1>;
 			#address-cells = <3>;
 			#size-cells = <2>;
 		};
 
 		pcie2: pcie@18014000 {
+			compatible = "brcm,iproc-pcie";
 			reg = <0x18014000 0x1000>;
-
+			ranges = <0x82000000 0 0x28000000 0x28000000 0 0x08000000>;
+			interrupt-map-mask = <0 0 0 0>;
+			interrupt-map = <0 0 0 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+			bus-range = <0x00 0xff>;
+			device_type = "pci";
+			#interrupt-cells = <1>;
 			#address-cells = <3>;
 			#size-cells = <2>;
 		};
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus
  2024-04-23 11:02 [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus Rafał Miłecki
  2024-04-23 11:02 ` [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully Rafał Miłecki
@ 2024-04-23 11:45 ` Linus Walleij
  2024-04-23 18:59 ` Florian Fainelli
  2 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2024-04-23 11:45 UTC (permalink / raw
  To: Rafał Miłecki
  Cc: Florian Fainelli, Hauke Mehrtens, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	bcm-kernel-feedback-list, Rafał Miłecki

On Tue, Apr 23, 2024 at 1:03 PM Rafał Miłecki <zajec5@gmail.com> wrote:

> From: Rafał Miłecki <rafal@milecki.pl>
>
> Limiting addresses to 0x18000000 + 0x100000 disallowed describing some
> devices (e.g. PCIe controllers).
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
  2024-04-23 11:02 ` [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully Rafał Miłecki
@ 2024-04-23 11:46   ` Linus Walleij
  2024-04-23 19:03   ` Florian Fainelli
  1 sibling, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2024-04-23 11:46 UTC (permalink / raw
  To: Rafał Miłecki
  Cc: Florian Fainelli, Hauke Mehrtens, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	bcm-kernel-feedback-list, Rafał Miłecki,
	Arınç ÜNAL

On Tue, Apr 23, 2024 at 1:03 PM Rafał Miłecki <zajec5@gmail.com> wrote:

> From: Rafał Miłecki <rafal@milecki.pl>
>
> This fixes:
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property
>         from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property
>         from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property
>         from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property
>         from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property
>         from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property
>         from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
>
> Cc: Arınç ÜNAL <arinc.unal@arinc9.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Looks right to me!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus
  2024-04-23 11:02 [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus Rafał Miłecki
  2024-04-23 11:02 ` [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully Rafał Miłecki
  2024-04-23 11:45 ` [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus Linus Walleij
@ 2024-04-23 18:59 ` Florian Fainelli
  2 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2024-04-23 18:59 UTC (permalink / raw
  To: Rafał Miłecki, Hauke Mehrtens
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, bcm-kernel-feedback-list, Rafał Miłecki


[-- Attachment #1.1: Type: text/plain, Size: 590 bytes --]

On 4/23/24 04:02, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Limiting addresses to 0x18000000 + 0x100000 disallowed describing some
> devices (e.g. PCIe controllers).

This might require a little more explanation, because the PCIe 
controlers are (relative to the base of the axi@18000000 node) at 
0x12000, 0x13000 and 0x14000 respectively, which are all within the 1MiB 
aperture defined from 0x18000000.

The PCIe node(s) do not currently have a "ranges" node either, so I am 
not sure what this change does besides flattening the address space?
-- 
Florian


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
  2024-04-23 11:02 ` [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully Rafał Miłecki
  2024-04-23 11:46   ` Linus Walleij
@ 2024-04-23 19:03   ` Florian Fainelli
  2024-04-24  6:43     ` Rafał Miłecki
  1 sibling, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2024-04-23 19:03 UTC (permalink / raw
  To: Rafał Miłecki, Hauke Mehrtens
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, bcm-kernel-feedback-list, Rafał Miłecki,
	Arınç ÜNAL


[-- Attachment #1.1: Type: text/plain, Size: 2045 bytes --]

On 4/23/24 04:02, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This fixes:
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property
>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property
>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property
>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property
>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property
>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property
>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
> 
> Cc: Arınç ÜNAL <arinc.unal@arinc9.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

OK, so this is the rationale for patch #1, because you are adding a 
'ranges' property to each PCIe root complex node, and you need the 
values in the 'ranges' property to be expressed relative to the global 
address space, and not the axi@18000000 address space, you needed to 
flatten the axi@18000000 range.

Why not just bring those 3 nodes out of the axi@18000000 node into the 
global address space then? That would greatly limit the amount of 
changes in patch #1, some of which are just unfortunate noise.

 From the chip diagram, each PCIe controller has its own separate AXI 
interface to the NIC 301 AXI fabric, so having 3 independent nodes which 
are not tied to the axi@18000000 would not be wrong IMHO.

Thanks for doing this!
-- 
Florian


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
  2024-04-23 19:03   ` Florian Fainelli
@ 2024-04-24  6:43     ` Rafał Miłecki
  2024-04-24 16:57       ` Florian Fainelli
  0 siblings, 1 reply; 9+ messages in thread
From: Rafał Miłecki @ 2024-04-24  6:43 UTC (permalink / raw
  To: Florian Fainelli, Hauke Mehrtens
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, bcm-kernel-feedback-list, Rafał Miłecki,
	Arınç ÜNAL

On 23.04.2024 21:03, Florian Fainelli wrote:
> On 4/23/24 04:02, Rafał Miłecki wrote:
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> This fixes:
>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'device_type' is a required property
>>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 'ranges' is a required property
>>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'device_type' is a required property
>>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 'ranges' is a required property
>>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'device_type' is a required property
>>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 'ranges' is a required property
>>          from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
>>
>> Cc: Arınç ÜNAL <arinc.unal@arinc9.com>
>> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> 
> OK, so this is the rationale for patch #1, because you are adding a 'ranges' property to each PCIe root complex node, and you need the values in the 'ranges' property to be expressed relative to the global address space, and not the axi@18000000 address space, you needed to flatten the axi@18000000 range.
> 
> Why not just bring those 3 nodes out of the axi@18000000 node into the global address space then? That would greatly limit the amount of changes in patch #1, some of which are just unfortunate noise.
> 
>  From the chip diagram, each PCIe controller has its own separate AXI interface to the NIC 301 AXI fabric, so having 3 independent nodes which are not tied to the axi@18000000 would not be wrong IMHO.

I got impression that memory mapped blocks should preferably go into a
"soc" node. It's what I seen in some other platforms and what is also
present (thought not directly documented) in the dts-coding-style.rst .

We don't have "soc" node but "axi@18000000" seems like our substitute.

So I thought we should keep PCIe controllers nodes in axi@ (soc@).

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
  2024-04-24  6:43     ` Rafał Miłecki
@ 2024-04-24 16:57       ` Florian Fainelli
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2024-04-24 16:57 UTC (permalink / raw
  To: Rafał Miłecki, Hauke Mehrtens, Krzysztof Kozlowski
  Cc: Rob Herring, Conor Dooley, linux-arm-kernel, devicetree,
	bcm-kernel-feedback-list, Rafał Miłecki,
	Arınç ÜNAL


[-- Attachment #1.1: Type: text/plain, Size: 3148 bytes --]

On 4/23/24 23:43, Rafał Miłecki wrote:
> On 23.04.2024 21:03, Florian Fainelli wrote:
>> On 4/23/24 04:02, Rafał Miłecki wrote:
>>> From: Rafał Miłecki <rafal@milecki.pl>
>>>
>>> This fixes:
>>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 
>>> 'device_type' is a required property
>>>          from schema $id: 
>>> http://devicetree.org/schemas/pci/pci-bus.yaml#
>>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000: 
>>> 'ranges' is a required property
>>>          from schema $id: 
>>> http://devicetree.org/schemas/pci/pci-bus.yaml#
>>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 
>>> 'device_type' is a required property
>>>          from schema $id: 
>>> http://devicetree.org/schemas/pci/pci-bus.yaml#
>>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000: 
>>> 'ranges' is a required property
>>>          from schema $id: 
>>> http://devicetree.org/schemas/pci/pci-bus.yaml#
>>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 
>>> 'device_type' is a required property
>>>          from schema $id: 
>>> http://devicetree.org/schemas/pci/pci-bus.yaml#
>>> arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000: 
>>> 'ranges' is a required property
>>>          from schema $id: 
>>> http://devicetree.org/schemas/pci/pci-bus.yaml#
>>>
>>> Cc: Arınç ÜNAL <arinc.unal@arinc9.com>
>>> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>>
>> OK, so this is the rationale for patch #1, because you are adding a 
>> 'ranges' property to each PCIe root complex node, and you need the 
>> values in the 'ranges' property to be expressed relative to the global 
>> address space, and not the axi@18000000 address space, you needed to 
>> flatten the axi@18000000 range.
>>
>> Why not just bring those 3 nodes out of the axi@18000000 node into the 
>> global address space then? That would greatly limit the amount of 
>> changes in patch #1, some of which are just unfortunate noise.
>>
>>  From the chip diagram, each PCIe controller has its own separate AXI 
>> interface to the NIC 301 AXI fabric, so having 3 independent nodes 
>> which are not tied to the axi@18000000 would not be wrong IMHO.
> 
> I got impression that memory mapped blocks should preferably go into a
> "soc" node. It's what I seen in some other platforms and what is also
> present (thought not directly documented) in the dts-coding-style.rst .
> 
> We don't have "soc" node but "axi@18000000" seems like our substitute.
> 
> So I thought we should keep PCIe controllers nodes in axi@ (soc@).

PCIe Host Bridges are sort of special because they are bridges but also 
have a configuration interface via the MMIO register space. Tying them 
to a particular bus node in the .dts(i) that accurately describes how 
they are interfaced to the host CPU might be a tad difficult sometimes.

My preference as a maintainer would be to minimize the amount of node(s) 
being changed and just isolate the 3 PCIe host bridges directly under 
the root node.

Krysztof, any objection to that?
-- 
Florian


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully
  2024-04-30 23:07 [PATCH 0/2] ARM: dts: BCM5301X: Fix PCIe controller warnings Florian Fainelli
@ 2024-04-30 23:07 ` Florian Fainelli
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2024-04-30 23:07 UTC (permalink / raw
  To: linux-arm-kernel
  Cc: Rafał Miłecki, Arınç ÜNAL,
	Florian Fainelli, Hauke Mehrtens, Rafał Miłecki,
	Broadcom internal kernel review list, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

From: Rafał Miłecki <rafal@milecki.pl>

This fixes:
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000:
'device_type' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18012000:
'ranges' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000:
'device_type' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18013000:
'ranges' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000:
'device_type' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#
arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dtb: pcie@18014000:
'ranges' is a required property
        from schema $id: http://devicetree.org/schemas/pci/pci-bus.yaml#

Cc: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[florian: Make it apply to the relocated PCIe node(s)]
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
index 8f69da8d18c2..b6fc4e4bba8d 100644
--- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
@@ -474,22 +474,40 @@ usb3_dmp: syscon@18105000 {
 	};
 
 	pcie0: pcie@18012000 {
+		compatible = "brcm,iproc-pcie";
 		reg = <0x18012000 0x1000>;
-
+		ranges = <0x82000000 0 0x08000000 0x08000000 0 0x08000000>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+		bus-range = <0x00 0xff>;
+		device_type = "pci";
+		#interrupt-cells = <1>;
 		#address-cells = <3>;
 		#size-cells = <2>;
 	};
 
 	pcie1: pcie@18013000 {
+		compatible = "brcm,iproc-pcie";
 		reg = <0x18013000 0x1000>;
-
+		ranges = <0x82000000 0 0x20000000 0x20000000 0 0x08000000>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+		bus-range = <0x00 0xff>;
+		device_type = "pci";
+		#interrupt-cells = <1>;
 		#address-cells = <3>;
 		#size-cells = <2>;
 	};
 
 	pcie2: pcie@18014000 {
+		compatible = "brcm,iproc-pcie";
 		reg = <0x18014000 0x1000>;
-
+		ranges = <0x82000000 0 0x28000000 0x28000000 0 0x08000000>;
+		interrupt-map-mask = <0 0 0 0>;
+		interrupt-map = <0 0 0 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+		bus-range = <0x00 0xff>;
+		device_type = "pci";
+		#interrupt-cells = <1>;
 		#address-cells = <3>;
 		#size-cells = <2>;
 	};
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2024-04-30 23:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23 11:02 [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus Rafał Miłecki
2024-04-23 11:02 ` [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully Rafał Miłecki
2024-04-23 11:46   ` Linus Walleij
2024-04-23 19:03   ` Florian Fainelli
2024-04-24  6:43     ` Rafał Miłecki
2024-04-24 16:57       ` Florian Fainelli
2024-04-23 11:45 ` [PATCH 1/2] ARM: dts: BCM5301X: Drop ranges mapping from AXI bus Linus Walleij
2024-04-23 18:59 ` Florian Fainelli
  -- strict thread matches above, loose matches on Subject: below --
2024-04-30 23:07 [PATCH 0/2] ARM: dts: BCM5301X: Fix PCIe controller warnings Florian Fainelli
2024-04-30 23:07 ` [PATCH 2/2] ARM: dts: BCM5301X: Describe PCIe controllers fully Florian Fainelli

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 read-only IMAP folder(s) and NNTP newsgroup(s).