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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48781F55101 for ; Sat, 7 Mar 2026 16:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yFNb5U8AIOL+sWXHzCDKFFjPjEvZE9TIr/9pFV/GoYk=; b=x3Gi9dQXcQCDyi 8s9zM3OxJxw9Ua8i4v3dcxhGDdDODIC5vTjluwekc0llb4kQCCGMb+S9uwrhCtFlbGGLx2GQXgUaI pFsTgYtsal1aQMbHbNz7QVhzHN1jWlOeE3BdcR0Ft7p2+QaO9y4J+fLa2otmnhjnV7bLXX5ISxN2b E/phb11Ix3K9WH9aR6RdQzlSDCNRz6JxkjGnL3wERiKspSlkv0fuVnHO5nqVmzAnkdNF0k3T+b+g4 5WHQPeaA0mo740jenSj1G0Y/NLtfoeyah5qha1cK1qsIORWbCoVJy2evNtiZcLYy533GByUq6aGV4 ar8zgKt/kvTPUws6EgVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vyufj-00000005Mfp-07qM; Sat, 07 Mar 2026 16:38:35 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vyuff-00000005MfZ-3bJf; Sat, 07 Mar 2026 16:38:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id CDEDE6001D; Sat, 7 Mar 2026 16:38:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D778DC19422; Sat, 7 Mar 2026 16:38:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772901510; bh=GgYhTuG+U8qCqyt6YR2UooulYaCofpgoCdJojn6OTyw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=psJvfMHGSMXtWgS0VhCZODcnp4mxeQaGAs9tLBpFKEFsKCBgD6u5XdpU83xn560kh nwdpdup66SBJ1q4cD7uwl0avIdM7LMof4RGSKv17t0wW8ZmJynq1MO6Qh7Nmq69b42 CQrj9U4wKZ2+yvkvMkQqJdy6gHDxW69Sk/LFUik95UBO1GloeCWeCH10jW3ohfOuHf SAWhHUEd0H/VB/f+vC0XsHnJ9M/5vyK8NlUnPBJKwr6pi0arT8EDaBYI1CnUxSpJwH 9FOYhyv0m9LUWicS1XYaXlxOpDYy/oA58VFRHuihiRna2uBq/bN3QjmGbG0yO0wHu7 6t9glmRfDTiNg== Message-ID: Date: Sat, 7 Mar 2026 17:38:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 4/4] phy: airoha: Add support for Airoha AN7581 USB PHY To: Christian Marangi Cc: Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lorenzo Bianconi , linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260306190156.22297-1-ansuelsmth@gmail.com> <20260306190156.22297-5-ansuelsmth@gmail.com> <20260307-otter-of-imminent-merriment-d3475d@quoll> <69abffe6.050a0220.18164c.58d6@mx.google.com> <52123051-0d2d-42b2-b677-99a5de0f2c4e@kernel.org> <69ac04a6.5d0a0220.2969f9.9d81@mx.google.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307 QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp +r2I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9d81@mx.google.com> X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On 07/03/2026 11:57, Christian Marangi wrote: > On Sat, Mar 07, 2026 at 11:40:48AM +0100, Krzysztof Kozlowski wrote: >> On 07/03/2026 11:37, Christian Marangi wrote: >>>>> + >>>>> + if (phy_type == PHY_TYPE_USB3) { >>>>> + ret = of_property_read_u32(dev->of_node, "airoha,usb3-serdes", >>>>> + &priv->serdes_port); >>>>> + if (ret) >>>>> + return dev_err_probe(dev, ret, "missing serdes line for USB 3.0\n"); >>>>> + >>>>> + priv->scu = syscon_regmap_lookup_by_compatible("airoha,en7581-scu"); >>>> >>>> Nope, you need phandle to express proper device links. >>>> >>>> Don't sprinkle compatible lookups for new code which does not need to >>>> keep things backwards compatible. How do you manage device links >>>> without phandle? How do you manage device probe ordering? >>>> >>> >>> Hi, >>> >>> the phandle to SCU was present in old implementation but later dropped as it was >>> said that it wouldn't describe the HW. >> >> >> I went through v3 review and I did not find such said arguments. Can you >> point me to it? >> >> > > Here was v2 [0] that was clock + USB PHY. (there were clock stuff as the SCU > implementation was different) The link wasn't added in the changelog as it's > quite different than this current series. > > In patch 7 Rob pointed out that serdes-port + scu was a bit unusual. > > Then the implementation changed in favor of a more simple one where it's the PHY > that configure everything and in this new version the usage of the SCU phandle > is really to just get the regmap and modify the single bit to select the PHY > path/mode for USB 3.0. (it's mainly the reason the SCU is referenced directly > with a compatible instead of a phandle, in the previous implementation we used a > function exposed by the SCU SSR, while in this it's just a regmap that can > PROBE_DEFER) > > Rob suggested an additional layer (a PHY) to handle this but I don't feel it > would actually describe the HW this way as that bit doesn't modify another PHY > but it just toggle the mode to the related USB 3.0 PHY. > > This is really another case of not-so-organized register mapping on the SoC. > > [0] https://lore.kernel.org/all/20250320130054.4804-1-ansuelsmth@gmail.com/ That's the cover letter. I guess you did not implement Rob's feedback, either. This is either phy (for phy) as Rob asked or scu phandle. Removing scu phandle and not implementing phy is not what Rob proposed. Best regards, Krzysztof -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy