Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5325639rwd; Mon, 5 Jun 2023 01:45:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5yxkdyqiEGVCIw9U7y6k3qZsdo10BoK5bhrOgPj0fWZQYWTGHZKG0TgTweFVWPu/Jp1gcm X-Received: by 2002:a17:902:9f87:b0:1aa:d971:4623 with SMTP id g7-20020a1709029f8700b001aad9714623mr6910765plq.38.1685954741586; Mon, 05 Jun 2023 01:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685954741; cv=none; d=google.com; s=arc-20160816; b=zkslWqWFNdv5WUvppY6S3T6vlhwjP/4IcDRasQ6Incxm4CogCIHqz1a/aEWJqBu7QF kDyanQxkC2A4pUrZnaK7Ux7SzjqUi9OA5I8g1iCrWW50dGiM5ltkHmyZ/t7hdQMZSNQk s3UXdC9vH8ntQ+T2HZ9OzbPde7TcgWgv3rzqw/h6X4uk1jIBY3WoJyIWu7tskiyjqRrb RxKFNmXlSzeVZle0lvv77WzN00ljeM/RGCgMSkoYm+8LqJBtvXxLotneaD2W1zeipExJ Icjbb57HzYAp2776SSSgJ3mmFekIu9qQ2Ziq5pGmq2ga2+nABevCu1k8r1uxssVP+iJL h/Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :organization:content-language:references:cc:to:reply-to:from :user-agent:mime-version:date:message-id:dkim-signature; bh=w33NFs9NKaKx4FHgTPgRsKul7wuRuEzUhG9qWfveVqg=; b=0CjGYL4CmdAXUFOoyMqRVsHdSbLsxgF3+DOB+u6vW+wDAu1XC75i2/2qLJheTOS24m gANJhpNYUmYAYMdF+i3oHoFp4HvTnoB2N9465+6fGmkSTDrBmRKjQU2IEjbBetFyj9mH 1x8WOtXVeIDMyKONSgNE0E1qq2C3fBZMHZeQkryPxOfVaKVdeqtu0/ZK/YjSlLh4Fnzl Vu+hDPWHZJZSlbua/o90EggJwFzHF7Tk9d9VBPh4gmx+ppV6bKVssv6A8KIcRc5Z8oE7 QQ607R5OModwMfshvmEcpMaFTiNSwRO/nUKeWyOmrtBEF3ysfUNO+9m3lb1pesEfGLb0 OqGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=meHNHj71; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a170902d2c700b001b024322547si5336001plc.577.2023.06.05.01.45.27; Mon, 05 Jun 2023 01:45:41 -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=@linaro.org header.s=google header.b=meHNHj71; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbjFEIbn (ORCPT + 99 others); Mon, 5 Jun 2023 04:31:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbjFEIbl (ORCPT ); Mon, 5 Jun 2023 04:31:41 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15104C7 for ; Mon, 5 Jun 2023 01:31:40 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f6094cb2d2so46502575e9.2 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=ES6oBXidUGo2KETQB01UwJyP998GCacEFsuQ+HAgR3KXtvCL1yi1aa7uhUXVmwp/SX wjgFmc5IxA+dg7XA4ihAOgB1r5g6sQG54xfbyWkKeQrcoOVuMfnVr+1yDsqETBEsrXXk mFcr5dz6T2M++RMNzpkS1EdU52EJxpwLoCwWH0S4fUj+kG2BFiotqe/8+Sz6QBJdqN0m 8wWDFK62g9eFWe+QIAbmq7eDucOjBUJjIu3fbxkLg3F0aDNtHYtuIKsAon2zr7jIoPLl 4Vg1ZQ4R20hiDf0haUXWoMN4gw0qnifutD0sNOFIcwbvNJlilusq9GAJZRtrFFSol9Bn qF7Q== X-Gm-Message-State: AC+VfDx8nTUuZFXFZb+h4D+BUgtofFRHM+Pa049MyCf/md5RNW19fhbQ e/91AiMm6cweeC4OVgCCpQJv/Q== 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 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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, >