Message ID | 20240222210903.208901-1-m.felsch@pengutronix.de |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-77364-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp219503dyb; Thu, 22 Feb 2024 13:28:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV79UASKRPt+ZYmYzncNFenXGbpO7vzRPEfc4LXuod1NEEFHTIqY7jPuWXgRKE1+qvY4C3lFBCDU7ubwjgQ422O4+ixcQ== X-Google-Smtp-Source: AGHT+IFCPTY3YJ2pVyA/ThYwS/kc1Pc1LJtzwSzJCieoFszLdZLsgHBXoXdsSyZsRhsg/KxXofM4 X-Received: by 2002:a17:903:11c6:b0:1db:e7a7:63f4 with SMTP id q6-20020a17090311c600b001dbe7a763f4mr117367plh.19.1708637291972; Thu, 22 Feb 2024 13:28:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708637291; cv=pass; d=google.com; s=arc-20160816; b=BDUvlb4rMCC6wzyG/EG2BmSbZSEucv5Slbq+tVHNljLUau7NLo7TZOEdFUGNfzI2ls qsbwxpCogsFbC+GX2760qhVKMaVXklZhsS6iI4DbNhC+/Rq1lFfytQDDAb25U54JxNs4 FyT6MZSRFY0bkY6QNyZ3bZPCTSLpmX+MRNLM/gcSI/fLqwXR3hG80fKkH05APCWoGsbZ 0FBfmm4DhCwetFniqmMfIOeM1ywv9UVVTWUOgtEWiZsI/S/rE4y/WH7twOhjdg2gPHDr s9g6CefF35aAISVMOikfrc8ViwbVnDeaSkSTmhsaCx8CMrbyXOdLo65k3Hi6NkQbL+nj snLg== 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=QFr4NYyXsnWwh9B5F/JhgE24cTREw/FrW8S+pjED9nw=; fh=FttDRjnFdpjso3V5tb3WR+hSGsT8UJL4OhhG9l/Cs7o=; b=akhhMaK/pmQRndgB74ItnB5t7bsRQmD4eobJzLPb/CtzF/EQMBVGtc5yuKTgHPPvW+ YA1I79rf98XP9n07UkIueEhjVitnJxNyMmBbM5qBOL6115YhmyK508gAQfmbUKpf50TH uuH9fI6O9/qnpQg5fNK0TYQzi0wrnuYS/pMu9JY2X/YiJOJb36ActJFVGCXGTCZjo2vj TCaSNHlCPiomtrWTCSa0Ntzb0cPUSRh621OD14ZMTdeY4sUkHzUnTxWM7NuVX5EqyXQT VdXmEvA0fmslm/zqfHB+yH96bRkOnx0/NlbDlL3R3cLMj/2hIDVJze89xX/vHgCWSp3o RHLQ==; 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-77364-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77364-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u11-20020a17090282cb00b001db6a9b4b69si10569415plz.506.2024.02.22.13.28.11 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 13:28:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77364-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-77364-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77364-ouuuleilei=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 04D2AB28003 for <ouuuleilei@gmail.com>; Thu, 22 Feb 2024 21:11:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 593F713BAD1; Thu, 22 Feb 2024 21:09:33 +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 4F22412D1F9 for <linux-kernel@vger.kernel.org>; Thu, 22 Feb 2024 21:09:30 +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=1708636171; cv=none; b=Jtzn7X7Zsuppve/LgM8oN0+22iig9OiBcJWZEU1D2dO7Ldu0G2gK7mcw+L4jRvx1knYD7h1OoDkqlyFfLJ+2wiOpgeprRcdXCAy9JTvS8FnzrwKrRN6cyPJ2pBnc0xEEJwTWhjY7/3jO13ExO6f265Ah8v2PRzmsgsi3A8cjRmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708636171; c=relaxed/simple; bh=j31Dajbarf+Gba2tIUbxNCli685oiAzWii4l564PZMs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=dzoebH7JFKuYmCqMULq7e2Asrh+tFFcZtHamz7Dw7ev8ntbAxqU5hX01f9lmjWzDxfvqvlHeTfALjkFlyP2wT0eJA/We85vQk3KQe/1y6/hcIrRtSvCeHT/yGBXlP5iaZLwCSqhA3ynkLlZezMijy7kYm7cJPhyq2Bpipx1CLdk= 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 <m.felsch@pengutronix.de>) id 1rdGJY-0000lo-UV; Thu, 22 Feb 2024 22:09:08 +0100 From: Marco Felsch <m.felsch@pengutronix.de> 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: devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v3 0/4] USB-C TCPM Orientation Support Date: Thu, 22 Feb 2024 22:08:59 +0100 Message-Id: <20240222210903.208901-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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791636057083462490 X-GMAIL-MSGID: 1791636057083462490 |
Series |
USB-C TCPM Orientation Support
|
|
Message
Marco Felsch
Feb. 22, 2024, 9:08 p.m. UTC
Hi, this adds the support to control 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. The patch adapting the existing dts files is send separately, as requested. 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 | 6 ++- 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, 65 insertions(+), 2 deletions(-)