Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp705995iol; Thu, 9 Jun 2022 12:09:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx07YzCE4b43T2S5gFaocEfmlgQsU08j+1mSj0pJvJ5J0vROcggKTiSmzLWIPpDu6z4/1g7 X-Received: by 2002:a17:902:b418:b0:166:3165:eaff with SMTP id x24-20020a170902b41800b001663165eaffmr41293579plr.96.1654801748487; Thu, 09 Jun 2022 12:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654801748; cv=none; d=google.com; s=arc-20160816; b=pZH48y9XCq+pV7hjOfQaZGoGXlKwpWN5vBNWdLkv6xu5cRqY3F276W9ROZnwBKqvV1 DDNLY4vdoVbGQ76lAKAqT7GtV0CFQsodCNQbS2zPHjteQu95YNW51EtXp5JtEVdu6ECC jQwBoprIb+G9wNkP9GCxFeeiJ7GTghIky/yfbGoyRBKXIXcgmbC8XcpHGntcRzucvJw/ wkgLbgWre9zkpWyFY9M8ESMrvc4RNZyopvf8dcIoyHxI6oN6Z3hErf9x2YlcZyBjXV+D y+ivbQTHVNIRELg+jM5b2qPAP6JVqUSGjkyv8lVdB7m+gtb07G5oqW1HN04NfRHZNa18 Xy7w== 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=B5EoYi45ZBUgcYzH5QmcJabRI+K9dAvb3lNExbNzDTc=; b=BAqHv9Xjy4gozaSBrM2m1RQdV5+Ing6Q/C2FLXF27MD1tSCDy7Bee8+WNWHZPMpAWi tAz+Vn/zZhuQrxDZIpseBoteoGGYwcp5y2yr5uFJxXhFIH0Jh6wC03HdSZPbXZu92obx 7hh0zaopwZfETo1z6/3nUgFgy55X6I8JtoGE9HVtJkRVYJDlBSz36FCk2ZBn25d12dHu BIH3qjvAx+q4Id2X0aThaCGKAwalXvB0+5Ud3GNRBA4sxorcQM+NwIYlk9VAnDsRlnJ5 qKrlGv5LoR8fKr4RtWMswEywCPV+vD7a4Ui0NrNpVKiP+gJa+5BtCg86vijWdEpRYof8 a/BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="IRBv/Csm"; 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 h14-20020a056a00170e00b004faac3a73f4si32708345pfc.17.2022.06.09.12.08.54; Thu, 09 Jun 2022 12:09:08 -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="IRBv/Csm"; 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 S1345272AbiFISLm (ORCPT + 99 others); Thu, 9 Jun 2022 14:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiFISLk (ORCPT ); Thu, 9 Jun 2022 14:11:40 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AA643AD8BE for ; Thu, 9 Jun 2022 11:11:38 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id e24so22075186pjt.0 for ; Thu, 09 Jun 2022 11:11:38 -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=B5EoYi45ZBUgcYzH5QmcJabRI+K9dAvb3lNExbNzDTc=; b=IRBv/Csm/7toLZfIoXEPX0E45ay4Enl4+enzXX7DKTkX5nUg1cRxZOi2qv4NePVtAg VoHy+EUE1WpiNMTX9FhRf/mrnjfYQPaESFmpZVcbJGR4OGpEFAlKDDengyMyRxJYaCqe 7Zb9IVzTdblW1xpdWU5oA4UNZms7szwAcKGXQ= 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=B5EoYi45ZBUgcYzH5QmcJabRI+K9dAvb3lNExbNzDTc=; b=oSckdqZ8nOqkLrkNts5Njcz/5xievo4FOZrGw6pwlxudYB8AKBMSfYbThsFP7mrngB bZtRDkjV55I7SNFRq1PMZmGJ9AYAqTnZo02VsyqNd1S1moMufqnxO1tgYbOi+gE8t4Po nwZH6IGG3YFwrQZ6fZzS5KZLF6cx1gKn5SddkpUSW4SPmWk3A0waxikfZcjkqAqgtk72 WWznJcVE84dRZI/0G5fBTXj4oDAelGxVb/mwbcipXNsqY0pEFcL7rOFvm9d7h4QR/ECa joUDYFKKm9Kcr5KBKL8mWeP+FtPRSPaQ3EzYhTx1b6s6f11Z02dLhvWm8l3RPx0sX8g/ J8zw== X-Gm-Message-State: AOAM531KRtwbtLtodjVvmjZqvzbAnoBtywV1hWR2fVNk65GRrovmNLiK lqOz7LBqNVO+KKNoJ9A27xu+64hshvdIcQ== X-Received: by 2002:a17:902:7248:b0:167:95e2:f83c with SMTP id c8-20020a170902724800b0016795e2f83cmr14304302pll.74.1654798297569; Thu, 09 Jun 2022 11:11:37 -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 r14-20020a63ec4e000000b003fb0354c43asm17728049pgj.32.2022.06.09.11.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 11:11: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 , AngeloGioacchino Del Regno , 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 , Tzung-Bi Shih , Xin Ji Subject: [PATCH v2 0/7] usb: typec: Introduce typec-switch binding Date: Thu, 9 Jun 2022 18:09:39 +0000 Message-Id: <20220609181106.3695103-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,URIBL_BLOCKED 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. v1: https://lore.kernel.org/linux-usb/20220607190131.1647511-1-pmalani@chromium.org/ Changes since v1: - Fixed function signature error in "else case" of typec_mux.h - typec-switch.yaml: Fixed indentation, compatible, and node names in examples. - anx7625.yaml: + Introduced patternProperties for "switch" children (suggested by Krzysztof Kozlowski). + Added unevaluatedProperties descriptor (suggested by Krzysztof Kozlowski). + Added "address-cells" and "size-cells" properties to "switches". 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 | 63 ++++++++ .../devicetree/bindings/usb/typec-switch.yaml | 74 +++++++++ drivers/gpu/drm/bridge/analogix/anx7625.c | 151 ++++++++++++++++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 20 +++ drivers/usb/typec/mux.c | 8 +- include/linux/usb/typec_mux.h | 38 +++++ 6 files changed, 352 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/typec-switch.yaml -- 2.36.1.476.g0c4daa206d-goog