Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp707218iog; Wed, 15 Jun 2022 10:29:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vjEhk8Ezej3suFTxt7rbc9PeOzbbLzQCtNStWMstNHQ9lwj0NmbV0rPNkJgPB4ejhUlkYm X-Received: by 2002:a17:902:d506:b0:167:5021:d644 with SMTP id b6-20020a170902d50600b001675021d644mr801982plg.159.1655314166472; Wed, 15 Jun 2022 10:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655314166; cv=none; d=google.com; s=arc-20160816; b=i6ECskUhIsqGV2Dznf8YGkEAO0wV/KrWo+y9Wa0zoBsx3Dvmkdeq6HsyRyRbbOd89c s+FHNsbh6ky1ZR0g2XQb4tjFK2cFAQCgu1IxsxmoC0sHjN2yTpUCJq6YRcQhLUVknDL9 qtCzJBkAgd5TOu5FAfgkhpwIJvi1fpb01vD4qWyQIvXkBw61W/wyEJ6uJNVhAHwdGdNO eG2cRLT9OgPyd6NgC5Bvv5een5VdoKn5N9vhFTi2ZVdYYn2bhG5uHy0Jdg9TXcZuFUwb UmBauJkuFTxlSPEXf/ecvtDpvA9T6F6cZ3XBw2aRnA+fGTfSyQYPuaqejL3mwBYPTu7X y8XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Jat6dhLeZ479iY01jqnpJJmmx4iBaVyzdt75yCacVFk=; b=VU4O5/SCYTtniVq70kBGUdWJeH1JGdwrcE3McSeMPesRtdo65sCERSLd2YsT+X/T/k qVA+LSBaqAvmd+ggRtCkYyd49b/lrp8M4B/D9pPd2U/e+ssdSlpq+csuxtl3ryrKNtaH eLMKV3xRrvmzeBfFUe43C82ZlwlxLDrojWmslsYOD9jep0ItThzSvTTqb0BGlXeMpQB3 KhUeA1ffv/hagqxavf5JIqnzUp7tVlO4NHf8EJ2m4U7XHBzdCrW9ss3NkBjJEBKWZvX1 fONZdl4tjN5f2eLivOS8mfb0CE7CyZsMbWEGvpBczIX0qWLV1567EomZ2b0GrAAbuZLt Ak3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CTbzYX0m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170903111100b001640ab15478si17619321plh.593.2022.06.15.10.29.14; Wed, 15 Jun 2022 10:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CTbzYX0m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349776AbiFORVj (ORCPT + 99 others); Wed, 15 Jun 2022 13:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349741AbiFORVi (ORCPT ); Wed, 15 Jun 2022 13:21:38 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78A0E23172 for ; Wed, 15 Jun 2022 10:21:37 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d5so8363491plo.12 for ; Wed, 15 Jun 2022 10:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jat6dhLeZ479iY01jqnpJJmmx4iBaVyzdt75yCacVFk=; b=CTbzYX0mU8x2G9wYTMN9/+ShQbDWPSZUnKSQz3p2zDl0GSxC2zDIeyICJCqxABHmko ozexhom+4LY52Rh9URh2HyhEshSaEGxvQ34y2s1se4BY2i8/P4dJIiDiLZQtC1VyxwBN gtaeXosMTsknyWQbF3qa6DUok2hckCaeupNgQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jat6dhLeZ479iY01jqnpJJmmx4iBaVyzdt75yCacVFk=; b=qXoIlAsUa3F9+rKYeMTlw11xgujRS70iJUIU1auQZppfk42thxl7NABTRsPGT4xxa7 ylVUNrnIk5QQPR8ThiqhXyJU8IBf7z2nq0ztmmYnvi7zNw5AAgFjQO5TNsCvMtz/aaLA v4/mYgVwcYanGhFPmELdX54BndFERFJ26TrvegEhuanwr9MUMu8knSRRxFqS2nhB6qTa FAF7SOQHSYMe/CEevgXzgNSzHO7oro18Ze+dcI9DXSlQwYY10N1qDJx29poiHX2l36Gh N7gSGVQv9yi4juEbO3c9qTLegzAzGeWMWQoMZT+1jRDBYRGhadZ3mely5kQyIAwA/gKC R0Zg== X-Gm-Message-State: AJIora8+ZQnlN1BTVCl1oKDIAkdGCwM1Rt/0Vr3CcGpD9n4JUpIs/UKB Ek7jQ1kOrSZTHwm7m72RVxYFqyTZhdop/Q== X-Received: by 2002:a17:902:9307:b0:166:41a8:abc0 with SMTP id bc7-20020a170902930700b0016641a8abc0mr638722plb.135.1655313696754; Wed, 15 Jun 2022 10:21:36 -0700 (PDT) Received: from pmalani.c.googlers.com.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id d10-20020aa7814a000000b005103abd2fdbsm10147433pfn.206.2022.06.15.10.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 10:21:36 -0700 (PDT) From: Prashant Malani To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: bleung@chromium.org, swboyd@chromium.org, heikki.krogerus@linux.intel.com, Prashant Malani , Andrzej Hajda , Daniel Vetter , David Airlie , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), Greg Kroah-Hartman , Hsin-Yi Wang , Jernej Skrabec , Jonas Karlman , =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= , Krzysztof Kozlowski , Laurent Pinchart , Maxime Ripard , Neil Armstrong , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Pin-Yen Lin , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Xin Ji Subject: [PATCH v4 0/7] usb: typec: Introduce typec-switch binding Date: Wed, 15 Jun 2022 17:20:16 +0000 Message-Id: <20220615172129.1314056-1-pmalani@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series introduces a binding for Type-C data lane switches. These control the routing and operating modes of USB Type-C data lanes based on the PD messaging from the Type-C port driver regarding connected peripherals. The first patch introduces a change to the Type-C mux class mode-switch matching code, while the second adds a config guard to a Type-C header. The next couple of patches introduce the new "typec-switch" binding as well as one user of it (the ANX7625 drm bridge). The remaining patches add functionality to the anx7625 driver to register the mode-switches, as well as program its crosspoint switch depending on which Type-C port has a DisplayPort (DP) peripheral connected to it. v3: https://lore.kernel.org/linux-usb/20220614193558.1163205-1-pmalani@chromium.org/ Changes since v3: - Some more modifications to the anx7625 binding patch (4/7). - Picked up 1 more Reviewed-by tag. Pin-Yen Lin (1): drm/bridge: anx7625: Add typec_mux_set callback function Prashant Malani (6): usb: typec: mux: Allow muxes to specify mode-switch usb: typec: mux: Add CONFIG guards for functions dt-bindings: usb: Add Type-C switch binding dt-bindings: drm/bridge: anx7625: Add mode-switch support drm/bridge: anx7625: Register number of Type C switches drm/bridge: anx7625: Register Type-C mode switches .../display/bridge/analogix,anx7625.yaml | 64 ++++++++ .../devicetree/bindings/usb/typec-switch.yaml | 74 +++++++++ drivers/gpu/drm/bridge/analogix/anx7625.c | 148 ++++++++++++++++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 20 +++ drivers/usb/typec/mux.c | 8 +- include/linux/usb/typec_mux.h | 44 +++++- 6 files changed, 350 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/typec-switch.yaml -- 2.36.1.476.g0c4daa206d-goog