From patchwork Fri Jul 5 11:41:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nagarjuna Kristam X-Patchwork-Id: 11032487 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 E71B9912 for ; Fri, 5 Jul 2019 11:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5AC928A45 for ; Fri, 5 Jul 2019 11:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA17D28A4B; Fri, 5 Jul 2019 11:42:00 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44D6928A45 for ; Fri, 5 Jul 2019 11:42:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728781AbfGELl7 (ORCPT ); Fri, 5 Jul 2019 07:41:59 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:18396 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728087AbfGELl7 (ORCPT ); Fri, 5 Jul 2019 07:41:59 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 05 Jul 2019 04:42:01 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 05 Jul 2019 04:41:57 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 05 Jul 2019 04:41:57 -0700 Received: from HQMAIL110.nvidia.com (172.18.146.15) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 5 Jul 2019 11:41:56 +0000 Received: from HQMAIL101.nvidia.com (172.20.187.10) by hqmail110.nvidia.com (172.18.146.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 5 Jul 2019 11:41:56 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 5 Jul 2019 11:41:56 +0000 Received: from nkristam-ubuntu.nvidia.com (Not Verified[10.19.65.118]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 05 Jul 2019 04:41:56 -0700 From: Nagarjuna Kristam To: , , , , , CC: , , , Nagarjuna Kristam Subject: [Patch V5 0/8] Tegra XUSB gadget driver support Date: Fri, 5 Jul 2019 17:11:43 +0530 Message-ID: <1562326911-26855-1-git-send-email-nkristam@nvidia.com> X-Mailer: git-send-email 2.7.4 X-NVConfidentiality: public MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1562326921; bh=An+Urv9XV2AD6jTYSCzlN4FzI3Z/ef28K03o6ym3v9E=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:Content-Type; b=PjRIUfS5NDVsspPkaiRPOqaEC/tABcWw1L+qRhExJ0Jg/VhKRE0+zVfmjk6gQSjPB fMTcM7NfNBV/+C3qNfMONKJNqBglUqA9LcOhCQ44qtgFc5AD3GAJ+1Ew/IjDY4Bfhd lYO1F6fOL/5G3saE58UaUoRhACzZNJQVVbPovmnMWjDoLoDJ8+J3jymCg/OqHL03cd z8uLpwMlY6XNxUv5OuPfz5fC8v6kKYRkHEbSlHRNucDRAljgcqFwyAN90o68GS5sE+ MNfqHbqP4o+L0NrHLkt4mgA8A1NsrzTms/ceaOB0ZimDjRPzqd0qxLXPc97FABj1Di uOO2JxGiTl8wQ== Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is the fifth version of series "Tegra XUSB gadget driver support" Patches 1-3 are phy driver changes to add support for device mode. Patches 4-7 are changes related to XUSB device mode controller driver. Patch 8 is to enable XUDC driver in defconfig Test Steps(USB 2.0): - Enable "USB Gadget precomposed configurations" in defconfig - Build, flash and boot Jetson TX1 - Connect Jetson TX1 and Ubuntu device using USB A to Micro B cable - After boot on Jetson TX1 terminal usb0 network device should be enumerated - Assign static ip to usb0 on Jetson TX1 and corresponding net device on ubuntu - Run ping test and transfer test(used scp) to check data transfer communication SS mode is verified by enabling Type A port as peripheral This patch series is dependent on https://patchwork.kernel.org/cover/10986249/ --- v5: * Patches 1-3 - Commit subject updated as per inputs from Thierry * Patch 4 - Added reg-names used on Tegra210 in the bindings doc * Enabled xudc driver as module instead of part of kernel in patch 8 * Patched 5-8 - No changes --- v4: * patch 1 - no changes * corrected companion device search based on inputs from Thierry in patch 2 * removed unneeded dev variable and corrected value read in tegra210_utmi_port_reset function in patch 3 * dt binding doc and dtb files are corrected for alignments. Replaced extcon-usb-gpio with usb role switch. * Added support for USB role switch instead of extcon-usb-gpio and other minor comments as suggested by Chunfeng. * Enabled xudc driver as module instead of part of kernel in patch 8 --- V3: * Rebased patch 1 to top of tree. * Fixed bug in patch 2, where xudc interrupts dont get generated if USB host mode fails to probe. Moved fake port detection logic to generic xusb.c. fake usb port data is updated based on soc flag need_fake_usb3_port. * Added extra lines whereever necessary to make code more readable in patch 3 and 7. * dt binding doc is corrected for typos and extcon references. Also added details for clocks and removed xusb_ references to clock and power-domain names and accordingly patch 5 is updated. * removed avdd-pll-utmip-supply in patch 6, as its now part of padctl driver. * Patch 8 has no changes. --- V2: * Patches 1-3 are new patches in this series, which splits unified features patch to speprated features and removes need of port-fake entry in DT. * Patch 4 is re-arragend dt-bindings patch which incorporates previous patch comments to sort DT entries alphabetically, addresses name changes and PM domain details added. * Patch 5-6 are re-arranged DT patches with major changes - sort entries alphabetically, and adds clock names. * Patch 7 is UDC driver tegra XUSB device mode controller with major changes - remove un-used module params, lockinng for device_mode flag, moving un-needed info logs to debug level, making changes feature flag dependent rather than SOC based macros and other error handling in probe. * Patch 8 has no changes. Nagarjuna Kristam (8): phy: tegra: xusb: Add XUSB dual mode support on Tegra210 phy: tegra: xusb: Add usb3 port fake support on Tegra210 phy: tegra: xusb: Add vbus override support on Tegra210 dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding arm64: tegra: Add xudc node for Tegra210 arm64: tegra: Enable xudc on Jetson TX1 usb: gadget: Add UDC driver for tegra XUSB device mode controller arm64: defconfig: Enable tegra XUDC driver .../devicetree/bindings/usb/nvidia,tegra-xudc.txt | 110 + arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 29 + arch/arm64/boot/dts/nvidia/tegra210.dtsi | 19 + arch/arm64/configs/defconfig | 1 + drivers/phy/tegra/xusb-tegra210.c | 133 +- drivers/phy/tegra/xusb.c | 87 + drivers/phy/tegra/xusb.h | 4 + drivers/usb/gadget/udc/Kconfig | 11 + drivers/usb/gadget/udc/Makefile | 1 + drivers/usb/gadget/udc/tegra_xudc.c | 3808 ++++++++++++++++++++ include/linux/phy/tegra/xusb.h | 4 +- 11 files changed, 4204 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.txt create mode 100644 drivers/usb/gadget/udc/tegra_xudc.c