Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1075345rdb; Fri, 2 Feb 2024 12:48:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7uCiJilZoHhzdL2v6RiSmUDHfKGVfXZfmky8+Vdon+lIG8Vsd1ZBENL9fz4T7RyE+/mZT X-Received: by 2002:a17:90a:b396:b0:293:ed23:c2da with SMTP id e22-20020a17090ab39600b00293ed23c2damr6573511pjr.31.1706906934080; Fri, 02 Feb 2024 12:48:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706906934; cv=pass; d=google.com; s=arc-20160816; b=bO+yVFOCWPlUYFCns9LrxhZIDhdybiMu8AkfGaYpVXGEWyaTAKFWeW8zVaOgqvC3ml 0utU83jOhI6oZIvbzNzwXNFRV4YBrJXOiOV0+HwDe1N7Eu16zyom8XuM2LZYC2e7yzLr qY/b5OZX2adv9pShDN8NiQumfQSApji4ozMOGyJzF93PPjxqT73EOGra2frrm/bQ8FUj FxjPzuVZhBjbA6djMi6hRk6qH+ZktRyNK0aJZVZDErabLKaXkihuEHgi3n1kBfsrjdKR hz+0O1uJGKnP9V0qXGJtrEK1z/Qvk+JXguyq7cqzwSDq+wyuFDmV8DIZZAWcHaSqniXS xg1g== 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=naYLGMbdPNShyn4d4AGzui8CX82zlAHyQkYJJ+Jxbyg=; fh=ogvYvbDmAh8k0YmNk9trhs+DPBVrXI+dqTlRdVuXNRg=; b=tHxzChptG6rID+53Sd+X5pNiLA3PwEFNyMDDpfkQ0o4zCkboLPCW3fzjRRSUrEy906 m6iJYtjDRWS9BU2ezOtAaAyVJoVUal6Nzx0Y6M4dMKv9LJhRN5inplm5gr2QOR/P4ljR c6miOV3tUaG4FrQTGn0OGeS552I6cma/UrPMi+N2m2F2jLnQmfS9nqE3wPcuSkFv+gR1 GzYLrUl70V4ojpeSdIVAOtYqpSeyN8+9XoFWrO3oEaeSRP8z8lP8RUysz1SL9ruFfxdA 6duvVRtxzFnD5TY4vpxAEkaM8zyG7zghyROJEH4rxEdKgoVVvonzHNUrFd7FzZnlcxTU Rnfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mWdL9qfG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVlNMpK3VcE7cV8S9IOkw9K002wff0isVCh9uKr5njwH08uMu/AXpSnqX3VpinVjgGMnT5Fp4LQTeVZdCg6QFSTw/K64YvNVo0gHprJmw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h12-20020a63df4c000000b005d8b4e5910fsi2040800pgj.615.2024.02.02.12.48.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 12:48:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mWdL9qfG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50549-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 712B3B221BD for ; Fri, 2 Feb 2024 20:39:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A1387A732; Fri, 2 Feb 2024 20:39:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mWdL9qfG" 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 8CABF7A705; Fri, 2 Feb 2024 20:39:17 +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=1706906357; cv=none; b=VosYsLecc9Faqgr0U9NhHYUcXQFaAC5r6BOB1ktjl47QFVAazXX2l7N40w4lo2FrKMK1NzJLC9XV+Qp8CE8alXXFp45/Ug4hDbi8itAlHpCtN+b868L1c8rRh6znCbR0mk5hO4lQi0sjiCLH1ucDUyVfrS2Pt/zkIlGimkiZJpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706906357; c=relaxed/simple; bh=lUiZwAyJaZQ+4+AMBX9/v5QxyV7H20zeM9q/qx9XCac=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CDDnzmHkFapCJkoa7sBg3NawFgR1z6Hh6i8YpMQZPFjlbG/PfZp2HjByQXomkFp9XnGqw65s6M9DwdRvV/Yz0NxDQiNWRswYOsr/Lp6sYJQFIJ+pns0FMFXRAQsPxWXJLiTaAJuXoJf0P6e/anB84f9EOmRdwVhblQ4pqFSLfl0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mWdL9qfG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37F31C433F1; Fri, 2 Feb 2024 20:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706906357; bh=lUiZwAyJaZQ+4+AMBX9/v5QxyV7H20zeM9q/qx9XCac=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mWdL9qfGg9+QYiLHGqKxy5w13NQS3jS8kuZiGZQpV1EHP0DDuiG50vo53jUAMg7el 9Eg5SKbj+hgnPOOHe/DnUhehIBbvGqKvBPa2H6jt3Jd8CZrSKgmatkyFNVrwvVF/Mv y/RM/pYp9W8S76hE1ryic+RHRHTv5/tY1d1yYFSMa12Da5W4RzYZpTIbiclMaGBNWk BcaESKdR34K7KngBrj/kZNHznnAspo0bqYaVvQSbtfPUOqlb6XVN1I3bFuNZdZP14d rLAQKz1fy1fH5ITZ0/9cE94sQkhjd8gRI//CQPBLvQ6EAtI52h/5BTcTfyREgrQj0o 8iSEimIbIsGRA== Date: Fri, 2 Feb 2024 14:39:15 -0600 From: Rob Herring To: Christian Marangi Cc: Krzysztof Kozlowski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Andrew Lunn , Heiner Kallweit , Russell King , Frank Rowand , Robert Marko , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [net-next PATCH v5 6/9] dt-bindings: net: Document Qcom QCA807x PHY package Message-ID: <20240202203915.GA1075521-robh@kernel.org> References: <20240201151747.7524-1-ansuelsmth@gmail.com> <20240201151747.7524-7-ansuelsmth@gmail.com> <94dfc4c4-5fe6-438d-bcda-4f818eafd2f0@linaro.org> <65bd0678.050a0220.bf9e4.9bd2@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: <65bd0678.050a0220.bf9e4.9bd2@mx.google.com> On Fri, Feb 02, 2024 at 04:12:53PM +0100, Christian Marangi wrote: > On Fri, Feb 02, 2024 at 08:45:52AM +0100, Krzysztof Kozlowski wrote: > > On 01/02/2024 16:17, Christian Marangi wrote: > > > Document Qcom QCA807x PHY package. > > > > > > Qualcomm QCA807X Ethernet PHY is PHY package of 2 or 5 > > > IEEE 802.3 clause 22 compliant 10BASE-Te, 100BASE-TX and > > > 1000BASE-T PHY-s. > > > > > > Document the required property to make the PHY package correctly > > > configure and work. > > > > > > Signed-off-by: Christian Marangi > > > --- > > > .../devicetree/bindings/net/qcom,qca807x.yaml | 142 ++++++++++++++++++ > > > > Your bindings header must be squashed here. Headers are not separate > > thing from the bindings. > > > > > 1 file changed, 142 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/net/qcom,qca807x.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/net/qcom,qca807x.yaml b/Documentation/devicetree/bindings/net/qcom,qca807x.yaml > > > new file mode 100644 > > > index 000000000000..1c3692897b02 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/net/qcom,qca807x.yaml > > > @@ -0,0 +1,142 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/net/qcom,qca807x.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Qualcomm QCA807X Ethernet PHY > > > > What is "X"? Wildcards are usually not expected. > > > > It's to identify the Ethrnet PHY family. Looks wrong to declare qca8072 > or qca8074 since they would refer to a more generic Family of devices. Declare them all or provide some justification such as the exact model is discoverable (and better be sure power on is the same in order to do discovery). > What would be the correct way? We have many other case on net with > schema called qca8k that refer to the family of Ethernet Switch but in > it refer to qca8327 qca8337 qca8334... > > > > + > > > +maintainers: > > > + - Christian Marangi > > > + - Robert Marko > > > + > > > +description: | > > > + Qualcomm QCA807X Ethernet PHY is PHY package of 2 or 5 > > > + IEEE 802.3 clause 22 compliant 10BASE-Te, 100BASE-TX and > > > + 1000BASE-T PHY-s. > > > + > > > + They feature 2 SerDes, one for PSGMII or QSGMII connection with > > > + MAC, while second one is SGMII for connection to MAC or fiber. > > > + > > > + Both models have a combo port that supports 1000BASE-X and > > > + 100BASE-FX fiber. > > > + > > > + Each PHY inside of QCA807x series has 4 digitally controlled > > > + output only pins that natively drive LED-s for up to 2 attached > > > + LEDs. Some vendor also use these 4 output for GPIO usage without > > > + attaching LEDs. > > > + > > > + Note that output pins can be set to drive LEDs OR GPIO, mixed > > > + definition are not accepted. > > > + > > > + PHY package can be configured in 3 mode following this table: > > > + > > > + First Serdes mode Second Serdes mode > > > + Option 1 PSGMII for copper Disabled > > > + ports 0-4 > > > + Option 2 PSGMII for copper 1000BASE-X / 100BASE-FX > > > + ports 0-4 > > > + Option 3 QSGMII for copper SGMII for > > > + ports 0-3 copper port 4 > > > + > > > +$ref: ethernet-phy-package.yaml# > > > + > > > +properties: > > > + compatible: > > > + const: qcom,qca807x-package > > > + > > > + qcom,package-mode: > > > > Where is definition of this property with type and description? > > > > > + enum: > > > + - qsgmii > > > + - psgmii > > > + > > > + qcom,tx-driver-strength: > > > > Use proper unit suffix. > > > > https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml > > > > > + description: set the TX Amplifier value in mv. > > > + If not defined, 600mw is set by default. > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + enum: [140, 160, 180, 200, 220, > > > + 240, 260, 280, 300, 320, > > > + 400, 500, 600] > > > + > > > +patternProperties: > > > + ^ethernet-phy(@[a-f0-9]+)?$: > > > + $ref: ethernet-phy.yaml# > > > + > > > + properties: > > > + gpio-controller: > > > + description: set the output lines as GPIO instead of LEDs > > > + type: boolean You only need 'gpio-controller: true'. The core already defines the type. > > > + > > > + '#gpio-cells': > > > + description: number of GPIO cells for the PHY Not a useful description. Normally, you'd describe what's in the cells, but GPIO is standardized so no need (unless you are deviating from the norm). > > > + const: 2 > > > + > > > + dependencies: > > > + gpio-controller: ['#gpio-cells'] > > > > Why do you need it? None of gpio-controllers do it, I think. > > > > Well gpio-controller property is optional and having that declared and > #gpio-cells skipped will result in an error on probe. I think it should > be the opposite with other schema having to declare this. If you think everything else is wrong, then please fix them. :) > > In usual way for gpio-controller both property are defined as required > but you can see some (to-be-converted) txt files whith comments where > they say: > > ./mux/adi,adgs1408.txt:10:- gpio-controller : if present, #gpio-cells is required. > > Should I instead add this condition in the if right below? The core schema enforces this dependency, so you don't need to. Rob