From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 58315212F98 for ; Mon, 16 Feb 2026 09:01:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771232479; cv=none; b=HZ5EcjrsAmsVL7kHcO1ROMpIPOmiViHUYkQS/XN+CROPG/OdTJS6jhE1oeySuZ4OzQ0xBULF4D1dKZIsun+s9Bx6T9FOxuMBlEJ5j8xXCDn9oum/fVklfS6EPJpyXofv5bD3Ljl4vI5/bvu5B8mHq+tjYpOabjM+Dkfe6kcEZQM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771232479; c=relaxed/simple; bh=2MLUkdf1st2wI8Mhpz3EHSzrYYrzKyvFdnclNChQ0Po=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ma+fGVjhlfpx5nFpg7AxQnfUMwb3SpUBNzfER1zjP1068E7ggSxFD93onfGrIO1PB6FePudE8cWk4rEZlWVH9ZBD51gHivg1XezSH8V5ZD6pzxtdOhgoBb0gyJXdqDmusR68Ha9bk3ANcrHsbmVL8+9zWn+Bj8PGREdcLrjr5Xw= 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=WmQaaKp9; arc=none smtp.client-ip=209.85.128.45 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="WmQaaKp9" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4806b88d8c9so3831645e9.2 for ; Mon, 16 Feb 2026 01:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771232476; x=1771837276; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qHnHPcuynIqTUxCpCO7mrbWmUqF4Rxqiy/wTilKTles=; b=WmQaaKp9Q3jJ/sf6KjjXgX5qSHAyxuIcukKFq5+OnhxY2YzB6+XgUjPjfG0wIpHXXm txXA+guyXjVjltaIPhRT8f7kxJ8/CBSnUuFS9dHvlqztpE4agEPuAWyiAHqzY6uS2gKs A6Z249mKc0XjtW7Uangtt28PG/6poFZp+PTJi4H1NrTrlOBS7BiYeBICyHycPNowxBBM E8pCq7jLUt3hgssCzGl0eIg7NwHUa1pf9sQQ18pp2UzC57NRHhnetjNHUB1kcBMlDUrw h7HHu8CvkZxse/rJviqN1ACWSutngZf6cBKg/SEbhJEVvT8jrjjiVL9AEjZ0omG3Mbcq bgTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771232476; x=1771837276; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qHnHPcuynIqTUxCpCO7mrbWmUqF4Rxqiy/wTilKTles=; b=e+USEwItB9GQ6FbdG24LjrMNiNyCFALB1Ajn/2vrB4QOIS0n3ZDMiJC02PIhR4WHLy Xka0FNp4x74AL5gASeyCFzDgZnb6sd5dEvhvXrQYYKhGU+p41A8pRqEPg6UNtmX8xFCG QsvuPDhlRhFTgQjSCJ26Lb9m506XDxtPF1CUJAUtx/Ry50PcNIpNigywC+S+GRLIjbwS +tBRgFtS9f29VGcOJHd9DPC3yy8X48UH/VHFNxXUxEC9SXZratECBPR+uiqg/HhlxCN+ NVr3VElRrLo0fEXijbPWHIpVnC7pqiPSlWjDEpWV38PWKSjAvWnCuW7IaW72VevF77b2 +JHQ== X-Forwarded-Encrypted: i=1; AJvYcCUXaUmYrZkK7NKnidbyyJJ3zB2VZeFne9nENvVe4QMMEAG8xsNFOGlXAUM+hA154DGNjUNo097+YNOtEZc=@vger.kernel.org X-Gm-Message-State: AOJu0YxRtiEHuLPGajZD19bfe+AaS+tnllTZ5VTxafgXi+qSbqGsszPn 5NW4RZznJ0f7L0yC2j9znUnr3JzPxIX88qKJHxfimjEezlHlZngQ3O2W X-Gm-Gg: AZuq6aIWcaYATk5Hqhm8JmWHWcbixpYXmXsOasNSWiSbTd0rnbK/NT1VNP4vCVAeQK5 gaPpnuFkMsT+mJU3VBSnWO8I2JhEhwl7+0n8Vfnd49JdKWwiBE1su7gx+Y/fu8QE4gJDyTYlbFe qvoUAX0oW5PCcmxjauR1wxcTapZINjL767id8/TOs58R7M7DJSvjMKsFHSSN4069/+PP47+23f8 rRaM1sirWkQtm3sr49liQh8K6n1C+U6p8GBYeRuvTMyj0VS/UdckvJ7a2f+bDMs3g2Vs4pdjds9 kIf46dlZbuoxw6PbZinddv9s5b0vPCSkIIHQH1hrGzaGbPuZlh2/OGVgp2Cz+FHnCRDOKw/3YH6 bSZsvfOF/CeOzRNrtXy4on2gmSgE2qubMjdxO8Kr5eaWAIyIzou1Uwofe1ldJrKbiJZWSI55lLy kVVAShD3/cUt5gAw== X-Received: by 2002:a05:600c:4448:b0:47b:d992:601e with SMTP id 5b1f17b1804b1-48370e2b6bemr118797125e9.2.1771232475530; Mon, 16 Feb 2026 01:01:15 -0800 (PST) Received: from skbuf ([2a02:2f04:d501:d900:68e2:cc27:74c:c083]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48370a78c89sm249517325e9.5.2026.02.16.01.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Feb 2026 01:01:14 -0800 (PST) Date: Mon, 16 Feb 2026 11:01:12 +0200 From: Vladimir Oltean To: Yixun Lan Cc: Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ze Huang , Junzhong Pan , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] phy: k1-usb: add disconnect function support Message-ID: <20260216090112.n5jjpui3luqsybb5@skbuf> References: <20260214-11-k3-usb2-phy-v2-0-6ed31e031ab4@kernel.org> <20260214-11-k3-usb2-phy-v2-2-6ed31e031ab4@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: <20260214-11-k3-usb2-phy-v2-2-6ed31e031ab4@kernel.org> Hello Yixun, On Sat, Feb 14, 2026 at 08:29:15PM +0800, Yixun Lan wrote: > A disconnect status BIT of USB2 PHY need to be cleared, otherwise > it will fail to work properly during next connection when devices > connect to roothub directly. > > Fixes: fe4bc1a08638 ("phy: spacemit: support K1 USB2.0 PHY controller") > Signed-off-by: Yixun Lan > --- > drivers/phy/spacemit/phy-k1-usb2.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/phy/spacemit/phy-k1-usb2.c b/drivers/phy/spacemit/phy-k1-usb2.c > index 342061380012..959bf79c7a72 100644 > --- a/drivers/phy/spacemit/phy-k1-usb2.c > +++ b/drivers/phy/spacemit/phy-k1-usb2.c > @@ -48,6 +48,9 @@ > #define PHY_CLK_HSTXP_EN BIT(3) /* clock hstxp enable */ > #define PHY_HSTXP_MODE BIT(4) /* 0: force en_txp to be 1; 1: no force */ > > +#define PHY_K1_HS_HOST_DISC 0x40 > +#define PHY_K1_HS_HOST_DISC_CLR BIT(0) > + > #define PHY_PLL_DIV_CFG 0x98 > #define PHY_FDIV_FRACT_8_15 GENMASK(7, 0) > #define PHY_FDIV_FRACT_16_19 GENMASK(11, 8) > @@ -142,9 +145,20 @@ static int spacemit_usb2phy_exit(struct phy *phy) > return 0; > } > > +static int spacemit_usb2phy_disconnect(struct phy *phy, int port) > +{ > + struct spacemit_usb2phy *sphy = phy_get_drvdata(phy); > + > + regmap_update_bits(sphy->regmap_base, PHY_K1_HS_HOST_DISC, > + PHY_K1_HS_HOST_DISC_CLR, PHY_K1_HS_HOST_DISC_CLR); Please align function arguments to the open parenthesis. Since we are in the merge window, it is likely that new features will not be picked up at this stage. But this seems to be a fix for existing SpacemiT K1 support, currently in the linux-phy/next branch. The linux-phy pull request hasn't been sent yet, so if you can resend just this patch and we can get an ACK for it in time, perhaps it can be included for v7.0. The K3 support should be resent after the merge window. > + > + return 0; > +} > + > static const struct phy_ops spacemit_usb2phy_ops = { > .init = spacemit_usb2phy_init, > .exit = spacemit_usb2phy_exit, > + .disconnect = spacemit_usb2phy_disconnect, > .owner = THIS_MODULE, > }; > > > -- > 2.52.0 > >