From patchwork Thu May 27 08:44:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Tso X-Patchwork-Id: 449686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1CC9C4707F for ; Thu, 27 May 2021 08:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DEB5613CA for ; Thu, 27 May 2021 08:44:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235553AbhE0IqU (ORCPT ); Thu, 27 May 2021 04:46:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235284AbhE0IqU (ORCPT ); Thu, 27 May 2021 04:46:20 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C56C061760 for ; Thu, 27 May 2021 01:44:47 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id h67-20020a25d0460000b0290517e5f14ba4so4918708ybg.18 for ; Thu, 27 May 2021 01:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=E9Y+aCu/dNMj5yd6F2VP6nHchu69wdBKbxAfsbuEMQk=; b=Tx0eyYcsGyiJMMykGJTtD73pcz5KKEDDkvgFfXC27lTQUBuHhLkMYYtljva9xL0g1A 6M7kAAEZvnoidO/0uoFDvjx/Kb5GRU2TWFk3E9PIO8O1fZROZAa/WeLrOJvI+8H4+eP2 Tn/Z62xn5Zf5AczjGy5LPOfc1UKMmO8amXaNF1Iv+bCNLmUd4cq0lTDl/YSva2Q+Nn2z VWwJinImPJIc5SfNMxH3m6AjEdUB+U4R9ANlTJHpGa+3MwZP4qL/abeH9qsvumzp/662 1vX5cC8/gua4px+jbZPPa8Bba0WqGLsXhJIfZOGTvn3OeNcA7Qs2w5Ofkhvz122/ixU9 GUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=E9Y+aCu/dNMj5yd6F2VP6nHchu69wdBKbxAfsbuEMQk=; b=cKx1iOZkfE3y7zbbQrJ/Z7iNq/xDpvnJclKbP1odjYRKXHemGwRjAeWU/YW5ypnlz+ K031+SHZ/TkxrH6aVBWUCVUInCggq2HupSe1BZX9zSLmfb9bEoPBhZbzlR7Dnyqq9h4N 2g1UZikm5F+AQI7XbUdrAnBxKO9YAkGzth0KsgMU5Nwvd4OI5cfUUQJ6IVL3evP6WmI7 7Htp+jULIwg4O0ewUD4mtlujyZSLHAxt5LBSldBNji+XFPUsKXrg6zhf01cvz3rTNJkP PsrxbaxBHr9NL7v8h1PtzF919sM9ZfDW13QyRw0zyCmCHXFc6zrPv1t3J8RYPiSqwCpQ Ybww== X-Gm-Message-State: AOAM532ILvOHJ5Bo32/djWRKiyLHEK7wiXXfCjEwEPvVNDh3KoCMzx91 3oeV24WoEMjnhguo+uRVLMXRGy4DO70N X-Google-Smtp-Source: ABdhPJy47Q7Ea3hXhnA5pq2z2QwnAlc4ysNg/muW3ni16oJivYHPBQZfdJ0zx9Ndg3w9uRf7X4M4cUpYpnsM X-Received: from kyletso.ntc.corp.google.com ([2401:fa00:fc:202:c563:7257:f641:cbcd]) (user=kyletso job=sendgmr) by 2002:a25:880f:: with SMTP id c15mr3138750ybl.247.1622105086846; Thu, 27 May 2021 01:44:46 -0700 (PDT) Date: Thu, 27 May 2021 16:44:16 +0800 Message-Id: <20210527084419.4164369-1-kyletso@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog Subject: [PATCH 0/3] Add the support of SVDM Version 2.0 VDOs From: Kyle Tso To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, robh+dt@kernel.org Cc: badhri@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Kyle Tso Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Greg, these patches are based on usb-linus branch. Is it okay? === The patches are primarily for the responses to the Discover Identity command. This part was changed a lot from PD rev2.0 to PD rev3.0 (now it's rev3.1 :D). e.g. DFP can respond to Discover Identity command with ACK in PD rev3.x and the Product Type VDOs are quite different. Given that tcpm.c moved on to PD rev3.x and PD rev2.0 is still supported, some changes need to be made to support both PD rev3.x and rev2.0. usb: typec: tcpm: Correct the responses in SVDM Version 2.0 DFP - This patch is to unblock the responder ACK to Discover Identity if the port is DFP and the SVDM version is 2.0 dt-bindings: connector: Add PD rev 2.0 VDO definition - similar changes to Commit 2a1673f0f1de ("usb: pd: Reland VDO definitions of PD2.0") https://lore.kernel.org/linux-usb/20210204005036.1555294-1-kyletso@google.com/ - add a new property sink-vdos-v1 to store the PD rev2.0 VDOs usb: typec: tcpm: Introduce snk_vdo_v1 for SVDM version 1.0 - populate the legacy VDOs from fwnode - send these data if the port partner is SVDM Version 1.0 Kyle Tso (3): usb: typec: tcpm: Correct the responses in SVDM Version 2.0 DFP dt-bindings: connector: Add PD rev 2.0 VDO definition usb: typec: tcpm: Introduce snk_vdo_v1 for SVDM version 1.0 .../bindings/connector/usb-connector.yaml | 15 ++++ drivers/usb/typec/tcpm/tcpm.c | 52 ++++++++++---- include/dt-bindings/usb/pd.h | 69 ++++++++++++++++++- 3 files changed, 119 insertions(+), 17 deletions(-)