Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1010934rwb; Tue, 29 Nov 2022 07:58:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf591yKdUmW8S+HA5xCOw2LosI9jNcNoJLn2Q7QYsKA54ymGBD2lcCYIEGMmSguXlx1TBL9A X-Received: by 2002:a17:902:ebc1:b0:176:a6c5:20c9 with SMTP id p1-20020a170902ebc100b00176a6c520c9mr41558057plg.57.1669737531900; Tue, 29 Nov 2022 07:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669737531; cv=none; d=google.com; s=arc-20160816; b=S88cBaqKn613pTS12udMY5dwPID9e1lKLLi2vBE5gqC9ZD1ounhTPvxfj/EdNSFwHW tEglgHUjvHinm8d6X42rDcdWaebODwwP5cTf6WMUgSGYbfqMH/PbJHQebJK8bgrWA2zl vwYX5sBVPCez6L7BY1fql0FUbvVoofQMwMmobUlNlEON+Q3Fluxkpo3Ui3T9kGs1yCX5 EktOIZuphBKBqWsJDmECG3La7fGT4kDioS6JaUG1fbfw1RdAJ7vw846BN3Jb/KxJo73z uSkQA6/YFpq8sNC3syCgM4IYMSc8Q/ia1reJtzQGxAF7H7O/vxF+qlRBKJPMQGu72w5W Xe8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bloqSK//IBxB0iv/3Jamfp707T0kobp8PFRMIwvoti0=; b=guihhX8+eJXvst0ralC7KU4x9lxDa9p8Py/aTcI07f7hff/fOz6w5B1+9svaUu2o1S 7Uh4etG+DSs4l8ZklEeDi2wFKjAJHgVodUsoWgqkRzDpzD5gjnOS+fCrMHhAoZRyO8WV SA3Ox8u+SIdfDoLx9efjrzdEquj3bABTxWc9hqTmHo+xcMjZOhbgJEBrPjOjsB4dTl+6 XITa3E8x4a8zeIPg+LBIdtVoB80IZB4cOT06o/Q9ZcuA4pH8y/jlM36/hUC5e1T9oIpy mRTj7yU78ofSiQtTLtOvIwCK7dRhsbmxH5s2kdolTxvy3FcrANz9c5lvTyjYq+3/cq2n 2f3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W18al4QI; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 196-20020a6305cd000000b0046ff26f21eesi14366367pgf.435.2022.11.29.07.58.39; Tue, 29 Nov 2022 07:58:51 -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=@kernel.org header.s=k20201202 header.b=W18al4QI; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235210AbiK2P3x (ORCPT + 84 others); Tue, 29 Nov 2022 10:29:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235212AbiK2P3v (ORCPT ); Tue, 29 Nov 2022 10:29:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8626013EAC; Tue, 29 Nov 2022 07:29:50 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1DEA66176F; Tue, 29 Nov 2022 15:29:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B681C433C1; Tue, 29 Nov 2022 15:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669735789; bh=LcLxGc0JJF4Y9hWKi36NBEOqASyjERCHhf229KIalLQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W18al4QIssBUGlHaJSbuzmXtvkWgmxk2N5i7DIut8Nxy3ysCvHhMCMSHDvP5DMrfG 0wWPme5DrYNNTRWyQl6RYolbCm5jf1AIiubRS0JyuzAWzUsneuSjfbmjaIGQMPC9Hi 9UX/mKX8fZfsSG/BdLHP7IqJkI9eM4yKhO1guYXCtoZqdtWA+E7uFtLfE4dmlgU9TU cnhd0jpYcbvNKphuNYIYmjW6Vbp6azO2Vjo6GjJHwCrkXQBN5sXEiNI4gF6KBAgC8I Lsh7CTkV0GrBfYaPWS8nTPLwzPspp4HCeVGQi+4iFnsBdg0G/y+se2uPUmfPNgy08x qDctGIBXbzAiw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p02YP-0004V6-2i; Tue, 29 Nov 2022 16:29:49 +0100 Date: Tue, 29 Nov 2022 16:29:49 +0100 From: Johan Hovold To: Luca Weiss Cc: linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Message-ID: References: <20221125092749.46073-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Fri, Nov 25, 2022 at 03:12:24PM +0100, Luca Weiss wrote: > On Fri Nov 25, 2022 at 2:52 PM CET, Johan Hovold wrote: > > On Fri, Nov 25, 2022 at 01:53:25PM +0100, Luca Weiss wrote: > > > > Parent clocks (ref_clk_src) should not be included in the binding, but > > > > rather be handled by the clock driver. For example, see: > > > > > > > > https://lore.kernel.org/all/20221121085058.31213-4-johan+linaro@kernel.org/ > > > > https://lore.kernel.org/all/20221115152956.21677-1-quic_shazhuss@quicinc.com/ > > > > > > So I assume you mean that I shouldn't do this: > > > > > > clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, > > > <&rpmhcc RPMH_QLINK_CLK>, > > > <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, > > > <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; > > > clock-names = "aux", "ref", "com_aux", "usb3_pipe"; > > > > > > But for "ref" use GCC_USB3_PRIM_CLKREF_CLK? That also seems to work > > > fine, also if RPMH_QLINK_CLK is not used from Linux-side (checked in > > > debugfs). > > > > Exactly. Since the vendor dts describes RPMH_QLINK_CLK as parent of ref, > > I'd suggest modelling that in the clock driver. Perhaps it has just been > > left on by the boot firmware. Someone with access to docs may be able > > explain how it is supposed to be used. > > RPMH_QLINK_CLK is also in msm-4.19 ref_clk_src for > GCC_UFS_MEM_CLKREF_CLK (ufsphy_mem) and also ref_clk (ufshc_mem). > > Honestly since it works fine without adding this to gcc driver and I > don't really know much about clk (and have no docs for this) would it be > okay to just ignore RPMH_QLINK_CLK? Preferably it should be fixed now as it may be harder to figure out what's missing in case this causes trouble in some setup later. But, yeah, the lack of documentation is a pain. Hopefully Bjorn or Vinod can help out with getting this sorted properly. > > > And for the driver patch, I've discovered that this phy doesn't have > > > separate txa/tbx region, so dts was also wrong there. Do you know if > > > there's a way to test DP phy initialization without having all the USB-C > > > plumbing in place? Might be good to validate at least phy init works if > > > we're already touching all of this. > > > > Do you mean that it appears to work as sc8280xp with txa/txb shared by > > both the USB and DP parts? > > Yes, looks like it. Can't find any evidence pointing in any other > direction at least, everything I've seen shows .txa = 0x1200 & .txb = > 0x1600. Ok. I've also only seen indirect references to the DP registers for the older platforms, but at least of them do have the separate DP TX regions. > > I guess you need a proper setup to test it properly. Not sure what > > you'll be able to learn otherwise, apart from whether it passes basic > > smoke testing. > > Currently it's not even smoke testing because dp phy is never getting > enabled because there's no consumer. That's why I guess it was never > noticed it's wrongly described in dts. Yeah, people shouldn't be adding (copy-pasted) nodes for peripherals that they are not able to test (especially given the lack of documentation), but I guess the USB3-DP case is a bit of a grey area as the USB part can have been verified. Fortunately, this should be less of any issue with the new binding scheme. Johan