From patchwork Fri May 7 10:30:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 432133 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp147923jao; Fri, 7 May 2021 03:30:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypgbZ2+Sw+VqdRgF6TyQ4OK1zvFPKZyrOzWwvEF1f56zIihw6KwC9zOivMfNtwjYhOifc8 X-Received: by 2002:a63:4c63:: with SMTP id m35mr9009587pgl.105.1620383457296; Fri, 07 May 2021 03:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620383457; cv=none; d=google.com; s=arc-20160816; b=TdVEmlqhdP6ARtRycIaTwvgUCJ+l19L5/nWyZ4fobmY0hTkgo7xolEGcbz5T3v9k0r iA22UUUJ2OpvB9fV8i7cpPxgD9GA+MOEGVDKm2fy544Tc12Jp3ABNfwGFgqyv4ux9VL/ WcpBYX/QuDpHFdUZyWtw2aAtytf7kbYHIF2qJpGGnRLEeZNSj9y3fKKbkmzk5kK2oU4a EMXCcnfMn25bJC/yGTFFI6kHwUCWALG5s7VYEbx/bMzRg9yj2l8zjFs7TMOp3PScL3v1 D0miPu5ewBFtScqSo5/Wk/0XdSnKqfUPZ8k5CnxwMhsWZiGz8Bc0NMiNYcpvEwl/30Ln nS+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=beBOO2e9LBlqWNSPs81mS1QwysR1XMwYJL5ldmakWMs=; b=OybZdkDlDHmWcu0cj9VxBniWlRl2SJZGd6QP8pMpVk3ftc+GsgpKmwd88MWSP5VxO0 wcU3UTH7J4JvWRkhqWK+ooE4jOt4JH91UCTSthqwQJdLF89u3WH03BQE1Q8F0E9zuE4t vskhm75SBxYac0e4eT6kNsvORo5ypu11fbh/JqJ/ZBovaOwOJ24fGhVVmTorlYUKxvxe 5jVAFBCIKhKY+qHTzNUcPh5ObmifHeZwwL8HS7bp/AXXL0tYfOA6ST6GKSHiH8mc/bGR VKhry2gJ8Qkbq8PdETKSbguNRkECWQol9pkSMe/jL0qAuEb7Isw/mGsGDLXQzBHRMwXe I53g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PEmhT5Tk; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id go11si5294552pjb.120.2021.05.07.03.30.56; Fri, 07 May 2021 03:30:57 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PEmhT5Tk; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236913AbhEGKby (ORCPT + 7 others); Fri, 7 May 2021 06:31:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234674AbhEGKbx (ORCPT ); Fri, 7 May 2021 06:31:53 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06463C061763 for ; Fri, 7 May 2021 03:30:53 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id j10so12033853lfb.12 for ; Fri, 07 May 2021 03:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=beBOO2e9LBlqWNSPs81mS1QwysR1XMwYJL5ldmakWMs=; b=PEmhT5Tkxv0eG+GMGVbBbXkRsRqXoYrMomfqdRUXs/KIg+R8vK4ic7o67o9NTbz71M viPhB8pMffqmc2dLVHH8WtgAZIh4eTm7X3EM0d6p6VzXN2TvrGkWjRJ/CoXZFCqKx6ba JmK1vpchZvPugJ4Uz2nBfkCHUF/nAoHxhq/vxNziYJvrLgi3JGA8Xm8NNeZlkVePeyDq XhdzcIepzuWQTGzAgZC2MImPDniZ9ZBpPqaFhiI86AwIAlBH5oZ4nKOoxY5OTdh9YWsC lEKCCPSNXfj3MyJox6gbqFOvLox+8XvrjOP/hy5bWS+uKyf3xOD/w0wDj6/OhyHEQvAW LrSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=beBOO2e9LBlqWNSPs81mS1QwysR1XMwYJL5ldmakWMs=; b=tORqU0qjXYohuyUf/vnSkpYVBuJfZobH+4Y26IhBlsqz2vCKYt0DEtV6f3Tf93V05A 1p7uP+j2oh0RrbDBT88X4ihGjQwig48hZfwukrUevYAN3iAofsIuQSxzNTgOS/+n7Q1k WBZgjaA7cOU8ceDcR0YSkJhQ0/5qS4m75deecZs+EOrG967k3Tn8y84b946LorGtjCsx 3dLg5Xkq+dTLhkKChwI/7sKJDMs/49BAky/IiwGleRQBYSNuGLBNTsObZbld6cjWRGx3 6si1Y4JRiGC7VsPIoaEV185cOcwgxXK0u2yjrZLK4hTjdvuhJbYCeolivuEDjhR4txzn HN8g== X-Gm-Message-State: AOAM531gj7gSFZM+sFe2e4v1VTvelM2UrOkkaCrELal10gkWepgN/j6Q hpuMhpFKm7yFVKrLDVbphh1b1g== X-Received: by 2002:ac2:58e7:: with SMTP id v7mr6167405lfo.505.1620383451518; Fri, 07 May 2021 03:30:51 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id y7sm1314218lfb.62.2021.05.07.03.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 May 2021 03:30:51 -0700 (PDT) From: Linus Walleij To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Arnd Bergmann , Imre Kaloz , Krzysztof Halasa , Zoltan HERPAI , Raylynn Knight , Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 3/4 v2] PCI: ixp4xx: Add device tree bindings for IXP4xx Date: Fri, 7 May 2021 12:30:39 +0200 Message-Id: <20210507103040.132562-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210507103040.132562-1-linus.walleij@linaro.org> References: <20210507103040.132562-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the Intel IXP4xx PCI controller which can be used as both host and option. Cc: devicetree@vger.kernel.org Cc: Arnd Bergmann Cc: Imre Kaloz Cc: Krzysztof Halasa Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Add the three controller interrupts to the binding. PCI maintainers: mainly looking for a review and ACK (if you care about DT bindings) the patch will be merged through ARM SoC. --- .../bindings/pci/intel,ixp4xx-pci.yaml | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml -- 2.30.2 diff --git a/Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml b/Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml new file mode 100644 index 000000000000..12c9be2ac118 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/intel,ixp4xx-pci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Intel IXP4xx PCI controller + +maintainers: + - Linus Walleij + +description: PCI host controller found in the Intel IXP4xx SoC series. + +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + +properties: + compatible: + items: + - enum: + - intel,ixp42x-pci + - intel,ixp43x-pci + description: The two supported variants are ixp42x and ixp43x, + though more variants may exist. + + reg: + items: + - description: IXP4xx-specific registers + + interrupts: + items: + - description: Main PCI interrupt + - description: PCI DMA interrupt 1 + - description: PCI DMA interrupt 2 + + ranges: + maxItems: 2 + description: Typically one memory range of 64MB and one IO + space range of 64KB. + + dma-ranges: + maxItems: 1 + description: The DMA range tells the PCI host which addresses + the RAM is at. It can map only 64MB so if the RAM is bigger + than 64MB the DMA access has to be restricted to these + addresses. + + "#interrupt-cells": true + + interrupt-map: true + + interrupt-map-mask: + items: + - const: 0xf800 + - const: 0 + - const: 0 + - const: 7 + +required: + - compatible + - reg + - ranges + - dma-ranges + - "#interrupt-cells" + - interrupt-map + - interrupt-map-mask + +unevaluatedProperties: false + +examples: + - | + pci@c0000000 { + compatible = "intel,ixp43x-pci"; + reg = <0xc0000000 0x1000>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + bus-range = <0x00 0xff>; + status = "disabled"; + + ranges = + <0x02000000 0 0x48000000 0x48000000 0 0x04000000>, + <0x01000000 0 0x00000000 0x4c000000 0 0x00010000>; + dma-ranges = + <0x02000000 0 0x00000000 0x00000000 0 0x04000000>; + + #interrupt-cells = <1>; + interrupt-map-mask = <0xf800 0 0 7>; + interrupt-map = + <0x0800 0 0 1 &gpio0 11 3>, /* INT A on slot 1 is irq 11 */ + <0x0800 0 0 2 &gpio0 10 3>, /* INT B on slot 1 is irq 10 */ + <0x0800 0 0 3 &gpio0 9 3>, /* INT C on slot 1 is irq 9 */ + <0x0800 0 0 4 &gpio0 8 3>, /* INT D on slot 1 is irq 8 */ + <0x1000 0 0 1 &gpio0 10 3>, /* INT A on slot 2 is irq 10 */ + <0x1000 0 0 2 &gpio0 9 3>, /* INT B on slot 2 is irq 9 */ + <0x1000 0 0 3 &gpio0 8 3>, /* INT C on slot 2 is irq 8 */ + <0x1000 0 0 4 &gpio0 11 3>, /* INT D on slot 2 is irq 11 */ + <0x1800 0 0 1 &gpio0 9 3>, /* INT A on slot 3 is irq 9 */ + <0x1800 0 0 2 &gpio0 8 3>, /* INT B on slot 3 is irq 8 */ + <0x1800 0 0 3 &gpio0 11 3>, /* INT C on slot 3 is irq 11 */ + <0x1800 0 0 4 &gpio0 10 3>; /* INT D on slot 3 is irq 10 */ + };