From patchwork Mon Nov 16 14:19:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 324745 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=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 89458C64E90 for ; Mon, 16 Nov 2020 14:20:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F2CE2222C for ; Mon, 16 Nov 2020 14:20:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729969AbgKPOT5 (ORCPT ); Mon, 16 Nov 2020 09:19:57 -0500 Received: from out28-170.mail.aliyun.com ([115.124.28.170]:59150 "EHLO out28-170.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbgKPOTv (ORCPT ); Mon, 16 Nov 2020 09:19:51 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.08245762|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.22616-0.0193576-0.754482; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047211; MF=zhouyanjie@wanyeetech.com; NM=1; PH=DS; RN=18; RT=18; SR=0; TI=SMTPD_---.IxS0Otf_1605536372; Received: from localhost.localdomain(mailfrom:zhouyanjie@wanyeetech.com fp:SMTPD_---.IxS0Otf_1605536372) by smtp.aliyun-inc.com(10.147.40.7); Mon, 16 Nov 2020 22:19:44 +0800 From: =?utf-8?b?5ZGo55Cw5p2wIChaaG91IFlhbmppZSk=?= To: balbi@kernel.org, gregkh@linuxfoundation.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, kishon@ti.com, vkoul@kernel.org Cc: linux-clk@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dongsheng.qiu@ingenic.com, aric.pzqi@ingenic.com, rick.tyliu@ingenic.com, yanfei.li@ingenic.com, sernia.zhou@foxmail.com, zhenwenjin@gmail.com, paul@crapouillou.net Subject: [PATCH v9 0/3] Use the generic PHY framework for Ingenic USB PHY. Date: Mon, 16 Nov 2020 22:19:03 +0800 Message-Id: <20201116141906.11758-1-zhouyanjie@wanyeetech.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org v3->v4: Only add new generic-PHY driver, without removing the old one. Because the jz4740-musb driver is not ready to use the generic PHY framework. When the jz4740-musb driver is modified to use the generic PHY framework, the old jz4770-phy driver can be "retired". v4->v5: 1.Add an extra blank line between "devm_of_phy_provider_register" and "return". 2.Remove unnecessary "phy_set_drvdata". 3.Add Paul Cercueil's Reviewed-by. v5->v6: 1.Revert the removal of "phy_set_drvdata" in v5, removing "phy_set_drvdata" will cause a kernel panic on CI20. Reported-by: H. Nikolaus Schaller 2.Rewrite the macro definitions, replace the original code with "FIELD_PREP()" and "u32p_replace_bits()" according to Vinod Koul's suggestion. v6->v7: 1.Remove the stray tab character. 2.Remove unnecessary "platform_set_drvdata". 3.Remove the "dev" field in priv structure, and use &phy->dev instead. v7->v8: Add support for Ingenic JZ4775 SoC and X2000 SoC. v8->v9: Correct the path errors in "ingenic,phy-usb.yaml" and "ingenic,cgu.yaml". 周琰杰 (Zhou Yanjie) (3): USB: PHY: JZ4770: Remove unnecessary function calls. dt-bindings: USB: Add bindings for Ingenic JZ4775 and X2000. PHY: Ingenic: Add USB PHY driver using generic PHY framework. .../devicetree/bindings/clock/ingenic,cgu.yaml | 2 +- .../ingenic,phy-usb.yaml} | 4 +- drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/ingenic/Kconfig | 12 + drivers/phy/ingenic/Makefile | 2 + drivers/phy/ingenic/phy-ingenic-usb.c | 412 +++++++++++++++++++++ drivers/usb/phy/phy-jz4770.c | 2 +- 8 files changed, 433 insertions(+), 3 deletions(-) rename Documentation/devicetree/bindings/{usb/ingenic,jz4770-phy.yaml => phy/ingenic,phy-usb.yaml} (89%) create mode 100644 drivers/phy/ingenic/Kconfig create mode 100644 drivers/phy/ingenic/Makefile create mode 100644 drivers/phy/ingenic/phy-ingenic-usb.c