From patchwork Tue Aug 23 19:54:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 12951980 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CEB56C32772 for ; Tue, 23 Aug 2022 11:54:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=f0nzlJG9bvASeKi7fmbUXKYvWLFSFeCS8CBVga410Tw=; b=qqqDg+7dRLBWB8 PbIrM4MzohXi+6g4c5WtA1TyXaJ5GFI+j5+OZklOx1OaHffzQc0VGe6t5U1qYyHsGH6CatZIDUktY H9y2RgQGQwnD+SX/SnRYkL+GEJzsH8pfcfgZ4+9Y4rsK4zbe5+6sOSfe7tSv2MKenmYgRUpRrd+BI 8L8gxhSaFP62XjYuWM2MBrumzd5P0dzEw9G4uz6cDba+ONl71lRmwB4iv7YzI2l059iaH8HczWOtN lNcMSpaqX+MxgQCFrtGUcg0HUlLGXvyAn1PLhvHxOv6xDeszpDyrqielwoz8qodaTbq6dileHe/Ln 6Y3tU/PlcSKlrHDm9IOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQSTH-005ZV1-25; Tue, 23 Aug 2022 11:53:27 +0000 Received: from mail-eopbgr130080.outbound.protection.outlook.com ([40.107.13.80] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQSTE-005ZMv-05 for linux-arm-kernel@lists.infradead.org; Tue, 23 Aug 2022 11:53:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFlH/fHFpKjGaAYtYiJ1xQWVa+OO2NZZbOScALbIsuTYOWsthAUPGEIAqzN6T+1XTaHOUIN6u8oD6M46q5VoYki1a7BHMY4hYj2PTGvhN48c9OaMq5ck8COf8H09//W9QV9CQzJwH/TWn7BHuG8McsE3TYMyjzOzoiMYzGjZdQvROMtK+t6Fh/2N6cOFBbtq968/70M2QDUjJi6hB1lrOjvp28YGPNSA/0yI3AKqqVuaSH8LIrkPe0ctmN3OMoI1KCZ52vBDWEKWxdRsxw4sHg/85nq0mgruHK6o6pKWJegkoUk4K5gwauFiKkETvRtLxHYhvIhw0MyMlRZwH1l/sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hclc/fKCMScQuXC8QLzOd7QtSDh2pdKucfyS02tR6m8=; b=HSabk0TC2U+Q5ONQG1Cv7FZRnBsHzfDIuGF9RMnox4wImDxsZ/HkqUiJ1HEbxJiZ+g2cZSjz8DfKZfIDMTaA/cwSs0Hnqhub14P4xEjC6AGcg1AjSyMuzxCEZYZ1wnfB7F5XWG0yJhsgvDKTujLbzy9GbsSWXSq6u9ONRMzfiHFD2VOCF3nLe8idBeNe5ZvcRi6ZqQ3x55hprF1IMi+uDj9SlkOUBxAtBWmhvVLqSdoRNB0StYtxJffUFOplXwK16lPCU8kDiVJCBUDGeq9akPqdrvuQge2cN1dDMsq60oz+vflR0jWn4lZGZJUNpIve/29tTxzIqF3aJRkkCXmDYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hclc/fKCMScQuXC8QLzOd7QtSDh2pdKucfyS02tR6m8=; b=TKU/NauW6lJSPYYC5O5A9k+kGi88gmRJygQQwpGUUBa5GL5wCCJeCOxXTWXY1ZnBjOqO+T/RzV//Ul75Hali6emWfhzkpSUIosToTXcl4XR5u4K3BYo536DeGbDinML9+ETQmAfkg4/39LVxZhNJ42qHH6qhMaxtHkO5gNnEjiw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8784.eurprd04.prod.outlook.com (2603:10a6:102:20f::23) by VI1PR0402MB2720.eurprd04.prod.outlook.com (2603:10a6:800:b3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Tue, 23 Aug 2022 11:53:11 +0000 Received: from PAXPR04MB8784.eurprd04.prod.outlook.com ([fe80::60b7:af13:8472:2e8c]) by PAXPR04MB8784.eurprd04.prod.outlook.com ([fe80::60b7:af13:8472:2e8c%4]) with mapi id 15.20.5546.022; Tue, 23 Aug 2022 11:53:11 +0000 From: Xu Yang To: heikki.krogerus@linux.intel.com, robh+dt@kernel.org, peda@axentia.se, shawnguo@kernel.org Cc: gregkh@linuxfoundation.org, linux@roeck-us.net, jun.li@nxp.com, xu.yang_2@nxp.com, linux-usb@vger.kernel.org, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/4] typec orientation switch support via mux controller Date: Wed, 24 Aug 2022 03:54:25 +0800 Message-Id: <20220823195429.1243516-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR04CA0155.apcprd04.prod.outlook.com (2603:1096:4::17) To PAXPR04MB8784.eurprd04.prod.outlook.com (2603:10a6:102:20f::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1b7719fc-c78d-4e92-fbe9-08da84fe0db7 X-MS-TrafficTypeDiagnostic: VI1PR0402MB2720:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OaSZOqDPpFXWp3LPD7rY1jRMqsjLVEWxWKQ+O4PbhRG/p4j52SU1ddyzKjltPKu8/NPtk3UZgNN5pujYIaMpJJURH1Pj8TmhJdb72nupzcsq1WSHIHArglahd7cctkmKsPuYC8IclO35wzZ/VUC6M5OkMOPtH4FZz73nRpLIkvx7LnWUTlZjJ1IrSX/nkCtmdCxbLgVmg9CI5dMP/TgDLdJz+4eJe/7B9TjmI35ug/zLO22HRdqXStbJp8FermX8g8LcTXSoEgMlk9mgS8f3A7JfVlcASMOmNhl3SFv/3kMQFtrj1WrnE9cxGsI2XfzJKV7JZYbW/FqikzasawGwdWkLG3aojVnW8rcZGxDHeqC3MUyz7Y49dA9Jfl19BpFX4qU5uzv93s1Fjg/rsO+8YwjVwZhB9V7LFL0W7hkahp97gJviIGENMcJfOOVN3mezWbmm+JUUhZxcgZcOlMWRhnK+NZx0at3ZshYpMdUXUIdSzCB8G7q97UfomLxBuuMr297NynC0JOHzpoBd1PieI3jGBLFIjo1XyzgvsvXuOTGEIHam6pQC9r5fzRNsxxr4WO3x/mO9BfhCYozmFVyCEPbUwxhjPfdsvqolG7lhEnusfFRLgqexp8WuvwMdZmtYHJdz+jotMlzHpnGdCAc+tueZi9swOxVqgRXpKywwVZSKN2QfbTtlqth8SFKu2IR3ZbxRCI/9mUO6p7atvvhQwBtDa9+OGEGxUIt6yp/nHTLQUrM9Oa72v2BTE7ti2lJfcDsm1JzF3wb0D7MGxtdFJw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8784.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(376002)(366004)(39860400002)(346002)(136003)(66556008)(66476007)(66946007)(8676002)(4326008)(86362001)(38350700002)(38100700002)(36756003)(186003)(8936002)(26005)(6512007)(52116002)(1076003)(4743002)(6666004)(6506007)(41300700001)(6486002)(478600001)(316002)(2906002)(5660300002)(83380400001)(4744005)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mcxijasAFiw9ZHsGl6EYSKzZv0/oDGbabultj0cnUYhCcBnEnLiImGCPwZ0rx93SBinXreZaTX3Qh7e5sUD8uPzR/tKHURT5GnHyncwI3ACBZ8NsQ2ZDXCgUFJy7c7rGmFmy/BRVsOw0ZyCS1fc3/sHCpybP1vhnMaku6AsEL1JwmBi9lg9lKuI+cVkjhaPz+m4gMng6u26kovOD95b3ikYE/Gc4J6aM1Yu2DAUz0TR83zayTD903jaCkN3XdvZnra5hMI27gCN3THxxC+X+GAq+MWgfQrpnrR7cSHQsBYfUxddS7KCRNIc9EIc9hcIKJsO9ghOzLaPQaeizjkz3bmJWqB+235c5jSY3cPbDKOKDAa36ztTs4LAGrdamxSkKSbpgtx3gnrBHVqjO+/X9amimVVjlihz0HxEsrta6awnCsKdXIKrkZK7ubhcGYSEsbR2tv6X9lryBkox71hRLGkXvZcR+WyYeabPwMU1CzmUQZg98yA2J2MMl/l+UwYxTCBYs2oKLNWgzwx/mzxqQmiDgXGCn+WQU/RnBDg3vkzZMyZz9WGThSA3/Hu7E8DFmJ0a4dyZ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08da84fe0db7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8784.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 11:53:11.6816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u8dwL3EhA/f1RYhGM6V/9S9qAtgnvquHCQ6XFnr1wZQuQUky9nRHSk/0Pg2s+cvmHI3eQnH9FCmNSw1kiRXRrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2720 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220823_045324_330662_8EC87F89 X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since typec port support flip-ability, there may need various swithes to set correct path for SuperSpeed or Sideband use cases. As a common way, mux controller could complete such tasks in simple cases, such as GPIO-based swich or reg-based switch. This implementation could be an alternate way to control orientation switch. Xu Yang (4): dt-bindings: connector: Add typec orientation switch properties mux: convert to use fwnode interface usb: typec: mux: add typec orientation switch support via mux controller arm64: dts: imx8mp-evk: add typec node .../bindings/connector/usb-connector.yaml | 18 +++ arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 122 ++++++++++++++++++ drivers/mux/core.c | 65 +++++----- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/mux.c | 76 ++++++++++- include/linux/usb/typec_mux.h | 7 +- 6 files changed, 251 insertions(+), 38 deletions(-)