Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp50590imn; Mon, 25 Jul 2022 09:56:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v+6XD28DMpjksVaig/goQ+m5HFUyCc/Lmr5yuqzrwBRcw57OaciNPWov2LiUSjcjlnWSzM X-Received: by 2002:a17:902:b612:b0:16c:7e2d:ff39 with SMTP id b18-20020a170902b61200b0016c7e2dff39mr12534283pls.111.1658768189580; Mon, 25 Jul 2022 09:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658768189; cv=none; d=google.com; s=arc-20160816; b=BJDHN3LILNmJ/oUAnkpGmqd4NPXIlYObd6T1WEVikep0qFnM/dGbb3KO2MfqMF0ud7 uQPRso5mflqIxyrEXPoQMvfB8QVLux9rFgrPndwhtuOG+tmyrnwLGOBDTi6H/EoMc1iO uBwh5ftVx0unumt0FEI01bVYD3lQZsALjCCGCqPhmjytqw7kHtNcsFdYPT6uZJGi4zcr vSmeo3prkZ1ZAkguS/4rl6Z0t7Lg+uFrlvWAIcizO0nPqYBajuQ+ceuqR9IGS2189jQd 1+SbOS4M9WjmERE+/xO6dFUfoZu6ORq4Sreie+2Q8EKOdj1MmspKWe52+LN19iat3Dg2 BsnA== 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 :message-id:date:subject:cc:to:from; bh=xK+wgHjtTUKSb1Bbp0A5Nc4NPdsIHcEsw5C0d6qFxWo=; b=y9M7e2noqh6uLrtecvJ+NfAQpPzvBRGNwzKjaxwYQf+kbj9Zv/FcHcawbrx/Wza/HR LMfnBeDP6oGaIa0lNjoM640GXzO18IC0TLNIeFy+UyeDgFWMXbCiq+cxzH59gzesrwsD IBNpqVJScUS5tghoVK/+Q9Mk473DUQl74EvEoy954c1w+Z6uLVkse8erqFz2OQ9klJiP LWrVI9E4EkrA4Qk37YN2uY7WYB22rnmvFs2hAshrZDSnt0PHxoCMqcZVSrvGmuzPBnOS NiIZR/B3u1tyCQqRKUM0+MFgOz3yhINlJqj7QBRyfpqTupbvRLQm+eHK8fSZQmm7qzWt dJFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a65578b000000b0041288737bc6si15525733pgr.797.2022.07.25.09.56.14; Mon, 25 Jul 2022 09:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236316AbiGYQjL (ORCPT + 99 others); Mon, 25 Jul 2022 12:39:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236231AbiGYQjK (ORCPT ); Mon, 25 Jul 2022 12:39:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D71A51CFF7; Mon, 25 Jul 2022 09:39:08 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1719D2B; Mon, 25 Jul 2022 09:39:09 -0700 (PDT) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4C26F3F73D; Mon, 25 Jul 2022 09:39:08 -0700 (PDT) From: Jeremy Linton To: linux-pci@vger.kernel.org Cc: will@kernel.org, bhelgaas@google.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, lpieralisi@kernel.org, kw@linux.com, mark.rutland@arm.com, sudeep.holla@arm.com, boqun.feng@gmail.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Linton Subject: [PATCH 0/4] PCI SMC conduit, now with DT support Date: Mon, 25 Jul 2022 11:39:01 -0500 Message-Id: <20220725163905.2024437-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a rebase of the later revisions of [1], but refactored slightly to add a DT method as well. It has all the same advantages of the ACPI method (putting HW quirks in the firmware rather than the kernel) but now applied to a 'pci-host-smc-generic' compatible property which extends the pci-host-generic logic to handle cases where the PCI Config region isn't ECAM compliant. With this in place, and firmware managed clock/phy/etc its possible to run the generic driver on hardware that isn't what one would consider standards compliant PCI root ports. The DT code was tested on the RPi4, where the ACPI/SMC is upstream in TF-A and EDK2. On that platform the PCIe works as expected utilizing the generic host driver rather than the pcie-brcmstb driver. [1] https://lkml.org/lkml/2021/1/4/1255 Jeremy Linton (4): arm64: smccc: Add PCI SMCCCs arm64: PCI: Enable SMC conduit PCI: host-generic: Add firmware managed config ops dt-bindings: PCI: Note the use of pci-host-smc-generic .../bindings/pci/host-generic-pci.yaml | 24 +++- arch/arm64/kernel/pci.c | 109 ++++++++++++++++++ drivers/pci/controller/pci-host-common.c | 34 ++++-- drivers/pci/controller/pci-host-generic.c | 6 + include/linux/arm-smccc.h | 29 +++++ 5 files changed, 186 insertions(+), 16 deletions(-) -- 2.37.1