From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Shradha Todi <shradha.t@samsung.com>,
bhelgaas@google.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, kishon@ti.com,
vkoul@kernel.org, lpieralisi@kernel.org, kw@linux.com,
mani@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org,
alim.akhtar@samsung.com, ajaykumar.rs@samsung.com,
rcsekar@samsung.com, sriranjani.p@samsung.com,
bharat.uppal@samsung.com, s.prashar@samsung.com,
aswani.reddy@samsung.com, pankaj.dubey@samsung.com,
p.rajanbabu@samsung.com, niyas.ahmed@samsung.com,
chanho61.park@samsung.com
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org
Subject: Re: [PATCH 2/6] dt-bindings: PCI: Add PCIe controller bindings for FSD
Date: Mon, 21 Nov 2022 13:05:46 +0100 [thread overview]
Message-ID: <d728bb46-558c-67e8-c93b-96f2a6ab77a3@linaro.org> (raw)
In-Reply-To: <20221121105210.68596-3-shradha.t@samsung.com>
On 21/11/2022 11:52, Shradha Todi wrote:
> Document the PCIe controller device tree bindings for
Subject: drop second, redundant "bindings".
> Tesla FSD SoC for both RC and EP
Full stop.
>
> Signed-off-by: Shradha Todi <shradha.t@samsung.com>
> ---
> .../bindings/pci/tesla,pcie-fsd-ep.yaml | 107 ++++++++++++++++
> .../bindings/pci/tesla,pcie-fsd.yaml | 117 ++++++++++++++++++
> 2 files changed, 224 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pci/tesla,pcie-fsd-ep.yaml
> create mode 100644 Documentation/devicetree/bindings/pci/tesla,pcie-fsd.yaml
>
> diff --git a/Documentation/devicetree/bindings/pci/tesla,pcie-fsd-ep.yaml b/Documentation/devicetree/bindings/pci/tesla,pcie-fsd-ep.yaml
> new file mode 100644
> index 000000000000..07308cb9a35c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pci/tesla,pcie-fsd-ep.yaml
Filename based on compatible.
> @@ -0,0 +1,107 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pci/tesla,pcie-fsd-ep.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Synopsys DesignWare based PCIe EP controller on FSD SoCs
> +
> +maintainers:
> + - Shradha Todi <shradha.t@samsung.com>
> +
> +description: |
> + FSD PCIe EP controller is based on Synopsys DesignWare PCIe IP
> + and thus inherits all the common properties defined in
> + snps,dw-pcie-ep.yaml. The controller instance is dual mode and
> + can work in Root port mode or Endpoint mode at a time.
> +
> +allOf:
> + - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - tesla,fsd-pcie-ep
> +
> + reg:
> + items:
> + - description: controller's application logic registers
> + - description: controller's own configuration registers
> + are available.
> + - description: controller's own configuration shadow registers
> + are available.
> + - description: Map the remote Root Complex slave address space
> +
> + reg-names:
> + items:
> + - const: appl
> + - const: dbi
> + - const: dbi2
> + - const: addr_space
> +
> + clocks:
> + items:
> + - description: Auxiliary clock for PCIe
> + - description: AHB clock for PCIe dbi
> + - description: AHB clock for PCIe master
> + - description: AHB clock for PCIe slave
> +
> + clock-names:
> + items:
> + - const: aux_clk
> + - const: dbi_clk
> + - const: mstr_clk
> + - const: slv_clk
Drop "_clk" everywhere.
> +
> + interrupts:
> + items:
> + - description: Controller interrupt
> +
> + interrupt-names:
> + items:
> + - const: sub_ctrl_intr
Drop entire property.
> +
> + tesla,pcie-sysreg:
> + $ref: '/schemas/types.yaml#/definitions/phandle-array'
Drop quotes.
In the PHY patch you said it is one phandle. Here it is an array. If it
is an array, then define it properly:
https://elixir.bootlin.com/linux/v5.18-rc1/source/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml#L42
> + description: phandle for system control registers, used to
> + control signals at system level
> +
> +required:
> +
Drop blank line.
> + - compatible
> + - reg
> + - reg-names
> + - clocks
> + - clock-names
> + - ranges
> + - num-lanes
> + - tesla,pcie-sysreg
> +
> +additionalProperties: true
This must be false. Did you see such code anywhere in existing bindings?
Maybe you meant unevaluatedProperties?
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/fsd-clk.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + pcie4_ep: pcie-ep@15400000 {
> + compatible = "tesla,fsd-pcie-ep";
> + clocks = <&clock_fsys0 PCIE_SUBCTRL_INST0_AUX_CLK_SOC>,
> + <&clock_fsys0 PCIE_SUBCTRL_INST0_DBI_ACLK_SOC>,
> + <&clock_fsys0 PCIE_SUBCTRL_INST0_MSTR_ACLK_SOC>,
> + <&clock_fsys0 PCIE_SUBCTRL_INST0_SLV_ACLK_SOC>;
> + clock-names = "aux_clk", "dbi_clk", "mstr_clk", "slv_clk";
> + interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
> + interrupt-names = "sub_ctrl_intr";
> + reg = <0x15090000 0x1000>,
reg is a second property.
> + <0x15400000 0x1000>,
> + <0x15401000 0x80>,
> + <0x15800000 0xFF0000>;
Lowercase hex.
> + reg-names = "appl", "dbi", "dbi2", "addr_space";
> + num-lanes = <4>;
> + tesla,pcie-sysreg = <&sysreg_fsys0 0x434>;
> + phys = <&pcie_phy0>;
> + phy-names = "pcie_phy0";
> + status = "disabled";
No status.
> + };
> +...
> diff --git a/Documentation/devicetree/bindings/pci/tesla,pcie-fsd.yaml b/Documentation/devicetree/bindings/pci/tesla,pcie-fsd.yaml
> new file mode 100644
> index 000000000000..85648e5c7d27
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pci/tesla,pcie-fsd.yaml
All comments apply here as well.
> @@ -0,0 +1,117 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/pci/tesla,pcie-fsd.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Synopsys DesignWare based PCIe controller on FSD SoCs
> +
> +maintainers:
> + - Shradha Todi <shradha.t@samsung.com>
> +
> +description: |
> + FSD PCIe controller is based on Synopsys DesignWare PCIe IP
> + and thus inherits all the common properties defined in
> + designware-pcie.txt.
> +
> +allOf:
> + - $ref: /schemas/pci/snps,dw-pcie.yaml#
> +
> +properties:
> + compatible:
> + const: tesla,fsd-pcie
> +
> + reg:
> + items:
> + - description: controller's application logic registers
> + - description: controller's own configuration registers
> + are available.
> + - description: configuration registers
> +
> + reg-names:
> + items:
> + - const: appl
> + - const: dbi
> + - const: config
> +
> + clocks:
> + items:
> + - description: Auxiliary clock for PCIe
> + - description: AHB clock for PCIe dbi
> + - description: AHB clock for PCIe master
> + - description: AHB clock for PCIe slave
> +
> + clock-names:
> + items:
> + - const: aux_clk
> + - const: dbi_clk
> + - const: mstr_clk
> + - const: slv_clk
> +
> + interrupts:
> + minItems: 1
> + items:
> + - description: MSI interrupt
> + - description: Controller interrupt
> +
> + interrupt-names:
> + minItems: 1
> + items:
> + - const: msi
> + - const: sub_ctrl_intr
Drop "_intr"
> +
> + tesla,pcie-sysreg:
> + $ref: '/schemas/types.yaml#/definitions/phandle-array'
> + description: phandle for system control registers, used to
> + control signals at system level
> +
> +required:
> +
?
> + - compatible
> + - reg
> + - reg-names
> + - clocks
> + - clock-names
> + - ranges
> + - num-lanes
> + - tesla,pcie-sysreg
> +
> +additionalProperties: true
false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/fsd-clk.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + bus {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + pcie4_rc: pcie@15400000 {
> + compatible = "tesla,fsd-pcie";
> + clocks = <&clock_fsys0 PCIE_SUBCTRL_INST0_AUX_CLK_SOC>,
> + <&clock_fsys0 PCIE_SUBCTRL_INST0_DBI_ACLK_SOC>,
> + <&clock_fsys0 PCIE_SUBCTRL_INST0_MSTR_ACLK_SOC>,
> + <&clock_fsys0 PCIE_SUBCTRL_INST0_SLV_ACLK_SOC>;
> + clock-names = "aux_clk", "dbi_clk", "mstr_clk", "slv_clk";
> + #address-cells = <3>;
> + #size-cells = <2>;
> + dma-coherent;
> + interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
> + interrupt-names = "msi";
> + num-lanes = <4>;
> + reg = <0x0 0x15090000 0x0 0x1000>,
> + <0x0 0x15400000 0x0 0x1000>,
> + <0x0 0x15800000 0x0 0x1000>;
reg is always second. reg-names in such case third. ranges fourth.
> + reg-names = "appl", "dbi", "config";
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-11-21 12:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20221121104714epcas5p27508b91010c72117dd7116fc387b382f@epcas5p2.samsung.com>
2022-11-21 10:52 ` [PATCH 0/6] Add PCIe support for Tesla FSD SoC Shradha Todi
[not found] ` <CGME20221121104719epcas5p2f87febfba74a4ca6807b3095acf507d0@epcas5p2.samsung.com>
2022-11-21 10:52 ` [PATCH 1/6] dt-bindings: phy: Add PCIe PHY bindings for FSD Shradha Todi
2022-11-21 11:59 ` Krzysztof Kozlowski
[not found] ` <CGME20221121104725epcas5p3af00b0c717f2132f5c1ba7fd4e903e26@epcas5p3.samsung.com>
2022-11-21 10:52 ` [PATCH 2/6] dt-bindings: PCI: Add PCIe controller " Shradha Todi
2022-11-21 12:05 ` Krzysztof Kozlowski [this message]
[not found] ` <CGME20221121104731epcas5p48f96c92e5bfb4ede56ce74a78887a2f3@epcas5p4.samsung.com>
2022-11-21 10:52 ` [PATCH 3/6] PCI: dwc: fsd: Add FSD PCIe Controller driver support Shradha Todi
2022-11-21 12:07 ` Krzysztof Kozlowski
2022-11-21 23:18 ` Bjorn Helgaas
2022-11-30 18:44 ` Rob Herring
[not found] ` <CGME20221121104736epcas5p36c12ff0b575af77f8cf99811b055b339@epcas5p3.samsung.com>
2022-11-21 10:52 ` [PATCH 4/6] phy: tesla-pcie: Add PCIe PHY driver support for FSD Shradha Todi
2022-11-21 12:08 ` Krzysztof Kozlowski
[not found] ` <CGME20221121104741epcas5p31e1320bc4c0912485c1fabe52ea19988@epcas5p3.samsung.com>
2022-11-21 10:52 ` [PATCH 5/6] arm64: dts: fsd: Add PCIe support for Tesla FSD SoC Shradha Todi
2022-11-21 12:11 ` Krzysztof Kozlowski
2022-12-03 9:55 ` kernel test robot
[not found] ` <CGME20221121104746epcas5p109c7bb299cf19070a9237c00c162ed8f@epcas5p1.samsung.com>
2022-11-21 10:52 ` [PATCH 6/6] misc: pci_endpoint_test: Add driver data for FSD PCIe controllers Shradha Todi
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=d728bb46-558c-67e8-c93b-96f2a6ab77a3@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=ajaykumar.rs@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=arnd@arndb.de \
--cc=aswani.reddy@samsung.com \
--cc=bharat.uppal@samsung.com \
--cc=bhelgaas@google.com \
--cc=chanho61.park@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@ti.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=niyas.ahmed@samsung.com \
--cc=p.rajanbabu@samsung.com \
--cc=pankaj.dubey@samsung.com \
--cc=rcsekar@samsung.com \
--cc=robh+dt@kernel.org \
--cc=s.prashar@samsung.com \
--cc=shradha.t@samsung.com \
--cc=sriranjani.p@samsung.com \
--cc=vkoul@kernel.org \
/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).