mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanimir Varbanov <svarbanov@suse.de>
To: Rob Herring <robh@kernel.org>, Stanimir Varbanov <svarbanov@suse.de>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Jim Quinlan <jim2101024@gmail.com>,
	Nicolas Saenz Julienne <nsaenz@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	kw@linux.com, Philipp Zabel <p.zabel@pengutronix.de>,
	Andrea della Porta <andrea.porta@suse.com>,
	Phil Elwell <phil@raspberrypi.com>,
	Jonathan Bell <jonathan@raspberrypi.com>
Subject: Re: [PATCH 1/7] dt-bindings: interrupt-controller: Add bcm2712 MSI-X DT bindings
Date: Fri, 19 Jul 2024 19:22:22 +0300	[thread overview]
Message-ID: <82472066-56a5-4f4f-8034-cf3a7afc206e@suse.de> (raw)
In-Reply-To: <20240628220521.GA274493-robh@kernel.org>

Hi Rob,

Thank you for the comments!

On 6/29/24 01:05, Rob Herring wrote:
> On Wed, Jun 26, 2024 at 01:45:38PM +0300, Stanimir Varbanov wrote:
>> Adds DT bindings for bcm2712 MSI-X interrupt peripheral controller.
>>
>> Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
>> ---
>>  .../brcm,bcm2712-msix.yaml                    | 74 +++++++++++++++++++
>>  1 file changed, 74 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
>> new file mode 100644
>> index 000000000000..ca610e4467d9
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
>> @@ -0,0 +1,74 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/interrupt-controller/brcm,bcm2712-msix.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Broadcom bcm2712 MSI-X Interrupt Peripheral support
>> +
>> +maintainers:
>> +  - Stanimir Varbanov <svarbanov@suse.de>
>> +
>> +description: >
>> +  This interrupt controller is used to provide intterupt vectors to the
> 
> typo

Will fix it.

> 
>> +  generic interrupt controller (GIC) on bcm2712. It will be used as
>> +  external MSI-X controller for PCIe root complex.
>> +
>> +allOf:
>> +  - $ref: /schemas/interrupt-controller/msi-controller.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    items:
>> +      - enum:
>> +          - "brcm,bcm2712-mip-intc"
> 
> Don't need quotes. Nor 'items'. And enum can be 'const' 

OK.

> 
>> +  reg:
>> +    maxItems: 1
>> +    description: >
>> +      Specifies the base physical address and size of the registers
> 
> drop. That's *every* reg property.

OK.

> 
>> +
>> +  interrupt-controller: true
>> +
>> +  "#interrupt-cells":
>> +    const: 2
>> +
>> +  msi-controller: true
> 
> Add #msi-cells. The default is 0, but that's legacy.

OK.

> 
>> +
>> +  brcm,msi-base-spi:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: The SGI number that MSIs start.
>> +
>> +  brcm,msi-num-spis:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: The number of SGIs for MSIs.
>> +
>> +  brcm,msi-offset:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: Shift the allocated MSIs up by N.
> 
> If only we had a property that every MSI controller seems to need. Go 
> check msi-controller.yaml...

This exists because the second instance of MIP MSI-X
interrupt-controller (mip1) has some limitations.

Snippet from donwstream dtsi:

	brcm,msi-base-spi = <247>;
	/* Actually 20 total, but the others are
	 * both sparse and non-consecutive
	 */
	brcm,msi-num-spis = <8>;
	brcm,msi-offset = <8>;
	brcm,msi-pci-addr = <0xff 0xffffe000>;

I don't know how to model this except private property.

> 
>> +
>> +  brcm,msi-pci-addr:
>> +    $ref: /schemas/types.yaml#/definitions/uint64
>> +    description: MSI-X message address.
> 
> Why don't other platforms need something like this?

This is a destination address for MSI mem writes from PCIe endpoint
devices, i.e. msi_msg.address filled when composing msi_msg
(irq_chip::irq_compose_msi_msg).

~Stan

> 
>> +
>> +additionalProperties: false
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupt-controller
>> +  - "#interrupt-cells"
>> +  - msi-controller
>> +
>> +examples:
>> +  - |
>> +    msi-controller@130000 {
>> +      compatible = "brcm,bcm2712-mip-intc";
>> +      reg = <0x00130000 0xc0>;
>> +      msi-controller;
>> +      interrupt-controller;
>> +      #interrupt-cells = <2>;
>> +      brcm,msi-base-spi = <128>;
>> +      brcm,msi-num-spis = <64>;
>> +      brcm,msi-offset = <0>;
>> +      brcm,msi-pci-addr = <0xff 0xfffff000>;
>> +    };
>> -- 
>> 2.43.0
>>

  reply	other threads:[~2024-07-19 16:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 10:45 [PATCH 0/7] Add PCIe support for bcm2712 Stanimir Varbanov
2024-06-26 10:45 ` [PATCH 1/7] dt-bindings: interrupt-controller: Add bcm2712 MSI-X DT bindings Stanimir Varbanov
2024-06-26 11:31   ` Florian Fainelli
2024-07-02  9:39     ` Stanimir Varbanov
2024-06-26 11:35   ` Florian Fainelli
2024-07-02  9:58     ` Stanimir Varbanov
2024-06-28 22:05   ` Rob Herring
2024-07-19 16:22     ` Stanimir Varbanov [this message]
2024-06-26 10:45 ` [PATCH 2/7] dt-bindings: PCI: brcmstb: Update bindings for PCIe on bcm2712 Stanimir Varbanov
2024-06-28 22:06   ` Rob Herring (Arm)
2024-06-26 10:45 ` [PATCH 3/7] irqchip: Add Broadcom bcm2712 MSI-X interrupt controller Stanimir Varbanov
2024-06-27 12:12   ` Thomas Gleixner
2024-07-18 15:54     ` Stanimir Varbanov
2024-06-26 10:45 ` [PATCH 4/7] PCI: brcmstb: Reuse config structure Stanimir Varbanov
2024-06-26 10:45 ` [PATCH 5/7] PCI: brcmstb: add phy_controllable flag Stanimir Varbanov
2024-06-26 15:27   ` Bjorn Helgaas
2024-06-26 10:45 ` [PATCH 6/7] PCI: brcmstb: Add bcm2712 support Stanimir Varbanov
2024-06-26 10:45 ` [PATCH 7/7] arm64: dts: broadcom: bcm2712: Add PCIe DT nodes Stanimir Varbanov
2024-06-26 11:28   ` Florian Fainelli
2024-06-26 11:31 ` [PATCH 0/7] Add PCIe support for bcm2712 Florian Fainelli
2024-07-02 10:05   ` Stanimir Varbanov

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=82472066-56a5-4f4f-8034-cf3a7afc206e@suse.de \
    --to=svarbanov@suse.de \
    --cc=andrea.porta@suse.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=jim2101024@gmail.com \
    --cc=jonathan@raspberrypi.com \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=nsaenz@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=phil@raspberrypi.com \
    --cc=robh@kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®