From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A7A5C77B73 for ; Mon, 5 Jun 2023 08:31:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbjFEIbn (ORCPT ); Mon, 5 Jun 2023 04:31:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbjFEIbm (ORCPT ); Mon, 5 Jun 2023 04:31:42 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14EBBB0 for ; Mon, 5 Jun 2023 01:31:40 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f736e0c9b1so13931885e9.3 for ; Mon, 05 Jun 2023 01:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685953898; x=1688545898; h=content-transfer-encoding:in-reply-to:subject:organization :content-language:references:cc:to:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=w33NFs9NKaKx4FHgTPgRsKul7wuRuEzUhG9qWfveVqg=; b=meHNHj71nk1G60egTOikZNzf9bGrnks19/urL0IAx6KDFZ7WDQNSe5z1z2c5luucvW mLsgV16m+mzY+jpIynxJdxNkXoVaH8pM45s3bZxOtqzPGPq3Vj6U1OpC9eeAuGM9/MFN iYQMg45Yhb1txDr1lFH+0Y2fREIvXsTTKrFqQ9f5QbhP94HO1jTehFE7D1bVE0m1ySo+ KabJL6ckbF64Ms1hkYrKylRrsXN7miNeUxzsnFqgtFCtC7R6pA7MfkteYKAul853tVmn TdSFVMdne26vXwwSN/XvdypOJ1/+67dApglhlzQEj3CQRES5ptEm0j2iU4WhE3Mesq3t IG2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685953898; x=1688545898; h=content-transfer-encoding:in-reply-to:subject:organization :content-language:references:cc:to:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=w33NFs9NKaKx4FHgTPgRsKul7wuRuEzUhG9qWfveVqg=; b=LxvMgUpLdlKWdbGKLquhiIutbeCJjSbXSuLwDG5BDW4Zw1pw0DgMWrni/wOc5ZGJno fNTo2K7c0jDasviY0yxSSaOFmbXzm0QD4GBrxiKF4U3vlmpNKWC4WgkacXKvt6Zp5Mgt /ouu6jz0hfBhsXCsKLoNnAOgaLimbUjR6LtgeJgO13Gdpaa5HvBjlkmoJPNFA0xsGtAv VSNoO4XIwsvxTkfs4qB/EIRCTAZSAbycIVzyCP0gQKP5W8lxEUYPc8/I9GRkGQMlQBUd zTUAhZWwqi6mcpC+sxCvJShkb0UVZ1iB3R/ziviDtOiWPwuF6Pee/BBqIw01ILKIpvpc GZ0g== X-Gm-Message-State: AC+VfDzYeWwuo6zN1WX2dAe0rlWEMgoxfTlQmNFlkmmFNIHLwy+FI29h l0nexAMHZC+zFifWqNovAGTUuA== X-Google-Smtp-Source: ACHHUZ5sBks7sH2tdACY7VhIK2H5kjcJrT+ivIsWNVtKwfHiV7wgcAqbq8su7V3Isk1sH3Mkf4lmEw== X-Received: by 2002:a05:600c:2146:b0:3f7:3636:358c with SMTP id v6-20020a05600c214600b003f73636358cmr3253241wml.11.1685953898454; Mon, 05 Jun 2023 01:31:38 -0700 (PDT) Received: from [192.168.7.188] (679773502.box.freepro.com. [212.114.21.58]) by smtp.gmail.com with ESMTPSA id m4-20020a5d6a04000000b0030aea925fbesm8969116wru.50.2023.06.05.01.31.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jun 2023 01:31:38 -0700 (PDT) Message-ID: Date: Mon, 5 Jun 2023 10:31:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 From: neil.armstrong@linaro.org Reply-To: neil.armstrong@linaro.org To: Heikki Krogerus Cc: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Liam Girdwood , Mark Brown , Dmitry Baryshkov , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230601-topic-sm8x50-upstream-redriver-v1-0-6ad21094ff6f@linaro.org> <20230601-topic-sm8x50-upstream-redriver-v1-2-6ad21094ff6f@linaro.org> Content-Language: en-US Organization: Linaro Developer Services Subject: Re: [PATCH 2/2] usb: typec: add support for the nb7vpq904m Type-C Linear Redriver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, On 05/06/2023 10:24, Heikki Krogerus wrote: > Hi Neil, > > On Thu, Jun 01, 2023 at 11:21:13AM +0200, neil.armstrong@linaro.org wrote: >> From: Dmitry Baryshkov >> >> Add support for the ON Semiconductor NB7VPQ904M Type-C USB SuperSpeed >> and DisplayPort ALT Mode Linear Redriver chip found on some devices >> with a Type-C port. >> >> The redriver compensates ultra High-Speeed DisplayPort and USB >> Super Speed signal integrity losses mainly due to PCB & transmission >> cables. >> >> The redriver doesn't support SuperSpeed lines swapping, but >> can support Type-C SBU lines swapping. >> >> Signed-off-by: Dmitry Baryshkov >> Signed-off-by: Neil Armstrong >> --- >> drivers/usb/typec/mux/Kconfig | 8 + >> drivers/usb/typec/mux/Makefile | 1 + >> drivers/usb/typec/mux/nb7vpq904m.c | 526 +++++++++++++++++++++++++++++++++++++ >> 3 files changed, 535 insertions(+) > > This looks good to me, but I think you should register a retimer > instead of a mode switch (the orientation switch is fine). Indeed, I'm not familiar with namings but by looking around it seems that redriver and retimers for USB-C applications are exactly the same. > > Retimers are handled just like the muxes, so this patch would not need > that many changes, but you would need to change the first patch too. > You would need to declare a "redriver-switch" instead of "mode-switch" > property in your DT (or perhaps make it just "redriver" instead of > "redriver-switch"?). So it would need some additional handling to also set the retimer state along the mux, but I was wondering, why having a separate handling while the retimer state struct is exactly the same as the mux ? > > We just need to add a device type for redrivers to the retimer class - > check the attached diff. Something like that. > > Let me know what you guys think. I think I'll switch to retimer, thanks for pointing it to me... Thanks, Neil > > thanks, >