From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9388C433EF for ; Mon, 28 Mar 2022 16:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HGSi97AGj6eLFGp0icqDq/rgn82LycJD/22WiEGLZk0=; b=29eEUZInHpLnIk ia/XYBmbrdOAf9yFGfX0Ax5yT/EXXIAZ4JQyEp8jibp5DxlgER3BckoPBpwLVSOCwJvuN5dmOfaPK +NTd3P6EhfZJ4aoele/NJJBIHfHjlYuyx9pvNmZthDKrA0Y42A3Gl9aspbsDkPwI+h/HuUoZ7UegC EZqsP7XVP50p3ri9Pv8GYOMmIt0JkxBRD0zrokUmTQXzcdRKXywO/paz3jEpf6M77RPXljjm6uxPy lwVW4weAkgKP9Ri+YPjQOKE0+r89G90EDFPVU2rnTqNt/odNJ0oGtSHFRoF7tuJlvCTM74jX2Gg90 0UkMyrDDtgJzrmMvdGJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYs8m-009U8V-MN; Mon, 28 Mar 2022 16:22:48 +0000 Received: from mail-ot1-f43.google.com ([209.85.210.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYs8i-009U7i-Tq for linux-arm-kernel@lists.infradead.org; Mon, 28 Mar 2022 16:22:46 +0000 Received: by mail-ot1-f43.google.com with SMTP id e25-20020a0568301e5900b005b236d5d74fso11048087otj.0 for ; Mon, 28 Mar 2022 09:22:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J1jMR9dXB4EBClhx/VkwbBtXY45OnmdTpgwd1QsgBQ0=; b=cyPt1LpPXT0NFAmFi/J2R5saC5Z8FRPDFL6cuD86AsXvKKmgBZg3rukxmrc+vAtCee w4r01NWwXz3eb8+aUsYkcOiYD2/ITQwxCDULJJj1ubb2tMoSVZBOQmoqyinzaq/E6ZIC u4Lc/T3bNkRl9rbnUhZVYZRmfzqwNPohtaqVfIQdWo1baYpAweod+k5si2KMWrfX8IAS 1hMwI+7dU5vv581TZ6l+8e4Nasf42V0l+xt08YD647RgPbuPP7pTGDhMH7Z3RL7k8Su2 dCRXmSloBRX3PjZJP7jA/uqKSpBRAElbSyWgMcOjVYprcGh8KpyJbRCqzOkSGITBoNQY 3z2g== X-Gm-Message-State: AOAM531NqTtU2mPFO8vwUubLWo8ZI0s23k0H4WNxBLOvUPm319g0TnYd 6zeX3mKXWaAwmY6MDNhp9g== X-Google-Smtp-Source: ABdhPJxrUjcZd0pzxFr4q2rWryMDDV/OHhC+GnOG4OjChVysYlaPrNdSQQtr2s79Mp1NPLmf4hpKdg== X-Received: by 2002:a05:6830:1f5b:b0:5a2:2ec7:4ea4 with SMTP id u27-20020a0568301f5b00b005a22ec74ea4mr10412065oth.206.1648484563468; Mon, 28 Mar 2022 09:22:43 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id e4-20020a056808148400b002d9be41b179sm7702224oiw.50.2022.03.28.09.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 09:22:42 -0700 (PDT) Received: (nullmailer pid 2497885 invoked by uid 1000); Mon, 28 Mar 2022 16:22:41 -0000 Date: Mon, 28 Mar 2022 11:22:41 -0500 From: Rob Herring To: Kunihiko Hayashi Cc: Bjorn Helgaas , Krzysztof Kozlowski , Masami Hiramatsu , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: PCI: uniphier: Convert uniphier-pcie.txt to json-schema Message-ID: References: <1648433498-23450-1-git-send-email-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1648433498-23450-1-git-send-email-hayashi.kunihiko@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220328_092244_994740_2FCF07EF X-CRM114-Status: GOOD ( 31.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 28, 2022 at 11:11:38AM +0900, Kunihiko Hayashi wrote: > Convert the file into a JSON description at the yaml format. > > Signed-off-by: Kunihiko Hayashi > --- > .../bindings/pci/socionext,uniphier-pcie.yaml | 100 ++++++++++++++++++ > .../devicetree/bindings/pci/uniphier-pcie.txt | 82 -------------- > MAINTAINERS | 2 +- > 3 files changed, 101 insertions(+), 83 deletions(-) > create mode 100644 Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml > delete mode 100644 Documentation/devicetree/bindings/pci/uniphier-pcie.txt > > diff --git a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml > new file mode 100644 > index 000000000000..57176f62f955 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie.yaml > @@ -0,0 +1,100 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pci/socionext,uniphier-pcie.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Socionext UniPhier PCIe host controller > + > +description: | > + UniPhier PCIe host controller is based on the Synopsys DesignWare > + PCI core. It shares common features with the PCIe DesignWare core and > + inherits common properties defined in > + Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml. > + > +maintainers: > + - Kunihiko Hayashi > + > +allOf: > + - $ref: /schemas/pci/snps,dw-pcie.yaml# > + > +properties: > + compatible: > + enum: > + - socionext,uniphier-pcie > + > + reg: > + minItems: 3 > + maxItems: 4 > + > + reg-names: > + oneOf: > + - items: > + - const: dbi > + - const: link > + - const: config > + - items: > + - const: dbi > + - const: link > + - const: config > + - const: atu You can have just the 2nd list plus 'minItems: 3' to do the same thing. > + > + clocks: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + num-viewport: true > + > + num-lanes: true > + > + phys: > + maxItems: 1 > + > + phy-names: > + const: pcie-phy > + > +required: > + - compatible > + - reg > + - reg-names > + - clocks > + - resets > + > +unevaluatedProperties: false > + > +examples: > + - | > + pcie: pcie@66000000 { > + compatible = "socionext,uniphier-pcie"; > + reg-names = "dbi", "link", "config"; > + reg = <0x66000000 0x1000>, <0x66010000 0x10000>, <0x2fff0000 0x10000>; > + #address-cells = <3>; > + #size-cells = <2>; > + clocks = <&sys_clk 24>; > + resets = <&sys_rst 24>; > + num-lanes = <1>; > + num-viewport = <1>; > + bus-range = <0x0 0xff>; > + device_type = "pci"; > + ranges = <0x81000000 0 0x00000000 0x2ffe0000 0 0x00010000>, > + <0x82000000 0 0x00000000 0x20000000 0 0x0ffe0000>; > + phy-names = "pcie-phy"; > + phys = <&pcie_phy>; > + #interrupt-cells = <1>; > + interrupt-names = "dma", "msi"; > + interrupts = <0 224 4>, <0 225 4>; > + interrupt-map-mask = <0 0 0 7>; > + interrupt-map = <0 0 0 1 &pcie_intc 0>, > + <0 0 0 2 &pcie_intc 1>, > + <0 0 0 3 &pcie_intc 2>, > + <0 0 0 4 &pcie_intc 3>; > + > + pcie_intc: legacy-interrupt-controller { > + interrupt-controller; > + #interrupt-cells = <1>; > + interrupt-parent = <&gic>; > + interrupts = <0 226 4>; > + }; > + }; > diff --git a/Documentation/devicetree/bindings/pci/uniphier-pcie.txt b/Documentation/devicetree/bindings/pci/uniphier-pcie.txt > deleted file mode 100644 > index 359585db049f..000000000000 > --- a/Documentation/devicetree/bindings/pci/uniphier-pcie.txt > +++ /dev/null > @@ -1,82 +0,0 @@ > -Socionext UniPhier PCIe host controller bindings > - > -This describes the devicetree bindings for PCIe host controller implemented > -on Socionext UniPhier SoCs. > - > -UniPhier PCIe host controller is based on the Synopsys DesignWare PCI core. > -It shares common functions with the PCIe DesignWare core driver and inherits > -common properties defined in > -Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml. > - > -Required properties: > -- compatible: Should be "socionext,uniphier-pcie". > -- reg: Specifies offset and length of the register set for the device. > - According to the reg-names, appropriate register sets are required. > -- reg-names: Must include the following entries: > - "dbi" - controller configuration registers > - "link" - SoC-specific glue layer registers > - "config" - PCIe configuration space > - "atu" - iATU registers for DWC version 4.80 or later > -- clocks: A phandle to the clock gate for PCIe glue layer including > - the host controller. > -- resets: A phandle to the reset line for PCIe glue layer including > - the host controller. > -- interrupts: A list of interrupt specifiers. According to the > - interrupt-names, appropriate interrupts are required. > -- interrupt-names: Must include the following entries: > - "dma" - DMA interrupt > - "msi" - MSI interrupt > - > -Optional properties: > -- phys: A phandle to generic PCIe PHY. According to the phy-names, appropriate > - phys are required. > -- phy-names: Must be "pcie-phy". > - > -Required sub-node: > -- legacy-interrupt-controller: Specifies interrupt controller for legacy PCI > - interrupts. > - > -Required properties for legacy-interrupt-controller: > -- interrupt-controller: identifies the node as an interrupt controller. > -- #interrupt-cells: specifies the number of cells needed to encode an > - interrupt source. The value must be 1. > -- interrupt-parent: Phandle to the parent interrupt controller. > -- interrupts: An interrupt specifier for legacy interrupt. > - > -Example: > - > - pcie: pcie@66000000 { > - compatible = "socionext,uniphier-pcie", "snps,dw-pcie"; > - status = "disabled"; > - reg-names = "dbi", "link", "config"; > - reg = <0x66000000 0x1000>, <0x66010000 0x10000>, > - <0x2fff0000 0x10000>; > - #address-cells = <3>; > - #size-cells = <2>; > - clocks = <&sys_clk 24>; > - resets = <&sys_rst 24>; > - num-lanes = <1>; > - num-viewport = <1>; > - bus-range = <0x0 0xff>; > - device_type = "pci"; > - ranges = > - /* downstream I/O */ > - <0x81000000 0 0x00000000 0x2ffe0000 0 0x00010000 > - /* non-prefetchable memory */ > - 0x82000000 0 0x00000000 0x20000000 0 0x0ffe0000>; > - #interrupt-cells = <1>; > - interrupt-names = "dma", "msi"; > - interrupts = <0 224 4>, <0 225 4>; > - interrupt-map-mask = <0 0 0 7>; > - interrupt-map = <0 0 0 1 &pcie_intc 0>, /* INTA */ > - <0 0 0 2 &pcie_intc 1>, /* INTB */ > - <0 0 0 3 &pcie_intc 2>, /* INTC */ > - <0 0 0 4 &pcie_intc 3>; /* INTD */ > - > - pcie_intc: legacy-interrupt-controller { > - interrupt-controller; > - #interrupt-cells = <1>; > - interrupt-parent = <&gic>; > - interrupts = <0 226 4>; > - }; > - }; > diff --git a/MAINTAINERS b/MAINTAINERS > index 4cc47b2dbdc9..c1d377be991c 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -15337,7 +15337,7 @@ PCIE DRIVER FOR SOCIONEXT UNIPHIER > M: Kunihiko Hayashi > L: linux-pci@vger.kernel.org > S: Maintained > -F: Documentation/devicetree/bindings/pci/uniphier-pcie* > +F: Documentation/devicetree/bindings/pci/socionext,uniphier-pcie* > F: drivers/pci/controller/dwc/pcie-uniphier* > > PCIE DRIVER FOR ST SPEAR13XX > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel