Re: [PATCH RESEND v2 1/5] dt-bindings: pci: st-pcie: PCIe controller found on STi platforms

From: Bjorn Helgaas
Date: Mon Jan 24 2022 - 15:30:00 EST


On Mon, Jan 03, 2022 at 08:47:27AM +0100, Alain Volmat wrote:
> Addition of the bindings for the Designware based PCIe controller
> that can be found on STi platforms such as STiH407, STiH410 or STiH418.
>
> Signed-off-by: Alain Volmat <avolmat@xxxxxx>
> ---
> .../devicetree/bindings/pci/snps,dw-pcie.yaml | 2 +-
> .../devicetree/bindings/pci/st,st-pcie.yaml | 112 ++++++++++++++++++
> 2 files changed, 113 insertions(+), 1 deletion(-)
> create mode 100644 Documentation/devicetree/bindings/pci/st,st-pcie.yaml
>
> diff --git a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
> index 9ed0dfba7f89..3a92078128f7 100644
> --- a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
> @@ -35,7 +35,7 @@ properties:
> maxItems: 5
> items:
> enum: [ dbi, dbi2, config, atu, app, elbi, mgmt, ctrl, parf, cfg, link,
> - ulreg, smu, mpu, apb, phy ]
> + ulreg, smu, mpu, apb, phy, mem-window ]
>
> num-lanes:
> description: |
> diff --git a/Documentation/devicetree/bindings/pci/st,st-pcie.yaml b/Documentation/devicetree/bindings/pci/st,st-pcie.yaml
> new file mode 100644
> index 000000000000..2fa686d573c3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pci/st,st-pcie.yaml
> @@ -0,0 +1,112 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pci/st,st-pcie.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: PCIe RC controller on ST STi platform
> +
> +maintainers:
> + - Alain Volmat <avolmat@xxxxxx>
> +
> +allOf:
> + - $ref: /schemas/pci/snps,dw-pcie.yaml#
> +
> +properties:
> + compatible:
> + const: st,stih407-pcie
> +
> + reg:
> + items:
> + - description: Controller control and status registers.
> + - description: PCIe configuration registers.
> + - description: Memory made available to the controller
> +
> + reg-names:
> + items:
> + - const: dbi
> + - const: config
> + - const: mem-window

I guess "mem-window" is the range for inbound DMA? Other controllers
should have similar ranges. Can we use the same DT reg names used by
other controllers instead of adding something new and STi-specific?

> + interrupts:
> + maxItems: 1
> +
> + resets:
> + items:
> + - description: Controller reset
> + - description: Powerdown reset (optional)
> + minItems: 1
> +
> + reset-names:
> + items:
> + - const: softreset
> + - const: powerdown

"softreset" and "powerdown" appear only in this binding. Are they
really unique to STi, or can we use the same names used for other
controllers?