From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48D8BC12002 for ; Wed, 21 Jul 2021 16:53:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 288EE61222 for ; Wed, 21 Jul 2021 16:53:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235719AbhGUQMa (ORCPT ); Wed, 21 Jul 2021 12:12:30 -0400 Received: from mail-il1-f181.google.com ([209.85.166.181]:39722 "EHLO mail-il1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbhGUQM2 (ORCPT ); Wed, 21 Jul 2021 12:12:28 -0400 Received: by mail-il1-f181.google.com with SMTP id a7so2870982iln.6; Wed, 21 Jul 2021 09:53:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2FlplugSms0lq9vlT6qVeAF/xOXlsmB/xXx4Xh3GmPg=; b=qEYugqIGuohbcrLlpQUA+XEvyBUaxaTs3jqG3qNgzY4O0ITwcTfGsCHNk9A6HkHNYR 3XOxiPQAMszyz7Bt4AAvBb4yORX4GqyidwLSY+JJ4O2cIf/+rr0LTsELXLdch/At+wB/ HeZoTak2BtNN5401lO7tE1bGD8Cet3L+8u+GrwyCC4oxarcy04EFNjOcqeWxI4ShAxlN 4Nnn8kq935+cQ81WhLbLSzgQuis4b6XWFYSGlu3OZ8EZI7vOQ+ibM7RAz+day4QJWGuC /qjD23Q3Q1OOmoTPnONGSD1vhv4Z+JzXoP1G8yhMSNs+tX5NwHkcAlvZpA3Biqgab4Tl Qj2A== X-Gm-Message-State: AOAM5324p6nGdDjnZXvjFOdjx+Hi5xkibt3SvyGmY1pKnJFj/wLxI2bS IplbwnCzI8xlI+TS+5uigA== X-Google-Smtp-Source: ABdhPJyBGw8BgX6Ut+AjXB1gavWfI+GdQEOaA4ld3jRnJ/IyC+2yOdS5D+jM8xTQoVX/cB9CQhftLw== X-Received: by 2002:a92:d112:: with SMTP id a18mr20234016ilb.67.1626886383904; Wed, 21 Jul 2021 09:53:03 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id b25sm14700743ios.36.2021.07.21.09.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 09:53:03 -0700 (PDT) Received: (nullmailer pid 2433823 invoked by uid 1000); Wed, 21 Jul 2021 16:53:00 -0000 Date: Wed, 21 Jul 2021 10:53:00 -0600 From: Rob Herring To: Joakim Zhang Cc: davem@davemloft.net, kuba@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, kernel@pengutronix.de, linux-imx@nxp.com, peppe.cavallaro@st.com, joabreu@synopsys.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next V1 2/3] dt-bindings: net: imx-dwmac: convert imx-dwmac bindings to yaml Message-ID: <20210721165300.GA2430128@robh.at.kernel.org> References: <20210719071821.31583-1-qiangqing.zhang@nxp.com> <20210719071821.31583-3-qiangqing.zhang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210719071821.31583-3-qiangqing.zhang@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 19, 2021 at 03:18:20PM +0800, Joakim Zhang wrote: > In order to automate the verification of DT nodes covert imx-dwmac to > nxp,dwmac-imx.yaml, and pass below checking. > > $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > > Signed-off-by: Joakim Zhang > --- > .../devicetree/bindings/net/imx-dwmac.txt | 56 ----------- > .../bindings/net/nxp,dwmac-imx.yaml | 93 +++++++++++++++++++ > 2 files changed, 93 insertions(+), 56 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/net/imx-dwmac.txt > create mode 100644 Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > > diff --git a/Documentation/devicetree/bindings/net/imx-dwmac.txt b/Documentation/devicetree/bindings/net/imx-dwmac.txt > deleted file mode 100644 > index 921d522fe8d7..000000000000 > --- a/Documentation/devicetree/bindings/net/imx-dwmac.txt > +++ /dev/null > @@ -1,56 +0,0 @@ > -IMX8 glue layer controller, NXP imx8 families support Synopsys MAC 5.10a IP. > - > -This file documents platform glue layer for IMX. > -Please see stmmac.txt for the other unchanged properties. > - > -The device node has following properties. > - > -Required properties: > -- compatible: Should be "nxp,imx8mp-dwmac-eqos" to select glue layer > - and "snps,dwmac-5.10a" to select IP version. > -- clocks: Must contain a phandle for each entry in clock-names. > -- clock-names: Should be "stmmaceth" for the host clock. > - Should be "pclk" for the MAC apb clock. > - Should be "ptp_ref" for the MAC timer clock. > - Should be "tx" for the MAC RGMII TX clock: > - Should be "mem" for EQOS MEM clock. > - - "mem" clock is required for imx8dxl platform. > - - "mem" clock is not required for imx8mp platform. > -- interrupt-names: Should contain a list of interrupt names corresponding to > - the interrupts in the interrupts property, if available. > - Should be "macirq" for the main MAC IRQ > - Should be "eth_wake_irq" for the IT which wake up system > -- intf_mode: Should be phandle/offset pair. The phandle to the syscon node which > - encompases the GPR register, and the offset of the GPR register. > - - required for imx8mp platform. > - - is optional for imx8dxl platform. > - > -Optional properties: > -- intf_mode: is optional for imx8dxl platform. > -- snps,rmii_refclk_ext: to select RMII reference clock from external. > - > -Example: > - eqos: ethernet@30bf0000 { > - compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a"; > - reg = <0x30bf0000 0x10000>; > - interrupts = , > - ; > - interrupt-names = "eth_wake_irq", "macirq"; > - clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>, > - <&clk IMX8MP_CLK_QOS_ENET_ROOT>, > - <&clk IMX8MP_CLK_ENET_QOS_TIMER>, > - <&clk IMX8MP_CLK_ENET_QOS>; > - clock-names = "stmmaceth", "pclk", "ptp_ref", "tx"; > - assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>, > - <&clk IMX8MP_CLK_ENET_QOS_TIMER>, > - <&clk IMX8MP_CLK_ENET_QOS>; > - assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, > - <&clk IMX8MP_SYS_PLL2_100M>, > - <&clk IMX8MP_SYS_PLL2_125M>; > - assigned-clock-rates = <0>, <100000000>, <125000000>; > - nvmem-cells = <ð_mac0>; > - nvmem-cell-names = "mac-address"; > - nvmem_macaddr_swap; > - intf_mode = <&gpr 0x4>; > - status = "disabled"; > - }; > diff --git a/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml b/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > new file mode 100644 > index 000000000000..5629b2e4ccf8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > @@ -0,0 +1,93 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/nxp,dwmac-imx.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NXP i.MX8 DWMAC glue layer Device Tree Bindings > + > +maintainers: > + - Joakim Zhang > + > +# We need a select here so we don't match all nodes with 'snps,dwmac' > +select: > + properties: > + compatible: > + contains: > + enum: > + - nxp,imx8mp-dwmac-eqos > + - nxp,imx8dxl-dwmac-eqos > + required: > + - compatible > + > +allOf: > + - $ref: "snps,dwmac.yaml#" > + > +properties: > + compatible: > + oneOf: > + - items: Don't need 'oneOf' as there is only one entry. > + - enum: > + - nxp,imx8mp-dwmac-eqos > + - nxp,imx8dxl-dwmac-eqos > + - const: snps,dwmac-5.10a > + > + clocks: > + minItems: 3 > + maxItems: 5 > + items: > + - description: MAC host clock > + - description: MAC apb clock > + - description: MAC timer clock > + - description: MAC RGMII TX clock > + - description: EQOS MEM clock > + > + clock-names: > + minItems: 3 > + maxItems: 5 > + contains: s/contains/items/ But really, like the other one, can't you define the order? > + enum: > + - stmmaceth > + - pclk > + - ptp_ref > + - tx > + - mem > + > + intf_mode: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: > + Should be phandle/offset pair. The phandle to the syscon node which > + encompases the GPR register, and the offset of the GPR register. Sounds like 2 cells: maxItems: 2 > + > + snps,rmii_refclk_ext: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + To select RMII reference clock from external. > + > +required: > + - compatible > + - clocks > + - clock-names > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + eqos: ethernet@30bf0000 { > + compatible = "nxp,imx8mp-dwmac-eqos","snps,dwmac-5.10a"; > + reg = <0x30bf0000 0x10000>; > + interrupts = , > + ; > + interrupt-names = "macirq", "eth_wake_irq"; > + clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>, > + <&clk IMX8MP_CLK_QOS_ENET_ROOT>, > + <&clk IMX8MP_CLK_ENET_QOS_TIMER>, > + <&clk IMX8MP_CLK_ENET_QOS>; > + clock-names = "stmmaceth", "pclk", "ptp_ref", "tx"; > + phy-mode = "rgmii"; > + status = "disabled"; Why are you disabling your example? Drop. > + }; > -- > 2.17.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27761C636C9 for ; Wed, 21 Jul 2021 16:54:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA5A6611C1 for ; Wed, 21 Jul 2021 16:54:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA5A6611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mcJPywusqXLzbUTUacDngi/a6w7Xm2oxgzixW7WMC5U=; b=WUkxH0t4f2YCS0 mvCeFYtUtL8L50UXnFcxBpIx5kaxmf9apvh+xNYdAKoOLkoe1PhxePPYTlDqjvP2KeiHjj9jFnr6w UuewjuXr1yZH3phEsg1fXFs+HJBzzWJtN0BSwoY+k0bJ+iL9trOfkdc+A3CeNLeeK/gMpMsgBPNjx gKz9qey3Fswq5CfrNamn7rXThGP/ihq1Q0isQFuMsrHJBUGyjhTh4SUq3uc9KP6rO74JuBGFuAOpZ pMP5rA5/QwMU8w4QlgQU/XPlRYXUY6Im82GAg5eHkcWcx04s+Kgskt6ylPGu0WY+y+1fVq9lzSGUz CyjmWUloIvVzLULBSaGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6FT4-00Gebw-0k; Wed, 21 Jul 2021 16:53:10 +0000 Received: from mail-il1-f180.google.com ([209.85.166.180]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6FSz-00GeaR-NQ for linux-arm-kernel@lists.infradead.org; Wed, 21 Jul 2021 16:53:07 +0000 Received: by mail-il1-f180.google.com with SMTP id r16so2832667ilt.11 for ; Wed, 21 Jul 2021 09:53:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2FlplugSms0lq9vlT6qVeAF/xOXlsmB/xXx4Xh3GmPg=; b=LljcwOAahbmcXrAPAzKZIXE5KgXtUosF8LPm8ToXLA0XZpsMmc1YaX93TsyKzUUqf8 ZTe7x/zKDruLaPVRzVIdfPFgQULKrqF7lartvE0wcK9P8LBEY5fcJwGvaQi6u4d6jibk ULTSUfIGSW4EZbn3g7lmr1+y1WWi2qSSgcbkvCSohMamW0/DgI80VV8lLE+aCS1SWTj2 7y0UmhY0IW7UwySgnA4ap+VF+gvQer3KGRz/TaS9JRDjxvbdvehMILbuohbQ0KwtBs14 WILcA37rm5GBmv4hjSK2wkKigTxMXhQ4f4zRo7iwL6dPWc86KSjn2VTblsn5a51sMZ5k 0NUQ== X-Gm-Message-State: AOAM530w8cfV9gbj2SIDvWR6Bp72nrxF2RgQ1eGXVMM1apCZfEB73i8R Ck3llNRnbwpeEvFiiuumeQ== X-Google-Smtp-Source: ABdhPJyBGw8BgX6Ut+AjXB1gavWfI+GdQEOaA4ld3jRnJ/IyC+2yOdS5D+jM8xTQoVX/cB9CQhftLw== X-Received: by 2002:a92:d112:: with SMTP id a18mr20234016ilb.67.1626886383904; Wed, 21 Jul 2021 09:53:03 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id b25sm14700743ios.36.2021.07.21.09.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 09:53:03 -0700 (PDT) Received: (nullmailer pid 2433823 invoked by uid 1000); Wed, 21 Jul 2021 16:53:00 -0000 Date: Wed, 21 Jul 2021 10:53:00 -0600 From: Rob Herring To: Joakim Zhang Cc: davem@davemloft.net, kuba@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, kernel@pengutronix.de, linux-imx@nxp.com, peppe.cavallaro@st.com, joabreu@synopsys.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next V1 2/3] dt-bindings: net: imx-dwmac: convert imx-dwmac bindings to yaml Message-ID: <20210721165300.GA2430128@robh.at.kernel.org> References: <20210719071821.31583-1-qiangqing.zhang@nxp.com> <20210719071821.31583-3-qiangqing.zhang@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210719071821.31583-3-qiangqing.zhang@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210721_095305_831899_A1489BBE X-CRM114-Status: GOOD ( 25.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 19, 2021 at 03:18:20PM +0800, Joakim Zhang wrote: > In order to automate the verification of DT nodes covert imx-dwmac to > nxp,dwmac-imx.yaml, and pass below checking. > > $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > > Signed-off-by: Joakim Zhang > --- > .../devicetree/bindings/net/imx-dwmac.txt | 56 ----------- > .../bindings/net/nxp,dwmac-imx.yaml | 93 +++++++++++++++++++ > 2 files changed, 93 insertions(+), 56 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/net/imx-dwmac.txt > create mode 100644 Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > > diff --git a/Documentation/devicetree/bindings/net/imx-dwmac.txt b/Documentation/devicetree/bindings/net/imx-dwmac.txt > deleted file mode 100644 > index 921d522fe8d7..000000000000 > --- a/Documentation/devicetree/bindings/net/imx-dwmac.txt > +++ /dev/null > @@ -1,56 +0,0 @@ > -IMX8 glue layer controller, NXP imx8 families support Synopsys MAC 5.10a IP. > - > -This file documents platform glue layer for IMX. > -Please see stmmac.txt for the other unchanged properties. > - > -The device node has following properties. > - > -Required properties: > -- compatible: Should be "nxp,imx8mp-dwmac-eqos" to select glue layer > - and "snps,dwmac-5.10a" to select IP version. > -- clocks: Must contain a phandle for each entry in clock-names. > -- clock-names: Should be "stmmaceth" for the host clock. > - Should be "pclk" for the MAC apb clock. > - Should be "ptp_ref" for the MAC timer clock. > - Should be "tx" for the MAC RGMII TX clock: > - Should be "mem" for EQOS MEM clock. > - - "mem" clock is required for imx8dxl platform. > - - "mem" clock is not required for imx8mp platform. > -- interrupt-names: Should contain a list of interrupt names corresponding to > - the interrupts in the interrupts property, if available. > - Should be "macirq" for the main MAC IRQ > - Should be "eth_wake_irq" for the IT which wake up system > -- intf_mode: Should be phandle/offset pair. The phandle to the syscon node which > - encompases the GPR register, and the offset of the GPR register. > - - required for imx8mp platform. > - - is optional for imx8dxl platform. > - > -Optional properties: > -- intf_mode: is optional for imx8dxl platform. > -- snps,rmii_refclk_ext: to select RMII reference clock from external. > - > -Example: > - eqos: ethernet@30bf0000 { > - compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a"; > - reg = <0x30bf0000 0x10000>; > - interrupts = , > - ; > - interrupt-names = "eth_wake_irq", "macirq"; > - clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>, > - <&clk IMX8MP_CLK_QOS_ENET_ROOT>, > - <&clk IMX8MP_CLK_ENET_QOS_TIMER>, > - <&clk IMX8MP_CLK_ENET_QOS>; > - clock-names = "stmmaceth", "pclk", "ptp_ref", "tx"; > - assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>, > - <&clk IMX8MP_CLK_ENET_QOS_TIMER>, > - <&clk IMX8MP_CLK_ENET_QOS>; > - assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, > - <&clk IMX8MP_SYS_PLL2_100M>, > - <&clk IMX8MP_SYS_PLL2_125M>; > - assigned-clock-rates = <0>, <100000000>, <125000000>; > - nvmem-cells = <ð_mac0>; > - nvmem-cell-names = "mac-address"; > - nvmem_macaddr_swap; > - intf_mode = <&gpr 0x4>; > - status = "disabled"; > - }; > diff --git a/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml b/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > new file mode 100644 > index 000000000000..5629b2e4ccf8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml > @@ -0,0 +1,93 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/nxp,dwmac-imx.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NXP i.MX8 DWMAC glue layer Device Tree Bindings > + > +maintainers: > + - Joakim Zhang > + > +# We need a select here so we don't match all nodes with 'snps,dwmac' > +select: > + properties: > + compatible: > + contains: > + enum: > + - nxp,imx8mp-dwmac-eqos > + - nxp,imx8dxl-dwmac-eqos > + required: > + - compatible > + > +allOf: > + - $ref: "snps,dwmac.yaml#" > + > +properties: > + compatible: > + oneOf: > + - items: Don't need 'oneOf' as there is only one entry. > + - enum: > + - nxp,imx8mp-dwmac-eqos > + - nxp,imx8dxl-dwmac-eqos > + - const: snps,dwmac-5.10a > + > + clocks: > + minItems: 3 > + maxItems: 5 > + items: > + - description: MAC host clock > + - description: MAC apb clock > + - description: MAC timer clock > + - description: MAC RGMII TX clock > + - description: EQOS MEM clock > + > + clock-names: > + minItems: 3 > + maxItems: 5 > + contains: s/contains/items/ But really, like the other one, can't you define the order? > + enum: > + - stmmaceth > + - pclk > + - ptp_ref > + - tx > + - mem > + > + intf_mode: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: > + Should be phandle/offset pair. The phandle to the syscon node which > + encompases the GPR register, and the offset of the GPR register. Sounds like 2 cells: maxItems: 2 > + > + snps,rmii_refclk_ext: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + To select RMII reference clock from external. > + > +required: > + - compatible > + - clocks > + - clock-names > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + eqos: ethernet@30bf0000 { > + compatible = "nxp,imx8mp-dwmac-eqos","snps,dwmac-5.10a"; > + reg = <0x30bf0000 0x10000>; > + interrupts = , > + ; > + interrupt-names = "macirq", "eth_wake_irq"; > + clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>, > + <&clk IMX8MP_CLK_QOS_ENET_ROOT>, > + <&clk IMX8MP_CLK_ENET_QOS_TIMER>, > + <&clk IMX8MP_CLK_ENET_QOS>; > + clock-names = "stmmaceth", "pclk", "ptp_ref", "tx"; > + phy-mode = "rgmii"; > + status = "disabled"; Why are you disabling your example? Drop. > + }; > -- > 2.17.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel