From patchwork Wed May 16 13:37:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10403965 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 5329F60155 for ; Wed, 16 May 2018 13:39:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F69028979 for ; Wed, 16 May 2018 13:39:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 309A32897C; Wed, 16 May 2018 13:39:01 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76DF328973 for ; Wed, 16 May 2018 13:39:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752657AbeEPNi7 (ORCPT ); Wed, 16 May 2018 09:38:59 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:42003 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358AbeEPNi4 (ORCPT ); Wed, 16 May 2018 09:38:56 -0400 Received: from localhost.localdomain ([37.4.249.136]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MANKs-1f8TIE2JOU-00BZ1Z; Wed, 16 May 2018 15:37:40 +0200 From: Stefan Wahren To: Rob Herring , Mark Rutland , Jean Delvare , Guenter Roeck , Eric Anholt Cc: Florian Fainelli , Ray Jui , Scott Branden , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, Stefan Wahren Subject: [PATCH RFC 2/6] dt-bindings: hwmon: Add Raspberry Pi voltage sensor Date: Wed, 16 May 2018 15:37:03 +0200 Message-Id: <1526477827-10859-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526477827-10859-1-git-send-email-stefan.wahren@i2se.com> References: <1526477827-10859-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:hsykWWrWIRPNNWVIXS+cFExAq04vy31+iu5jPwfeimgh5swSsmJ BVRCvh+dHYDsF4iHULeTgfPx6aG1hL8QfVqMx9pt5+giIr5owubcKm9BBKphQ9GfNpBkG9f 3d8q1WrEYxuE1AHAfYlnD/K9I3usyirL/AoPxv+mOZXdkWBqJ8IANw62Y4bVnJxRJGJAGSZ 4dBLZi6wIwQ/cZXT+OKfw== X-UI-Out-Filterresults: notjunk:1; V01:K0:662I8MO+bMg=:o0LLyzXv7qTRUfbbyPcoAi oRsTuP9w0iljcsDPz+AM1S6OUzWa3tRGjC3XKHULiP5mtJbO5fDbcEFLD104WafQvYZ428OuY zw4z09FpkjZ2DMFJMwrjPErCpJjhz8J8Rgy/dvjR5HXFTFRcSAPsEt0lJfSf4nxsdwQUk1vhV gLTXYRa4U3D/JS5vvIpMCSZIsP9AsjSZbzpdnUh9T0s5eoqi2RMNSzKcn5yS0CZCrNcRZklfN qFJaLI59p+LovXOd+sYTFL8n7xWgF/xHb7UaeXgxPzXnI4w0kg6nGMjU1y8CE/Zh7PwCAt0zu tDfVtL+tCKSopRCCsgWtpocfNgTUXj0VPSl4OI5rdmqgAQ+tOSB7AjmDiiXiR4XqBrw2JhFkF RAYHAkqVmYohSpmQds7l8cYgUbUz6dDFMc7/xfSwqDL1wTgwjsSkMgtfx60B81/pPIof7jWBJ GQe82Eyf2S1ub3ZdCoagvg4WrdeRXu3j2wrLjBYJu/pu9jRRtORcXGHFSQWbDUWRtEM3U8PoA 3cEOOu4JU6JwuV8NOmtNpJCAT/BQ51ByVQGeViksIASLj5xYS5JFENxd6+JvfTbzJ+V9ScybF nppreYNu1p5PTkjVmx99dyJdN+UUUyDWB5iBc9OFr2k6z29HPp2CBSztORA7EK3KiMOI4F8pe c4H96s76Rva07U6C584YJO0W2aKv57tdTa8ytImjoi3Dopg3pQOCubegvjpVSKXUBFtA= Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Recent VC4 firmware provides a hardware-independent way to retrieve the under-voltage sensor on the following Raspberry Pi boards: - Raspberry Pi B+ (via GPIO on SoC) - Raspberry Pi A+ (via GPIO on SoC) - Raspberry Pi 2 B (via GPIO on SoC) - Raspberry Pi 3 B (via GPIO on port expander) - Raspberry Pi 3 B+ (via PMIC) TODO: - try to make bcm2835 firmware a bus driver Signed-off-by: Stefan Wahren --- .../devicetree/bindings/hwmon/raspberrypi-hwmon.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/raspberrypi-hwmon.txt diff --git a/Documentation/devicetree/bindings/hwmon/raspberrypi-hwmon.txt b/Documentation/devicetree/bindings/hwmon/raspberrypi-hwmon.txt new file mode 100644 index 0000000..ec2523f --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/raspberrypi-hwmon.txt @@ -0,0 +1,19 @@ +Raspberry Pi voltage sensor +--------------------------- + +The VC4 firmware exposes a mailbox interface that allows the ARM core +to access the board's voltage sensor. + +Required properties : +- compatible : Should be "raspberrypi,bcm2835-hwmon" + +Example: + +firmware: firmware-rpi { + compatible = "raspberrypi,bcm2835-firmware"; + mboxes = <&mailbox>; + + voltage-sensor { + compatible = "raspberrypi,bcm2835-hwmon"; + }; +};