From patchwork Mon Jan 4 12:41:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 356375 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp14936121jai; Mon, 4 Jan 2021 04:43:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJykzs21cpNLlu3MzNbqr9sc5GJ5LJjm0Rd157p9e3Smbkh9qvy6Wh+LWN32Pd6PijtZ7abY X-Received: by 2002:a50:eb96:: with SMTP id y22mr71883931edr.91.1609764235859; Mon, 04 Jan 2021 04:43:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609764235; cv=none; d=google.com; s=arc-20160816; b=SjwUCxUxJ10kRlI6AYRmzpMUMUnGa0yD0hUh+rNjBIir43IR6LZFk6Y+kLmp7Q5E+q WLBZDK0wbbBfwlDIbPcHatyk2wEOR3//DQtag+L/HAuxqgypI6XNVzKZms8ZuCjMnOjx UYHJFUt/x/l9H8ngqkT/3UCtulIHIxW2w+FAll/gDKOBFXn6u1s2rrA4sAiOH09yXeOz BtrD3pSC6aV1kdvSm2YPvZwTuW4RnN+/8vfHoEDp44w/j+Zugh6C4eoiHKWYyXE5lnrC Ex+O9nK3Fjidr/705jQaT3XsQKeY4omQHYubE1NAp3YDpxMyF6MZYGOQK0oekaWBG5Kl U9YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5LOsNk+DfZ3KJX3uwomu6Vnma6rc/1g2DMZdSRAxi8s=; b=Yq057HoRQWfcSedhiSScVg1eXkGt5o/9aNgiCu2Tv2vqxMFq9j81+Mf9sFEYgFIBUK st0hykffaZg9SHs4PtNWWYjVUk9GAt453dvLD1TbpYqRyi3Zyj20R5m6Sg99if4s8jyK 6NWMHxITyaALpi5k7l7esw2RsosZpgDIk6Ac3fCdCO4ofhdRpEIDgOZbQ78FunMaRKR+ eiV9MW0hx7f1d2JTJy6Zd2Jj2NqX9ySSWOkCQ3z/b8A6VRbLOUhAR6AAR+O4eMKBv8sd VAuRn+lhKKUJ0pFup8kUAWelReZ6OwMmH4TUT3b2mbYNLR6ZK6xA84eKzndF1+F8NIyZ LYIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=X2QK92L8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si32993070edo.164.2021.01.04.04.43.55; Mon, 04 Jan 2021 04:43:55 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=X2QK92L8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726098AbhADMmX (ORCPT + 6 others); Mon, 4 Jan 2021 07:42:23 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:34916 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbhADMmX (ORCPT ); Mon, 4 Jan 2021 07:42:23 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 104CfXsE015124; Mon, 4 Jan 2021 06:41:33 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1609764093; bh=5LOsNk+DfZ3KJX3uwomu6Vnma6rc/1g2DMZdSRAxi8s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=X2QK92L8BE8p3QM+xyIonxYwIuVIyUHCdInv+E3es+QB/ayAfftslBKbqeh/X0hwA flj16N0cg6GNIyCLkYjJBaHLN0Z2xkIgVcVkTADNLOBjVskPQVdOr6/RnSkmVy1EZt IlmxzHpBGesA06ncNLsLMcxHXsdhqTvVwnhTjOpA= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 104CfXEi095444 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Jan 2021 06:41:33 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 4 Jan 2021 06:41:13 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 4 Jan 2021 06:41:13 -0600 Received: from a0393678-ssd.ent.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 104Cf3bh034579; Mon, 4 Jan 2021 06:41:09 -0600 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Rob Herring , Tom Joseph , Lorenzo Pieralisi , Kishon Vijay Abraham I , Nadeem Athani CC: , , , , Subject: [PATCH v2 1/4] dt-bindings: PCI: ti, j721e: Add binding to represent refclk to the connector Date: Mon, 4 Jan 2021 18:11:00 +0530 Message-ID: <20210104124103.30930-2-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210104124103.30930-1-kishon@ti.com> References: <20210104124103.30930-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add binding to represent refclk to the PCIe connector. Signed-off-by: Kishon Vijay Abraham I --- .../bindings/pci/ti,j721e-pci-host.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml index 0880a613ece6..7607018a115b 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml @@ -46,12 +46,21 @@ properties: maxItems: 1 clocks: - maxItems: 1 - description: clock-specifier to represent input to the PCIe + minItems: 1 + maxItems: 2 + description: clock-specifier to represent input to the PCIe for 1 item. + 2nd item if present represents reference clock to the connector. clock-names: - items: - - const: fck + oneOf: + - description: Represent input clock to the PCIe + items: + - const: fck + - description: Represent input clock to the PCIe and reference clock to + the connector. + items: + - const: fck + - const: pcie_refclk vendor-id: const: 0x104c From patchwork Mon Jan 4 12:41:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 356378 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp14936188jai; Mon, 4 Jan 2021 04:44:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHpqXlRZtvfmpD/6nbyBXe9wiEFAAmlweSbJaG1zXIz46FfogvuBt9XwUpEegugw17tQjD X-Received: by 2002:a17:906:ce23:: with SMTP id sd3mr66651239ejb.69.1609764243045; Mon, 04 Jan 2021 04:44:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609764243; cv=none; d=google.com; s=arc-20160816; b=h1FAwcTEqV9dVlzeoc3mfwkjGIBpQzpJbSjPr/ozN2yx1fEXU6Y/4ZCHF6+ixLZhwb rHLeoV7Q/pCGpEjNBpQ7hs6VE4oW5eYmlloKVGF8zUdyG5r/+jGjL7BPE/faozscyll0 ffMmTnAtt050TdBeREjgQwlYCcMvkiwx8VDzMOKFd5JCzAeDpRfDCgE3aVbRU53Rwfcz FCUOa6fs3Fh15ZlKjIT9iPy1A6YEyrQKhFjRqZo/1aAW/mGG3SXDkkycSgamKCzYozWD xTaUhRreKyNDNJ9o0f1WyulisMJNB7wd+135iBgxfbAt19Hh5Tq3ItKbOG2hVNOR4C4L Z8pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pW+3Nkkfv15OxmYOKkSjlpKQ8IkjEw2ZblHzX+3dit8=; b=jjN4Se00EsTMEn2wNqFaFvAm9gVJe8B7gKIMv5/k3oTraASYBsAS+jXEPoBroLYFAZ SnYDPBgW/GePiB6RoMv2dTAquxGw4LTg6Sm4p3wvqNP7FWU2QCWRghEV2jU40LCLN0/h XGSsnoxNUrDElwO5KpCzc7xGh8fLbwQB8gtAG/XNHXHyc/Rm9o0zGrWd3qLHW26cSs1o C9RNnpujZGX76ZyuoHodyTLRAQPTU1KWrr1QGyxuIIGQnQXOeOiy3gzexpXlRXPEEJcZ HezfO1l7FEAhl7gA6j5ruWe2sv4vBEB7jpvUlHH1XhgAKXubFkZkMe2tE9Is7eVfGOtb RJxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="AKt/lhY0"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si32993070edo.164.2021.01.04.04.44.02; Mon, 04 Jan 2021 04:44:03 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b="AKt/lhY0"; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727047AbhADMno (ORCPT + 6 others); Mon, 4 Jan 2021 07:43:44 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:56494 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727019AbhADMnn (ORCPT ); Mon, 4 Jan 2021 07:43:43 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 104CfwsB098481; Mon, 4 Jan 2021 06:41:58 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1609764118; bh=pW+3Nkkfv15OxmYOKkSjlpKQ8IkjEw2ZblHzX+3dit8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=AKt/lhY0m29zqJN9KO05LwQipGxH1RVVYyYFtO7tp2VHQKUjuSdvOqjjZRC4+ilfd 5Lolq1uWdxseCo8rjYCljMbgOQhzuG6XOGG+o48Sm3I8eoLjNZ/HrCbpX1NB0ePUOV kvkgSuS0jA/d0GQkxA5CA4Drj0mp2Sv1OMo45kdA= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 104CfwnS080776 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Jan 2021 06:41:58 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 4 Jan 2021 06:41:17 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 4 Jan 2021 06:41:17 -0600 Received: from a0393678-ssd.ent.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 104Cf3bi034579; Mon, 4 Jan 2021 06:41:13 -0600 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Rob Herring , Tom Joseph , Lorenzo Pieralisi , Kishon Vijay Abraham I , Nadeem Athani CC: , , , , Subject: [PATCH v2 2/4] dt-bindings: pci: ti, j721e: Add host mode dt-bindings for TI's AM64 SoC Date: Mon, 4 Jan 2021 18:11:01 +0530 Message-ID: <20210104124103.30930-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210104124103.30930-1-kishon@ti.com> References: <20210104124103.30930-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add host mode dt-bindings for TI's AM64 SoC. This is the same IP used in J7200, however AM64 is a non-coherent architecture. Signed-off-by: Kishon Vijay Abraham I --- .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml index 7607018a115b..77118dba415e 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml @@ -16,12 +16,17 @@ allOf: properties: compatible: oneOf: - - description: PCIe controller in J7200 + - const: ti,am64-pcie-host + - const: ti,j7200-pcie-host + - const: ti,j721e-pcie-host + - description: PCIe controller in AM64 items: + - const: ti,am64-pcie-host - const: ti,j7200-pcie-host - const: ti,j721e-pcie-host - - description: PCIe controller in J721E + - description: PCIe controller in J7200 items: + - const: ti,j7200-pcie-host - const: ti,j721e-pcie-host reg: @@ -87,7 +92,6 @@ required: - vendor-id - device-id - msi-map - - dma-coherent - dma-ranges - ranges - reset-gpios From patchwork Mon Jan 4 12:41:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 356377 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp14936146jai; Mon, 4 Jan 2021 04:43:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJ1DFhS4NC5SO6xV8a0KfMEoVYA4Dhd4HvdfLu6XAbwjgrtKcs/gTM60TfMxjH2OUcxBc8 X-Received: by 2002:a17:906:3c04:: with SMTP id h4mr64897171ejg.220.1609764239222; Mon, 04 Jan 2021 04:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609764239; cv=none; d=google.com; s=arc-20160816; b=b57x58YqJrJ6JktYFYZOleiumYDgmx0riCMDeNwX3DLMQ0tqIH2sXwRBN4AkhFIQDv h2jab+UF8R7YWBuUlfmB1HaXApL+5cK3Z1O22JcFVuGqk9lLOKstrS3zDfySLXpCLNJe rjOK+zPWtBDiKS/i0OdQDY696m0UZP0JoaQm4EeMqlxkoL1UYGdsRHvQcoPqsCKxSky8 NSW8Ixi2VUkjoyg9kmCo4+TfZP2CzifM92tkvZqxG+Ys3P4VLee4nzqobx7VURbk87gH mKTKSATJR4A3jEWmmc4srRFogv49hGzlVy8e/Ca6tT38OExUqGrOasxQl54h/wC4YfN4 lW5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=k3u+AVmoyV8AjjDEAKA55tnZJ8Kv6tWdf0rL6Di5au0=; b=NOi1jQrLOCkWEZHaiayB9orhfKG59OoHiJHr3vJMkO37IAxvERB7OZ7JlLG7xwDzfn C0nPpHnz1ybUn1WB1DBwoorhvLhZwH2ySi1zntPqCgQP9AkUHUVST50XEnJKHt/LUhzI asRuhaeDaLa4EBpOSuUbnLZAcB6JK+o6xnfATGc42Ca+iOKnpoXXToohw2kPq+9soTsY fjG/PwOsCtgs8HiYIo1bm9yreCwWiAh3HjeCPkI1IfqLyVyKcpkTrDcf3sEV7dTlB1bV dRmG0yX4F+P2PaVfpJoP/6P20MMy6vY6kECiu1jZQfmrlQ1OEC5koe0oDAqqbS57erGk sAHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rAdjzeiC; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si32993070edo.164.2021.01.04.04.43.59; Mon, 04 Jan 2021 04:43:59 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=rAdjzeiC; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbhADMmu (ORCPT + 6 others); Mon, 4 Jan 2021 07:42:50 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:56502 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbhADMmt (ORCPT ); Mon, 4 Jan 2021 07:42:49 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 104Cg1Ai098496; Mon, 4 Jan 2021 06:42:01 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1609764121; bh=k3u+AVmoyV8AjjDEAKA55tnZJ8Kv6tWdf0rL6Di5au0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rAdjzeiC8CQMcOEpvggErBwS75NZ7TMRGP9V6lb9vef9mNtJDUspxN4fmaS2gZRSC e18ZIt+t8YPfxToVroEkRzXTYJjxfhfCEecaqiMuR7WAo/YuBdvCoK/Aucx7TE3iD9 xP3gGfDJhiWqpSVlpCqOuBceYby6d0jMLaAK0YrQ= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 104Cg1mM096157 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Jan 2021 06:42:01 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 4 Jan 2021 06:41:26 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 4 Jan 2021 06:41:26 -0600 Received: from a0393678-ssd.ent.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 104Cf3bk034579; Mon, 4 Jan 2021 06:41:22 -0600 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Rob Herring , Tom Joseph , Lorenzo Pieralisi , Kishon Vijay Abraham I , Nadeem Athani CC: , , , , Subject: [PATCH v2 4/4] PCI: j721e: Add support to provide refclk to PCIe connector Date: Mon, 4 Jan 2021 18:11:03 +0530 Message-ID: <20210104124103.30930-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210104124103.30930-1-kishon@ti.com> References: <20210104124103.30930-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add support to provide refclk to PCIe connector. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/cadence/pci-j721e.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 2.17.1 diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c index dac1ac8a7615..2e73729c7388 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -6,6 +6,7 @@ * Author: Kishon Vijay Abraham I */ +#include #include #include #include @@ -50,6 +51,7 @@ enum link_status { struct j721e_pcie { struct device *dev; + struct clk *refclk; u32 mode; u32 num_lanes; struct cdns_pcie *cdns_pcie; @@ -310,6 +312,7 @@ static int j721e_pcie_probe(struct platform_device *pdev) struct cdns_pcie_ep *ep; struct gpio_desc *gpiod; void __iomem *base; + struct clk *clk; u32 num_lanes; u32 mode; int ret; @@ -408,6 +411,20 @@ static int j721e_pcie_probe(struct platform_device *pdev) goto err_get_sync; } + clk = devm_clk_get_optional(dev, "pcie_refclk"); + if (IS_ERR(clk)) { + dev_err(dev, "failed to get pcie_refclk\n"); + ret = PTR_ERR(clk); + goto err_pcie_setup; + } + + ret = clk_prepare_enable(clk); + if (ret) { + dev_err(dev, "failed to enable pcie_refclk\n"); + goto err_get_sync; + } + pcie->refclk = clk; + /* * "Power Sequencing and Reset Signal Timings" table in * PCI EXPRESS CARD ELECTROMECHANICAL SPECIFICATION, REV. 3.0 @@ -476,6 +493,7 @@ static int j721e_pcie_remove(struct platform_device *pdev) struct cdns_pcie *cdns_pcie = pcie->cdns_pcie; struct device *dev = &pdev->dev; + clk_disable_unprepare(pcie->refclk); cdns_pcie_disable_phy(cdns_pcie); pm_runtime_put(dev); pm_runtime_disable(dev);