From patchwork Fri Mar 31 21:45:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 77988 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp859772vqo; Fri, 31 Mar 2023 14:49:49 -0700 (PDT) X-Google-Smtp-Source: AKy350Ybm17FwclrtTYVORhiv9hggEsKnt/7VeAp500xNJWHjpPAuzgTMw1lT+ftqcdeVEd+ILVx X-Received: by 2002:a17:906:4d8b:b0:92b:f8ce:4e75 with SMTP id s11-20020a1709064d8b00b0092bf8ce4e75mr26701815eju.72.1680299388788; Fri, 31 Mar 2023 14:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680299388; cv=none; d=google.com; s=arc-20160816; b=ab9qnJHzEJNT28nworDrEejKUb2Behq0d3uo8Np5bngXP4lTo0IXcYpX0u1Zh9/nZ3 BOPsYNuVToCsnV8Ql8yR1VRRA+YBdgbJ2jW2Sh0BcByeBC0dJC5d3CTlR8smO6MLwaOq dcYEmdtVCYw8O/WpCr76UyMxSZdSMEG9+Yz0L/yyfZ1uMsy1nvk/SKIStZK04AlJ0Ogu 3sMzC5+2K0Gi74qUATCgBm8M2otb1EyeTf6MvX8W2YYQ7MCckic6QgusnVHU1/ggirLp +yWHaHEeq2R7S8rTqEeWXnnRg31Xee3T/DqnvAPmEcJVQwINXNyJyefFKYRuADTWUOgy VHuQ== 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=8R6+P26evvrjI1mMxGxNI8F3VJcXEzOTQuxXqUJHchU=; b=HM4IoHqurITBuyeJLxfI6qDUiePZ++l3PZs8Vx7+YfpkndWn0s4J/uXJ/9TqBPg5Sb 97cd/U4CmZZWS9qCpOVbZUVObuMP0O1/MbCQtmzhNFXZSNyyx/1cQOmMoiJ5OUL1jgZ1 CuUhs4LsWqGKrHvWWdYF0aautdMWb+rjqE28Y3tYzXGaALxuCCJqnzzN58fIobAuUa+x ynANN+eTz7yAwXbA/oggD156W2ymTXCOgSS8R+uUn6ImywNaAW8QMn8vUuxIO0pTbD39 gbzzjvP3hElf2c1wsXSYNxz1Mo+XxLoz0/Me+JEfeUedO881OFdN778vAYJ/mdlSo1LJ xH0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aeR0Heew; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o8-20020a170906288800b008e10c06e930si2450840ejd.549.2023.03.31.14.49.25; Fri, 31 Mar 2023 14:49:48 -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=@redhat.com header.s=mimecast20190719 header.b=aeR0Heew; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233170AbjCaVrt (ORCPT + 99 others); Fri, 31 Mar 2023 17:47:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232682AbjCaVrl (ORCPT ); Fri, 31 Mar 2023 17:47:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B950E22907 for ; Fri, 31 Mar 2023 14:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680299184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8R6+P26evvrjI1mMxGxNI8F3VJcXEzOTQuxXqUJHchU=; b=aeR0HeeweDR0bSQVgg4uAy7EeNQC0SVL+TTaGlB6D3cUesTDZigQMGd0M+EAQ+ta/wcvSb nV1vWu224yRPBBEyr1tQhCJZFbXY5o/yLhU0KbiZ6WvvfpuYhiBwwFtXI5Rsg4mwgB6Gpv TE1lokat8DMuo4n43W4ibWZaHTP+nHY= Received: from mail-oa1-f71.google.com (mail-oa1-f71.google.com [209.85.160.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-39-IlU_6aWFOpebSHsNFG1Qag-1; Fri, 31 Mar 2023 17:46:22 -0400 X-MC-Unique: IlU_6aWFOpebSHsNFG1Qag-1 Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-17f12d9b68eso9713100fac.11 for ; Fri, 31 Mar 2023 14:46:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680299181; 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:message-id:reply-to; bh=8R6+P26evvrjI1mMxGxNI8F3VJcXEzOTQuxXqUJHchU=; b=qRg59WkVh4CqOupu7EbhctNTLNf9V0AQajpeEfRNiearGJHMVlWVIcwqGj7WH6Usnm ZYxHBHqXKsaGFTKHb/pKdYS1npmTI/fFIGQe5OHsgnDw9ikmQLOQPrbuwol7omS0F/MJ hmdpJvTFc0bxm2AE5/kv+cWrL3k8p7uYNAjv4r7KUE5vDbXWyv1cF6AyiyJgk45+L20t P+AeZuHRyLd83SMWQd70+HHayYMN5cfDzJ+rK9hx1b7AcEuNUs1veSMF1V86oJV1YiJf +vtXBVj0t9pbwcL4EmPhoqbznX9yXTLu8eEZXwJm6Stf4VXAhj/gyUT0DMF1nkt/TlAj KrCw== X-Gm-Message-State: AO0yUKUWLhBT2QkGlb8vdeK0H99RyE+Nqo2lmRbFhFKF63NmKjK1TrqY WtSHwokQ571Jm5/EckFZWLtp4c2YOzlYcFYyn0r9xEsHBhL70vNUg2vYKt5Sdz4m4S//2dIe8x6 jtJcm7hveFwyjxXCGaBYYzrW820x4KfMKA2mlK7aW0+mcBva56GJR8ZSiseFnPbjXolpyodJEGi 12SU7QwefMbfU= X-Received: by 2002:a4a:3707:0:b0:525:7096:972f with SMTP id r7-20020a4a3707000000b005257096972fmr14921292oor.9.1680299180894; Fri, 31 Mar 2023 14:46:20 -0700 (PDT) X-Received: by 2002:a4a:3707:0:b0:525:7096:972f with SMTP id r7-20020a4a3707000000b005257096972fmr14921245oor.9.1680299180588; Fri, 31 Mar 2023 14:46:20 -0700 (PDT) Received: from halaney-x13s.attlocal.net (104-53-165-62.lightspeed.stlsmo.sbcglobal.net. [104.53.165.62]) by smtp.gmail.com with ESMTPSA id x80-20020a4a4153000000b0053d9be4be68sm1328531ooa.19.2023.03.31.14.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 14:46:20 -0700 (PDT) From: Andrew Halaney To: linux-kernel@vger.kernel.org Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, bhupesh.sharma@linaro.org, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, mturquette@baylibre.com, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, richardcochran@gmail.com, linux@armlinux.org.uk, veekhee@apple.com, tee.min.tan@linux.intel.com, mohammad.athari.ismail@intel.com, jonathanh@nvidia.com, ruppala@nvidia.com, bmasney@redhat.com, andrey.konovalov@linaro.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ncai@quicinc.com, jsuraj@qti.qualcomm.com, hisunil@quicinc.com, echanude@redhat.com, Krzysztof Kozlowski , Andrew Halaney Subject: [PATCH net-next v3 03/12] dt-bindings: net: qcom,ethqos: Convert bindings to yaml Date: Fri, 31 Mar 2023 16:45:40 -0500 Message-Id: <20230331214549.756660-4-ahalaney@redhat.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230331214549.756660-1-ahalaney@redhat.com> References: <20230331214549.756660-1-ahalaney@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761921611662895582?= X-GMAIL-MSGID: =?utf-8?q?1761921611662895582?= From: Bhupesh Sharma Convert Qualcomm ETHQOS Ethernet devicetree binding to YAML. In doing so add a new property for iommus since newer platforms support using one, and without such make dtbs_check fails on them. While at it, also update the MAINTAINERS file to point to the yaml version of the bindings. Signed-off-by: Bhupesh Sharma [halaney: Remove duplicated properties, add MAINTAINERS and iommus] Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andrew Halaney --- Changes since v2: * Add Krzysztof's Reviewed-by tag Changes since v1: * Drop redundant wording in binding description (Krzysztof) * Document iommus addition explicitly in commit message (Krzysztof) .../devicetree/bindings/net/qcom,ethqos.txt | 66 ----------- .../devicetree/bindings/net/qcom,ethqos.yaml | 110 ++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 111 insertions(+), 67 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..88234a2010b1 --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml @@ -0,0 +1,110 @@ +# 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: + dwmmac based Qualcomm ethernet devices which support Gigabit + ethernet (version v2.3.0 and onwards). + +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 + +required: + - compatible + - clocks + - clock-names + - reg-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>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index dffcc253563b..d1cb4fa8b704 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17294,7 +17294,7 @@ M: Vinod Koul R: Bhupesh Sharma L: netdev@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/net/qcom,ethqos.txt +F: Documentation/devicetree/bindings/net/qcom,ethqos.yaml F: drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c QUALCOMM FASTRPC DRIVER