Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7819894ybl; Tue, 24 Dec 2019 09:33:28 -0800 (PST) X-Google-Smtp-Source: APXvYqy9Yj/8yAk96iR9PgN05nBrvZzn9SKOCPRZSc3Er1uYKa+MbbCEfuYX5voQN3y723+c1cFd X-Received: by 2002:aca:120e:: with SMTP id 14mr872737ois.135.1577208807988; Tue, 24 Dec 2019 09:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577208807; cv=none; d=google.com; s=arc-20160816; b=Yo228biWhl4FKUVulfs4vffBAupLJr6ZZETG/MNoxgPO0/kRWANm2VfizL8bgA6jAx Dxmad8GRT+KKX9DYaFpv0EMDo7uO4DAraZlnCYDUHgijtMJ7IeiSmdiBSh2AZFumcxo3 7+dIS1v9h+pKThhIMjO5nD6ZkyV84wf/L4HVp4OEPTG1QEIbBEUEVd01LyBfJ8KNtUdd gWOGUIYx9we/CvyitA2kVsRVLHDWzasAce+WjCxiBFvYx0J3CRW5V+r/vGYc6Lrux7Tr qDKjQ4DmkB4gdXUSSndrlizK6intte8kO4Fnhpiawnfy9stznMxjyQJVg9lJvgSuq7To rLAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6VT2SWHybwwDW5nNQFVEKLlc2rLN5IRgoYg7mDGoPFA=; b=I85fhC6RbOkvfm2wBTJq6VM+KkdRwmXDHgQRKYN48vZEtAnjRn2CxQbJ8QpTOLcfvJ LWjIlAit4vbO1Z+jGbYIm3wtnghpxmdfuZGIUVKPenhSwI+wA84LKlRUodtnwV2rgP3X 9WNW9IS6KEtwXMo7/K0j+k9sFm+7La2lJJ5JwW126VVdm/OlPCpnLMZJ3jMjf2C0JDqx tbQn2+gRmrd7kmpzCCrEiHXO7XDNW/441W13C6j+Mr7NRDsD3X3N2GZTMHgKMtcqrPsV uebZBtiBDq9+sG4f4NnX21Cv+bn9rb0zh7mryWZGtGvty5hx3B3VZTaG8TGBjO3bxJns 2/bQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si11374630oij.270.2019.12.24.09.33.14; Tue, 24 Dec 2019 09:33:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726222AbfLXRbz (ORCPT + 99 others); Tue, 24 Dec 2019 12:31:55 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:38419 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbfLXRbz (ORCPT ); Tue, 24 Dec 2019 12:31:55 -0500 Received: from localhost (unknown [88.190.179.123]) (Authenticated sender: repk@triplefau.lt) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 82C4B240004; Tue, 24 Dec 2019 17:31:51 +0000 (UTC) From: Remi Pommarel To: Kishon Vijay Abraham I , Yue Wang , Lorenzo Pieralisi , Andrew Murray , Neil Armstrong , Kevin Hilman , Martin Blumenstingl Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Remi Pommarel Subject: [PATCH v3 0/5] PCI: amlogic: Make PCIe working reliably on AXG platforms Date: Tue, 24 Dec 2019 18:39:37 +0100 Message-Id: <20191224173942.18160-1-repk@triplefau.lt> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PCIe device probing failures have been seen on AXG platforms and were due to unreliable clock signal output. Setting HHI_MIPI_CNTL0[26] bit in MIPI's PHY registers solved the problem. This bit appears to control band gap reference. As discussed here [1] one of these shared MIPI/PCIE PHY register bits was mistakenly implemented in the clock driver as CLKID_MIPI_ENABLE. This adds a PHY driver to control this bit through syscon subsystem instead, as well as setting the band gap one in order to get reliable PCIE communication. While at it adding this PHY make AXG code close to G12A one thus allowing to remove some specific platform handling in pci-meson driver. Please note that CLKID_MIPI_ENABLE removable will be done in a different serie. Changes since v2: - Remove shared MIPI/PCIE device driver and use syscon to access register in PCIE only driver instead - Include devicetree documentation Changes sinve v1: - Move HHI_MIPI_CNTL0 bit control in its own PHY driver - Add a PHY driver for PCIE_PHY registers - Modify pci-meson.c to make use of both PHYs and remove specific handling for AXG and G12A [1] https://lkml.org/lkml/2019/12/16/119 Remi Pommarel (5): phy: amlogic: Add Amlogic AXG PCIE PHY Driver PCI: amlogic: Use AXG PCIE PHY arm64: dts: meson-axg: Add PCIE PHY node dt-bindings: PCI: meson: Update PCIE bindings documentation dt-bindings: Add AXG PCIE PHY bindings .../bindings/pci/amlogic,meson-pcie.txt | 22 +-- .../bindings/phy/amlogic,meson-axg-pcie.yaml | 51 +++++ arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 9 + drivers/pci/controller/dwc/pci-meson.c | 116 ++--------- drivers/phy/amlogic/Kconfig | 11 ++ drivers/phy/amlogic/Makefile | 1 + drivers/phy/amlogic/phy-meson-axg-pcie.c | 185 ++++++++++++++++++ 7 files changed, 287 insertions(+), 108 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/amlogic,meson-axg-pcie.yaml create mode 100644 drivers/phy/amlogic/phy-meson-axg-pcie.c -- 2.24.0