Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2186172rdh; Sat, 25 Nov 2023 17:54:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSi0aaw4t5DNYYWfc+fzi1aMTYCxV8ZGP1+0sfJOtw/awCTFu4RLXqtGpnqpaC/NH+eAGf X-Received: by 2002:a05:6a00:2410:b0:68f:f650:3035 with SMTP id z16-20020a056a00241000b0068ff6503035mr8058242pfh.12.1700963671800; Sat, 25 Nov 2023 17:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700963671; cv=none; d=google.com; s=arc-20160816; b=CwIoygPb/D/EJ9Pi4lT0YgiUR9epY+2d4n++Il+sJlcRGRyFmPikGQqleBxpT5e89t C669rR15WeR4VcJpv/e37iQSB1dgSirYEA5837QHbry1YUMJblzl81f8Vol1FlKpVfqs 2Ty7teNX4ZZKBgcvz7EmmU1dwngc+guMkP2qlEHWFwWZU5RtQpb7GYIYGjg2YljoxQwJ LYv6y8R7VIWSH00+zfRatKNwNoy+/uzwhKmGSxXSHUOek0Cd5JDN6eciluqypqxk8Exz MrdwYea6ezVJU8d6mVovxvg9D9b5goz1XsAuMlEa8XdYlRfrzfm5VvNIXETqJo9LXzYp myHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=9PuPfc3pKT54jXiYQ8Ndfth4/oA2Qy9PCNWIdvTn7YQ=; fh=GuXHbauIWIsfqUgDfzJcOeH7sZ7GFl1Lm8srCvZShQk=; b=ZfCeMqm/WCM6JRjgGKOXbWplHeXOaiaeEoj4LHjVhWn+pdxWCxQocmLbJWMup1r/UZ Ox8BXiUCyt/A4US+X5yuv/b+uykpwQSM68+OHmUA3P3pyH65Hpi1AYYZIt+7Tu0MSv4H O39mvgygQi2MqRQ77lp5jSawmp5DkdX5wwIM8ty5gsJdd53YOXjMbfXwzt8BP5viFSTi AEzmrywu+IEz6jxjyhdq4kuS6RuINBVZ08E3j2OOzpuykxg/PFCWLOn94CZBoVdxxQ+y pNfDwOrAKiO87LsX+4YWeHDE7FYpClY0UH6+qedpUVwGpGc/kdZ9kBMjQB6AuCpWqCRE W4tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dHnxkXPm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p19-20020a056a000b5300b006c3077a340dsi7037951pfo.285.2023.11.25.17.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 17:54:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dHnxkXPm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1BDBC805AA31; Sat, 25 Nov 2023 17:54:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230108AbjKZBxw (ORCPT + 99 others); Sat, 25 Nov 2023 20:53:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjKZBxt (ORCPT ); Sat, 25 Nov 2023 20:53:49 -0500 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-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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 25 Nov 2023 17:54:24 -0800 (PST) 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>; + }; + }; + }; -- 2.40.1