From patchwork Sun Nov 26 01:53:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13468718 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dHnxkXPm" Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FFDE110; Sat, 25 Nov 2023 17:53:56 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-332c0c32d19so2137456f8f.3; Sat, 25 Nov 2023 17:53:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700963634; x=1701568434; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9PuPfc3pKT54jXiYQ8Ndfth4/oA2Qy9PCNWIdvTn7YQ=; b=dHnxkXPmL0O4KCmluUFo6KG/o+8ZsE9Yb92g10wZpMIKCPkCmzIBEGo4GAzakK606v 1T5JqmVKjDiSui7Lvz3h7UsZ01TKDSkig9moQcpnvicbuN8jQ+vgD6QefxDwRuLDoR3B x4r0j3BZfyKOSyhKfZcsH+ei5ipR/E5ekQvLNpj9fPjUYdzy97pl2AG3q6CblTcA6NGB DtYCykrzZAmomS7bmDNQqUkavHIW0ob1uPG6DbMix6goShISZplxtduKt9eKYrPkr/3+ 6RnF7Fx8u8DcmFPCl/C1Moi3/Q1QfescGLaow/eAb5xxrWzQq1uf9Q2RuqnNJRZb16vU hv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700963634; x=1701568434; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9PuPfc3pKT54jXiYQ8Ndfth4/oA2Qy9PCNWIdvTn7YQ=; b=sy+OXw4YRsaO98r1juLaNPWAfruHEnC9/FleY/glkup93afNRYwITWV1ykrEb+TABc Tofviat2iCzIJ4aVJctY2UCqXcJEpQB/iVlpn+KNULrdYnlTnVDA++mL15vT4MR0GiS4 hM7bDV+v/is0eX561W65hrzLi5hXy9m8l9eS9aeqCwf8WDdiUVzXRGhieKBHs0xjNBsu /WVG0xIaDIAj5JuWPJ869ZXLU3aw9KA1gJhZRu7qzfhLbNLnLuDSzPS6unRW4NSKYXuF y0y+5J8CmbNXGcQIDDLhgAkBlopLnTBRvuCGtJIz8HWGFIxhNMY1gY4TnAWWN+w8eR4I +O1w== X-Gm-Message-State: AOJu0Yzgv9cYpvmh7+gbRD7jbOv6Payd+3N/c5eC3/Rt/bmrhtMbGVP0 FrHyg/tBG9XBC7oRT+wUMiI= X-Google-Smtp-Source: AGHT+IGT3kVk/Y70H/CEAP1Ju5gLlYhiOA1oBECCTELXr6jvCovt5uh7h4dHEkHO63rUGI9WO9Z/HA== X-Received: by 2002:a05:600c:4e8e:b0:405:7b92:453e with SMTP id f14-20020a05600c4e8e00b004057b92453emr5936349wmq.37.1700963634259; Sat, 25 Nov 2023 17:53:54 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id p34-20020a05600c1da200b00406408dc788sm9875344wms.44.2023.11.25.17.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 17:53:54 -0800 (PST) From: Christian Marangi To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio , Andrew Lunn , Heiner Kallweit , Russell King , Matthias Brugger , AngeloGioacchino Del Regno , Christian Marangi , Robert Marko , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [net-next PATCH RFC v3 1/8] dt-bindings: net: document ethernet PHY package nodes Date: Sun, 26 Nov 2023 02:53:39 +0100 Message-Id: <20231126015346.25208-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231126015346.25208-1-ansuelsmth@gmail.com> References: <20231126015346.25208-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document ethernet PHY package nodes used to describe PHY shipped in bundle of 4-5 PHY. The special node describe a container of PHY that share common properties. This is a generic schema and PHY package should create specialized version with the required additional shared properties. Example are PHY package that have some regs only in one PHY of the package and will affect every other PHY in the package, for example related to PHY interface mode calibration or global PHY mode selection. The PHY package node MUST declare the base address used by the PHY driver for global configuration by calculating the offsets of the global PHY based on the base address of the PHY package and declare the "ethrnet-phy-package" compatible. Each reg of the PHY defined in the PHY package node is absolute and will reference the real address of the PHY on the bus. Signed-off-by: Christian Marangi --- .../bindings/net/ethernet-phy-package.yaml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ethernet-phy-package.yaml diff --git a/Documentation/devicetree/bindings/net/ethernet-phy-package.yaml b/Documentation/devicetree/bindings/net/ethernet-phy-package.yaml new file mode 100644 index 000000000000..244d4bc29164 --- /dev/null +++ b/Documentation/devicetree/bindings/net/ethernet-phy-package.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/ethernet-phy-package.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ethernet PHY Package Common Properties + +maintainers: + - Christian Marangi + +description: + This schema describe PHY package as simple container for + a bundle of PHYs that share the same properties and + contains the PHYs of the package themself. + + Each reg of the PHYs defined in the PHY package node is + absolute and describe the real address of the PHY on the bus. + +properties: + $nodename: + pattern: "^ethernet-phy-package(@[a-f0-9]+)?$" + + compatible: + const: ethernet-phy-package + + reg: + minimum: 0 + maximum: 31 + description: + The base ID number for the PHY package. + Commonly the ID of the first PHY in the PHY package. + + Some PHY in the PHY package might be not defined but + still exist on the device (just not attached to anything). + The reg defined in the PHY package node might differ and + the related PHY might be not defined. + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + ^ethernet-phy(@[a-f0-9]+)?$: + $ref: ethernet-phy.yaml# + +required: + - compatible + - reg + +additionalProperties: true + +examples: + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy-package@16 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ethernet-phy-package"; + reg = <0x16>; + + ethernet-phy@16 { + reg = <0x16>; + }; + + phy4: ethernet-phy@1a { + reg = <0x1a>; + }; + }; + };