From: Evgeny Kolesnikov <evgenyz@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Evgeny Kolesnikov <evgenyz@gmail.com>,
Sebastian Reichel <sre@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] power: reset: Add UART-based MCU restart DT bindings
Date: Mon, 22 Jul 2019 21:53:02 +0200 [thread overview]
Message-ID: <98b32aebe39a7b6b3ace1c2ef6f51428e8284946.1563822216.git.evgenyz@gmail.com> (raw)
In-Reply-To: <cover.1563822216.git.evgenyz@gmail.com>
This adds device tree bindings of the restart driver
for power managing micro controller units that are connected
to a board via the UART interface.
Signed-off-by: Evgeny Kolesnikov <evgenyz@gmail.com>
---
.../bindings/power/reset/uart-restart.txt | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/reset/uart-restart.txt
diff --git a/Documentation/devicetree/bindings/power/reset/uart-restart.txt b/Documentation/devicetree/bindings/power/reset/uart-restart.txt
new file mode 100644
index 000000000000..bf831d9bdff8
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/uart-restart.txt
@@ -0,0 +1,39 @@
+* UART-based PM MCU restart driver
+
+Some devices have a microcontroller controlling the main power
+supply. This microcontroller is connected to UART of the SoC.
+Sending a sequence of characters tells the MCU to reset the SoC
+and/or MCU itself.
+
+The length of the sequence, baud rate and the timeout to process
+the command may vary from device to device.
+
+This driver could be used for WD My Cloud (Marvell SoCs), QNAP
+(Kirkwood and Orion5x SoCs) and Synology NAS devices.
+
+Required properties:
+- compatible: Should be "uart-restart"
+- reg: Address and length of the register set for UART
+- clocks: The tclk clock
+- cmd: Array of bytes, the command to send to the MCU
+- baud: Baud rate [75..460800]
+
+Optional properties:
+- byte-delay: A delay after each byte of a command, could be useful
+ for sloppy MCUs [ms], default value is 5
+- timeout: A timeout to wait for the MCU to process the command [ms],
+ default value is 1000
+- override: Boolean flag that indicates if the driver should
+ prioritize itself over any existing restart driver,
+ default behaviour is not to interfere
+
+Example:
+ restart@12100 {
+ compatible = "uart-restart";
+ reg = <0x12100 0x100>;
+ clocks = <&coreclk 0>;
+ baud = <19200>;
+ cmd = [fa 03 03 02 00 00 fb];
+ override;
+ status = "okay";
+ };
--
2.21.0
next prev parent reply other threads:[~2019-07-22 19:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 19:53 [PATCH 0/5] Add support for WD MyCloud EX2 Ultra (+ versatile UART-based restart/poweroff drivers) Evgeny Kolesnikov
2019-07-22 19:53 ` [PATCH 1/5] power: reset: Add UART-based MCU poweroff DT bindings Evgeny Kolesnikov
2019-08-12 23:50 ` Rob Herring
2019-07-22 19:53 ` Evgeny Kolesnikov [this message]
2019-07-22 19:53 ` [PATCH 3/5] power/reset: Add a power off driver for UART-based PM MCUs Evgeny Kolesnikov
2019-07-22 19:53 ` [PATCH 4/5] power/reset: Add a restart " Evgeny Kolesnikov
2019-07-22 19:53 ` [PATCH 5/5] ARM: dts: armada385-wd-mcex2u: Add DTS file for WD My Cloud EX2 Ultra Evgeny Kolesnikov
2019-07-23 13:48 ` Andrew Lunn
2019-07-23 1:56 ` [PATCH 0/5] Add support for WD MyCloud EX2 Ultra (+ versatile UART-based restart/poweroff drivers) Andrew Lunn
2019-07-23 17:48 ` Evgeny Kolesnikov
2019-07-23 22:06 ` Andrew Lunn
2019-07-28 13:20 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98b32aebe39a7b6b3ace1c2ef6f51428e8284946.1563822216.git.evgenyz@gmail.com \
--to=evgenyz@gmail.com \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).