From patchwork Tue Jul 11 22:14:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9835555 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 488B160325 for ; Tue, 11 Jul 2017 22:15:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E151285AF for ; Tue, 11 Jul 2017 22:15:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32714285B6; Tue, 11 Jul 2017 22:15:18 +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 962F8285AF for ; Tue, 11 Jul 2017 22:15:17 +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=CN7WPqYdw5LvCNDl2bIXJ1kl1KlZdfocWLTQbRqIsZA=; b=Gv5 JEMvSNGm5mQHPLVcitfYXT3v5sot+4i7qMyiMOBOfWxREDV1WsApnTMrmFtNdGX6aQZUqU12FjY0o ihbQcJQ9PVuK4CSUrHm2LeL6AwAnEzIOGMCHU7DIIOl+61/Wn4Y5IXf1NZXisQhnz2VGG0hVjGJFr r3KPALeLAIdWCrgaITsNy0IJ6AvrDyc61dpTBAUBc4O65YRPve9+L2ObymVyRoypY5vUHWaXbXic2 Y54IyPLpp/T3Jt02tV2om7XCvnrpY+17Rl5N0MysxYoUNH4jXXJCfuaAcEMgNiOlJM6CdujhSvBq7 mBkFwuIcIRJCDqmglITfPm8taS+wo4w==; 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 1dV3R7-0002sd-2S; Tue, 11 Jul 2017 22:15:17 +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 1dV3R4-0001c6-2C; Tue, 11 Jul 2017 22:15:15 +0000 Received: by mail-wr0-x241.google.com with SMTP id 77so1425129wrb.3; Tue, 11 Jul 2017 15:14:53 -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=ShPORagiKAO5g/DUGP8pYDz9nceA94G9e4vgSFdJymc=; b=Pa+p+7NmfCSOZM6YevHQe297IX0rRC7k1Wp+XjSXrwruXJWMt/AM+OnswuRGs5o4Qb 8KCBFWRSlMpPsdnktEpq1jwKH5aqnZu0nIU8tvMd6aFX/PVqrwTvXx+fhU/PKvzNRnfC f/bnK0pBHHp6p/IRntV5PfVKCt8qyNLAYPMSJZiQRpkdcqMafa9jLasU0mn1X/TeOWT3 dh6t2kSPHaJoqQJEMaeQP5xo6I2gMWYEcqkLsMl4SjSYHpVlJoQ5FmFoalTeEjzXQKZk eSpynwmfJDdEmVoZCxby3X1+ubv8LBUDpDp0PpXmJINGaJUjdWIem/4LdR4ZC8ApSusk jTFQ== 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=ShPORagiKAO5g/DUGP8pYDz9nceA94G9e4vgSFdJymc=; b=oUwtuXSfiAEjpe02BbhBZ9tbxmcF7YnycaPMnLz++0QwCPuoKsT4Zf4pDji5KAuNCJ DYgxLj9DOJU9MjrzgvJodkXyFxWsiPD5hbqlv/H3Hd27b4akSGLl1gOwziiydi2ZxCWO Y6LrclMzm3AO20iaEP1CQXlcHxFzRMZwh0NqoI0FuTEf2juLQcPYsTROKiwMX53I5Ho0 KPttmAwFFNFdDVZ5uhz6tkuSq7QQlkiSH6YmEMEY/ydsJucJClesU3y6ZS5uOYllLshn KAiBWJwIwEagbHx+BW04fQpLg8s8V9bUU8Yp1AYHYXMxFe17Er9gGJG74a2d7rsfMyZA wH0A== X-Gm-Message-State: AIVw113iVYDIcpk6p0E4gJ9rsmiwoydhDvXEsC79CL23e2nTdMQAV+7l 9+V9Fq+88B4p8A== X-Received: by 10.28.57.197 with SMTP id g188mr303483wma.13.1499811292046; Tue, 11 Jul 2017 15:14:52 -0700 (PDT) Received: from blackbox.darklights.net (p5DE38F03.dip0.t-ipconnect.de. [93.227.143.3]) by smtp.googlemail.com with ESMTPSA id t125sm394748wmt.20.2017.07.11.15.14.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 15:14:51 -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 v2] watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2 Date: Wed, 12 Jul 2017 00:14:38 +0200 Message-Id: <20170711221438.8958-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.13.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170711_151514_279386_B7B082B8 X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-amlogic@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, narmstrong@baylibre.com MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=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 Acked-by: Rob Herring --- Changes since v1 at [0]: - updated the documentation to indicate that Meson8 should also specify the Meson6 compatible and that Meson8m2 should also specify the Meson8b compatible [0] https://patchwork.kernel.org/patch/9780093/ 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..8a6d84cb36c9 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" on Meson6 SoCs + "amlogic,meson8-wdt" and "amlogic,meson6-wdt" on Meson8 SoCs + "amlogic,meson8b-wdt" on Meson8b SoCs + "amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs - 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);