Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1630956rwb; Wed, 28 Sep 2022 23:17:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4u3MInCLCYIl39LCj6NxERterLwu3p3lFwWcVSFzWYfZRal4glgg0JWY2+66zqxfpo+FIQ X-Received: by 2002:a17:903:1109:b0:179:d220:1f55 with SMTP id n9-20020a170903110900b00179d2201f55mr1806645plh.42.1664432247085; Wed, 28 Sep 2022 23:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664432247; cv=none; d=google.com; s=arc-20160816; b=pxMccvoOTLDXMHvW1l41CfHW3wX/8R6lY27++Q4jLvQQ+tmzf9+2CW8gvlRzQ1uchS 7Gm45BIxPw1wbZD6YCT1/8rFwn2fPX3vVTtG6wB1Syc3ONPoRdx1U1M6ZFd4FiF83auD JWHR2pNNZ4VBMn1SJ04QJt9AXCQBRFXi5cd8Gz1xKnCV67GFh2Is8X4rZ4Ku8u6L486s gzS95Kc++ANKo1ae4QjePbxHBlGANpq4IpRGH44MWnDBV3rmwGwlyuWSlg3nfgFEUsbh JpQkh/ZcsvyYdcNjNOurckzhUrJgNCBu0CKT6BnoWrxpJi+JzBqp3q12tLx3aDyGPGSF PtDQ== 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:cc:to:from :dkim-signature; bh=euoSuVgnw+yxsONpPgybf7DkiRoua4Vw0QEswYUTaXg=; b=m4uLdCTR4lXg+Hm3lFetNpE9L7mDz7VfPzeBgf2toFKgzDEd/6kZkCDxlazqe8d5iP 2wjbwXt05aVbl7hDFhASigIyY9Rc7i59WEW5y8Wo9SJvNF58SMjKwRWsCqLOt7jQuR24 ca5r1fQfmts/A/nxrvRzMD4xOPZ+Zd1QOXZDL8l/DyzEeG9Bdqxq0mmlsApDEu+adpv7 hSqSpnNT2GnKE9IjFA7BtgzqZ1Bpph3bGYZFznZ05q1u5l2SwUgW4Pbrzgo0RFGhIbUh ZLBYXj1RztB+ZPnSR/6o0SNoJMH4eB68JP36KgKWcXmj09FJGwMZHXiwAPmtuqz9CZy8 NtUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VJyw4UFZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a17090ab30800b00202dd7a4d3csi3989774pjr.113.2022.09.28.23.17.15; Wed, 28 Sep 2022 23:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VJyw4UFZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234958AbiI2GF0 (ORCPT + 99 others); Thu, 29 Sep 2022 02:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234922AbiI2GFI (ORCPT ); Thu, 29 Sep 2022 02:05:08 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EEF3DF0D for ; Wed, 28 Sep 2022 23:05:00 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id y20so409135plb.2 for ; Wed, 28 Sep 2022 23:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=euoSuVgnw+yxsONpPgybf7DkiRoua4Vw0QEswYUTaXg=; b=VJyw4UFZw/fGkRIeDK7yU2jaWGuuDRk1wSnttBccAt9I/+RBREOSBh2efNH4tPp7v5 6u7XmuzFgbKIU4elAqmgOH4VNr/6WyG8Tvmyz3GB9feCyDJkZg4BRHeNJT6S+3E2RjxB QJmgo6r5gd/ycKOQQYQG1HkhphhwBIXTbabLeskJtn+l3pV/K6XM8/m2Z2SeflbMulAX GDF+UxM9/IRxPg5n0RE7VnzIQ2di7D7EXQmH574kNTGV8385potSsrQ5+FXmJ7apDcPB iDfFi6C+Bbr/yq2WgD0QSLNRs9eTmAazoQazzvyy40T25w8LcE/XQBoMmoeGV4Sulj4Q dN0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=euoSuVgnw+yxsONpPgybf7DkiRoua4Vw0QEswYUTaXg=; b=5mI221Ih9Zm2sGIolQBOPEkaUXtwpcqHoKZZ3K1+quxWiOuLtZPN/+kmaJ95LI6rqk Cmvx/I5odWZP+aY7d+4mpPjLM9CLszrnlhtSABULk1zYGWz23rzNrPX4LDUhbLTLFEea yfsPdEbKTi1RFH9X2NQKF+46GD2SDMidn1IljBnwTxCStVHq+Br9BFwY3aXPLvBu0nDc WqnEUmbxeZe6EqyAi1N4xr//N81cml6/8+aWbstlB+/FHumaQTHQtT3WU3hUu3fOsZrA e/LBzP9yBTfmTX+v3pDZX93PYPIGq716rZEwago9u7zBnsuyjFmZTpegJmRCrCtjaXFU B8Qg== X-Gm-Message-State: ACrzQf2K1VrDOcRlM3aQ/s8BFeJ2v6yfauJDwgNlHuXxcFR4cR1fwGTQ gZeqg+ZQUmu99T0EugNtDA61bQ== X-Received: by 2002:a17:902:d2c8:b0:178:6f5b:f905 with SMTP id n8-20020a170902d2c800b001786f5bf905mr1841546plc.2.1664431499979; Wed, 28 Sep 2022 23:04:59 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1f3b:3adb:24f8:ac24:2282:1dc7]) by smtp.gmail.com with ESMTPSA id i1-20020aa796e1000000b00540c3b6f32fsm5037681pfq.49.2022.09.28.23.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 23:04:59 -0700 (PDT) From: Bhupesh Sharma To: devicetree@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, agross@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski@linaro.org, netdev@vger.kernel.org, Bjorn Andersson , Rob Herring , Vinod Koul , David Miller Subject: [PATCH v2 3/4] dt-bindings: net: qcom,ethqos: Convert bindings to yaml Date: Thu, 29 Sep 2022 11:34:04 +0530 Message-Id: <20220929060405.2445745-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220929060405.2445745-1-bhupesh.sharma@linaro.org> References: <20220929060405.2445745-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert Qualcomm ETHQOS Ethernet devicetree binding to YAML. While at it, also add Qualcomm Ethernet ETHQOS compatible checks in snps,dwmac YAML binding document. Cc: Bjorn Andersson Cc: Rob Herring Cc: Vinod Koul Cc: David Miller Signed-off-by: Bhupesh Sharma --- .../devicetree/bindings/net/qcom,ethqos.txt | 66 -------- .../devicetree/bindings/net/qcom,ethqos.yaml | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.txt create mode 100644 Documentation/devicetree/bindings/net/qcom,ethqos.yaml diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.txt b/Documentation/devicetree/bindings/net/qcom,ethqos.txt deleted file mode 100644 index 1f5746849a71..000000000000 --- a/Documentation/devicetree/bindings/net/qcom,ethqos.txt +++ /dev/null @@ -1,66 +0,0 @@ -Qualcomm Ethernet ETHQOS device - -This documents dwmmac based ethernet device which supports Gigabit -ethernet for version v2.3.0 onwards. - -This device has following properties: - -Required properties: - -- compatible: Should be one of: - "qcom,qcs404-ethqos" - "qcom,sm8150-ethqos" - -- reg: Address and length of the register set for the device - -- reg-names: Should contain register names "stmmaceth", "rgmii" - -- clocks: Should contain phandle to clocks - -- clock-names: Should contain clock names "stmmaceth", "pclk", - "ptp_ref", "rgmii" - -- interrupts: Should contain phandle to interrupts - -- interrupt-names: Should contain interrupt names "macirq", "eth_lpi" - -Rest of the properties are defined in stmmac.txt file in same directory - - -Example: - -ethernet: ethernet@7a80000 { - compatible = "qcom,qcs404-ethqos"; - reg = <0x07a80000 0x10000>, - <0x07a96000 0x100>; - reg-names = "stmmaceth", "rgmii"; - clock-names = "stmmaceth", "pclk", "ptp_ref", "rgmii"; - clocks = <&gcc GCC_ETH_AXI_CLK>, - <&gcc GCC_ETH_SLAVE_AHB_CLK>, - <&gcc GCC_ETH_PTP_CLK>, - <&gcc GCC_ETH_RGMII_CLK>; - interrupts = , - ; - interrupt-names = "macirq", "eth_lpi"; - snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - - snps,txpbl = <8>; - snps,rxpbl = <2>; - snps,aal; - snps,tso; - - phy-handle = <&phy1>; - phy-mode = "rgmii"; - - mdio { - #address-cells = <0x1>; - #size-cells = <0x0>; - compatible = "snps,dwmac-mdio"; - phy1: phy@4 { - device_type = "ethernet-phy"; - reg = <0x4>; - }; - }; - -}; diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml new file mode 100644 index 000000000000..d3d8f6799d18 --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml @@ -0,0 +1,145 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/qcom,ethqos.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Ethernet ETHQOS device + +maintainers: + - Bhupesh Sharma + +description: + This binding describes the dwmmac based Qualcomm ethernet devices which + support Gigabit ethernet (version v2.3.0 onwards). + + So, this file documents platform glue layer for dwmmac stmmac based Qualcomm + ethernet devices. + +allOf: + - $ref: snps,dwmac.yaml# + +properties: + compatible: + enum: + - qcom,qcs404-ethqos + - qcom,sm8150-ethqos + + reg: + maxItems: 2 + + reg-names: + items: + - const: stmmaceth + - const: rgmii + + interrupts: + items: + - description: Combined signal for various interrupt events + - description: The interrupt that occurs when Rx exits the LPI state + + interrupt-names: + items: + - const: macirq + - const: eth_lpi + + clocks: + maxItems: 4 + + clock-names: + items: + - const: stmmaceth + - const: pclk + - const: ptp_ref + - const: rgmii + + iommus: + maxItems: 1 + + mdio: + $ref: mdio.yaml# + unevaluatedProperties: false + + properties: + compatible: + const: snps,dwmac-mdio + + phy-handle: + maxItems: 1 + + phy-mode: + maxItems: 1 + + snps,reset-gpio: + maxItems: 1 + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + rx-fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + + tx-fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + + snps,tso: + type: boolean + description: Enables the TSO feature (otherwise managed by MAC HW capability register). + +required: + - compatible + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + ethernet: ethernet@7a80000 { + compatible = "qcom,qcs404-ethqos"; + reg = <0x07a80000 0x10000>, + <0x07a96000 0x100>; + reg-names = "stmmaceth", "rgmii"; + clock-names = "stmmaceth", "pclk", "ptp_ref", "rgmii"; + clocks = <&gcc GCC_ETH_AXI_CLK>, + <&gcc GCC_ETH_SLAVE_AHB_CLK>, + <&gcc GCC_ETH_PTP_CLK>, + <&gcc GCC_ETH_RGMII_CLK>; + interrupts = , + ; + interrupt-names = "macirq", "eth_lpi"; + + rx-fifo-depth = <4096>; + tx-fifo-depth = <4096>; + + snps,tso; + snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 10000>; + + pinctrl-names = "default"; + pinctrl-0 = <ðernet_defaults>; + + phy-handle = <&phy1>; + phy-mode = "rgmii"; + mdio { + #address-cells = <0x1>; + #size-cells = <0x0>; + + compatible = "snps,dwmac-mdio"; + phy1: phy@4 { + compatible = "ethernet-phy-ieee802.3-c22"; + device_type = "ethernet-phy"; + reg = <0x4>; + + #phy-cells = <0>; + }; + }; + }; -- 2.37.1