From patchwork Fri Nov 1 16:45:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 178317 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp741142ill; Fri, 1 Nov 2019 09:45:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxW6mMU97pAiJmAhe/j7TYRgB023ipekURJJT3GDywwZO5buAtny9l3sU/45xoW/iXXYRvW X-Received: by 2002:a17:906:9618:: with SMTP id s24mr10789587ejx.185.1572626717001; Fri, 01 Nov 2019 09:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572626716; cv=none; d=google.com; s=arc-20160816; b=VTcNq17tVeKyaYcprIK7+Zl3wtrwbPUSaH0Oec3wUBJWvn+7VBH/ziDvkhY+31aNYm 6Hl3kkXNNGp5DlFyshCvtmj6vrXCb4ikfJZkaddEIIa9mOLxIJso51oYHpUxQKOK8BKD DsoaZsjuAGKFbRD1oPJkLhU9KLo3a7cKSLSf8SeeFwv4qE0G0llj/w6jDVD8ZcfFiHtS ktBTQWHGNL2Hp8ZM+GSa7jByJA8lZ1sk125BlNsteEGFtGUVl66OP0u0qawb/N+uSlIV 4WuwsKagLq10sDgTWPmdcc6zSnzLVRRDQM/y1DggvX11Z7k3lb8cl7eH9tfqkGU8WtCL XdLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=aLazdWHqwMmzhyqcTwdhpTY3yMjMZynbrNye1KKLlZs=; b=A55R/pv7p5uHhyUR/4nciukH94qACQBaesTqZpxzUmrB+V0FmelRzv2gB0b5SewaFL DXSAuU0IMSC7+79rnVqXNG+1F5//9Nc/8Py/8Z+/jGswE+MdkT0Dg3h1ojDD5N2KSQqk GaKUIOroyKccAbcsfJ7Ooi+70+nWuO7T+5Z1U+fc8ANhzRR225Oe7n7amioTtVtAljst mLYELw7cqb/SL5ASrYOpzbZUYUJIjVvcZNhPK0fP7qN8cNtGESXHdQ+5p9UmI9eASlgs DdMwRX6REEqijnPMSe8zKOyNev9eiOHit28DcAq9LkG+D4BQJhrfOSpchz62mrUDjgk1 WoZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yeMa8ruk; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cf22si6354734ejb.290.2019.11.01.09.45.16; Fri, 01 Nov 2019 09:45:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yeMa8ruk; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727626AbfKAQpQ (ORCPT + 8 others); Fri, 1 Nov 2019 12:45:16 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:34242 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727148AbfKAQpQ (ORCPT ); Fri, 1 Nov 2019 12:45:16 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA1GjBsr085616; Fri, 1 Nov 2019 11:45:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572626711; bh=aLazdWHqwMmzhyqcTwdhpTY3yMjMZynbrNye1KKLlZs=; h=From:To:CC:Subject:Date; b=yeMa8rukT2H837Z9cSK/bSEAsvhyPlTrTzIZLUB9vE9WqcIQ9hyaox5er0rWkjixe Nj8yUgxwBZ7zfv+RxkHZRwWMGC+snIcnV9zNmpztvzqcuMjuYPze5YnF720sTozaKp 8FB9TuoVBN2oatqEUNgDCJ9nujIehH0Lb0VBb4io= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA1GjBBL067059 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 1 Nov 2019 11:45:11 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 1 Nov 2019 11:44:57 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 1 Nov 2019 11:44:57 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xA1GjAos082902; Fri, 1 Nov 2019 11:45:10 -0500 From: Grygorii Strashko To: "David S. Miller" , , Rob Herring , CC: Sekhar Nori , , Grygorii Strashko Subject: [PATCH] dt-bindings: net: davinci-mdio: convert bindings to json-schema Date: Fri, 1 Nov 2019 18:45:02 +0200 Message-ID: <20191101164502.19089-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Now that we have the DT validation in place, let's convert the device tree bindings for the TI SoC Davinci/OMAP/Keystone2 MDIO Controllerr over to a YAML schemas. Signed-off-by: Grygorii Strashko --- changes since rfc: - removed old bindings - bus_freq defined as "required" for davinci_mdio rfc: https://lkml.org/lkml/2019/10/24/300 .../devicetree/bindings/net/davinci-mdio.txt | 36 ---------- .../bindings/net/ti,davinci-mdio.yaml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 36 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/davinci-mdio.txt create mode 100644 Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml -- 2.17.1 diff --git a/Documentation/devicetree/bindings/net/davinci-mdio.txt b/Documentation/devicetree/bindings/net/davinci-mdio.txt deleted file mode 100644 index e6527de80f10..000000000000 --- a/Documentation/devicetree/bindings/net/davinci-mdio.txt +++ /dev/null @@ -1,36 +0,0 @@ -TI SoC Davinci/Keystone2 MDIO Controller Device Tree Bindings ---------------------------------------------------- - -Required properties: -- compatible : Should be "ti,davinci_mdio" - and "ti,keystone_mdio" for Keystone 2 SoCs - and "ti,cpsw-mdio" for am335x, am472x, am57xx/dra7, dm814x SoCs - and "ti,am4372-mdio" for am472x SoC -- reg : physical base address and size of the davinci mdio - registers map -- bus_freq : Mdio Bus frequency - -Optional properties: -- ti,hwmods : Must be "davinci_mdio" - -Note: "ti,hwmods" field is used to fetch the base address and irq -resources from TI, omap hwmod data base during device registration. -Future plan is to migrate hwmod data base contents into device tree -blob so that, all the required data will be used from device tree dts -file. - -Examples: - - mdio: davinci_mdio@4a101000 { - compatible = "ti,davinci_mdio"; - reg = <0x4A101000 0x1000>; - bus_freq = <1000000>; - }; - -(or) - - mdio: davinci_mdio@4a101000 { - compatible = "ti,davinci_mdio"; - ti,hwmods = "davinci_mdio"; - bus_freq = <1000000>; - }; diff --git a/Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml b/Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml new file mode 100644 index 000000000000..242ac4935a4b --- /dev/null +++ b/Documentation/devicetree/bindings/net/ti,davinci-mdio.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/ti,davinci-mdio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI SoC Davinci/Keystone2 MDIO Controller + +maintainers: + - Grygorii Strashko + +description: + TI SoC Davinci/Keystone2 MDIO Controller + +allOf: + - $ref: "mdio.yaml#" + +properties: + compatible: + oneOf: + - const: ti,davinci_mdio + - items: + - const: ti,keystone_mdio + - const: ti,davinci_mdio + - items: + - const: ti,cpsw-mdio + - const: ti,davinci_mdio + - items: + - const: ti,am4372-mdio + - const: ti,cpsw-mdio + - const: ti,davinci_mdio + + reg: + maxItems: 1 + + bus_freq: + maximum: 2500000 + description: + MDIO Bus frequency + + ti,hwmods: + description: TI hwmod name + deprecated: true + allOf: + - $ref: /schemas/types.yaml#/definitions/string-array + - items: + const: davinci_mdio + +if: + properties: + compatible: + contains: + const: ti,davinci_mdio + required: + - bus_freq + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +examples: + - | + davinci_mdio: mdio@4a101000 { + compatible = "ti,davinci_mdio"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x4a101000 0x1000>; + bus_freq = <1000000>; + };