From patchwork Mon May 7 07:33:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 909556 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="B92gApFK"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40fZBH42P6z9ryk for ; Mon, 7 May 2018 17:34:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3EF6DC22077; Mon, 7 May 2018 07:34:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_WEB,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 70849C22018; Mon, 7 May 2018 07:34:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E6BE6C22018; Mon, 7 May 2018 07:34:02 +0000 (UTC) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by lists.denx.de (Postfix) with ESMTPS id 30031C21FB0 for ; Mon, 7 May 2018 07:34:02 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id g20-v6so12928413pgv.1 for ; Mon, 07 May 2018 00:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=/kSyAzPPIoZqN01OJd7/ZpWY2B6gt2/SLhRcVu9f4Sw=; b=B92gApFKzDcY4wsbBD9mr2L8azLET3vxYNBJeeowmoaF8cvOQ1ZT1S7dcOoxrW4xpl ZUkoU5dcxoIBHmYY0douYdBo4u6QKegAUUkHOYLipSNRxi6CTIv9bz74GStm3l7505k2 g03nFKS37k80GALXj2DnhlsfMHZ7EaH0fzJnM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/kSyAzPPIoZqN01OJd7/ZpWY2B6gt2/SLhRcVu9f4Sw=; b=N659eub9zH5JzhLzCo46YfEZNkntbBDBzXhmIS9Df37Jmsqec4Lz4CjePoMo6KGASg lXJ8EH7RtLzj6RMaNf9zy8HP254HV+/urdRibvQNxL7O8WW4NdJNkORpPmirSYTWKkP+ bnOvnZ69knlzcA/o8y/RhCPrLuWIo0yLTUpCHH4RPCFEBUbJkYPlMwgJrHG8CO3qxRQq hVxbB1EMdM/cu/YGw167GG1+PPWdiHwQnQRWeAFSyBu4AtGJAbA7ESdkvBllceVpA3BK vxeAptd70Vv/8QfQPgs5ek0BLph0iMtMXz3uPodkvOvCK+hk64C4XlyjUyjJEmz3J7E9 5j5g== X-Gm-Message-State: ALQs6tAmZsh/Cb/s+bTRID9U5h1LcreuFfL7GgGUWy4LirZrsgTu9b+f aFzZWJfNNsYD8XlqSWsBJnMIBPaI8po= X-Google-Smtp-Source: AB8JxZqMAarRoZ+BHaLZcNtC9y5Lm9a3ngqtPzgoRT2Z6G951egQIHTfPiiTt+T5odcHBZfu2S3pfg== X-Received: by 2002:a17:902:265:: with SMTP id 92-v6mr36006361plc.368.1525678439986; Mon, 07 May 2018 00:33:59 -0700 (PDT) Received: from localhost.localdomain ([183.82.228.172]) by smtp.gmail.com with ESMTPSA id 76sm59400891pfm.178.2018.05.07.00.33.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 May 2018 00:33:59 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de Date: Mon, 7 May 2018 13:03:16 +0530 Message-Id: <20180507073351.30582-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 Cc: Maxime Ripard , Marek Vasut , linux-sunxi@googlegroups.com Subject: [U-Boot] [PATCH v7 00/35] phy: sunxi: Add Allwinner sun4i USB PHY X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This series rework of previous version where it removes legacy usb phy handling and added phy driver on generic-phy framework. Current implementation phy driver is unable to get pinctrl, clock and reset details from DT since the dm code on these will add it future. Changes for v7: - rebase on master Changes for v6: - Create private config for passing through driver_data instead directly passing musb_config. This make room for adding new configs in coming patches. - memset to pdata in musb-new/sunxi.c Changes for v5: - Rework of previous series - Used driver_data on sunxi.c since dt supported - tested on bpi-m2-plus, orangepi_pc2/prime, bananapi-m64 Changes for v4: - Rework of previous series - Add Allwinner sun4i USB PHY driver - Drop legacy arch/arm/mach-sunxi/usb_phy.c and related code Chen-Yu Tsai (1): sunxi: clock: Fix OHCI clock gating for H3/H5 Jagan Teki (33): usb: sunxi: Simplify ccm reg base code musb: sunxi: Add proper macros instead of numericals musb: sunxi: Use simple way to fill musb_hdrc pdata musb: sunxi: Add fifo config sunxi: clock: Fix clock gating for H3/H5/A64 musb: sunxi: Add OTG device clkgate and reset for H3/H5 musb: sunxi: Use BIT instead of numerical shift musb: sunxi: Add support for H3/H5A64 phy: Add Allwinner A64 USB PHY driver phy: sun4i-usb: Add id_detect and vbus_detect ops phy: sun4i-usb: Add H3/H5 PHY config phy: sun4i-usb: Add V3S PHY config phy: sun4i-usb: Add A83T USB PHY config phy: sun4i-usb: Add A10/A13/A20 PHY config phy: sun4i-usb: Add A31 PHY config phy: sun4i-usb: Add A33 USB PHY config phy: sun4i-usb: Add A23 USB PHY config device-tree-bindings: phy: Sync sun4i-usb-phy bindings board: sunxi: Use generic-phy for board_usb_cable_connected phy: sun4i-usb: Add a sunxi specific function for setting squelch-detect usb: sunxi: Switch to use generic-phy sunxi: Drop legacy usb_phy.c arm64: allwinner: a64: bananapi-m64: Sync usb_otg node from Linux configs: bananapi-m64: Enable USB OTG peripheral mode ARM: dts: sun8i: a83t: Sync usbphy node from Linux arm64: allwinner: a64: bananapi-m64: Sync usb host nodes from Linux ARM: dts: sun8i-h3: bananapi-m2-plus: Sync usb otg nodes from Linux configs: bananapi-m2-plus: Enable USB OTG peripheral mode arm64: allwinner: h5: orangepi-pc2: Order nodes in alphabetic arm64: allwinner: h5: orangepi-pc2: Sync usb otg nodes from Linux configs: orangepi-pc2: Enable USB OTG peripheral mode arm64: allwinner: h5: orangepi-prime: Sync usb otg nodes from Linux configs: orangepi-prime: Enable USB OTG peripheral mode Jun Nie (1): sunxi: h3: Sync OTG and HCI nodes from Linux DT arch/arm/dts/sun50i-a64-bananapi-m64.dts | 26 ++ arch/arm/dts/sun50i-h5-orangepi-pc2.dts | 59 ++- arch/arm/dts/sun50i-h5-orangepi-prime.dts | 13 + arch/arm/dts/sun8i-a83t.dtsi | 20 + arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts | 13 + arch/arm/dts/sun8i-h3.dtsi | 32 ++ arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 23 +- arch/arm/include/asm/arch-sunxi/usb_phy.h | 21 - arch/arm/mach-sunxi/Kconfig | 9 + arch/arm/mach-sunxi/Makefile | 3 - arch/arm/mach-sunxi/usb_phy.c | 407 ----------------- board/sunxi/board.c | 40 +- configs/Sinovoip_BPI_M2_Plus_defconfig | 1 + configs/bananapi_m64_defconfig | 1 + configs/orangepi_pc2_defconfig | 1 + configs/orangepi_prime_defconfig | 1 + doc/device-tree-bindings/phy/sun4i-usb-phy.txt | 65 +++ drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/phy/allwinner/Kconfig | 13 + drivers/phy/allwinner/Makefile | 6 + drivers/phy/allwinner/phy-sun4i-usb.c | 575 +++++++++++++++++++++++++ drivers/usb/host/ehci-sunxi.c | 66 ++- drivers/usb/host/ohci-sunxi.c | 72 +++- drivers/usb/musb-new/musb_core.h | 4 + drivers/usb/musb-new/musb_regs.h | 3 +- drivers/usb/musb-new/musb_uboot.c | 22 +- drivers/usb/musb-new/sunxi.c | 228 ++++++++-- include/phy-sun4i-usb.h | 34 ++ 29 files changed, 1191 insertions(+), 570 deletions(-) delete mode 100644 arch/arm/include/asm/arch-sunxi/usb_phy.h delete mode 100644 arch/arm/mach-sunxi/usb_phy.c create mode 100644 doc/device-tree-bindings/phy/sun4i-usb-phy.txt create mode 100644 drivers/phy/allwinner/Kconfig create mode 100644 drivers/phy/allwinner/Makefile create mode 100644 drivers/phy/allwinner/phy-sun4i-usb.c create mode 100644 include/phy-sun4i-usb.h Acked-by: Jun Nie