From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) (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 9D5FA35AC3C for ; Sat, 22 Aug 2026 12:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787401994; cv=none; b=cxOlrWW4teIaVLwTaXZlDX8E2JlnNPW5Yo32TheIK3Xa9W510aUja8zr/qojbDOcvRS2ZiJUxrW45tIRTGYlE2isBiKp1MLak5HA2kBI+Gn8Hosq14V2so598kqv0yObdQjA5V026ZN7hgNCmrzYobJxodbXIlqMUONViqnp2iI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787401994; c=relaxed/simple; bh=Uw+TK3EgJNgltpy0OWy0qdquWNHbs0IQEHSfH/QkdGs=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YUeigO9GJeVonQLXupFlCBEybKF/q82TYIOVNYJeTy8ayJTl9iH6CA+DhG5ccMrXj5fVPQ9mcPmizqP3Msv7xo/yUumOchCmkQCk1uIytUZSleywFzNGcHt30OTX5bVRAnJMU8LCoeM//naAcLlUzifL4QseYzHRVe4/CeFVrU0= 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=o22LtE55; arc=none smtp.client-ip=209.85.215.176 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="o22LtE55" Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-ca80d708489so1250849a12.1 for ; Sat, 22 Aug 2026 05:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787401993; x=1788006793; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:to:from:date:from:to:cc:subject:date :message-id:reply-to:content-type; bh=XfHQG1lWh9ZlhxyhVuyS3JBvk/o8rp8H++Qugcq4y9w=; b=o22LtE55UdTn0st+ag0i7o8XQWFeteMvYUYQluba1G6qb0atVq2h9+SLPA/vv/Ab5Y 6RskHT6Yqe8DPkkKgk2N9A+5TPpxQep0a3IE0kOv2oyW8G2tTCdyeQYkb1XfudEf2Phr QDrKYD0mMxPEH9UaPHB39v7HDdAMNOBc8byNjn7z46V1msPC5GrhlB4iasL43lFlqu46 4RkVKbIZo5aHwoGw/Ak82KzdUxhHZt+47qs06StyVauU8NqIYRcx0JPL92tPdM25etif swK9vfS1qKenh4xiLUALsn1FteekN1605aQhMJ0EYlOR7p213sn84W1IG1icIOq7moSo UICw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787401993; x=1788006793; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=XfHQG1lWh9ZlhxyhVuyS3JBvk/o8rp8H++Qugcq4y9w=; b=UW87NtQEqwAhmjEKgixBtxZtT6yZ5du5X6eKeHa/1JNCVxaLif0XaGbvvqUvFzxUmS N+UGLCO2er1yPt1U+lHp9vIqJJ1kUpmVfN1bFo1/f4/PfBOnuksQrNUJYcsTMozwsTtT 9AnGhsTr9FPmmyszFYdZ7EDZa1fzHyrbIfe3EJuPnbUZx5Url8+UWv0h7NQ9Eh89lnNq dBatZ5S3D0U73udIUYD602fT7Wo6+POGD8Q7ymYP8j6D4JMGSay1dMHsIZv9ciNupSbD tll2Z+7yVffmQU1HeH5MJMMxRqrSvh9FXKBtLtGkYgjy/bvWvl/y8P8CxxOKsKK19Pk8 ubbg== X-Forwarded-Encrypted: i=1; AHgh+RqUxMCtukDlhbi0ik4uYxJxIUvx6mrXEQM56CDE1WNuI7DE7dgUHmwPQ141euaTV4fYVNNFzWEqpLUL8DA=@vger.kernel.org X-Gm-Message-State: AFuF++mAbfdKWo+8Da9pUF1j0++nAvdy88hVIfllFwKZW2h7vwinn5Fl Qgzxh+Sg0qgzu6WJ1RWjm+kAeWa3wyHFlqokq5vUFK4puSgfofWd0C4C X-Gm-Gg: AR+sD13M/w4BwuYWFgQSgaxAWJc502cY7FCCJ7ZuEfzXie9KmLEHY6gvhPgT8AzO+pD d5zNPnuZBseewoNcO7cmby6i0huzNk5k6ckXbC2To1yMdIA0RKODSt5QF7wq950SO4FBl21AzNd x1amWe6Qwg0k0KFGsiWCfg1sJt6kTBYN8FNwQWLVIllv9JBAUuzNDrwtgQa62puCKCmfwS7EpfT ukkQTcw2nAsvQSeVnYu21uHCZdq260qDyJJaE5OFo5ORO0p18A7F8I9e8T0YBfiAFqcd+cZlusz Vc8F9um/Dvc46aQlyQPtnVyXKbjaILUaLq3CsdQOuuQNzfVaGmtQy9OHKj0IMWSAqJLMgKHsaYl 0W2VVfLIRaDKqpX6e1XH/PSWwdolDWUO7LQ7XZxQ7HWnvdRV9AALcppuHZmFHcXGVWUGHTC29X+ 7SjOmi+RK3FKqfdW+x8Vyuygd1fFUAinTxr4IH9Kr+/3xPNGJNKdDQDs6Xn2s= X-Received: by 2002:a17:90b:268b:b0:38e:42f5:d096 with SMTP id 98e67ed59e1d1-395c4528324mr11764124a91.0.1787401992755; Sat, 22 Aug 2026 05:33:12 -0700 (PDT) Received: from localhost ([2001:19f0:8000:3e6e:5400:6ff:fe38:3d01]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-395e4af6e88sm2619008a91.9.2026.08.22.05.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Aug 2026 05:33:12 -0700 (PDT) Date: Sat, 22 Aug 2026 20:33:08 +0800 From: Inochi Amaoto To: Inochi Amaoto , linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:RISC-V SPACEMIT SoC Support" , "open list:RISC-V SPACEMIT SoC Support" Subject: Re: [PATCH v3 1/5] riscv: dts: spacemit: k3: move USB3 phy to board level Message-ID: References: <20260819162115.2252812-1-aurelien@aurel32.net> <20260819162115.2252812-2-aurelien@aurel32.net> 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, Aug 22, 2026 at 11:37:44AM +0200, Aurelien Jarno wrote: > On 2026-08-22 10:17, Inochi Amaoto wrote: > > On Wed, Aug 19, 2026 at 06:15:42PM +0200, Aurelien Jarno wrote: > > > On the SpacemiT K3 SoC, the combo phy provides 8 lines that can > > > either be used for PCIe or USB3, depending on its configuration > > > (spacemit,apmu). This configuration is defined at the board level, and > > > assigning a phy line to a USB3 controller while it is configured as PCIe > > > results in an "Invalid PHY mode" error. > > > > > > Move the USB3 phy at the board level, the as it is done for the > > > submitted PCIe controller [1]. Keep the USB2 phy at the SoC level as > > > there is one phy per USB controller. > > > > > > [1] https://lore.kernel.org/20260727094726.890179-3-inochiama@gmail.com/ > > > > > > Fixes: 46380e4b1534c1626cecd7f4d0abb5e0cce09af6 ("riscv: dts: spacemit: k3: add USB controller and USB phy support") > > > Cc: Inochi Amaoto > > > Signed-off-by: Aurelien Jarno > > > --- > > > arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 +++ > > > arch/riscv/boot/dts/spacemit/k3.dtsi | 5 ++--- > > > 2 files changed, 5 insertions(+), 3 deletions(-) > > > > > > diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts > > > index b084a35aa00e..171bd2f40aa6 100644 > > > --- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts > > > +++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts > > > @@ -328,5 +328,8 @@ &usb3d_u2phy { > > > }; > > > > > > &usb3d { > > > + phys = <&usb3d_u2phy>, > > > + <&combophy 4 PHY_TYPE_USB3>; > > > + phy-names = "usb2-phy", "usb3-phy"; > > > status = "okay"; > > > }; > > > diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi > > > index c3f2dce0969c..3e24054d2084 100644 > > > --- a/arch/riscv/boot/dts/spacemit/k3.dtsi > > > +++ b/arch/riscv/boot/dts/spacemit/k3.dtsi > > > @@ -452,9 +452,8 @@ usb3d: usb@81a00000 { > > > <&syscon_apmu RESET_APMU_USB3_D_VCC>, > > > <&syscon_apmu RESET_APMU_USB3_D_PHY>; > > > reset-names = "ahb", "vcc", "phy"; > > > > > - phys = <&usb3d_u2phy>, > > > - <&combophy 4 PHY_TYPE_USB3>; > > > - phy-names = "usb2-phy", "usb3-phy"; > > > + phys = <&usb3d_u2phy>; > > > + phy-names = "usb2-phy"; > > > > I suggest removing this completely as we can not determine the > > phy we used. I think it is suitable for setting this in board > > file only > > Yes, moving all the phy definition to the board level is an option. I > decided to keep the USB2 phy at the SoC level, because contrary to the > USB3 phys, there is a one to one mapping between the controller and the > phy. Do you think it is a wrong assumption? > By default, I prefer to make the forgotten thing as an error in validation for any flexible field. If you leave the default value, the forgotten field will lead to a downgrade hardware (or maybe broken hardware). So I prefer to remove this rather than give a default value. Regards, Inochi