Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp3072407pxy; Wed, 4 Aug 2021 01:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxftWeSLwydqAqa2WKTRf3OpFJHWtItkep88fDGVrro3fhuStRH3zwclEMCUCHr4Lnyv5wh X-Received: by 2002:aa7:d144:: with SMTP id r4mr29679023edo.111.1628065263342; Wed, 04 Aug 2021 01:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628065263; cv=none; d=google.com; s=arc-20160816; b=A/ycyLuZOEikmvmMWtQvrggDY++z6hr0PGxrvhu1GwHFUzt6YuYrvG0MrBIHXe1OOO 7NsrQTUCFTM0hjvby6l36LRSgYmgPLO0zt+p95vJyv+tf5PrOg6cVnDN1VDIUBiPURdt AQegWuotYdFfwatw33E7YBkhPO77KGcFGkCiYH6g7LdMOIqykUvm1XRwGOCgUGTuCYav 5FUIwoncoIkGZhJxpYUO7KFi7ayLLQAbqTPDdRfUTooHNyiL2BdOjMEtKc/WboyMr8IE vyzD35xZFumwD4VfQr1ULc8Sw46zYnISw4EgWbR4gaDSs1F66EekDG0sUHeyicTrHypt CUdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=JaeVOCD1xjiNZOo9WK4DguArWkRWfpfwXcJD2bxAZ2E=; b=CpLEs4Kb1NOaazJSNDwdZd6RME4N3RVKJYehe292h4M0g2YGFy0ANoaanhQ0T0HHUc VZccEhRfKr2tqj0obBrn+ucI9MlHU22ofTYoITMH8eNCSjcfaZpGR/yqo0eVAX3R5hWw N+m9DFMNlLUexbYDOSfwkpT8iAy3jzXr4lIVi7YqwJkrZvTa0FVValzswTKBRTybCnus p1/7YA7PzT0sKEDihAKM1q6VriRBfvO3KFujJOxSIbarq64nzhLItIx6KWNRKZVrIj8/ ccj4hWbxxPdWAUsoUUCHzdQZuuASh9uMcjkXLjcsbTCwF9OsOgBgtEP3rmR70N9CXwNY qvow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=RUoMD6rT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be21si1535266edb.173.2021.08.04.01.20.40; Wed, 04 Aug 2021 01:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=RUoMD6rT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232023AbhHDITi (ORCPT + 99 others); Wed, 4 Aug 2021 04:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236179AbhHDITh (ORCPT ); Wed, 4 Aug 2021 04:19:37 -0400 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B02C5C061799 for ; Wed, 4 Aug 2021 01:19:23 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id p14-20020a05620a22eeb02903b94aaa0909so1617556qki.15 for ; Wed, 04 Aug 2021 01:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=JaeVOCD1xjiNZOo9WK4DguArWkRWfpfwXcJD2bxAZ2E=; b=RUoMD6rTY3IJ5/5+6xzAN02NV3WPmsnxPG+M6fxPeTNjvM/X4YQhwIGP2Rup96mqcI BhViJzXZSQHeOTbN/UGP3oFMatd7QM8PuTjGcMQb6P+BUarMrSAj517wqzBc6UXudTGK k3bubRgnXNyS+LnPV+vAuaWqRXr4bELD8I4x98i4v27VZYNpbblHw6B61CBOQnVXwQ10 CDP/9NmBDASfZkv6UeCrimgSd1Zoji+aEytv2Cu6cxJf1s4k/kG/r/5p0vPrCqPP/BG8 iWS0q32Muevk+q1Z2hFn+AfPpvNH/D/XyaN/8Hh6JMPPkwdclpQaDQRl2Zg6SNW+dFwG CouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=JaeVOCD1xjiNZOo9WK4DguArWkRWfpfwXcJD2bxAZ2E=; b=auNY24Fv+9wrGGudJPYTTyYUdW12YvY1z6zaWfZi/cwWd5eVOclb/ZskI5FGHeqvZz xrhMkhk34bMynltSoVHPHm0pLys54Swgj8c2sygYShmsDRAcGfI3zPzssAIsV/0EsYn5 Vu0vlkVMABG/eTG55Q481BvjTN37qQbkgnJRVVpFz6LALSRmznJzD+B5+2eWQIevstmA eTd2ujm9T8vsGThH2nd4egNd127hI7UD5FGLkbhOrBU6d8ZwTHJnpre41LZzbN966i+R hm3hotn17ZmIeKjmUOEvab1XZyHdzSRluBo8XoV0s6oKYTu7Ky85kaPGBcmzXcyTdVNb GvFQ== X-Gm-Message-State: AOAM530435SNz2+4M1HiQguXttjYFtqajv+wb0olTd6iYTiRA1ECXykM BlKvpw1Eism1rbH2bZqgXXZKbIJUg/co X-Received: from kyletso.ntc.corp.google.com ([2401:fa00:fc:202:7eb8:c2f5:2e08:d4bc]) (user=kyletso job=sendgmr) by 2002:a05:6214:1021:: with SMTP id k1mr25874996qvr.4.1628065162885; Wed, 04 Aug 2021 01:19:22 -0700 (PDT) Date: Wed, 4 Aug 2021 16:19:15 +0800 Message-Id: <20210804081917.3390341-1-kyletso@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog Subject: [PATCH v6 0/2] TCPM non-PD mode From: Kyle Tso To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, robh+dt@kernel.org Cc: badhri@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Kyle Tso Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (changed the property name only) The reason for this patch is to let the device/system policy decide whether PD is going to be supported using devicetree properties. A new dt property "pd-disable" is introduced and TCPM uses this property as a flag to decide whether PD is supported. If the flag is false (the dt property is not present), the RX functionality of the low-level driver will not be enabled. The power negotiation related states will be skipped as well. If the flag is true, everything is a what it was before. If "pd-disable" is present, and the port is SRC or DRP, another existing dt property "typec-power-opmode" needs to be specified to indicate which Rp value should be used when the port is SRC. changes since v5: dt-bindings: connector: Add pd-disable property - Changed the property name to "pd-disable" usb: typec: tcpm: Support non-PD mode - Changed the property name to "pd-disable" - Added Acked-by tag Kyle Tso (2): dt-bindings: connector: Add pd-disable property usb: typec: tcpm: Support non-PD mode .../bindings/connector/usb-connector.yaml | 4 + drivers/usb/typec/tcpm/tcpm.c | 87 +++++++++++++++---- 2 files changed, 72 insertions(+), 19 deletions(-) -- 2.32.0.554.ge1b32706d8-goog