Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2547372imu; Sun, 9 Dec 2018 04:15:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/XgLRX7lbXV6+BptCsuJ7vdwlAR2KMI6OuYfYYjg9AKq32WjTl8F7f95QplS1MH1n83Woui X-Received: by 2002:a63:4d0e:: with SMTP id a14mr7608784pgb.408.1544357746011; Sun, 09 Dec 2018 04:15:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544357745; cv=none; d=google.com; s=arc-20160816; b=gf1gTg+Xh3rPhk3eBvRKrFAJR3YJrAOiMofaVMZ43XQKV5y+uAliHS3nrjU22jk6iL gwha0TkztqAk8f5npK6Am4PM5wBHy2XWQT9YFFHb0TZ/nenwj0yljjGte2uybbTsFU+Q TKpuH7NUts/C/mu1iL7+U1dV6nfSGqbZjgO8S6/EbLTUavRWrJDyBL0xcg6VlPcVIME3 hKQgjbll+VlLLp6jPJQXwRCWvODQLmeFXHpk4dUwbwbh0OqpaBTKwBdyII6QzhXX0BTh L2LnsCMxH6juolkEvL8zErOO8wsiOMAmfvcFrqWAdRjbnzyorZnT3CQrLQWYrxE2a3gS GjvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date; bh=6/BrH6eSiD8nZUHslhzMGWgG8uIU5xQ4zVj2h7bekTw=; b=mu2vLWQecLQKvoSsqIxpzazWoZLxQzgxGRWPAEZSKx5ev1FxjhJsXdaGa1M9unmvmj av9kVuXbavWSx80NPbnd4te2o6W90isx+Kp1XPowtE66l7T9z0FilkPs6adTBylFsqiL rpX8lSYIhGWU0mrE953ac0I89HxKmzTVx2fyvIQE9Cj5xjx7yhs30l87Wy5bVfMwJUfc ArsZqWppOpixTegJFzvOuCwLc2gsVINiEDKj+kjtExZiRyEH8JDeA94s2jjYkybMjZVz 6wW13LvhBFQhgDgi7mAYgRPjQSBscQs+Yyh0DDOEjXR1ktaRCYnuEgf9gs87El1uKoU7 xAuA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si7188382pgh.368.2018.12.09.04.15.30; Sun, 09 Dec 2018 04:15:45 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726266AbeLIMOy (ORCPT + 99 others); Sun, 9 Dec 2018 07:14:54 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:54003 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726131AbeLIMOx (ORCPT ); Sun, 9 Dec 2018 07:14:53 -0500 Received: from oxbaltgw09.schlund.de ([172.19.246.15]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MYNW6-1h1Qtt2V4E-00VPZx; Sun, 09 Dec 2018 13:14:03 +0100 Date: Sun, 9 Dec 2018 13:14:01 +0100 (CET) From: Stefan Wahren To: Eric Anholt , Florian Fainelli , devicetree@vger.kernel.org, Rob Herring , Mark Rutland , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Sebastian Reichel , linux-pm@vger.kernel.org Message-ID: <53380420.68255.1544357641824@email.ionos.de> In-Reply-To: <20181130202743.20585-2-eric@anholt.net> References: <20181130202743.20585-1-eric@anholt.net> <20181130202743.20585-2-eric@anholt.net> Subject: Re: [PATCH v3 1/5] dt-bindings: soc: Add a new binding for the BCM2835 PM node. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev47 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K1:mhi5VNbh49HU3iPYNttRAeK16mzFVlsMEWX2Jr0BKNDmRDYir9C T9nxyptjo0mPkH03bjT7OTl518XTHw5TE0HOSujf1M8b8wCG7lbD1LkOJsb/rdgAGDqhBEf /f39FzD6cQN5ZyGkuImO4nJ2gdl8CbRorirUauCwMbJ1d1qagF/0xI5NWS4r3yHur7XMM8t TrPBfNBwGTB4jNw+OU9LQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:mTBE6MxyVeI=:CwhDgGnxhEBETMdvQmE88J qW4i88hqGr3+cymJIsWpmfVDsxV6bjimh9z3/5PMA5yz1WBEp/RsU7ZrTRNvdrzdwUfxUMKCB pX5FaJwS+bgPFHOk0oEnFp/Bx+FlZ3nXwvbMr1WrpV6zzRuVYjENV9mqSQ/e0i2y74bUWdxVK hhiT9v5jElD2LeT37MTyh8yQInUfggYDIsflMOS84tgZnkFo0F2KlN7SrkIiYnWIn0iq3MTnM eqagHwYAVwMe6UW3FqxtTeKnM3PAOrtUnPbRZ2kfbgNzvQiGVxI1qexEhTWW+qo7UzQKf0JEB IeYJUABDkRscwMBIuBHUuGva/AcWLJDhneL4o1HT9PdE0AOV95HGrsMyRimsRKwkaGsQWaeQV KvaX2ed1GXmTz3tm9L9mLpG9WjwppyuIlmIEj65a9UiWneapgQ9EbFDCmQCup9wp41WrWp0rb YOfptK0SBC70VYLR/HP884+Yz0ky6X5qhtR5k3kU3Ut65pNHmL2WOmLNMfBYZSV0ti4ojZ0/a eZFSZFm5CaZ9mWmshMo3/GS5GpCsvRi4jypzBfWayjq8gRDR2P8FpGf3EPamAEhyIozk1qq4O qvGAbzV5X3OyPvLpxEcMl8VKtwO6kwtUZ3wgm8c8MZH75NR181X8XXpz7Hnmi3S7lp2ALIxlO 6CHP6Wn6JUyDjVd2pM3mZIJvTjWGZQwgbhguynG0rez96sVf2xy/wSVGMmMa3+fQ0mWYdQrVr VAdzn3lfiQhSvYUSlJwVMrUjuw1nDGktZ/H1aMR0vArOh8Y4YLfGU+fLzzU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, [add Sebastian] > Eric Anholt hat am 30. November 2018 um 21:27 geschrieben: > > > This binding supersedes the bcm2835-pm-wdt binding which only covered > enough to provide a watchdog, but the HW block is actually mostly > about power domains. > > Signed-off-by: Eric Anholt > --- > .../bindings/soc/bcm/brcm,bcm2835-pm.txt | 42 +++++++++++++++++++ > 1 file changed, 42 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt > > diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt > new file mode 100644 > index 000000000000..7818d33a158f > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt > @@ -0,0 +1,42 @@ > +BCM2835 PM (Power domains, watchdog) > + > +The PM block controls power domains and some reset lines, and includes > +a watchdog timer. This binding supersedes the brcm,bcm2835-pm-wdt > +binding which covered some of PM's register range and functionality. > + > +Required properties: > + > +- compatible: Should be "brcm,bcm2835-pm" > +- reg: Specifies base physical address and size of the two > + register ranges ("PM" and "ASYNC_BRIDGE" in that > + order) > +- clocks: a) v3d: The V3D clock from CPRMAN > + b) peri_image: The PERI_IMAGE clock from CPRMAN > + c) h264: The H264 clock from CPRMAN > + d) isp: The ISP clock from CPRMAN > +- #reset-cells: Should be 1. This property follows the reset controller > + bindings[1]. > +- #power-domain-cells: Should be 1. This property follows the power domain > + bindings[2]. > + > +Optional properties: > + > +- timeout-sec: Contains the watchdog timeout in seconds > + > +[1] Documentation/devicetree/bindings/reset/reset.txt > +[2] Documentation/devicetree/bindings/power/power_domain.txt > + sorry for my late reply. I hope we can take the opportunity of a new binding to fix an old issue of the bcm2835-wdt driver. The watchdog driver sets the pm_power_off callback without checking for "system-power-controller" property [3]. As a result we can't use another poweroff controller like e.g. gpio-poweroff. In downstream this has been workarounded by an additional devicetree property for the gpio-poweroff driver [4]. But this isn't the right way because the issue is in the bcm2835 watchdog driver not in all the other reset controller. Suggested pseudo code: if (!pm_power_off) { /* Preserve the old behavior of watchdog driver in case of old DTB */ if (!of_device_is_compatible(dev->of.node, "brcm,bcm2835-pm") || of_device_is_system_power_controller(dev->of.node)) pm_power_off = bcm2835_power_off; } Best regards Stefan [3] - https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/power/power-controller.txt [4] - https://github.com/raspberrypi/linux/commit/f86dcfac0a4e478fee40b5a3729ff1b159ae91ee