From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10E3D2066DE for ; Sat, 7 Mar 2026 10:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772881066; cv=none; b=rxgFQ/qHub1zY2vSdaaQdXswQiz4A9yjAjdxcHSvH+r7HsCmNt3RoXyc5LxzGbu/NutEUIzS3dzHL8nYMAvzIPuDjEFytxGi/w4igAnknz8RMgx0SSy6uScPlhIVisLvoR9SZRRfFzbGWElozXApJIjevYAc0rxLZERl+E+D4bc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772881066; c=relaxed/simple; bh=3dC54IEgG6lpF36kypu94sZUpT/MA7SJFESyYqq48dg=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oMmmll5YMeOPtcd6RfRtP5Q1b/IW8yD1Dl8Z/ObbMDuGVeCK/F5Jrq6MI60V86O1Rd/PgDE//6sqpUUUNuhMQGFhyRKBjll2X0YOtVQPV8vsRMlSWUlQ8f+RDFvLbhtEBX3LwhDbi9eWBh9sXkbPzWTprifcyWKwxXDVjLPM3eA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mpzjkylQ; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mpzjkylQ" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-439cd6b09f8so2381780f8f.3 for ; Sat, 07 Mar 2026 02:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772881063; x=1773485863; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=V94QkQoEyTd6cBgukGsABnXYIA0vAI5uUZxButFAf2M=; b=mpzjkylQE7nniaomMDqjQDykg4CVwAufAdxQ/clFF/7UhgRwfpzSDeEBfzAmccSuua Pp4UdNNL1fgmYrv9YcsZObW2+L/O/Wp7d39ixL6r0YCjp7TWimRFMh8yQX8+P8qNKn74 uqsVyazRxT9GoUjdmTCgojj6vMXiqF6PvM3VcBSZnPcawGbuu7O1tpAaJldD66QCfOY+ uDu7+E6PvEDWTmzu5uaMssMr8+ff7UxkFHUCd5PWiN+o0RCuw7HltV8Siu9PwFjqnb7M EQYVyyeaKNFF9Ke3eT0WMjDDwrZImrJrigu7ZAUmluyLcujxRmZ4AFn/i3k8h2Y9FZUK z+8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772881063; x=1773485863; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V94QkQoEyTd6cBgukGsABnXYIA0vAI5uUZxButFAf2M=; b=fYWSefIP6Lj7+iAM8UI05IcRrQmoWC9XU0hb5PfcHpusNzdkOVaIZ0dMPDaGSKu71G fLCLlH7z4xtLjvy0n4loy0deONRGgFv+Q7BCjgW267Cxp4iMTZdGKLpxK/DCymPpYRet c2cb009hheBSjJ8kA8pUsp4RlkJuzWK/uhYgbRN9ogMIid1PquhTz4j3BefLMyT9AsSx SjVv+2QuFGpxBRa+jccWFJIcdB1RIWSfYXnthLBhImjjNr5EQ7dbCwLXnaqiTPMrU8iM aFzURflJhmEZxZJmeRJr9zQcAmqsATHB3WFhiCZdFyafpmYy4CrBzssS0aKytk8sF3/5 wiLQ== X-Forwarded-Encrypted: i=1; AJvYcCUjjvB+UsYh/K4lNmkjX4ol3UdpRH4NksJ/lx56AmUM38dqKhTVZ1EqhMXofKvhCNw9PG3kfRkjBSItOKc=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0kHxyreQj39oZ/TLycwysJkPP/tfRx17Is9ebVqNKd4JODYaS 09r8GsjcFwXwPkuyUhtO8Anxk5Dc0hU+c2zf+vI2eTDhXzrNJCu0lGTl X-Gm-Gg: ATEYQzxpgT3OnCegmynoRp4VfuU4vw+WBgwnQdbeuKupq7N4yEMj8UPGmgW7XS3c1+0 4i6G2R2Tnn0WDWQUVqdWs2X9XyKbMJ2U9mi7PyOKAEN31gHl/SdihVWa/K5V+BO7D9FjhhLREsV IElEaVwiAcewNC4swD7s0Cv03uiNYynXZGGCfPUT2EQt89cwp+BV1d8XJ1cZ4hFVxZ1uKzbbOoP gVyraBIyGaJb797VedqjcyYbNQaoCrRUpLVVIrpYH2IEDznpPIyfUxnIjNbzTS51f2BsaFE2avh odgwkcI/oDLiPGp0+/S7SDZMI/q64vpEjC9Okp+F7Kw1MLxFo2ECJvE2+Rnv9M/ym+gCUtOrAun /VPDND92zA6UzLSWAuwWDXayVnodJXqIv7BjPfHAnTDIqgPQL9b24wvSpNC6fCsvVRYJ6coYoBt 4bJRqfK+lS7HIGuZyFcWz5XIfobhRkZixVHNS+dl6WwfJP/IaqonLXO+3JTwoyqbfh X-Received: by 2002:a05:6000:1447:b0:439:beba:300 with SMTP id ffacd0b85a97d-439da31e274mr9511165f8f.1.1772881063378; Sat, 07 Mar 2026 02:57:43 -0800 (PST) Received: from Ansuel-XPS. (93-34-88-122.ip49.fastwebnet.it. [93.34.88.122]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439dad8ec97sm11439826f8f.5.2026.03.07.02.57.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Mar 2026 02:57:42 -0800 (PST) Message-ID: <69ac04a6.5d0a0220.2969f9.9d81@mx.google.com> X-Google-Original-Message-ID: Date: Sat, 7 Mar 2026 11:57:40 +0100 From: Christian Marangi To: Krzysztof Kozlowski 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 Subject: Re: [PATCH v6 4/4] phy: airoha: Add support for Airoha AN7581 USB PHY 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52123051-0d2d-42b2-b677-99a5de0f2c4e@kernel.org> 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/ > > > > I will readd as airoha,scu. Is it ok for you? > > > > (I actually prefer phandle than hardcoding compatible as it makes things more > > descriptive and prevent all kind of problem in the future, so I'm more than > > happy than using that) > > > > > Best regards, > Krzysztof -- Ansuel