From patchwork Tue Jan 29 09:36:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 10785879 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83BB3922 for ; Tue, 29 Jan 2019 09:37:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75B372A6B3 for ; Tue, 29 Jan 2019 09:37:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 696602ABB3; Tue, 29 Jan 2019 09:37:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F292A2A6B3 for ; Tue, 29 Jan 2019 09:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=ZlZFIb7v2aS0vS5KiA9kGEESY9pTqvS9oUTkPU4vNQo=; b=LOrTsEbH3Xxxwt dSFeVuswHfSKzWvNcpY/LGl3aRLdh7lJXs+HZ5ZzxYL8/+tJ05ZWM22Z7WbFVg0eFVLj4QOFhHYIe 2W2dyUjdsHfd4Q7hEHJh93CJxIwbxdIkFJ9V1+KTNZxMcyggN+SXJDtJ2idduM6TYg/m30jU9c+eM OuuFDZoQUnbJIiIu+L7RjwU84lV1G/3cucI088etCCndyx57cYRYHKk24tRmV+O25phXKjfCKTpo/ TGGVjvvtHCNmtCggCiZNWtMpbAkq5Oj/l9amWx8PgWsxQT6xlIvqJSDyEfFfwloMQEkY3uV1ky1c5 k427l6aKr2mRHC+qynxg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goPpm-0004EP-QI; Tue, 29 Jan 2019 09:37:34 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goPp7-0003eG-Re for linux-arm-kernel@lists.infradead.org; Tue, 29 Jan 2019 09:36:57 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 4C55320A18; Tue, 29 Jan 2019 10:36:47 +0100 (CET) Received: from localhost.localdomain (aaubervilliers-681-1-87-206.w90-88.abo.wanadoo.fr [90.88.29.206]) by mail.bootlin.com (Postfix) with ESMTPSA id D837C20654; Tue, 29 Jan 2019 10:36:36 +0100 (CET) From: Miquel Raynal To: Kishon Vijay Abraham I , Rob Herring , Mark Rutland , Gregory Clement , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth Subject: [PATCH v5 0/6] A3700 USB UTMI PHY support Date: Tue, 29 Jan 2019 10:36:29 +0100 Message-Id: <20190129093635.4321-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190129_013654_174795_AA5093CA X-CRM114-Status: GOOD ( 16.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Antoine Tenart , Maxime Chevallier , Nadav Haklai , Thomas Petazzoni , Miquel Raynal , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP USB2 on A3700 only works because U-Boot initializes the UTMI PHYs (one wired to each USB controller). While there is no issue with regular use, this architecture does not allow suspend to RAM to work as the PHYs must be re-initialized at resume. In order to support this feature, this series adds a UTMI PHY driver for the A3700 SoC. The A3700 device tree is updated to reference the PHYs. Thanks, Miquèl Changes since v4: ================= * Drop USB patches as they have been sent in a separate series. No real functional changes since the v4 though, kind of a resend of the PHY patches from the "A3700 USB S2RAM support" series. Changes since v3: ================= * Bindings: as suggested by Gregory and Rob, used the "-misc" suffix instead of "-miscellaneous" and prefixed the compatible with "armada-3700" to follow what has been used for the other IPs of the same SoC (and added Rob's ack). Changes since v2: ================= * Typos * UTMI PHY bindings: > New name for the USB2 host/PHY syscons (+ changes in the DT). > Clearly state that the PHYs are different between OTG and host-only controllers. * UTMI PHY driver: > Use GENMASK macro. > Removed useless checks on driver data retrieval. > Dropped the empty ->remove() hook. > Updated the licence macro to match the SPDX tag. > Used the of_device_get_match_data() helper. > Removed the use of a local variable in the ->probe() for the driver's operations. > Fixed the driver co-author: Igal, not Evan. Changes since v1: ================= * Add UTMI PHY driver/bindings/DT changes to bring S2RAM support to both USB ports available on the A3700 SoC. * Rebased on top of v5.0-rc1. Miquel Raynal (6): phy: add A3700 UTMI PHY driver dt-bindings: phy: mvebu-utmi: add UTMI PHY bindings MAINTAINERS: phy: fill Armada 3700 PHY drivers entry ARM64: dts: marvell: armada-37xx: fix USB2 memory region ARM64: dts: marvell: armada-37xx: declare USB2 UTMI PHYs ARM64: dts: marvell: armada-37xx: link USB hosts with their PHYs .../bindings/phy/phy-mvebu-utmi.txt | 38 +++ MAINTAINERS | 4 +- arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 34 ++- drivers/phy/marvell/Kconfig | 9 + drivers/phy/marvell/Makefile | 1 + drivers/phy/marvell/phy-mvebu-a3700-utmi.c | 278 ++++++++++++++++++ 6 files changed, 362 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt create mode 100644 drivers/phy/marvell/phy-mvebu-a3700-utmi.c