From patchwork Sat Nov 25 00:11:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13468320 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MYNoJ++W" Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E253F1BD6; Fri, 24 Nov 2023 16:35:32 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40b27726369so17263825e9.0; Fri, 24 Nov 2023 16:35:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700872531; x=1701477331; 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=MHiLFw1bIGohpGtROyp7CqLCgHPbQhHjoTE9dyN6vFM=; b=MYNoJ++WjyUQR7oZbprPpd/W1kjoOypyR9uH45lgCFTzi8SQn8ORZEswL+5aXmm0YU HYgj1rAMAVESk06onBC66hcftf4FzUAfYa1Wn5t0DT3Q8Ahs5qIR0uHPGMWo5M0tk18+ gcoGszax6yWD5xsegyn9jd3F835O4D1T71iDh4woahYsrxadYdRp7RdN4P6FpX2Xl+zH 9kJQ32xjrqoEeUzYpa4Wr7oLnadKyk7mbJaxmJls0H2vdTO6OI/jsjuLlF+tfHblXozN BT2+Xpn/bEwt1PXbOAzN4roL/372ceqQvgPHkysLmigGuy3ZwrqdHqdnMQPlGfYnrrxF KRaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700872531; x=1701477331; 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=MHiLFw1bIGohpGtROyp7CqLCgHPbQhHjoTE9dyN6vFM=; b=GqCbhCC3OYeKSRmbu6RWKsfev7ffNkNqc+CJ8sMoo9OE89697BovB540sZ/lPJeDyl kUgG5ybSK+VAgfBWckzBJYMzqhg1sgchWAqHV3EFCvWflvNmzwDnTCngGAhyf3Nke/og TsaY919vRP9tk8XLo2ZTH4IJFVO4lxOlgR4qNhP7UcVBijJZtkTIQ/i3hs+9fP2GHOwA 2JnudrjQBP6jSDwykWzR8Sg1Q0v/GSYu49gW98vmyeacwXUCuKYEoNSdMStJvuQ487QH oqs2SsN6ZVt399VOVKlO9Q5NqdIV1+841UWob5sXX5JG9pIoALMzIkAyr2MjtJjKNMOX fQKg== X-Gm-Message-State: AOJu0YyieQ+9hMfPNbaTTiNw0GRts3VB2DYqpeqFpC7l6HxpfmL/89AG yxtKf+CpsW74QjIniNTsrs4= X-Google-Smtp-Source: AGHT+IGLc1mlt385WXqXvC6FEasxlmbyfmfpQzHK0GhuUqCYjrLEyySLW33U0gTDlILd7OygLIsynA== X-Received: by 2002:a05:600c:5252:b0:40b:36e7:1edf with SMTP id fc18-20020a05600c525200b0040b36e71edfmr3919226wmb.26.1700872531054; Fri, 24 Nov 2023 16:35:31 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id u13-20020a05600c00cd00b00405718cbeadsm4268005wmm.1.2023.11.24.16.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 16:35:30 -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 , Florian Fainelli , Broadcom internal kernel review list , Daniel Golle , Qingfang Deng , SkyLake Huang , Matthias Brugger , AngeloGioacchino Del Regno , Vladimir Oltean , David Epping , Harini Katakam , Christian Marangi , "Russell King (Oracle)" , 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 RFC PATCH v2 09/11] dt-bindings: net: Document Qcom QCA807x PHY package Date: Sat, 25 Nov 2023 01:11:25 +0100 Message-Id: <20231125001127.5674-10-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231125001127.5674-1-ansuelsmth@gmail.com> References: <20231125001127.5674-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC 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 | 148 ++++++++++++++++++ 1 file changed, 148 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..f6f07c77a639 --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,qca807x.yaml @@ -0,0 +1,148 @@ +# 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. + +allOf: + - $ref: ethernet-phy-package.yaml# + +select: + properties: + $nodename: + pattern: "^ethernet-phy-package(@[a-f0-9]+)?$" + + patternProperties: + ^ethernet-phy(@[a-f0-9]+)?$: + properties: + compatible: + contains: + enum: + - ethernet-phy-id004d.d0b2 + - ethernet-phy-id004d.d0b1 + + required: + - compatible + + required: + - $nodename + +properties: + qcom,package-mode: + enum: + - qsgmii + - psgmii + + qcom,tx-driver-strength: + enum: [140, 160, 180, 200, 220 + 240, 260, 280, 300, 320 + 400, 500, 600] + +patternProperties: + ^ethernet-phy(@[a-f0-9]+)?$: + $ref: /schemas/net/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>; + reg = <0>; + + qcom,package-mode = "qsgmii"; + + ethernet-phy@0 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <0>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; + }; + + ethernet-phy@1 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <1>; + }; + + ethernet-phy@2 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <2>; + + gpio-controller; + #gpio-cells = <2>; + }; + + ethernet-phy@3 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <3>; + }; + + ethernet-phy@4 { + compatible = "ethernet-phy-id004d.d0b2"; + reg = <4>; + }; + }; + };