From patchwork Sun Jun 11 09:52:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9780093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B2F060352 for ; Sun, 11 Jun 2017 09:53:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0557028556 for ; Sun, 11 Jun 2017 09:53:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC69E285A4; Sun, 11 Jun 2017 09:53:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7921E28556 for ; Sun, 11 Jun 2017 09:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=A0aBgC7ptCAMv7gRdSj6QkITVEYMnAW67jhf7MeJhvU=; b=A4E lVqcM35dnjr4o/aZhava9tAjeMnNRyFE1371pL+eeOe9YYPCSE8qJeVaOjctuxcDmYa5FlDSX8G21 p57zMsTtYRlEp7kPyJ4ye+0RyzJUJu5qvBPcJSzrxPKn4csm7BIZb0TYzvqtkOvkDtV6Hfz+xo53n i8Bkhpjfs5M0YKWNgxrcNHZ9xmmWHIFUM+0GLleo6+WbsPSFPXfqf6VPpjA8NObGB6Yn1+Xl4SQ5C JdVuPGXEKDNCmpAfVvzx5lamB+x6T0p2I/rGT6dnEQzUoy1r+INmEY7fxZwPKOwHPhlXSyb3D7O9u TgBuUx6720j9X9G3c0EmIjkqd8wXtEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dJzYg-0003TC-EJ; Sun, 11 Jun 2017 09:53:22 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dJzYc-0003QP-FJ; Sun, 11 Jun 2017 09:53:20 +0000 Received: by mail-wr0-x241.google.com with SMTP id e23so15776243wre.3; Sun, 11 Jun 2017 02:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=JIWxc1wI7Cpfncnb3m4/WoPWVzgpv9LFDuady0MtgkI=; b=hh99H6h3ypF0Ei1wDFMlY9tOl60HzGqtjVFJEHys/iV/jLb1i+d7rQ2aiH9rxyFaJh aCeUlQ2J1iBJ5jW8Y0SXHa8Zp4HfK40ETCJwNx8yo6YPT6k7ix46W6VoNxvuRW2CGF15 he/oJ8BSf7HUCKgX60+Tk6ClG1zBwcXb+8lKzGNLgWAANvxLKrFPctMcrL17/Lp/ttQH 4fy/Vy+UDfViUaNgj/I8mDWO8ONrjX1ViUV5EKmNHFd3PPjDPU6DZvSGW4tqU+h+VAca vDvmfCQzgn/S45Ws+XOxcsCvsRwAYcRho1UZ29FZ5ZbPr95lOO3Jq0OTG0JED+NZvXP9 540w== 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; bh=JIWxc1wI7Cpfncnb3m4/WoPWVzgpv9LFDuady0MtgkI=; b=D7CpNiWQqy6IYXUcSBTElW6O7Rc8v+vAsE7R5YYJU2g5Q6PtwzPTxrljlSGvZh/HLj xPnLqg0dFdv/piBMZ+dDCIURJ2/Vz/ATVJWG8OtmNJoRAz42I9lcSj7b6P5pLm9shs8b SEnWWkkrcZfdwOGNViSQ3ORXUhl+qLa+tU/Xy0tUtA1ZbkJGTllJ0zTfOi5rK0ORM/jS QWoM5sOrzMrmBbNLYVMXoI3b3mjfKGVXqNoVMLuqt4c4hrzKAwztfmxde1L9cJq2Q9xE Bmyy6M+qj5LpXrIq+i71xGzRkFK/vw6C2bryObwyDEj3Gn1ulYtvw54x5y/h6W8e96D5 8xGw== X-Gm-Message-State: AODbwcBT+qPBndRzn8djjMzdxsmawjIdCskZBCeYYElkqCTrqBl6JsWS JZURvAwT+DbheA== X-Received: by 10.223.135.153 with SMTP id b25mr3879019wrb.48.1497174776201; Sun, 11 Jun 2017 02:52:56 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3D2E004C1F3DE25BB39BC3B.dip0.t-ipconnect.de. [2003:dc:d3d2:e004:c1f3:de25:bb39:bc3b]) by smtp.googlemail.com with ESMTPSA id p78sm2871714wmg.5.2017.06.11.02.52.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 02:52:55 -0700 (PDT) From: Martin Blumenstingl To: wim@iguana.be, linux@roeck-us.net, robh+dt@kernel.org, carlo@caione.org, khilman@baylibre.com, linux-watchdog@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH] watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2 Date: Sun, 11 Jun 2017 11:52:19 +0200 Message-Id: <20170611095219.22095-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.13.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170611_025318_667889_85077B04 X-CRM114-Status: GOOD ( 10.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Martin Blumenstingl , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b. Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Guenter Roeck --- Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 6 +++++- drivers/watchdog/meson_wdt.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt index ae70185d96e6..f2fbe1a39d31 100644 --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt @@ -2,7 +2,11 @@ Meson SoCs Watchdog timer Required properties: -- compatible : should be "amlogic,meson6-wdt" or "amlogic,meson8b-wdt" +- compatible : depending on the SoC this should be one of: + "amlogic,meson6-wdt" + "amlogic,meson8-wdt" + "amlogic,meson8b-wdt" + "amlogic,meson8m2-wdt" - reg : Specifies base physical address and size of the registers. Example: diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c index 491b9bf13d84..304274c67735 100644 --- a/drivers/watchdog/meson_wdt.c +++ b/drivers/watchdog/meson_wdt.c @@ -155,7 +155,9 @@ static const struct watchdog_ops meson_wdt_ops = { static const struct of_device_id meson_wdt_dt_ids[] = { { .compatible = "amlogic,meson6-wdt", .data = &meson6_wdt_data }, + { .compatible = "amlogic,meson8-wdt", .data = &meson6_wdt_data }, { .compatible = "amlogic,meson8b-wdt", .data = &meson8b_wdt_data }, + { .compatible = "amlogic,meson8m2-wdt", .data = &meson8b_wdt_data }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids);