From patchwork Sun Nov 26 01:53:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 169822 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2256182vqx; Sat, 25 Nov 2023 17:55:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpZqT7apilFOQL4x4BJEelJuP9ne9C1khCJoW0myde1Q+qRv0nNYtMJ8IK+ps2svW0bpkE X-Received: by 2002:a9d:7f0c:0:b0:6d7:d4bd:1fca with SMTP id j12-20020a9d7f0c000000b006d7d4bd1fcamr8229593otq.17.1700963717637; Sat, 25 Nov 2023 17:55:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700963717; cv=none; d=google.com; s=arc-20160816; b=XIdzCSI8dkaJdw+i4+mCWv2eQlwyepfdkeWXXyI8e4nTz0fjHB8SyPphDkEKLyDmuT T6V4rbRd/zhVsKeKkrNdvV+yuv2tLD+my3Z7te9iYyZUwHBmb+IrB7lZ+zmwCxo+2ZwP EacU/NRAv/O3hOaUHLR0eECJ8IPGhonR5dYPUZDQomtRXMMzLXTbqsPIGhl3ym4cXll2 c9f0qOYYnLSSbzOEvwWMKNYAHSAR27FulUwJO4hO/udQc8qrVEUxnxhLg83HkW+CiOXC ru5f9+FSlqoiP0jiAbV3zy0sShHZKEjE5sBq9PwrvnOY+Ur6aE4EjZFxVd9RL4Dbrnz8 NJgA== 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=Z9LJN1mgEySGU8oKiT605MgEBGzWasHtQXxakyyFMOs=; fh=GuXHbauIWIsfqUgDfzJcOeH7sZ7GFl1Lm8srCvZShQk=; b=Os4za9qgraE56LOKxJQZGx+QwYfbgJzePEmF9H/N30m/QcsSy9IsmcLWX+JGX0fJcD MHBExgMemuHcUo0yUUzIju2aT3qN7/hk/mm0Ey2iRnzAoQKw27a82SxpZadEOOO1LlCC QGzs8hCvfoRBwUoaRC7l8jEb1sF1e2hcLu6cMhd5XbR8TuHWPEXr5+XQe0UbhF7HHSW3 WXUZm5rJYKLnKpB3O+s9fEAblJ52Vx8yHY9pgGm//xIYVsONwCGwqkVTqIYdE3koGy35 VpRO3flpdm/UcOo/gGBdA/ZPz8NtVt2csfNFtc1JTEls08JqOtxcT/yZCnxcCI98pjhX FJew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XiucdMfR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id f10-20020a17090274ca00b001c9daca280esi6035335plt.235.2023.11.25.17.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 17:55:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XiucdMfR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id B404F80C6157; Sat, 25 Nov 2023 17:55:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232294AbjKZByJ (ORCPT + 99 others); Sat, 25 Nov 2023 20:54:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230412AbjKZBx4 (ORCPT ); Sat, 25 Nov 2023 20:53:56 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4246F127; Sat, 25 Nov 2023 17:54:02 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40b402c36c4so4846115e9.1; Sat, 25 Nov 2023 17:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700963641; x=1701568441; 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=Z9LJN1mgEySGU8oKiT605MgEBGzWasHtQXxakyyFMOs=; b=XiucdMfRYBJ8vYdwYrANxC4qfVvI6vh0Wfge/UgxK1ZLHPsx679AzKz/y+jA7sVH8y 0kxX1+fYoodNxRZNfG+wMnr/Pn6x4+ZvC3w7XdeHRNd34iGuubIDQpT4zEbgfciT1zir YUs+y8SzOSX5yyZLzz7cuWSqRoplqg/NZKlzjh7qtcYDZ9dnBk7Iag/3O6KiXdAEZpdh sTBXzL7Dv1mm5RrgLtx+TbB92kce7yM9r2Xe+/pMFSQPBtAr7tOeAFxhEfnLtsiAtPQX rrXiLBduEV5kAua6xSLWYSjcYoP3utWgGfq/McU/o4A7w7GbnFp4sMUoNXjFnF5mR0o4 V8Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700963641; x=1701568441; 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=Z9LJN1mgEySGU8oKiT605MgEBGzWasHtQXxakyyFMOs=; b=GfPWlbGUrHPguGh/EwU6RfRy8bjxUweYSOxcb88V28EKivFrmKGEC2Xb7Rrm0XlhAw BXm+slJaVcdGf15wwGCboZWjRR2ydJwIGQsmJYMtTBPAsZiUujy284CVSueCgZBqxDdl 7W81kwL+pP6kFbGF5+j6i6qs3vmsKU9444O4z0yGXWesyLoJdFMooitiqb0FK25mLlsP 2736Qtye9rzYNdT/ddlSPt9+JIPWb2oZKYDq0pMO4x2/L7Ge0p5r2YPNG39bWCMQKANC E0hcglsANHtmBfgcPiTTA+YKPAvpN66r8dBhBA6vZNl9ZKfUM0zlhCZ76fUvzQcGnqIR XH3w== X-Gm-Message-State: AOJu0YwWgqll9U51EBQVyTh89yaMOdxRsEIb/MzTAqT+IcDWlHjTXiBn YqeE5x250U5QHkZN+ZI7s0k= X-Received: by 2002:a05:600c:4687:b0:40b:36e9:b84a with SMTP id p7-20020a05600c468700b0040b36e9b84amr5561233wmo.23.1700963640552; Sat, 25 Nov 2023 17:54:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 17:54:00 -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 6/8] dt-bindings: net: Document Qcom QCA807x PHY package Date: Sun, 26 Nov 2023 02:53:44 +0100 Message-Id: <20231126015346.25208-7-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 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 pete.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 (pete.vger.email [0.0.0.0]); Sat, 25 Nov 2023 17:55:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783589730819239695 X-GMAIL-MSGID: 1783589730819239695 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 | 136 ++++++++++++++++++ 1 file changed, 136 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..136ba2128b73 --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,qca807x.yaml @@ -0,0 +1,136 @@ +# 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 + +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: + qcom,package-mode: + enum: + - qsgmii + - psgmii + + qcom,tx-driver-strength: + 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 + + '#gpio-cells': + description: number of GPIO cells for the PHY + const: 2 + + dependencies: + gpio-controller: ['#gpio-cells'] + + if: + required: + - gpio-controller + then: + properties: + leds: false + + unevaluatedProperties: false + +unevaluatedProperties: false + +examples: + - | + #include + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy-package@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ethernet-phy-package"; + reg = <0>; + + qcom,package-mode = "qsgmii"; + + ethernet-phy@0 { + reg = <0>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; + }; + + ethernet-phy@1 { + reg = <1>; + }; + + ethernet-phy@2 { + reg = <2>; + + gpio-controller; + #gpio-cells = <2>; + }; + + ethernet-phy@3 { + reg = <3>; + }; + + ethernet-phy@4 { + reg = <4>; + }; + }; + };