From patchwork Thu Apr 29 19:23:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 429343 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 EA411C433B4 for ; Thu, 29 Apr 2021 19:24:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B78AD6144E for ; Thu, 29 Apr 2021 19:24:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231756AbhD2TYs (ORCPT ); Thu, 29 Apr 2021 15:24:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbhD2TYV (ORCPT ); Thu, 29 Apr 2021 15:24:21 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85447C06138D for ; Thu, 29 Apr 2021 12:23:33 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id h4so58998780wrt.12 for ; Thu, 29 Apr 2021 12:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mZR6yJJg0IBSnPE9su+AvonxGsm8ZfFFCm7ShdjTwvQ=; b=ssmtpDvjIDmJyk5nxi7ilK1rS/PfcgPrdlPqB0yDXDfix4oLBHhspiB1cA0BxZFHL0 fzl19sp6iG2WIJfo8AcYmKD7PD9H/xhA9jFXuIW5GC9Nb64iN4pSa/+omhb1qzEL+JDn e9BGy30ocZBmOQ95/onlHVbXHHgr9BQ6B3Efah0h2d18SWOUxZ5i5lBIpvtn2uhkU3Sj YJSDBSqP+Hh6NS8/xCYDWXtVPlRXdKkxpfPkYxs6TKCt+fS9G724Z99u3LwGxIY51Xt0 YfqGe3RKRw+J45fwUwdg8qQzy/4K28eD2P785rjIwWXGSzT7LSMuzTWWbww/tdwXRTGG g0CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mZR6yJJg0IBSnPE9su+AvonxGsm8ZfFFCm7ShdjTwvQ=; b=cXlKrzDzmfGkI7KYm000pKWOS4qtxuIY4vWIwnuTk2n/TxeymelYxV1SFjzDpVh4/X 4R3nm27NMmBbBfVkZIjJMNX7ZkusnMsI2s2HOjm2WHYzybyxAjyFzrib3J1xbDlGttTa xaEIvdm70E8NkN6fy/fq3i1efuBDX/+RsRIHyyTEVq5I4y6k3Wnnd/W5atrW+/+qoRyM 7S0Y77TSyMk3seOe6wdGoJDtY641ZIcgAgicpGqwxjj8PcmIfv86XFgqEz+2f1AfLbNg +a8eofwB0ef//5QfouUqLNUPKS75PmfEhnIOsCWJ/FlsdwxYRWgSo8bWk3eNbtieTK+g ghpg== X-Gm-Message-State: AOAM532B3mrgvII43ZPd2Dv4Vbzu3/flaEjdPX1kjhd5d9jlBbuL2f7G 2qpdKwgGOP6G1Dn/uOE9E97g2g== X-Google-Smtp-Source: ABdhPJza9qioQpEDGVoOtJ96QdX0eM9IWtCXsQyzsWrrlvDYObClYYuO0Plmm5pjMypo0szdZ9lSNA== X-Received: by 2002:adf:a316:: with SMTP id c22mr1513474wrb.202.1619724212082; Thu, 29 Apr 2021 12:23:32 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 61sm6708000wrm.52.2021.04.29.12.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 12:23:31 -0700 (PDT) From: Corentin Labbe To: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Corentin Labbe Subject: [PATCH v2] dt-bindings: net: Convert mdio-gpio to yaml Date: Thu, 29 Apr 2021 19:23:26 +0000 Message-Id: <20210429192326.1148440-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Converts net/mdio-gpio.txt to yaml Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Reviewed-by: Linus Walleij --- Changes since v1: - fixes yamllint warning about indent - added maxItems 3 .../devicetree/bindings/net/mdio-gpio.txt | 27 --------- .../devicetree/bindings/net/mdio-gpio.yaml | 57 +++++++++++++++++++ 2 files changed, 57 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/mdio-gpio.txt create mode 100644 Documentation/devicetree/bindings/net/mdio-gpio.yaml diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt deleted file mode 100644 index 4d91a36c5cf5..000000000000 --- a/Documentation/devicetree/bindings/net/mdio-gpio.txt +++ /dev/null @@ -1,27 +0,0 @@ -MDIO on GPIOs - -Currently defined compatibles: -- virtual,gpio-mdio -- microchip,mdio-smi0 - -MDC and MDIO lines connected to GPIO controllers are listed in the -gpios property as described in section VIII.1 in the following order: - -MDC, MDIO. - -Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases" -node. - -Example: - -aliases { - mdio-gpio0 = &mdio0; -}; - -mdio0: mdio { - compatible = "virtual,mdio-gpio"; - #address-cells = <1>; - #size-cells = <0>; - gpios = <&qe_pio_a 11 - &qe_pio_c 6>; -}; diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.yaml b/Documentation/devicetree/bindings/net/mdio-gpio.yaml new file mode 100644 index 000000000000..70103ef17f53 --- /dev/null +++ b/Documentation/devicetree/bindings/net/mdio-gpio.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/mdio-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MDIO on GPIOs + +maintainers: + - Andrew Lunn + - Florian Fainelli + - Heiner Kallweit + +allOf: + - $ref: "mdio.yaml#" + +properties: + compatible: + enum: + - virtual,mdio-gpio + - microchip,mdio-smi0 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + gpios: + minItems: 2 + maxItems: 3 + description: | + MDC and MDIO lines connected to GPIO controllers are listed in + the gpios property as described in section VIII.1 in the + following order: MDC, MDIO. + +#Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases" +#node. +unevaluatedProperties: false + +examples: + - | + aliases { + mdio-gpio0 = &mdio0; + }; + + mdio0: mdio { + compatible = "virtual,mdio-gpio"; + #address-cells = <1>; + #size-cells = <0>; + gpios = <&qe_pio_a 11 + &qe_pio_c 6>; + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + }; +...