linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Ray Jui <rjui@broadcom.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Grant Likely <grant.likely@linaro.org>,
	Christian Daudt <bcm@fixthebug.org>,
	Matt Porter <mporter@linaro.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Scott Branden <sbranden@broadcom.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	bcm-kernel-feedback-list@broadcom.com,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/4] pci: iProc: define Broadcom iProc PCIe binding
Date: Wed, 10 Dec 2014 11:30:27 +0100	[thread overview]
Message-ID: <1418207427.7616.5.camel@pengutronix.de> (raw)
In-Reply-To: <1418169871-19232-2-git-send-email-rjui@broadcom.com>

Am Dienstag, den 09.12.2014, 16:04 -0800 schrieb Ray Jui:
> Document the PCIe device tree binding for Broadcom iProc family of SoCs
> 
> Signed-off-by: Ray Jui <rjui@broadcom.com>
> Reviewed-by: Scott Branden <sbranden@broadcom.com>
> ---
>  .../devicetree/bindings/pci/brcm,iproc-pcie.txt    |   62 ++++++++++++++++++++
>  1 file changed, 62 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
> 
> diff --git a/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
> new file mode 100644
> index 0000000..2467628
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
> @@ -0,0 +1,62 @@
> +* Broadcom iProc PCIe controller
> +
> +Required properties:
> +- compatible: Must be "brcm,iproc-pcie"
> +- reg: base address and length of the PCIe controller and the MDIO interface
> +  that controls the PCIe PHY
> +- interrupts: interrupt IDs
> +- bus-range: PCI bus numbers covered
> +- #address-cells: set to <3>
> +- #size-cells: set to <2>
> +- device_type: set to "pci"
> +- ranges: ranges for the PCI memory and I/O regions
> +- phy-addr: MDC/MDIO adddress of the PCIe PHY
> +- have-msi-inten-reg: Required for legacy iProc PCIe controllers that need the
> +  MSI interrupt enable register to be set explicitly
> +
> +The Broadcom iProc PCie driver adapts the multi-domain structure, i.e., each
> +interface has its own domain and therefore has its own device node
> +Example:
> +
> +SoC specific DT Entry:
> +
> +	pcie0: pcie@18012000 {
> +		compatible = "brcm,iproc-pcie";
> +		reg = <0x18012000 0x1000>,
> +			<0x18002000 0x1000>;
> +		interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 97 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 98 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 99 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 100 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 101 IRQ_TYPE_NONE>;

This is missing the interrupt-map and interrupt-map-mask for the legacy
INTx interrupts. If you add this you don't need to have a special map
function in your driver, but can just use the standard
of_irq_parse_and_map_pci() function.

Regards,
Lucas

> +		bus-range = <0x00 0xFF>;
> +
> +		#address-cells = <3>;
> +		#size-cells = <2>;
> +		device_type = "pci";
> +		ranges = <0x81000000 0 0	  0x28000000 0 0x00010000   /* downstream I/O */
> +			  0x82000000 0 0x20000000 0x20000000 0 0x04000000>; /* non-prefetchable memory */
> +		phy-addr = <5>;
> +	};
> +
> +	pcie1: pcie@18013000 {
> +		compatible = "brcm,iproc-pcie";
> +		reg = <0x18013000 0x1000>,
> +			<0x18002000 0x1000>;
> +
> +		interrupts = <GIC_SPI 102 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 103 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 104 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 105 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 106 IRQ_TYPE_NONE>,
> +			     <GIC_SPI 107 IRQ_TYPE_NONE>;
> +		bus-range = <0x00 0xFF>;
> +
> +		#address-cells = <3>;
> +		#size-cells = <2>;
> +		device_type = "pci";
> +		ranges = <0x81000000 0 0	  0x48000000 0 0x00010000   /* downstream I/O */
> +			  0x82000000 0 0x40000000 0x40000000 0 0x04000000>; /* non-prefetchable memory */
> +		phy-addr = <6>;
> +	};

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |


  reply	other threads:[~2014-12-10 10:30 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Ray Jui <rjui@broadcom.com>
2014-12-10  0:04 ` [PATCH 0/4] Add PCIe support to Broadcom iProc Ray Jui
2014-12-10  0:04   ` [PATCH 1/4] pci: iProc: define Broadcom iProc PCIe binding Ray Jui
2014-12-10 10:30     ` Lucas Stach [this message]
2014-12-11  1:37       ` Ray Jui
2014-12-10  0:04   ` [PATCH 2/4] PCI: iproc: Add Broadcom iProc PCIe driver Ray Jui
2014-12-10 11:31     ` Arnd Bergmann
2014-12-10 16:46       ` Scott Branden
2014-12-10 18:46         ` Florian Fainelli
2014-12-10 20:26           ` Hauke Mehrtens
2014-12-10 20:40             ` Ray Jui
2014-12-11  9:44           ` Arend van Spriel
2014-12-10  0:04   ` [PATCH 3/4] ARM: mach-bcm: Enable PCIe support for iProc Ray Jui
2014-12-10  0:04   ` [PATCH 4/4] ARM: dts: enable PCIe for Broadcom Cygnus Ray Jui
2014-12-12  2:36 ` [PATCH v2 0/4] Add PCIe support to Broadcom iProc Ray Jui
2014-12-12  2:36   ` [PATCH v2 1/4] pci: iProc: define Broadcom iProc PCIe binding Ray Jui
2014-12-12 12:14     ` Arnd Bergmann
2014-12-12 16:53       ` Ray Jui
2014-12-12 17:14         ` Arnd Bergmann
2014-12-13 10:05           ` Arend van Spriel
2014-12-13 19:46             ` Arnd Bergmann
2014-12-14  9:48               ` Arend van Spriel
2014-12-14 16:29                 ` Arnd Bergmann
2014-12-12  2:36   ` [PATCH v2 2/4] PCI: iproc: Add Broadcom iProc PCIe driver Ray Jui
2014-12-12 12:29     ` Arnd Bergmann
2014-12-12 17:08       ` Ray Jui
2014-12-12 17:21         ` Arnd Bergmann
2014-12-15 19:16           ` Ray Jui
2014-12-15 21:37             ` Arnd Bergmann
2014-12-16  0:28               ` Ray Jui
2014-12-12  2:36   ` [PATCH v2 3/4] ARM: mach-bcm: Enable PCIe support for iProc Ray Jui
2014-12-12 12:15     ` Arnd Bergmann
2014-12-12 16:56       ` Ray Jui
2014-12-12 17:02         ` Arnd Bergmann
2014-12-12 17:09           ` Ray Jui
2014-12-12  2:36   ` [PATCH v2 4/4] ARM: dts: enable PCIe for Broadcom Cygnus Ray Jui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418207427.7616.5.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bcm@fixthebug.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mporter@linaro.org \
    --cc=pawel.moll@arm.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).