From patchwork Thu Jan 12 04:20:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 13097494 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 1021AC54EBD for ; Thu, 12 Jan 2023 04:21:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 14F9110E860; Thu, 12 Jan 2023 04:21:16 +0000 (UTC) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by gabe.freedesktop.org (Postfix) with ESMTPS id 357D710E860 for ; Thu, 12 Jan 2023 04:21:14 +0000 (UTC) Received: by mail-pf1-x430.google.com with SMTP id x4so8797987pfj.1 for ; Wed, 11 Jan 2023 20:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=e9TgMkUTB5YOnsNGFXtHW+XO6z2pX0iNsH1isonaM8g=; b=TbTXQTNnYb2+/gCpZS4/jwvr2YSRxosGiiZSD0IWuQeoMMyS2ipZzmSa+e1OXJTj3s LYJZ/mucmWPGqJkCrYg4Blol0UStFlbZIsrwquBSd9X2UKuLCnxN2iT5dcZXdO61MssC 5Iu1FEvWkv+6pyjCFAFFKVBwVBZR+JXgMK51A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=e9TgMkUTB5YOnsNGFXtHW+XO6z2pX0iNsH1isonaM8g=; b=W58iDBzxThErNxN2CEks94/2F6xJQtn+uED5AW8rnvn+SBqnsin3ZZDT+ywaXEG8vW v+uKMxEchfLziG8C/ym3bOG/GdRtvIvGO9RN1OEcRy/N5kKdI8+WFL1RkIaXKaD/poqm nKbmntWlhCguXmfNhna2ZhJ7Who/KyEjIVhzctT0W9eEs6LrMz36MSAgj+IIjYNoSwVJ lFD7x0ykBzYTPtIJ3gcv5nBk8TMvZsdIYp9cCHzwZwyuQvaWhVSk/IGYMp0eZPdzXRam HEIbeRWfYlsfxgDA7fOmgfnAYX4c9T5vt0T0miUgZQlHYE/BM60Nzc5pU1y4ZoFy7dll 7A2A== X-Gm-Message-State: AFqh2koOPrqu7xQPFHLRf7I+3PB9uX9szLw7cqlyqqsVo2qJ7fnCM5iK 30s3+dBB3tRWb9hf2E5l1vMFQA== X-Google-Smtp-Source: AMrXdXtEEf4zzIOGihPovGiSTQAooTH6SaH3XCz54U3JEV62yCNR6gI7P35jZs5wWV8JXGLSWMOBTg== X-Received: by 2002:a62:1684:0:b0:587:8d47:acdd with SMTP id 126-20020a621684000000b005878d47acddmr12787846pfw.34.1673497273462; Wed, 11 Jan 2023 20:21:13 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:594f:5484:7591:d074]) by smtp.gmail.com with ESMTPSA id s8-20020aa78bc8000000b00582579cb0e0sm5519478pfd.129.2023.01.11.20.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 20:21:13 -0800 (PST) From: Pin-yen Lin To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck Subject: [PATCH v10 0/9] Register Type-C mode-switch in DP bridge endpoints Date: Thu, 12 Jan 2023 12:20:55 +0800 Message-Id: <20230112042104.4107253-1-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Marek Vasut , chrome-platform@lists.linux.dev, Javier Martinez Canillas , linux-acpi@vger.kernel.org, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , devicetree@vger.kernel.org, Kees Cook , =?utf-8?q?N?= =?utf-8?q?=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Jani Nikula , Allen Chen , Stephen Boyd , Pin-yen Lin , Hsin-Yi Wang , Xin Ji , AngeloGioacchino Del Regno , shaomin Deng , Douglas Anderson , Thomas Zimmermann , Dmitry Baryshkov , =?utf-8?b?Sm9zw6kgRXhww7Nz?= =?utf-8?b?aXRv?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This series introduces bindings for anx7625/it6505 to register Type-C mode-switch in their output endpoints, and use data-lanes property to describe the pin connections. The first two patch modifies fwnode_graph_devcon_matches and cros_typec_init_ports to enable the registration of the switches. Patch 4~6 introduce the bindings for anx7625 and the corresponding driver modifications. Patch 7~9 add similar bindings and driver changes for it6505. v9: https://lore.kernel.org/all/20230109084101.265664-1-treapking@chromium.org/ v8: https://lore.kernel.org/all/20230107102231.23682-1-treapking@chromium.org/ v7: https://lore.kernel.org/all/20230105132457.4125372-1-treapking@chromium.org/ v6: https://lore.kernel.org/all/20221124102056.393220-1-treapking@chromium.org/ v5: https://lore.kernel.org/linux-usb/20220622173605.1168416-1-pmalani@chromium.org/ Changes in v10: - Collected Reviewed-by and Tested-by tags - Replaced "void *" with "typec_mux_set_fn_t" for mux_set callbacks - Print out the node name when errors on parsing DT - Use dev_dbg instead of dev_warn when no Type-C switch nodes available - Made the return path of drm_dp_register_mode_switch clearer - Added a TODO for implementing orientation switch for anx7625 - Updated the commit message for the absence of orientation switch - Fixed typo in the commit message Changes in v9: - Collected Reviewed-by tag - Fixed subject prefix again - Changed the naming of the example node for it6505 Changes in v8: - Fixed the build issue when CONFIG_TYPEC=m - Fixed some style issues - Fixed the subject prefixes for the bindings patch - Fixed the bindings for data-lanes properties Changes in v7: - Fix the long comment lines - Extracted the common codes to a helper function - Fixed style issues in anx7625 driver - Removed DT property validation in anx7625 driver. - Fixed style issues in it6505 driver - Removed the redundant sleep in it6505 driver - Removed DT property validation in it6505 driver - Rebased to drm-misc-next - Fixed indentations in bindings patches - Added a new patch to fix indentations in Kconfig Changes in v6: - Changed it6505_typec_mux_set callback function to accommodate with the latest drm-misc patches - Changed the driver implementation to accommodate with the new binding - Dropped typec-switch binding and use endpoints and data-lanes properties to describe the pin connections - Added new patches (patch 1,2,4) to fix probing issues - Changed the bindings of it6505/anx7625 and modified the drivers accordingly - Merged it6505/anx7625 driver changes into a single patch Pin-yen Lin (7): drm/display: Add Type-C switch helpers dt-bindings: display: bridge: anx7625: Add mode-switch support drm/bridge: anx7625: Check for Type-C during panel registration drm/bridge: anx7625: Register Type C mode switches dt-bindings: display: bridge: it6505: Add mode-switch support drm/bridge: it6505: Fix Kconfig indentation drm/bridge: it6505: Register Type C mode switches Prashant Malani (2): device property: Add remote endpoint to devcon matcher platform/chrome: cros_ec_typec: Purge blocking switch devlinks .../display/bridge/analogix,anx7625.yaml | 99 ++++++++++++- .../bindings/display/bridge/ite,it6505.yaml | 93 ++++++++++-- drivers/base/property.c | 15 ++ drivers/gpu/drm/bridge/Kconfig | 21 +-- drivers/gpu/drm/bridge/analogix/Kconfig | 1 + drivers/gpu/drm/bridge/analogix/anx7625.c | 105 +++++++++++++- drivers/gpu/drm/bridge/analogix/anx7625.h | 13 ++ drivers/gpu/drm/bridge/ite-it6505.c | 119 +++++++++++++++- drivers/gpu/drm/display/drm_dp_helper.c | 134 ++++++++++++++++++ drivers/platform/chrome/cros_ec_typec.c | 10 ++ include/drm/display/drm_dp_helper.h | 17 +++ 11 files changed, 598 insertions(+), 29 deletions(-)