From patchwork Tue Jan 12 11:29:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 8016351 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 79ACABEEE5 for ; Tue, 12 Jan 2016 11:30:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97BA0203C2 for ; Tue, 12 Jan 2016 11:30:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A10D820390 for ; Tue, 12 Jan 2016 11:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933724AbcALLa3 (ORCPT ); Tue, 12 Jan 2016 06:30:29 -0500 Received: from regular2.263xmail.com ([211.157.152.3]:57806 "EHLO regular2.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933632AbcALLa2 (ORCPT ); Tue, 12 Jan 2016 06:30:28 -0500 Received: from regular1.263xmail.com (unknown [192.168.165.232]) by regular2.263xmail.com (Postfix) with ESMTP id 43C681E1C4 for ; Tue, 12 Jan 2016 19:30:19 +0800 (CST) Received: from andy.yan?rock-chips.com (unknown [192.168.167.129]) by regular1.263xmail.com (Postfix) with SMTP id 1FE47918A; Tue, 12 Jan 2016 19:30:12 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id C396C12849; Tue, 12 Jan 2016 19:30:07 +0800 (CST) X-RL-SENDER: andy.yan@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 121.15.173.1 X-LOGIN-NAME: andy.yan@rock-chips.com X-UNIQUE-TAG: <9b7bad239b9ad43838e2b6259716c4da> X-ATTACHMENT-NUM: 0 X-SENDER: yxj@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [121.15.173.1]) by smtp.263.net (Postfix) whith ESMTP id 5090OC7XLC; Tue, 12 Jan 2016 19:30:10 +0800 (CST) From: Andy Yan To: heiko@sntech.de, arnd@arndb.de, john.stultz@linaro.org Cc: linux@roeck-us.net, galak@codeaurora.org, ijc+devicetree@hellion.org.uk, robh+dt@kernel.org, catalin.marinas@arm.com, geert+renesas@glider.be, sre@kernel.org, olof@lixom.net, dbaryshkov@gmail.com, alexandre.belloni@free-electrons.com, jun.nie@linaro.org, pawel.moll@arm.com, f.fainelli@gmail.com, will.deacon@arm.com, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, lorenzo.pieralisi@arm.com, moritz.fischer@ettus.com, cernekee@gmail.com, linux-kernel@vger.kernel.org, dwmw2@infradead.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, Andy Yan Subject: [PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver Date: Tue, 12 Jan 2016 19:29:49 +0800 Message-Id: <1452598189-8272-1-git-send-email-andy.yan@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452598029-8222-1-git-send-email-andy.yan@rock-chips.com> References: <1452598029-8222-1-git-send-email-andy.yan@rock-chips.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP add device tree binding document for reboot-mode driver Signed-off-by: Andy Yan --- Changes in v2: None Changes in v1: None .../bindings/power/reset/reboot-mode.txt | 41 +++++++++++++++++ .../bindings/power/reset/syscon-reboot-mode.txt | 52 ++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/reboot-mode.txt create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt new file mode 100644 index 0000000..81d9f66 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt @@ -0,0 +1,41 @@ +Generic reboot mode core map driver + +This driver get reboot mode arguments and call the write +interface to stores the magic value in special register +or ram . Then the bootloader can read it and take different +action according to the argument stored. + +Required properties: +- compatible: only support "syscon-reboot-mode" now. + +Each mode is represented as a sub-node of reboot_mode: + +Subnode required properties: +- linux,mode: reboot mode command,such as "loader", "recovery", "fastboot". +- loader,magic: magic number for the mode, this is vendor specific. + +Example: + reboot_mode { + compatible = "syscon-reboot-mode"; + offset = <0x40>; + + loader { + linux,mode = "loader"; + loader,magic = ; + }; + + maskrom { + linux,mode = "maskrom"; + loader,magic = ; + }; + + recovery { + linux,mode = "recovery"; + loader,magic = ; + }; + + fastboot { + linux,mode = "fastboot"; + loader,magic = ; + }; + }; diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt new file mode 100644 index 0000000..6bce7dd --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt @@ -0,0 +1,52 @@ +SYSCON reboot mode driver + +This driver get reboot mode magic value form reboot-mode driver +and stores it in a SYSCON mapped register. Then the bootloader +can read it and take different action according to the magic +value stored. + +This DT node should be represented as a sub-node of a "syscon", "simple-mfd" +node. + +Required properties: +- compatible: should be "syscon-reboot-mode" +- offset: offset in the register map for the storage register (in bytes) + +The rest of the properties should follow the generic reboot-mode discription +found in reboot-mode.txt + +Example: + pmu: pmu@20004000 { + compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd"; + reg = <0x20004000 0x100>; + + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x40>; + + normal { + linux,mode = "normal"; + loader,magic = ; + }; + + loader { + linux,mode = "loader"; + loader,magic = ; + }; + + maskrom { + linux,mode = "maskrom"; + loader,magic = ; + }; + + recovery { + linux,mode = "recovery"; + loader,magic = ; + }; + + fastboot { + linux,mode = "fastboot"; + loader,magic = ; + }; + }; + };