Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp609120lqm; Wed, 1 May 2024 10:05:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLcU8ppDwbcsTz9LMr9f0bgYoveRa0CVAeBgFFEZyr/imsBzzqkli1ytDXfjQEZn4BQjReSteXPhsTdfZBFDzZjiyGeJbIybz+kLxJeQ== X-Google-Smtp-Source: AGHT+IG5yUGrk3q3DvqQSyCDT0ZKQn9O94GAb7Xr6uOrEZ3WSnZvXjoEPdYJYaUKD/97dnE4102v X-Received: by 2002:a05:6214:f26:b0:6a0:ad3a:96ec with SMTP id iw6-20020a0562140f2600b006a0ad3a96ecmr3648670qvb.17.1714583140529; Wed, 01 May 2024 10:05:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714583140; cv=pass; d=google.com; s=arc-20160816; b=afFtXSUwFUV0m8tyFNJViQ4na3ODHjXB/93NRiCPzn75dCl//ZfMk/sKxcfpfUkt2U UBArG0f2xyYhYwk7dYyGuoNmrOcYyDudmiL6IYyBBOIj56blPKmWiI23aHnHpiHcgUit jFTcIMG4/Gm+8zDXZ7kR6JgJ0NzkuoonwXHCILGqLXSzeAeMyC7kLlVBoTWy/lxX0Y2Z /10UpLwPCaBOctqsZRmXjwPRIve+IBu5ryPR1KMvxep70rnBR8MFy/qFVfSfbmEshUre C0KfdtabSaF7wGGhBm+JqZRaA8falYvsEb2iNM8tdY/LeFeqJ4FX2zWUhbnzsMvSQfox 54VA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UXWrj0r/HEsw3896yTn+8B0SxgR2srpvlu4eJrn+77I=; fh=W8ajXoUKS0xdaETTjq1ukSd0//2/gP21NT77mHoTv+0=; b=oCnzcW3mSNWzjm9vJtZ6KiQaEsxrw6Vdo+A7Kjju5YbQG23+zWw0btM9EncYVkVifi Y2r7eI7gEcZQMUXm6QAxQnKN989kL2Rqhc5Wlp4X2yu7rePr6w2Ey05K4K8iCA+t1tAl BVc6I17VVq7LJ/gz5eFzBJZKhdxQyG3yEBBI3/y0dp38+Z+i8Ey2IIWYfmZxzhaNpMu4 yQI4FdB8JD6mXKsjkhPSNq8ebLOwn21zNWBalGd/wWQS3EXnwC+NUnOvwWOw8zNRUPjJ 7v72sxFhyKyrPjDl4sXOuswd8Ww+uaGXV3nblg1L9sRgoBd6tQuEx0k3oJILFbW64CVx u1rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PbJ274z8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-165623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gi6-20020a056214248600b006a0cba873d8si8071992qvb.556.2024.05.01.10.05.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 10:05:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PbJ274z8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-165623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3342D1C20F28 for ; Wed, 1 May 2024 17:05:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2BC317BD6; Wed, 1 May 2024 17:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PbJ274z8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2C81FBEA; Wed, 1 May 2024 17:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714583133; cv=none; b=RhEOoAAKutiNxskisqgSsAN5HMjwJtbkvyJhln3FL9lTOvLIJGGU0ZjFF7Ho/DYc5+ozuTmCufiHaMbhoPIVZW4Q9L7jWTd/i6dIJftJW077GalKu25djSau50cGG6zMOoJSl94g6tqlSTlpYTUjf14IbYYjgVljga6vHVkZYYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714583133; c=relaxed/simple; bh=WZbKbkoibAOTBbyLIFnKVCRX0lYAJryMRAupW0LKaZY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n/sJ7A1hu3+TNbTUMG2R+3vnzVJ7mc8XRzfzz7SC2WOhPlPCUIBgUNnQPqpQqr8TfrLujWsaE8++uM3XrJPBb6L66BRBoHajKAkLi4Wk3ex8s19u4zI6hARw7JyKqUEuaqKeVWwkL+787cIxvCIjjvJkFJD1+iT/034MM0girRY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PbJ274z8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94BA0C072AA; Wed, 1 May 2024 17:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714583133; bh=WZbKbkoibAOTBbyLIFnKVCRX0lYAJryMRAupW0LKaZY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PbJ274z89ZKqvddIWUlErvreEXL2V5sEkkcHpFlGnb02y5xe8Hekk0wgyw9Ofyl5O BQ//NtU1UWaYaHe5XRzSoCLwdqdbr5oaWFkTosiOa9wAcRLhIUsOaxcEzrXBf+x1Em XW0JaNNeV3vnmbz3kJ6p6kb254xEnm/fD82mxFJgP2GtlRKrMtWRbm0yzSBuyFF0tr uoWbMMZ5YUwCe5O88R88euN/uy4lGyWse1sL0Q3a0dGREE+i5NTouyObaGO5tc/KOO WUNmMIHVJkS/08OGJVpiOaXCK7zln5tLNdBolFH88tkt91VO33eAoiEaYBn13nt0Gq FNlvjG8a1Mrng== Date: Wed, 1 May 2024 18:05:28 +0100 From: Conor Dooley To: Inochi Amaoto Cc: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Jisheng Zhang , Liu Gui , Jingbao Qiu , dlan@gentoo.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] dt-bindings: phy: Add Sophgo CV1800 USB phy Message-ID: <20240501-effort-virus-9baa07daf429@spud> References: <20240430-crummiest-overnight-0f46dba32bb8@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LScSdEfhhOhhxX79" Content-Disposition: inline In-Reply-To: --LScSdEfhhOhhxX79 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 01, 2024 at 08:28:47AM +0800, Inochi Amaoto wrote: > On Tue, Apr 30, 2024 at 06:09:20PM GMT, Conor Dooley wrote: > > On Mon, Apr 29, 2024 at 08:31:11AM +0800, Inochi Amaoto wrote: > > > The USB phy of Sophgo CV18XX series SoC needs to sense a pin called > > > "VBUS_DET" to get the right operation mode. If this pin is not > > > connected, it only supports setting the mode manually. > > >=20 > > > Add USB phy bindings for Sophgo CV18XX/SG200X series SoC. > > >=20 > > > Signed-off-by: Inochi Amaoto > > > --- > > > .../bindings/phy/sophgo,cv1800-usb-phy.yaml | 68 +++++++++++++++++= ++ > > > 1 file changed, 68 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/phy/sophgo,cv18= 00-usb-phy.yaml > > >=20 > > > diff --git a/Documentation/devicetree/bindings/phy/sophgo,cv1800-usb-= phy.yaml b/Documentation/devicetree/bindings/phy/sophgo,cv1800-usb-phy.yaml > > > new file mode 100644 > > > index 000000000000..7e3382c18d44 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/phy/sophgo,cv1800-usb-phy.yaml > > > @@ -0,0 +1,68 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/phy/sophgo,cv1800-usb-phy.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Sophgo CV18XX/SG200X USB 2.0 PHY > > > + > > > +maintainers: > > > + - Inochi Amaoto > > > + > > > +properties: > > > + compatible: > > > + const: sophgo,cv1800-usb-phy > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + "#phy-cells": > > > + const: 0 > > > + > > > + clocks: > > > + items: > > > + - description: PHY clock > > > + - description: PHY app clock > > > + - description: PHY stb clock > > > + - description: PHY lpm clock > > > + > > > + clock-names: > > > + items: > > > + - const: phy > > > + - const: app > > > + - const: stb > > > + - const: lpm > > > + > > > + vbus_det-gpios: > >=20 > > "vbus_det-gpios" isn't a common property AFAICT, why does it not get a > > vendor prefix when the other gpios property does? > >=20 >=20 > I have seen other binding (such as sunxi phy) uses this property without= =20 > vendor prefix. So I think it is a common property and don't add perfix=20 > for it. But it is OK for me add the vendor prefix, thanks. I asked yesterday and Krzysztof said: "gpios just like supplies - no prefixes, I think." The other phy used a different property (they're not identical), I did check that yesterday. >=20 > > > + description: GPIO to the USB OTG VBUS detect pin. This should no= t be > > > + defined if vbus_det pin and switch pin are connected, which may > > > + break the VBUS detection. > > > + maxItems: 1 > > > + > > > + sophgo,switch-gpios: > > > + description: GPIO array for the phy to control connected switch.= For > > > + host mode, the driver will set these GPIOs to low one by one. = For > > > + device mode, the driver will set these GPIOs to high in reverse > > > + order. > > > + maxItems: 2 > >=20 > > You're still missing the itemised description of what each of the gpios > > here are - how would I know which order to put the GPIOs in? > >=20 > > Cheers, > > Conor. >=20 > In most case, the order depends on hardware design. But following the > guide sophgo provides, it does have an common order. Is it good to add > this description as a reference guide? If so, I will add it. If we can say "gpio 1 connects to xyz on the switch" & "gpio 2 connects to tuv" then it'll be easier to understand how to write the node. >=20 > Regards, > Inochi >=20 > >=20 > > > + > > > +required: > > > + - compatible > > > + - "#phy-cells" > > > + - clocks > > > + - clock-names > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + phy@48 { > > > + compatible =3D "sophgo,cv1800-usb-phy"; > > > + reg =3D <0x48 0x4>; > > > + #phy-cells =3D <0>; > > > + clocks =3D <&clk 92>, <&clk 93>, > > > + <&clk 94>, <&clk 95>; > > > + clock-names =3D "phy", "app", "stb", "lpm"; > > > + }; > > > + > > > +... > > > -- > > > 2.44.0 > > >=20 >=20 >=20 --LScSdEfhhOhhxX79 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZjJ2WAAKCRB4tDGHoIJi 0t3pAP0SMmeNRY7MkfCW54V9OEGUp1dtBrR5XDLqYPsCAYvb5QEA17rw7TzzPlPc Is2n9IJ026qIajuo2X0UOUZlLuZiRwU= =S11l -----END PGP SIGNATURE----- --LScSdEfhhOhhxX79--