Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3053753ybl; Mon, 19 Aug 2019 11:21:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM1p31cwiAlIkJb6/3MFPiGnZeJPSj1WaavGiVPTG9B3OcmDIIAh/8uYLf1Dg/wYfsrQ4m X-Received: by 2002:a17:90a:6581:: with SMTP id k1mr22073397pjj.47.1566238918148; Mon, 19 Aug 2019 11:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566238918; cv=none; d=google.com; s=arc-20160816; b=mVxFH1R7Ab6zbvCmKmDhY12semzH53/CfigTbcTwYn6H5io5mL6v5msXmBQ08Coaiv +Uhuw5S+RO9D1s/o44tArrRvfpcoFX+dYDQY700CbUYIJwiu4CH+8ySaRXIpRfdwUNsX vG6D19dUm+MJc9DIlUPGDF2gxiqOz5CtRVQLKqiyjav+B4/sYVWtQvqP9SVR+MenmCuR HPZjWiBkwUO7pkyqFRLzkoqdiHYZMT9yq9gL9F4NO0LcAdwhit8SfoQaQrzPdfDD6uOy eZqkTchDJfWvPI5klNRzAkWPej4Aig8Fsi2wIP4ANyuOBbmyZQmGGYHQ02TGkYIVp8PY 8jHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=icjUEIYOhhays6IG0KqA44ROjX3zqxZRbW+Cg5kdQAg=; b=enr9olIahgUDtVCo1w/67dzasPldCPXiLCVElaDwjw/dQdOIILZwusH6JPbBmu4cUr 6iMk/7P8QCO8QQPl6r88sMG594mlY19ONFKruXnIJzBr4hKPE96u8k7CUFTUg8u152gA xWeC9TJmotQETnpaIK9AT3uoEO5a6lrPLCJqV5PgMyWDs5tOR/plDrkkwX4BQiPg9LBc EGikHMLv4KmRBfDYiC2SWgnVh9SsN8fvzD5zsB3wrxGWwdOPc5aqF62p1fLcgIhvZt+k Y80QzCbjcYN2KTWqM31MNX5BHI4Jt3HuJAGfBFLD/FSRxvKFUCkjm7VYiBFZJQWqrRlT uleA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FnBL+MgF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si10384803plz.242.2019.08.19.11.21.43; Mon, 19 Aug 2019 11:21:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=FnBL+MgF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728204AbfHSSUs (ORCPT + 99 others); Mon, 19 Aug 2019 14:20:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:50090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728029AbfHSSUr (ORCPT ); Mon, 19 Aug 2019 14:20:47 -0400 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E3C4122CF6; Mon, 19 Aug 2019 18:20:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566238846; bh=WlmSIy9FhdBOLKfq102q4YX3QMPbyA7nFdt9dtzsEoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FnBL+MgF/ZB9CCVuwr5m9KxZREBzouKCnw8igv0c0JCFLkh41S5vVyloAifD8oYH1 aGuPiAlokWUN5Hkx3nN2ytnjYdRLr/d79mUIFzZJK1V3koYQiDaG0LAgq6FswWllzQ OQYjfJeovXVTZ3wSDVgKluGpVG+yUr/bmQmHYko0= From: Maxime Ripard To: linux@roeck-us.net, wim@linux-watchdog.org Cc: linux-kernel@vger.kernel.org, Chen-Yu Tsai , Maxime Ripard , Mark Rutland , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Maxime Ripard Subject: [PATCH v2 2/6] dt-bindings: watchdog: Convert Allwinner watchdog to a schema Date: Mon, 19 Aug 2019 20:20:35 +0200 Message-Id: <20190819182039.24892-2-mripard@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190819182039.24892-1-mripard@kernel.org> References: <20190819182039.24892-1-mripard@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Ripard The Allwinner SoCs have a watchdog supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard --- Changes from v1: - Use generic watchdog schema - Use unevaluatedProperties instead of additionalProperties --- .../watchdog/allwinner,sun4i-a10-wdt.yaml | 48 +++++++++++++++++++ .../bindings/watchdog/sunxi-wdt.txt | 22 --------- 2 files changed, 48 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml delete mode 100644 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml new file mode 100644 index 000000000000..dc7553f57708 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/allwinner,sun4i-a10-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner A10 Watchdog Device Tree Bindings + +allOf: + - $ref: "watchdog.yaml#" + +maintainers: + - Chen-Yu Tsai + - Maxime Ripard + +properties: + compatible: + oneOf: + - const: allwinner,sun4i-a10-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,sun50i-a64-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,sun50i-h6-wdt + - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,suniv-f1c100s-wdt + - const: allwinner,sun4i-a10-wdt + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + wdt: watchdog@1c20c90 { + compatible = "allwinner,sun4i-a10-wdt"; + reg = <0x01c20c90 0x10>; + timeout-sec = <10>; + }; + +... diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt deleted file mode 100644 index e65198d82a2b..000000000000 --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt +++ /dev/null @@ -1,22 +0,0 @@ -Allwinner SoCs Watchdog timer - -Required properties: - -- compatible : should be one of - "allwinner,sun4i-a10-wdt" - "allwinner,sun6i-a31-wdt" - "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt" - "allwinner,sun50i-h6-wdt","allwinner,sun6i-a31-wdt" - "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt" -- reg : Specifies base physical address and size of the registers. - -Optional properties: -- timeout-sec : Contains the watchdog timeout in seconds - -Example: - -wdt: watchdog@1c20c90 { - compatible = "allwinner,sun4i-a10-wdt"; - reg = <0x01c20c90 0x10>; - timeout-sec = <10>; -}; -- 2.21.0