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: 3890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3686803wrt; Wed, 11 Jan 2023 20:23:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXtFC4iJz0sM7k0sBOyeUHLtpLDjnGIQxdI68dA0zpn4q8sNbfPuSqjgHZRH4t/N/qsgXzXB X-Received: by 2002:aa7:d0d4:0:b0:461:ed76:cb45 with SMTP id u20-20020aa7d0d4000000b00461ed76cb45mr62374793edo.24.1673497429913; Wed, 11 Jan 2023 20:23:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673497429; cv=none; d=google.com; s=arc-20160816; b=sHc2k0hpXyMpXTsNnZahMPPA7+l33eWa9dmFBuPWRxp6tfTSqDgmDW/1MkG/ooJh0N 5v8l0/ZEr6rKlIvHzu4u37QnbdfXlYQh4Vk0DATkwNPuSrIGncNY/8yt1rvH7Punl6NY aLEL8B+GYaGX9MijF47rxY/RFqFD1sLOVtxemFTHoJ3agNF5Al4gIdMXOx4ieIUGoqS2 c1aXwbqzc4xGMe0bs3n1kx6kYLwSZld1DaPEb+WlHjltOzBhmWCjPEIYd+moQVUxqZuH WBouMc9xtLV89bFr1+8qvSEh0tqQqAme9vLOTyBqT412QWx3y/MU25StGrnFjsoQN4T9 sLyg== 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=e9TgMkUTB5YOnsNGFXtHW+XO6z2pX0iNsH1isonaM8g=; b=favpVlzzegtnUNeYHT9PG2BNlvwpG0XoTiPr1yCRe5oYi9EJM0l1uizHJuChyc/U8o fCcwlk+xURKN93kx1jXCfjSYL+v9n0fwDA9lg/GcunAPzzixRJ+hw55W5DUuPtXF7Ati O7yR667ybelt4Ub9AbzxMmts0Qe2bs6L+VPO00qMX7h9WJbP0ytaKNPqv9vOjMS4jTNd MjU99ajwcc+/wxWLoOQHBx4OEH/QJUdcpMTUSNkCXcj0bX8smXpQpqFmQVwD1BjxFqw0 Mzsf9Gcywwy/ZU1H0vL+9aJMfcCCWf1bGLRXLGYDas3hcY1oD3CoQJ7YVicEOjm99XLe ExMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TbTXQTNn; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a05640227c700b00488852e1250si19414024ede.254.2023.01.11.20.23.26; Wed, 11 Jan 2023 20:23:49 -0800 (PST) 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=TbTXQTNn; 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 S236498AbjALEWE (ORCPT + 99 others); Wed, 11 Jan 2023 23:22:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236658AbjALEVZ (ORCPT ); Wed, 11 Jan 2023 23:21:25 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19E77DFAC for ; Wed, 11 Jan 2023 20:21:14 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id q9so11969891pgq.5 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=65vm2BYVhwYhyHYm5lLZn/47JvqwZtnXFUMsqMXgbFZmwKddTQhsVbwL7pQllZTje3 dgwdPn/9VQS4ImLj52sAhl+Oi9qVbzB5QsOxMW1L6C/RYtmgQ6QFjKnk0i8n3OR4624i gRMzmEw1cJnPdc6ZBUaOrezAruv/gTNCU6fdh724cpuiT/yL3f2h7fXJEhzkFtqsFZ7Q RYCN/JGYBcUHDzQmkfnbAALq35cqJg6MUxptF/HEDRwpSzXYZJi9a99Phfy5OPYtSUFq Vxru7ZRr7UC8IIiMFHbSE6PSdLN0583kJplrUsE7PdpjvGmhFFim41R32fwcy+GgKEEj qJ0g== X-Gm-Message-State: AFqh2krm3u+oP6J4Ql4nDqHJB4YstIQUPfrvhaExy/ekldeP7XzoT4b4 nZ1GHsgp3CLsPLTdEu2AVPZDMg== 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 Cc: Stephen Boyd , Pin-yen Lin , =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Marek Vasut , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Lyude Paul , chrome-platform@lists.linux.dev, Xin Ji , Thomas Zimmermann , linux-kernel@vger.kernel.org, Allen Chen , linux-acpi@vger.kernel.org, Hsin-Yi Wang , Dmitry Baryshkov , Douglas Anderson , Imre Deak , Jani Nikula , =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= , Kees Cook , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , shaomin Deng 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-Spam-Status: No, score=-2.1 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754789241106876805?= X-GMAIL-MSGID: =?utf-8?q?1754789241106876805?= 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(-)