[U-Boot] [PATCH v5 07/14] sandbox: dts: Add a serial console node
Simon Glass
sjg at chromium.org
Fri Sep 5 00:27:29 CEST 2014
If the sandbox device tree is provided to U-Boot (with the -d flag) then it
will use the device tree version in preference to the built-in device. The
only difference is the colour.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v5:
- Use /chosen/stdout-path instead of /aliases/console to specify the console
Changes in v4:
- Add a binding for sandbox serial
- Remove pre-reloc fdt property
Changes in v3:
- Change pre-reloc fdt property to 'u-boot,dm-pre-reloc'
Changes in v2: None
arch/sandbox/dts/sandbox.dts | 10 ++++++++++
doc/device-tree-bindings/serial/sandbox-serial.txt | 13 +++++++++++++
2 files changed, 23 insertions(+)
create mode 100644 doc/device-tree-bindings/serial/sandbox-serial.txt
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index efffacb..797478a 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -1,6 +1,16 @@
/dts-v1/;
/ {
+ chosen {
+ stdout-path = "/serial";
+ };
+
+ /* Needs to be available prior to relocation */
+ uart0: serial {
+ compatible = "sandbox,serial";
+ sandbox,text-colour = "cyan";
+ };
+
triangle {
compatible = "demo-shape";
colour = "cyan";
diff --git a/doc/device-tree-bindings/serial/sandbox-serial.txt b/doc/device-tree-bindings/serial/sandbox-serial.txt
new file mode 100644
index 0000000..f429c90
--- /dev/null
+++ b/doc/device-tree-bindings/serial/sandbox-serial.txt
@@ -0,0 +1,13 @@
+Sandbox serial
+
+The sandbox serial device is an emulated device which displays its output
+on the host machine's console, and accepts input from its keyboard.
+
+Required properties:
+ compatible: "sandbox,serial"
+
+Optional properties:
+ sandbox,text-colour: If present, this is the colour of the console text.
+ Supported values are:
+ "black", "red", "green", "yellow", "blue", "megenta", "cyan",
+ "white"
--
2.1.0.rc2.206.gedb03e5
More information about the U-Boot
mailing list