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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCB0BC43461 for ; Thu, 6 May 2021 17:43:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B150960698 for ; Thu, 6 May 2021 17:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236299AbhEFRo3 (ORCPT ); Thu, 6 May 2021 13:44:29 -0400 Received: from mail-oo1-f46.google.com ([209.85.161.46]:40496 "EHLO mail-oo1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236042AbhEFRoZ (ORCPT ); Thu, 6 May 2021 13:44:25 -0400 Received: by mail-oo1-f46.google.com with SMTP id o202-20020a4a2cd30000b02901fcaada0306so1416208ooo.7; Thu, 06 May 2021 10:43:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KY+lNZjWq9ZgLiUiLyt3DXqjhKZuimW2lNubxuPtsOc=; b=bIoSo19GdjgxlLvrIpS1QKl8iFyetKc/gvphV3O284rE/nZDVWKwMvHz+lkZd6rVLF zp+w8K6qv6gw37TSajQM9iwNIqvZp6xzTwRtHt4zxxdEocvwgaPNgAYIDsD0COdgUSC7 hnqcV9M2wRB0rqIpIUl4O/JMqONDCpF1GFqFVYeD5qXwuQ4xPlf2rhzCltlmUCfcfVeJ cV93hGltvvC9is7nuUq2Aps6GFs3aHx2R5f56p9wpcxOlhPikgn4EzzO/Y2CK4ohCrrA BhyTofsbwyXY3WHXdjTHR9NsxyGv+32o4OuU3edjBRQ67PSOyawLHK9ZXKBVlX0mnIlF REew== X-Gm-Message-State: AOAM530d40YV9PLc/6mK5ZDUoEH0taOxDua94QyKKJUa1DK/gK7LH9xr cZ9wELRKlVkKhVLwqfOctA== X-Google-Smtp-Source: ABdhPJxbdtvMkpUek+cv6nQacMp2/jGhvnepprPGdWk8cRVD77uMXDL1Il7T9l8mnLZkvp/1ZUVoNg== X-Received: by 2002:a4a:8311:: with SMTP id f17mr1183015oog.83.1620323005650; Thu, 06 May 2021 10:43:25 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id m67sm673301otm.69.2021.05.06.10.43.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 10:43:24 -0700 (PDT) Received: (nullmailer pid 536127 invoked by uid 1000); Thu, 06 May 2021 17:43:22 -0000 Date: Thu, 6 May 2021 12:43:22 -0500 From: Rob Herring To: Corentin Labbe Cc: bhelgaas@google.com, linus.walleij@linaro.org, ulli.kroll@googlemail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: pci: convert faraday,ftpci100 to yaml Message-ID: <20210506174322.GA523813@robh.at.kernel.org> References: <20210503185228.1518131-1-clabbe@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210503185228.1518131-1-clabbe@baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 03, 2021 at 06:52:27PM +0000, Corentin Labbe wrote: > Converts pci/faraday,ftpci100.txt to yaml. > Some change are also made: > - example has wrong interrupts place > > Signed-off-by: Corentin Labbe > --- > .../bindings/pci/faraday,ftpci100.txt | 135 ----------- > .../bindings/pci/faraday,ftpci100.yaml | 211 ++++++++++++++++++ > 2 files changed, 211 insertions(+), 135 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/pci/faraday,ftpci100.txt > create mode 100644 Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml > diff --git a/Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml b/Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml > new file mode 100644 > index 000000000000..9be27e71526c > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml > @@ -0,0 +1,211 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pci/faraday,ftpci100.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Faraday Technology FTPCI100 PCI Host Bridge > + > +maintainers: > + - Linus Walleij > + > +description: | > + This PCI bridge is found inside that Cortina Systems Gemini SoC platform and > + is a generic IP block from Faraday Technology. It exists in two variants: > + plain and dual PCI. The plain version embeds a cascading interrupt controller > + into the host bridge. The dual version routes the interrupts to the host > + chips interrupt controller. > + The host controller appear on the PCI bus with vendor ID 0x159b (Faraday > + Technology) and product ID 0x4321. > + > +allOf: > + - $ref: /schemas/pci/pci-bus.yaml# > + > +properties: > + compatible: > + oneOf: > + - items: > + - const: "cortina,gemini-pci" > + - const: "faraday,ftpci100" > + - items: > + - const: "cortina,gemini-pci-dual" > + - const: "faraday,ftpci100-dual" > + - const: "faraday,ftpci100" > + - const: "faraday,ftpci100-dual" Don't need quotes. > + > + reg: > + minItems: 1 > + > + "#address-cells": > + const: 3 > + > + "#size-cells": > + const: 2 Covered by pci-bus.yaml. > + > + "#interrupt-cells": > + const: 1 > + > + bus-range: > + items: > + - const: 0x00 > + - const: 0xff That's the default range, so drop. > + > + ranges: > + minItems: 2 > + description: see pci.txt Drop the description. > + > + dma-ranges: > + minItems: 3 > + description: | > + three ranges for the inbound memory region. The ranges must > + be aligned to a 1MB boundary, and may be 1MB, 2MB, 4MB, 8MB, 16MB, 32MB, 64MB, > + 128MB, 256MB, 512MB, 1GB or 2GB in size. The memory should be marked as > + pre-fetchable. > + > + clocks: > + minItems: 2 > + description: | > + when present, this should contain the peripheral clock (PCLK) and the > + PCI clock (PCICLK). If these are not present, they are assumed to be > + hard-wired enabled and always on. The PCI clock will be 33 or 66 MHz. Split the description: items: - description: peripheral clock (PCLK) - description: PCI bus? clock (PCICLK). The PCI clock will be 33 or 66 MHz. > + > + clock-names: > + items: > + - const: "PCLK" > + - const: "PCICLK" Drop quotes. > + > + interrupt-controller: > + allOf: > + - $ref: /schemas/interrupt-controller.yaml# Drop, this will be applied based on the node name. > + type: object > + properties: > + interrupts: > + minItems: 1 > + > + interrupt-controller: true > + > + "#address-cells": > + const: 0 > + > + "#interrupt-cells": > + const: 1 > + > + required: > + - interrupts > + - interrupt-controller > + - "#address-cells" > + - "#interrupt-cells" > + > +required: > + - reg > + - compatible > + - "#address-cells" > + - "#size-cells" > + - "#interrupt-cells" > + - bus-range > + - ranges > + - interrupt-map-mask > + - interrupt-map > + - dma-ranges Drop all the ones required in pci-bus.yaml already. > + > +if: > + properties: > + compatible: > + contains: > + items: > + - const: cortina,gemini-pci > + - const: faraday,ftpci100 > +then: > + required: > + - interrupt-controller > + > +unevaluatedProperties: false > + > +#I/O space considerations: > + > +#The plain variant has 128MiB of non-prefetchable memory space, whereas the > +#"dual" variant has 64MiB. Take this into account when describing the ranges. Could go under 'ranges'? > + > +#Interrupt map considerations: Could go under 'interrupt-map'. > + > +#The "dual" variant will get INT A, B, C, D from the system interrupt controller > +#and should point to respective interrupt in that controller in its > +#interrupt-map. > + > +#The code which is the only documentation of how the Faraday PCI (the non-dual > +#variant) interrupts assigns the default interrupt mapping/swizzling has > +#typically been like this, doing the swizzling on the interrupt controller side > +#rather than in the interconnect: > + > +#interrupt-map-mask = <0xf800 0 0 7>; > +#interrupt-map = > +# <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */ > +# <0x4800 0 0 2 &pci_intc 1>, > +# <0x4800 0 0 3 &pci_intc 2>, > +# <0x4800 0 0 4 &pci_intc 3>, > +# <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */ > +# <0x5000 0 0 2 &pci_intc 2>, > +# <0x5000 0 0 3 &pci_intc 3>, > +# <0x5000 0 0 4 &pci_intc 0>, > +# <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */ > +# <0x5800 0 0 2 &pci_intc 3>, > +# <0x5800 0 0 3 &pci_intc 0>, > +# <0x5800 0 0 4 &pci_intc 1>, > +# <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */ > +# <0x6000 0 0 2 &pci_intc 0>, > +# <0x6000 0 0 3 &pci_intc 1>, > +# <0x6000 0 0 4 &pci_intc 2>; > + > + > +examples: > + - | > + #include > + pci@50000000 { > + compatible = "cortina,gemini-pci", "faraday,ftpci100"; > + reg = <0x50000000 0x100>; > + device_type = "pci"; > + #address-cells = <3>; > + #size-cells = <2>; > + #interrupt-cells = <1>; > + > + bus-range = <0x00 0xff>; > + ranges = /* 1MiB I/O space 0x50000000-0x500fffff */ > + <0x01000000 0 0 0x50000000 0 0x00100000>, > + /* 128MiB non-prefetchable memory 0x58000000-0x5fffffff */ > + <0x02000000 0 0x58000000 0x58000000 0 0x08000000>; > + > + /* DMA ranges */ > + dma-ranges = > + /* 128MiB at 0x00000000-0x07ffffff */ > + <0x02000000 0 0x00000000 0x00000000 0 0x08000000>, > + /* 64MiB at 0x00000000-0x03ffffff */ > + <0x02000000 0 0x00000000 0x00000000 0 0x04000000>, > + /* 64MiB at 0x00000000-0x03ffffff */ > + <0x02000000 0 0x00000000 0x00000000 0 0x04000000>; > + > + interrupt-map-mask = <0xf800 0 0 7>; > + interrupt-map = > + <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */ > + <0x4800 0 0 2 &pci_intc 1>, > + <0x4800 0 0 3 &pci_intc 2>, > + <0x4800 0 0 4 &pci_intc 3>, > + <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */ > + <0x5000 0 0 2 &pci_intc 2>, > + <0x5000 0 0 3 &pci_intc 3>, > + <0x5000 0 0 4 &pci_intc 0>, > + <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */ > + <0x5800 0 0 2 &pci_intc 3>, > + <0x5800 0 0 3 &pci_intc 0>, > + <0x5800 0 0 4 &pci_intc 1>, > + <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */ > + <0x6000 0 0 2 &pci_intc 0>, > + <0x6000 0 0 3 &pci_intc 0>, > + <0x6000 0 0 4 &pci_intc 0>; > + pci_intc: interrupt-controller { > + interrupt-parent = <&intcon>; > + interrupt-controller; > + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + }; > + }; > -- > 2.26.3 > 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 X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99080C43460 for ; Thu, 6 May 2021 17:45:58 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E94C3610CE for ; Thu, 6 May 2021 17:45:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E94C3610CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=Q18QTlXSMe/f+2ttUod7iRzgT0B3Sv/pax+VQ5011G8=; b=X5lg9DTG0T+gucaofWwFA6zTO QOu06HE2x4DVd05X0mqlofnLs5YzZeE8LEXoc7gk5LPsWOakAjoc6adW75sjIBiMmAir8LxqlVdWi 4ZMlIjR+qkHva1saHEHh4CRHRglFmj9ferYUtBQwnRGYwHHpQutgRo0mTqU7jyswpCbF+9WDkBGkt 3JMWdGm4AKtXnuqm39X7ROI9GlufVOAomvOaqzjqNtpyTnbXGc/cZZwog32dt6nhzN0nrfCo5XC39 D9r7R/WslX9kV5Y08nmmat9OSWOBO/hj8rmfPfoOy1Ic3Z6IhWdgPdTdchpCW8AZcuRW78N9b8TW3 tmlMPahaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lei2A-004xKC-0H; Thu, 06 May 2021 17:43:34 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lei26-004xJk-6A for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 17:43:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KY+lNZjWq9ZgLiUiLyt3DXqjhKZuimW2lNubxuPtsOc=; b=s+QOUGWscUC9mPuhzEgPm2uogD rjmh4u2aMHs2j4Tu8nRMHgyFYrNp/CAsDJrXUrZYox/bmCXTK7FGuBPe6kQt/lDC/amd0biOW+cab 87cpQ/F16EYKBr9erjWVwdu5bgpx7Ny8ZNvzVFbKo/U9soxvonG5p16NXuhrCIAxfJYziT0UHguKa Jvu1BXWQiE2u2dTr5ve67UICzpu7HuNiVbssryRK4mw7GyygixkBa8bnXDebXjFL4QIlrrpU+wY8q Z19efHd5MUS7bVTiNiJqcE16EyJ0m7kf1qTpcsSn+lODufa3kfhmvGRt+OiJVJV2cs6XB0+6utJlO ozsowAAg==; Received: from mail-oo1-f41.google.com ([209.85.161.41]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lei22-006GEl-Kl for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 17:43:28 +0000 Received: by mail-oo1-f41.google.com with SMTP id t17-20020a4a3e110000b02901fab2f46a48so1418647oot.6 for ; Thu, 06 May 2021 10:43:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KY+lNZjWq9ZgLiUiLyt3DXqjhKZuimW2lNubxuPtsOc=; b=K88TGoyxovcbF05zxQcPZ/H5m6ZrU/dbme1p9P/YtuKAU2gIyZWCjMq5g21GNC7tjX +366aPZDY0MFXf0KI1kA0BzenCxtlQnzfxB4c6BleKHkLcaALznOPpZVcmJpwVkhRRU+ g2DVjj8iJ9QSg8MztwI9utyyw6CNgUDFLHfZPIVFTcGbewFKHvx2PPEoiwwWfIoTzkMn qrAU0FFU1pXqtpIIqQa7LKT3ZIpX9l1XcW3NVUgtJaKqKfkQlxCtZqpm1/LTxPQzGM7q dJXMPrOwVoVLwW8CGP8PhPgjvlaL7yiUsG6UsZN+ivVWojahC5GC1o4mZ7x5yNNSuaON ghww== X-Gm-Message-State: AOAM531pRARz/y0FZgY4/jzNnV4D/nus79fm4PWUYP9r9RbiXPlflwYS xJCRRYyyF1c9FFP1pK/W2A== X-Google-Smtp-Source: ABdhPJxbdtvMkpUek+cv6nQacMp2/jGhvnepprPGdWk8cRVD77uMXDL1Il7T9l8mnLZkvp/1ZUVoNg== X-Received: by 2002:a4a:8311:: with SMTP id f17mr1183015oog.83.1620323005650; Thu, 06 May 2021 10:43:25 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id m67sm673301otm.69.2021.05.06.10.43.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 10:43:24 -0700 (PDT) Received: (nullmailer pid 536127 invoked by uid 1000); Thu, 06 May 2021 17:43:22 -0000 Date: Thu, 6 May 2021 12:43:22 -0500 From: Rob Herring To: Corentin Labbe Cc: bhelgaas@google.com, linus.walleij@linaro.org, ulli.kroll@googlemail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: pci: convert faraday,ftpci100 to yaml Message-ID: <20210506174322.GA523813@robh.at.kernel.org> References: <20210503185228.1518131-1-clabbe@baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210503185228.1518131-1-clabbe@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_104326_710063_4D2530E7 X-CRM114-Status: GOOD ( 30.75 ) 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, May 03, 2021 at 06:52:27PM +0000, Corentin Labbe wrote: > Converts pci/faraday,ftpci100.txt to yaml. > Some change are also made: > - example has wrong interrupts place > > Signed-off-by: Corentin Labbe > --- > .../bindings/pci/faraday,ftpci100.txt | 135 ----------- > .../bindings/pci/faraday,ftpci100.yaml | 211 ++++++++++++++++++ > 2 files changed, 211 insertions(+), 135 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/pci/faraday,ftpci100.txt > create mode 100644 Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml > diff --git a/Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml b/Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml > new file mode 100644 > index 000000000000..9be27e71526c > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/faraday,ftpci100.yaml > @@ -0,0 +1,211 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pci/faraday,ftpci100.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Faraday Technology FTPCI100 PCI Host Bridge > + > +maintainers: > + - Linus Walleij > + > +description: | > + This PCI bridge is found inside that Cortina Systems Gemini SoC platform and > + is a generic IP block from Faraday Technology. It exists in two variants: > + plain and dual PCI. The plain version embeds a cascading interrupt controller > + into the host bridge. The dual version routes the interrupts to the host > + chips interrupt controller. > + The host controller appear on the PCI bus with vendor ID 0x159b (Faraday > + Technology) and product ID 0x4321. > + > +allOf: > + - $ref: /schemas/pci/pci-bus.yaml# > + > +properties: > + compatible: > + oneOf: > + - items: > + - const: "cortina,gemini-pci" > + - const: "faraday,ftpci100" > + - items: > + - const: "cortina,gemini-pci-dual" > + - const: "faraday,ftpci100-dual" > + - const: "faraday,ftpci100" > + - const: "faraday,ftpci100-dual" Don't need quotes. > + > + reg: > + minItems: 1 > + > + "#address-cells": > + const: 3 > + > + "#size-cells": > + const: 2 Covered by pci-bus.yaml. > + > + "#interrupt-cells": > + const: 1 > + > + bus-range: > + items: > + - const: 0x00 > + - const: 0xff That's the default range, so drop. > + > + ranges: > + minItems: 2 > + description: see pci.txt Drop the description. > + > + dma-ranges: > + minItems: 3 > + description: | > + three ranges for the inbound memory region. The ranges must > + be aligned to a 1MB boundary, and may be 1MB, 2MB, 4MB, 8MB, 16MB, 32MB, 64MB, > + 128MB, 256MB, 512MB, 1GB or 2GB in size. The memory should be marked as > + pre-fetchable. > + > + clocks: > + minItems: 2 > + description: | > + when present, this should contain the peripheral clock (PCLK) and the > + PCI clock (PCICLK). If these are not present, they are assumed to be > + hard-wired enabled and always on. The PCI clock will be 33 or 66 MHz. Split the description: items: - description: peripheral clock (PCLK) - description: PCI bus? clock (PCICLK). The PCI clock will be 33 or 66 MHz. > + > + clock-names: > + items: > + - const: "PCLK" > + - const: "PCICLK" Drop quotes. > + > + interrupt-controller: > + allOf: > + - $ref: /schemas/interrupt-controller.yaml# Drop, this will be applied based on the node name. > + type: object > + properties: > + interrupts: > + minItems: 1 > + > + interrupt-controller: true > + > + "#address-cells": > + const: 0 > + > + "#interrupt-cells": > + const: 1 > + > + required: > + - interrupts > + - interrupt-controller > + - "#address-cells" > + - "#interrupt-cells" > + > +required: > + - reg > + - compatible > + - "#address-cells" > + - "#size-cells" > + - "#interrupt-cells" > + - bus-range > + - ranges > + - interrupt-map-mask > + - interrupt-map > + - dma-ranges Drop all the ones required in pci-bus.yaml already. > + > +if: > + properties: > + compatible: > + contains: > + items: > + - const: cortina,gemini-pci > + - const: faraday,ftpci100 > +then: > + required: > + - interrupt-controller > + > +unevaluatedProperties: false > + > +#I/O space considerations: > + > +#The plain variant has 128MiB of non-prefetchable memory space, whereas the > +#"dual" variant has 64MiB. Take this into account when describing the ranges. Could go under 'ranges'? > + > +#Interrupt map considerations: Could go under 'interrupt-map'. > + > +#The "dual" variant will get INT A, B, C, D from the system interrupt controller > +#and should point to respective interrupt in that controller in its > +#interrupt-map. > + > +#The code which is the only documentation of how the Faraday PCI (the non-dual > +#variant) interrupts assigns the default interrupt mapping/swizzling has > +#typically been like this, doing the swizzling on the interrupt controller side > +#rather than in the interconnect: > + > +#interrupt-map-mask = <0xf800 0 0 7>; > +#interrupt-map = > +# <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */ > +# <0x4800 0 0 2 &pci_intc 1>, > +# <0x4800 0 0 3 &pci_intc 2>, > +# <0x4800 0 0 4 &pci_intc 3>, > +# <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */ > +# <0x5000 0 0 2 &pci_intc 2>, > +# <0x5000 0 0 3 &pci_intc 3>, > +# <0x5000 0 0 4 &pci_intc 0>, > +# <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */ > +# <0x5800 0 0 2 &pci_intc 3>, > +# <0x5800 0 0 3 &pci_intc 0>, > +# <0x5800 0 0 4 &pci_intc 1>, > +# <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */ > +# <0x6000 0 0 2 &pci_intc 0>, > +# <0x6000 0 0 3 &pci_intc 1>, > +# <0x6000 0 0 4 &pci_intc 2>; > + > + > +examples: > + - | > + #include > + pci@50000000 { > + compatible = "cortina,gemini-pci", "faraday,ftpci100"; > + reg = <0x50000000 0x100>; > + device_type = "pci"; > + #address-cells = <3>; > + #size-cells = <2>; > + #interrupt-cells = <1>; > + > + bus-range = <0x00 0xff>; > + ranges = /* 1MiB I/O space 0x50000000-0x500fffff */ > + <0x01000000 0 0 0x50000000 0 0x00100000>, > + /* 128MiB non-prefetchable memory 0x58000000-0x5fffffff */ > + <0x02000000 0 0x58000000 0x58000000 0 0x08000000>; > + > + /* DMA ranges */ > + dma-ranges = > + /* 128MiB at 0x00000000-0x07ffffff */ > + <0x02000000 0 0x00000000 0x00000000 0 0x08000000>, > + /* 64MiB at 0x00000000-0x03ffffff */ > + <0x02000000 0 0x00000000 0x00000000 0 0x04000000>, > + /* 64MiB at 0x00000000-0x03ffffff */ > + <0x02000000 0 0x00000000 0x00000000 0 0x04000000>; > + > + interrupt-map-mask = <0xf800 0 0 7>; > + interrupt-map = > + <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */ > + <0x4800 0 0 2 &pci_intc 1>, > + <0x4800 0 0 3 &pci_intc 2>, > + <0x4800 0 0 4 &pci_intc 3>, > + <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */ > + <0x5000 0 0 2 &pci_intc 2>, > + <0x5000 0 0 3 &pci_intc 3>, > + <0x5000 0 0 4 &pci_intc 0>, > + <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */ > + <0x5800 0 0 2 &pci_intc 3>, > + <0x5800 0 0 3 &pci_intc 0>, > + <0x5800 0 0 4 &pci_intc 1>, > + <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */ > + <0x6000 0 0 2 &pci_intc 0>, > + <0x6000 0 0 3 &pci_intc 0>, > + <0x6000 0 0 4 &pci_intc 0>; > + pci_intc: interrupt-controller { > + interrupt-parent = <&intcon>; > + interrupt-controller; > + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + }; > + }; > -- > 2.26.3 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel