diff mbox series

[1/3] PCI: brcmstb: Enable ARCH_BRCMSTB

Message ID 20200213025930.27943-2-jaedon.shin@gmail.com
State New
Headers show
Series PCI: brcmstb: Add Broadcom STB support | expand

Commit Message

Jaedon Shin Feb. 13, 2020, 2:59 a.m. UTC
Add PCIe support for ARM-based Broadcom STB SoCs.

Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
---
 Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml | 8 +++++++-
 drivers/pci/controller/Kconfig                           | 2 +-
 drivers/pci/controller/pcie-brcmstb.c                    | 1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

Comments

Florian Fainelli Feb. 13, 2020, 3:58 a.m. UTC | #1
On 2/12/2020 6:59 PM, Jaedon Shin wrote:
> Add PCIe support for ARM-based Broadcom STB SoCs.
> 
> Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
> ---
>  Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml | 8 +++++++-
>  drivers/pci/controller/Kconfig                           | 2 +-
>  drivers/pci/controller/pcie-brcmstb.c                    | 1 +
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
> index 77d3e81a437b..fb1a78606f78 100644
> --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
> @@ -14,7 +14,13 @@ allOf:
>  
>  properties:
>    compatible:
> -    const: brcm,bcm2711-pcie # The Raspberry Pi 4
> +    oneOf:
> +      - description:
> +          BCM2711 based Boards
> +        const: brcm,bcm2711-pcie
> +      - description:
> +          ARM-based BCM7XXX Broadcom STB Boards
> +        const: brcm,bcm7445-pcie

You would also need to document the regulator properties as optional here.

>  
>    reg:
>      maxItems: 1
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 20bf00f587bd..c60a27cff81a 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -254,7 +254,7 @@ config VMD
>  
>  config PCIE_BRCMSTB
>  	tristate "Broadcom Brcmstb PCIe host controller"
> -	depends on ARCH_BCM2835 || COMPILE_TEST
> +	depends on ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST

This part looks entirely reasonable.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
index 77d3e81a437b..fb1a78606f78 100644
--- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
@@ -14,7 +14,13 @@  allOf:
 
 properties:
   compatible:
-    const: brcm,bcm2711-pcie # The Raspberry Pi 4
+    oneOf:
+      - description:
+          BCM2711 based Boards
+        const: brcm,bcm2711-pcie
+      - description:
+          ARM-based BCM7XXX Broadcom STB Boards
+        const: brcm,bcm7445-pcie
 
   reg:
     maxItems: 1
diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 20bf00f587bd..c60a27cff81a 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -254,7 +254,7 @@  config VMD
 
 config PCIE_BRCMSTB
 	tristate "Broadcom Brcmstb PCIe host controller"
-	depends on ARCH_BCM2835 || COMPILE_TEST
+	depends on ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST
 	depends on OF
 	depends on PCI_MSI_IRQ_DOMAIN
 	help
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index d20aabc26273..34581a6a7313 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -996,6 +996,7 @@  static int brcm_pcie_probe(struct platform_device *pdev)
 
 static const struct of_device_id brcm_pcie_match[] = {
 	{ .compatible = "brcm,bcm2711-pcie" },
+	{ .compatible = "brcm,bcm7445-pcie" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, brcm_pcie_match);