Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3788880imm; Mon, 18 Jun 2018 04:12:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLLQrOrI25OQpfxC6caot1hzTLtBFCRMgymwr+CvqhUZARTa5u7QJfyJoAYOH6PkZOZfCcL X-Received: by 2002:a62:8995:: with SMTP id n21-v6mr12912971pfk.83.1529320342278; Mon, 18 Jun 2018 04:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529320342; cv=none; d=google.com; s=arc-20160816; b=inMkJ0vCcfuCChyb+p97EDVGozfQk5lSm2NlW07070hGWieriMnkIUyUSxeGccdTQA PYsZ41v5iQ9DE+mjVDCEMLIN3+WVzenBI1skyyO8WZk7bNif+mt/zRsYUl0ZHY7/L5Ob zQGnzT2omtYopjB8bg4ssV6il6D59tnxYvjYiJpJgwC8B31iGARxa2WHYn5xDS6dmdLm ziadO+zOCVljbWmsjFdVi1OAqzBahaF6uZdgHucUtqaNmHOthW5g1M5qpebnQMoEmDcV 5DH/h5IWxb8EbFZRR+vAna/I1hwiIpGMMi71pZWYxBuwG0gijXgeVfpm7cNqIfyTyB8v D7DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yC0fGKyy+jisY3tSY3gK/7Wd/D3QhWG4LIK5LNHz/lA=; b=XmXKOrMcPev/ntwmlF4KDPFrwjk2g3dyKT2jsWJCvVFKrwRzmM0ZPFoAuQk2coGcrP 4Nap2GmVyGphfdIh/hLe8anI3Pj9YD3CWE3MgkhcrPoIDD4Zxi3ubKHlTaX0Ghbei8ay 5vFdVRjQZgZsShKAi+MxOC1jGbLAqoCfbkPwZIGtEXrYv3jZn4mKX09Ee3MMEf6xjIt5 7dVk0Mu5VL24/C7q0uBCxFqXxuUbGBQJ+YVExc+NOz+FbQ7f/bmpKpGnLKMwI1EOmpbt 1IoZIauP1i4u6dwn2GKOw0bUGe+V3p3I1QF2cwpfiiBUmpRCEC4PQ8RZySVEJ58ZXC23 fhIA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p8-v6si13741352pfh.249.2018.06.18.04.12.08; Mon, 18 Jun 2018 04:12:22 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755226AbeFRLIh (ORCPT + 99 others); Mon, 18 Jun 2018 07:08:37 -0400 Received: from mga14.intel.com ([192.55.52.115]:37633 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935955AbeFRLHe (ORCPT ); Mon, 18 Jun 2018 07:07:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 04:07:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,238,1526367600"; d="scan'208";a="233457951" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 18 Jun 2018 04:07:30 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 72A62124; Mon, 18 Jun 2018 14:07:31 +0300 (EEST) From: Mika Westerberg To: linux-kernel@vger.kernel.org Cc: Andreas Noever , Michael Jamet , Yehezkel Bernat , Lukas Wunner , "Rafael J. Wysocki" , Christian Kellner , Mario Limonciello , Mika Westerberg Subject: [PATCH 0/5] thunderbolt: Add support for runtime PM Date: Mon, 18 Jun 2018 14:07:26 +0300 Message-Id: <20180618110731.57427-1-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, In recent PCs such as Lenovo X1 Carbon 6th generation the Thunderbolt controller is in RTD3 mode (Runtime D3). This is different from the previous modes because now the controller is present most of the time (it still will be hot-removed/hot-added during NVM firmware upgrade). Because of that we need to dynamically power it down whenever possible to save some power. This patch series adds Linux runtime PM support for the Thunderbolt host controller driver using ICM firmware but it should be generic enough for future additions to allow similar functionality for the older Apple hardware as well (even though those system do not support full RTD3, it still makes it possible for the host controller to go to low power state if cable is not connected). With these patches the driver automatically runtime suspends the host controller after being idle for 15s. The connected Thunderbolt devices (if any) need to support RTD3 mode as well. Typically all 3rd generation devices (Alpine Ridge, Titan Ridge) support this. However, while this provides some power savings, there is more work to do in order to allow powering down the PCIe root port leading to the Thunderbolt PCIe hierarchy. This work is still in progress. Mika Westerberg (5): thunderbolt: Use 64-bit DMA mask if supported by the platform thunderbolt: Do not unnecessarily call ICM get route thunderbolt: No need to take tb->lock in domain suspend/complete thunderbolt: Use correct ICM commands in system suspend thunderbolt: Add support for runtime PM drivers/thunderbolt/domain.c | 55 ++++++++--- drivers/thunderbolt/icm.c | 172 ++++++++++++++++++++++++++++------ drivers/thunderbolt/nhi.c | 46 ++++++++- drivers/thunderbolt/switch.c | 65 ++++++++++++- drivers/thunderbolt/tb.h | 10 ++ drivers/thunderbolt/tb_msgs.h | 4 + drivers/thunderbolt/xdomain.c | 18 ++++ 7 files changed, 323 insertions(+), 47 deletions(-) -- 2.17.1