From patchwork Wed May 5 09:18:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 12239389 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=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 355F9C433B4 for ; Wed, 5 May 2021 09:22:18 +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 ECE46613C7 for ; Wed, 5 May 2021 09:22:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECE46613C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=tkos.co.il 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:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=fGHPWt9o+EgKq7Q8MrdhoGZsNxpFbKH671nBxwEKciU=; b=Qxhye3Ocb9xCgMIrouK+zMAl02 SzeWZoxH/fp3ufDg2OmSjHZshuquJZQ9twJ3/M/rz7oahNobmM190WZZlIjOg6+UDtun9xPpRdKlX 7qhNx3wicNDkW4yYo6WSAKibZDC0HxIrPH910tidPiGwAN4FKF+72raarcE5yryMM8I4K+x1gPmGq mVTGk2DcACxRYXTpBZp2f0KrFp5RWF91HiFGWfTLOmpNu0vYF2uTcvKPA3x6yMe87GhE9Yd9Nsn5l Bf4Q+e6It8XOeqrgUsEc1qq4V5mZ93EPt01P8P2WyKgrwbvMhypRdGkTuX/Ag1lDMg4K5hBSad2vM A8LFo83A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leDgQ-000hDz-TJ; Wed, 05 May 2021 09:19:07 +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 1leDgD-000hCV-DC; Wed, 05 May 2021 09:18:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=MUr9Dh3FcyUn1dsMfaHpogOkgM6Afmngn0FA4oekw88=; b=K5QwlLvpaBkg+fWe2Ie2gHk21g QsXDYSNjHO2tLFGw9JZlKVptdAYEpmdsvdYVlLbsPL8twkw7JwWxaToEJ/WvF8YI9XHReQ6GqwFYV 752aVCk5WoRAAHxC8v5p2baoBPyRxW/5X9DnC7ZSfzGaYqrp4zMwCb55oQR5efwNm+EqPFtFnByzI c0jBujqWFlTjrJLmBmRAieAmGysFJQNfNgHFQigcj8YM3VlBbmjJwBM8vrwwiYk9sAofyRx4wlZYI Iliy5Za6duJ1vuiRbjYnvMCF1HhYGGuadfABM7PAKkVHrczRmrsZh/wr9qMzVQ2Bt8ta5Zrp8ANMI 8tLUDtxQ==; Received: from guitar.tcltek.co.il ([192.115.133.116] helo=mx.tkos.co.il) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leDg9-004bRU-Lk; Wed, 05 May 2021 09:18:52 +0000 Received: from tarshish.tkos.co.il (unknown [10.0.8.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id EC4B74407F0; Wed, 5 May 2021 12:18:35 +0300 (IDT) From: Baruch Siach To: Andy Gross , Bjorn Andersson Cc: Baruch Siach , Selvam Sathappan Periakaruppan , Kathiravan T , Bjorn Helgaas , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Thierry Reding , Jonathan Hunter , Jingoo Han , Gustavo Pimentel , Robert Marko , devicetree@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 0/6] arm64: IPQ6018 PCIe support Date: Wed, 5 May 2021 12:18:28 +0300 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210505_021851_073974_BADFA1C5 X-CRM114-Status: GOOD ( 10.88 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds support for the single PCIe lane on IPQ6018 SoCs. The code is ported from downstream Codeaurora v5.4 kernel. The main difference from downstream code is the split of PCIe registers configuration from .init to .post_init, since it requires phy_power_on(). Tested on IPQ6010 based hardware. Changes in v2: * Add patch moving GEN3_RELATED macros to a common header * Drop ATU configuration from pcie-qcom * Remove local definition of common registers * Use bulk clk and reset APIs * Remove msi-parent from device-tree Baruch Siach (3): PCI: dwc: tegra: move GEN3_RELATED DBI register to common header dt-bindings: phy: qcom,qmp: Add IPQ60xx PCIe PHY bindings dt-bindings: pci: qcom: Document PCIe bindings for IPQ6018 SoC Selvam Sathappan Periakaruppan (3): PCI: qcom: add support for IPQ60xx PCIe controller phy: qcom-qmp: add QMP V2 PCIe PHY support for ipq60xx arm64: dts: ipq6018: Add pcie support .../devicetree/bindings/pci/qcom,pcie.txt | 24 +++ .../devicetree/bindings/phy/qcom,qmp-phy.yaml | 25 +++ arch/arm64/boot/dts/qcom/ipq6018.dtsi | 99 ++++++++++++ drivers/pci/controller/dwc/pcie-designware.h | 7 + drivers/pci/controller/dwc/pcie-qcom.c | 150 ++++++++++++++++++ drivers/pci/controller/dwc/pcie-tegra194.c | 6 - drivers/phy/qualcomm/phy-qcom-qmp.c | 147 +++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 132 +++++++++++++++ 8 files changed, 584 insertions(+), 6 deletions(-)