From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 D4F45C4BA35 for ; Thu, 27 Feb 2020 02:03:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7640222C2 for ; Thu, 27 Feb 2020 02:03:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="BaJLcL01" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728274AbgB0CD1 (ORCPT ); Wed, 26 Feb 2020 21:03:27 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:17935 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728217AbgB0CD0 (ORCPT ); Wed, 26 Feb 2020 21:03:26 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 26 Feb 2020 18:02:49 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 26 Feb 2020 18:03:26 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 26 Feb 2020 18:03:26 -0800 Received: from [10.19.108.125] (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 27 Feb 2020 02:03:24 +0000 Subject: Re: [PATCH] usb: host: xhci-tegra: Tegra186/Tegra194 LPM To: Mathias Nyman , Thierry Reding CC: , , , , References: <20200224062145.25785-1-jckuo@nvidia.com> <20200224125100.GA2108060@ulmo> <223f5f09-781a-825d-e75e-3b878acec27d@nvidia.com> <6c93af2b-5a4d-a3ad-07f4-f5c72f569752@linux.intel.com> X-Nvconfidentiality: public From: JC Kuo Message-ID: Date: Thu, 27 Feb 2020 10:03:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <6c93af2b-5a4d-a3ad-07f4-f5c72f569752@linux.intel.com> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1582768969; bh=lK6dW+IEyWhiwClCKvj+UqE+UR6I9nzlO2znKXwoWDM=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=BaJLcL01rmpSpRsgTrZ9/YKvBXkFV3y6/VSnJjCvqX/kc3zyeLagz/SzOkxbrDYG2 T35gfIeD9677HXPMM9iKP1GFhbaXhuqCK4z1wrGwT0yuMbMJ2YnfiO1TU37r40eYKa 9x0NzTJfyk0nDtJDkvkQzLy8CTd1CYCBhRR0jtVrXG3YUPQKpB/CV+yiJ6nvSxVlYa N+mzEvEYUqbBDTEwl64CZBGeT1AU09TMHe17bBdX4EJqC+g9dPYlRi6a8DmMKDMlSd ppGEYPtNn/XHwmsbCrkPe4N2Z842YZIYdjNAsEZ96Y6sHCwspgSJkBtkiDd8602lgV BRBqMLsPwRgtA== Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi Mathias, Thanks for the tip. It's really helpful. root@tegra-ubuntu:/d/usb/xhci/3610000.usb/ports/port04# cat portsc Powered Connected Enabled Link:U2 PortSpeed:4 Change: Wake: -JC On 2/26/20 5:32 PM, Mathias Nyman wrote: > On 26.2.2020 10.12, JC Kuo wrote: >> Hi Thierry, >> Yes, it can be verified with a LPM capable device. For example, a VIA USB 3.0 >> hub is connected to Jetson-Xavier. "lsusb -v" output [1] shows the device >> supports LPM and the host has enabled U1/U2 states for the device. If host LPM >> is disabled, there will be no "U1 Enabled" and "U2 Enabled" strings in "Device >> Status" section. >> >> To check LPM operation, disconnect all USB 3.0 devices from the hub and disable >> runtime PM for the super-speed portion of the hub, so that it won't be >> auto-suspended. >> root@tegra-ubuntu:~# echo on > /sys/bus/usb/devices/2-4/power/control >> >> Since there is no data transaction for the hub, link will enter U2 soon. This >> can be checked by reading XHCI.PORTSC register. In below, PLS (Port Link State) >> field is U2. >> root@tegra-ubuntu:~# devmem 0x3610450 >> 0x00001243 > > A more human friendly way to read portsc registers: > > # cat /sys/kernel/debug/usb/xhci/0000\:00\:14.0/ports/port02/portsc > Powered Connected Enabled Link:U0 PortSpeed:3 Change: Wake: > > -Mathias >