Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp726370rdb; Thu, 15 Feb 2024 13:35:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX5BugRcA601Hkl+9zyW7HJFp7szgMDk8XjHzkx1pOhbMfyBFPL/pwiLkPfbqWNms1UMiz33uBQ4CfYwz4bZk1nLEdvNTEP1L1rYVQuKA== X-Google-Smtp-Source: AGHT+IEEp4JFynbZ23eLFXoQaRZ3ASN0vK7p/ouF14txeYa+ul3j19JgCFx0EaXkTLbjW6dB5RB/ X-Received: by 2002:a17:902:9304:b0:1db:3618:fed5 with SMTP id bc4-20020a170902930400b001db3618fed5mr2778128plb.53.1708032940953; Thu, 15 Feb 2024 13:35:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708032940; cv=pass; d=google.com; s=arc-20160816; b=mWRWE12Ol5kOGbOuW+sB/qFLD6wPw2DwgFn4g5y/q/MC49bMwtGfe2/bZiEH2LBLsp ebznY59qui6rHNTQxPFo6JRBX8J9hvYtVyXPPIv+soX9qhtyswlSlC1fNekKudvZyQcM aqQunlM80y8swXfJMCMIyHV0DzFQtlKFcNq52Je8kHRRuKVmhglE+NQJtqgc3aRVXXKB t8UjTKVNmOYsk6S42UoD94Kt7xS5xAKKSU+l4siv1KtkfDm7S9izWqPm5SitTRuPzmvx vUQfXNr0DlInAKly58m/R1C4B7Mh7gfCjoufaZnIYtEWRUK5jZ96WehAKwcCI0zP3fOx 2WsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=IllXi7vdV173Kc7m29pGDrhvtqTaPbzo9B0qVFvgWqo=; fh=/cbLjW7Rfwzb3I2vrEK+NHt6YgOcJ+Bp+XUtKNVrstM=; b=TyTlD2cEt8LZ07fwUzufXAtHqF9T8+mOAMjn3LsY6IRkpdjlUT99mkYYHC5EdMWodT wlka/lC04czAuQikunyxm8ra4te7hm7xVz2IY5Eff2KugcCtCN2IUwXvlKg1ZrTZQ7fk 5QKbY5DSbLm31SUF/6Hl2r0mvZi9Ooz9UaDdr2rOAz3kf7US8scFmCzNP+UxnKbUuRpH e0JlNP3Sh3pwZHlAwwdzLI3ONnkfhO1TihlShidVuBXnV+YhvvXHwhiQplCCmXohE4A6 gBSrts1+M4irLGIT3DkZLElwpSJOz6WgkjTmgqexdxeookqI20qCfcaSVpg6HfCUEvlW 4ErQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-67694-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67694-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u5-20020a170903124500b001da2a3a75d2si1759203plh.393.2024.02.15.13.35.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 13:35:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67694-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-67694-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67694-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7A0FBB246F5 for ; Thu, 15 Feb 2024 21:29:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B1B6145325; Thu, 15 Feb 2024 21:29:13 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 246741420DF for ; Thu, 15 Feb 2024 21:29:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708032552; cv=none; b=uchUtY8iG2iqGqfwMTF35TizuOPIABrjGF5A1Tfx6polUeGGN119F1/6qZ9RqPuRVkG89AK9+0vozDy71a9NN5UfcghyWolTGJI1wXDVuLqukx9OejejqtVHtDsAIxnQp2bcnzzlGIv56NPT1mO1CQVm0k4qvM1dgxr5LAPdOvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708032552; c=relaxed/simple; bh=misj/VnHm/JTS+8SMdYAdNFoik7B5vvtXFX8JuijlvM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=SmIifueAoU+nnn+VtRNTwsruUJSQ/VEr2+s3DZK9p+GLEbyVQkFCAH75fcPm4BFZyMbXM4wyYeizLRxEcwwlhLPNiV/nseLl5DcOG76HUxFlKQMagzVNUTY0sNY8m3cVCZU7T+e37vSF4aJlEPARouuESUfPknEjaTTAQHmG3eA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1rajHr-0001xh-6z; Thu, 15 Feb 2024 22:28:55 +0100 From: Marco Felsch To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux@roeck-us.net, heikki.krogerus@linux.intel.com, jun.li@nxp.com Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v2 0/4] USB-C TCPM Orientation Support Date: Thu, 15 Feb 2024 22:28:48 +0100 Message-Id: <20240215212852.1202339-1-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Hi, this adds the support to controll the optional connector-orientation available on some TCPC from the TCPM. I used an custom board with OnSemi FUSB307B TCPC which is spec [1] compatible but albeit the spec [1] says that this pin is controlled by the TCPC if 'TCPC_CONTROL.DebugAccessoryControl = 0' it isn't at least for this device. I'm unsure if the usb tcpci spec has an copy'n'paste failure since 'TCPC_CONTROL.DebugAccessoryControl' shouldn't control the state of the 'connector orientation' pin or if the OnSemi FUSB307B has an HW bug. Since on my device the 'TCPC_CONTROL.DebugAccessoryControl' is set to 0 but the register wasn't updated automatically. Regards, Marco [1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf Marco Felsch (4): dt-bindings: usb: typec-tcpci: add tcpci fallback binding usb: typec: tcpci: add generic tcpci fallback compatible usb: typec: tcpm: add support to set tcpc connector orientatition usb: typec: tcpci: add support to set connector orientation .../devicetree/bindings/usb/nxp,ptn5110.yaml | 4 +- drivers/usb/typec/tcpm/tcpci.c | 45 +++++++++++++++++++ drivers/usb/typec/tcpm/tcpm.c | 6 +++ include/linux/usb/tcpci.h | 8 ++++ include/linux/usb/tcpm.h | 2 + 5 files changed, 64 insertions(+), 1 deletion(-) -- 2.39.2