Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1724494ybg; Sat, 19 Oct 2019 01:08:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPZWjMP5W3eIxfLwYoP2fn9MII9XERkCLDc0bc64BcRXB06Eoj60xkU7QdQQR9W6umO5uG X-Received: by 2002:a17:906:6a8e:: with SMTP id p14mr12466030ejr.137.1571472481136; Sat, 19 Oct 2019 01:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472481; cv=none; d=google.com; s=arc-20160816; b=ZCYDNixN58yDvdxfYPENM7VBlnryu5Nbi+LLg5W8aM38e1XI6dHnmvUDnqCLQbKDBj Cttk0ONWpJ91oZg+EAdq/LtFzO0abzTVX1cCCb09vdknMoAYeQi48YPY9PhCpIlMx3gx WTyHDTTHP6GzVuMsLVjEQg942KI0gzSRFnrOf7omQlW5Q9WUXrboh52r7uM0clhabsSF xRBVUWyFlEq2D+jIfNJ9wdspf8F9fks8YEfoRoG4IkwAXfmPN29x+pHOoBTHQ0wfqfd/ 6rDoV09yPgQTco3oCbi8nRm/VHHyIRokd0sI1a9sE8m2ppQie0XL0BqDqwU4No4Nuquj Rr/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:message-id :date:subject:cc:to:from; bh=47EXNA3S0+KHjdoC83yPa5Gt6NFURER54GHBRG5i5pA=; b=AnedfgSiLybmrmn+4rPFKG5StQiY+yojZVA1TgSOu9Lh/m3g5HtMYH8/uqhPocXdeA JfvEv0qrcPFIml1N/qvagnflAwAWZg/l34QMRbCHSOsvPH5VwQz+OWhHG/zysy0lFRrU 4JQCf9aU7R7k3gZ9I5daxKDwdKijb/skc0Sx5oQj+jkc9eRtU5HYbL/mn2bgE02pKmq1 1QdzSroTDaFnyEmkjWnR4e/0ExBRPWB0IZyfJ2sQLgNXZmzzGn9MqTYXfofOkX5Z7sX9 EP4dK9LHT8N/N9gISen616kva+zSxQJNB4q4+NF3zJ8wVfj5cxqi/3QgsIY0srk5EA5C qAmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=Bal5tBxe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gw6si4899920ejb.176.2019.10.19.01.07.38; Sat, 19 Oct 2019 01:08:01 -0700 (PDT) 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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=Bal5tBxe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407382AbfJRJjQ (ORCPT + 99 others); Fri, 18 Oct 2019 05:39:16 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:13319 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406647AbfJRJjO (ORCPT ); Fri, 18 Oct 2019 05:39:14 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 18 Oct 2019 02:39:15 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 18 Oct 2019 02:39:12 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 18 Oct 2019 02:39:12 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 18 Oct 2019 09:39:11 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 18 Oct 2019 09:39:11 +0000 Received: from nkristam-ubuntu.nvidia.com (Not Verified[10.19.66.147]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 18 Oct 2019 02:39:11 -0700 From: Nagarjuna Kristam To: , , , , , , CC: , , , , Nagarjuna Kristam Subject: [Patch V11 00/11] Tegra XUSB gadget driver support Date: Fri, 18 Oct 2019 15:08:05 +0530 Message-ID: <1571391496-20834-1-git-send-email-nkristam@nvidia.com> X-Mailer: git-send-email 2.7.4 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1571391555; bh=47EXNA3S0+KHjdoC83yPa5Gt6NFURER54GHBRG5i5pA=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:Content-Type; b=Bal5tBxeu4JrdAR5lO3R1bfYIT20BZD/iI/y91irr/3aF+dbWKYjL2G5X7PRPUPs3 2ZK5os9kQelLqDnaivyh4il2jYuJnK+qGVdOgMYcjlEeRX+/ZNud/yDXVjdkLohH7g IdKBuy1ryGnBvtqlOJ7MWh1GCXhFCNT+zkhCUJs+yYBAQccV84HllOu0zPgd6dg9ge 27FjRbw3ZxTNLwKLqlaNVGFXcnsexo+8hptckpZHE/oP5POFHTHJ/CWh+g6k1uwsOF ArPZclwpRacJw2ZTbCu6TBsrfJtIQoDOnxjjaugLQLI2OQNegl49CQBKljq8z+7W0O nF5ERIFaBxQmg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Patches 1-4 are phy driver changes to add support for device mode. Patches 5-10 are changes related to XUSB device mode controller driver. Patch 11 is to enable drivers for XUDC support 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 --- v11: * Patches 1,2,3 - No changes. * Patch 4 is new patch in the series to add support for Tegra186. * Patch 5(previously patch 4) - added Tegra186 compatible. * Patches 6,7(previously patches 5,6) - No changes. * Patch 8,9 are new patches to add support for Jetson-TX2 platform. * Patch 10(previously Patch 7) - added Tegra186 soc data. * Patch 11(previously Patch 8) - No changes. --- v10: * Patches 1,2,4,5,7,8 - No changes. * Patch 3 has braces added to one single line else condition. * Patch 6 has update on compatible string as per suggestion from Chunfeng. --- v9: * Patches 1,2,3,4,5 - No changes. * Patch 6 has update on compatible string as per suggestion from Chunfeng. * Patch 7 has comment fixes as suggested by Chunfeng. * Patch 8 has CONFIG_USB_GPIO enabled as module additionally. --- v8: * Patches 1,2,3,4,5,8 - No changes. * Patch 6 has update on compatible string as per change done in [1]. * Patch 7 has issue fix, where device mode didnot got enabled after resume from suspend. --- v7: * Patches 1,2,3,4,5,6,8 - No changes. * Patch 7 - Comments from Balbi and Chunfun adrresed. Added COMPILE_TEST in Kconfig and updated dependencies. --- v6: * Patches 1,2,3,7,8 - No changes. * Patch 4,5,6 - Comments from Rob addressed, updated usb connector driver compatibility string. --- 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 phy: tegra: xusb: Add vbus override support on Tegra186 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 arm64: tegra: Add xudc node for Tegra186 arm64: tegra: Enable xudc on Jetson TX2 usb: gadget: Add UDC driver for tegra XUSB device mode controller arm64: defconfig: Enable tegra XUDC support .../devicetree/bindings/usb/nvidia,tegra-xudc.txt | 112 + arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 29 +- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 19 + arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 31 +- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 19 + arch/arm64/configs/defconfig | 2 + drivers/phy/tegra/xusb-tegra186.c | 23 + drivers/phy/tegra/xusb-tegra210.c | 134 +- 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 | 3810 ++++++++++++++++++++ include/linux/phy/tegra/xusb.h | 4 +- 14 files changed, 4281 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.txt create mode 100644 drivers/usb/gadget/udc/tegra-xudc.c -- 2.7.4