From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 6EBE6355F31 for ; Sat, 7 Mar 2026 18:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772909280; cv=none; b=T12MjPSCs7IlbnXpDujFf1NyAPR9k97+BAjx9u6bUJzxCBYh/LlAkMHjLpwkg4FSF9jNUz2PDrRlIYAFbN5loWI+yluELd/YpcrFtjDJ0jWnefMEP/cwNVj44fsZyJWhevGIMm2/oW+IVg/M3ybexTf/Ak1F/24WJRPjr/aFuk4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772909280; c=relaxed/simple; bh=YdVEPVjV6iHxtNwNNftWEYvRTufEH+5D6Xi8HPm8yZ0=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nBSPJUvzJaPgDw3Rpme1N2A/5BxQvChuHaAY1kKwCpC3o6XjI7Kr5gikyye5K42DDFfcrKiOyZEA7xvFJ3Hwehul88AvxLZjbOHcmYKLpXiLkuHQ4znU2r+dR9CyTqNqo0Cz8VvgCDXC5ko6d5paV6jYUMSZoAAHD/moWVpEbec= 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=ik86ib/k; arc=none smtp.client-ip=209.85.221.54 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="ik86ib/k" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-439cd6b09f8so2542289f8f.3 for ; Sat, 07 Mar 2026 10:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772909278; x=1773514078; 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=fePtVH1XrSdcxkm/f3Lu86HTCbPhsyR6IapTe3JHplY=; b=ik86ib/kulNvjYDMX19tyWaTGAHSiPP2Srb4IJJqR9QG2/5vRGHbWajSvdVZZfhnux 0fjlvJKw6l7yRJ5WZJAPI+fFW9R3XwkI+niv9t8QqEm0vZbNs4SEyOnauzvbYdYkq28J 76PA6Q8EEXp3aXDIDuU0FIZH4iDLS+Dqczi+/AIge434xrLjV+kf0MJ6hljAR2GC0TJd HOJ2LqR1z8ge0Tq6agU3y/Qdo90GYCoIt+bGFX5NeBJxfIsMSOybUEwbytpDJkZEiCGT vr/rZE7zkMvxkf9PbHW9CPq368t6HapYtV+me6HoGZzMlzHukbd4EfpnhDrzBBUqtvHV dp6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772909278; x=1773514078; 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=fePtVH1XrSdcxkm/f3Lu86HTCbPhsyR6IapTe3JHplY=; b=l6QHa5ynSR+QbKydQ+nJ5dBGUROpf2XGQvwepDWTjJpX9rTlvvadDD+f4lnH4bFPCm pQSEr9pIGTrk8buNCZiILWXzySfed4LGvGoq4zt3WhiCViNSdJkn6qSH/1YnWqa/MBQ/ QaXkDnVMGPyUH+fTzXmGURgkFYAGNgN7Sg6Xcriso+mW8TDbPCJ81LyWorbxukVh57Ah iE+Kcb9idANY69Nlukz7v8A7WGPvktl03Ul+sht2JmCnUo0vDpv7PhWA/O2Je4NiCP0O WjQPuA3vmYPJji5sXKzRqMk8cDyhVDY4zQeyj2Nb8UUh7/T/pU8puKHHWLEgWJpDhPQZ 2cLQ== X-Forwarded-Encrypted: i=1; AJvYcCU7323BEkcNWxeyX9uJsqx98CJt6e1X9Ay1YIsXjfk9z/kdQypsn0fAX7etnyAUdRMKU/Aan9R0vGLI2UE=@vger.kernel.org X-Gm-Message-State: AOJu0YyhJkNod3qZldXqg96os95hSeopttbKc+o25Q2wCsz9qdqfp1HG vPUGG/COll44YoisA1xElcHGJe9o0X3S8pDQz3yTE4ZXLJkp95tviusg X-Gm-Gg: ATEYQzw9N+Xg1K6nkwpz9G5Yi+fIJ1nL4jLVY3K4eQZG4E6BnzrGLhHE+F0G7N0ggGV b1OeStzEcDAcf1vFzmAlqo5i+CKvA77USHihGfXdbMisC1lpZ/Be+eUWLw9WZ42qdKfX0ZYOZss Q0eYqgYIC0+OeCzuHkUqpm1g3U8GJSsnLV3C/XFe/Q9XKRj4JSKmsUF3o8loZPYAlXSLEw9diFF tI4Fa5ubbwiIAwJJIpGohvsi57t+hvS8YuNfW5jj81Bxya7XPrEuF57Rw68iSeg20LL8omF+JBz SJWXOIgdK9ItIoBhhX5hBo3wfF4+jqoEvygRHGQZE0zdTBKqH02roTpgrwStt7VTR0YGe3O61vF T1BX6+VAi3GCT2MoaOw4uE6iqvZjxGo2PslZUShfNJ9Wh2saqsMjHhQA37dvoEM2PSRj2j/nLt6 zl0ckMhNak1+GyZsc/nprh9O6H+6HKD0VtVu7FsdX4qQTTz0ToyyV/TQ== X-Received: by 2002:a05:6000:401e:b0:439:b3f1:8011 with SMTP id ffacd0b85a97d-439da35f838mr11120861f8f.29.1772909277570; Sat, 07 Mar 2026 10:47:57 -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-439dae3c80esm11455641f8f.29.2026.03.07.10.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Mar 2026 10:47:57 -0800 (PST) Message-ID: <69ac72dd.df0a0220.a3fa6.8d4f@mx.google.com> X-Google-Original-Message-ID: Date: Sat, 7 Mar 2026 19:47:54 +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> <69ac04a6.5d0a0220.2969f9.9d81@mx.google.com> 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: On Sat, Mar 07, 2026 at 05:38:25PM +0100, Krzysztof Kozlowski wrote: > 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. > It was to give the full series. The specific comment from Rob was [0]. SCU phandle is going back to the old dual binding that Rob was against but PHY for PHY would not be descriptive of the HW. I can do that but would it be correct? [0] https://lore.kernel.org/all/20250324154919.GA101272-robh@kernel.org/ -- Ansuel