219 lines
7.2 KiB
Diff
219 lines
7.2 KiB
Diff
|
From 2e389dcfa50b977f6094ee1c5149bb0d9062781d Mon Sep 17 00:00:00 2001
|
||
|
From: stephen <stephen@vamrs.com>
|
||
|
Date: Tue, 19 Mar 2019 20:39:05 +0800
|
||
|
Subject: [PATCH 40/97] arm64: overlays: modify the method of controlling the
|
||
|
console
|
||
|
|
||
|
By default, disables the fiq debugger console.
|
||
|
|
||
|
Signed-off-by: stephen <stephen@vamrs.com>
|
||
|
---
|
||
|
.../arm64/boot/dts/rockchip/overlays/Makefile | 4 +--
|
||
|
arch/arm64/boot/dts/rockchip/overlays/README | 33 +++++++++----------
|
||
|
.../overlays/console-disabled-overlay.dts | 16 ---------
|
||
|
.../overlays/console-on-ttyS2-overlay.dts | 32 ++++++++++++++++++
|
||
|
.../overlays/console-on-ttyS4-overlay.dts | 32 ++++++++++++++++++
|
||
|
.../overlays/console-on-uart4-overlay.dts | 32 ------------------
|
||
|
.../boot/dts/rockchip/rockpi-4b-linux.dts | 1 +
|
||
|
7 files changed, 83 insertions(+), 67 deletions(-)
|
||
|
delete mode 100644 arch/arm64/boot/dts/rockchip/overlays/console-disabled-overlay.dts
|
||
|
create mode 100644 arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS2-overlay.dts
|
||
|
create mode 100644 arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS4-overlay.dts
|
||
|
delete mode 100644 arch/arm64/boot/dts/rockchip/overlays/console-on-uart4-overlay.dts
|
||
|
|
||
|
diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile
|
||
|
index 0c691d2237af..50115840f972 100644
|
||
|
--- a/arch/arm64/boot/dts/rockchip/overlays/Makefile
|
||
|
+++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile
|
||
|
@@ -1,8 +1,8 @@
|
||
|
# Overlays for the ROCK Pi platform
|
||
|
|
||
|
dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||
|
- console-on-uart4.dtbo \
|
||
|
- console-disabled.dtbo \
|
||
|
+ console-on-ttyS4.dtbo \
|
||
|
+ console-on-ttyS2.dtbo \
|
||
|
two-color-led.dtbo \
|
||
|
at24c02.dtbo \
|
||
|
devspi.dtbo
|
||
|
diff --git a/arch/arm64/boot/dts/rockchip/overlays/README b/arch/arm64/boot/dts/rockchip/overlays/README
|
||
|
index 5f9ee4ed12e4..1d89601a6846 100644
|
||
|
--- a/arch/arm64/boot/dts/rockchip/overlays/README
|
||
|
+++ b/arch/arm64/boot/dts/rockchip/overlays/README
|
||
|
@@ -120,20 +120,19 @@ Info: Overlay for activation of two color led module.
|
||
|
Load: intfc:dtoverlay=two-color-led
|
||
|
|
||
|
|
||
|
-Name: console-disabled
|
||
|
-Info: Overlay for disabling fiq debugger console.
|
||
|
- When this dtbo file is not loaded, Rock Pi enables fiq debugger console
|
||
|
- by default. And UART2DBG Pins will output console information.
|
||
|
- When this dtbo is loaded, Rock Pi disables fiq debugger console and
|
||
|
- UART2DBG pins do not output console information. What's more,
|
||
|
- UART2DBG pins can be used for serial communication if UART2 is enabled.
|
||
|
-Load: intfc:dtoverlay=console-disabled
|
||
|
-
|
||
|
-
|
||
|
-Name: console-on-uart4
|
||
|
-Info: Overlay for setting uart4 pins as fiq debugger console pins. With this
|
||
|
- dtbo loaded, UART4 pins output console information after kernel is
|
||
|
- booted. Note that at the same time, Rock Pi cannot work with other
|
||
|
- serial communication devices like UART Serial Bluetooth Module through
|
||
|
- UART4 (even though set "on" for BUS UART4).
|
||
|
-Load: intfc:dtoverlay=console-on-uart4
|
||
|
+Name: console-on-ttyS2
|
||
|
+Info: By default, fiq debugger console is disabled.
|
||
|
+ When this dtbo file is loaded, Rock Pi enables fiq debugger console.
|
||
|
+ ttyS2 Pins will output console information.
|
||
|
+ At the same time, it is recommended that you set UART2 to off in
|
||
|
+ file /boot/hw_intfc.conf and do not load console-on-ttyS4.dtbo file.
|
||
|
+Load: intfc:dtoverlay=console-on-ttyS2
|
||
|
+
|
||
|
+
|
||
|
+Name: console-on-ttyS4
|
||
|
+Info: By default, fiq debugger console is disabled.
|
||
|
+ When this dtbo file is loaded, Rock Pi enables fiq debugger console.
|
||
|
+ ttyS4 Pins will output console information.
|
||
|
+ At the same time, it is recommended that you set UART4 to off in
|
||
|
+ file /boot/hw_intfc.conf and do not load console-on-ttyS2.dtbo file.
|
||
|
+Load: intfc:dtoverlay=console-on-ttyS4
|
||
|
diff --git a/arch/arm64/boot/dts/rockchip/overlays/console-disabled-overlay.dts b/arch/arm64/boot/dts/rockchip/overlays/console-disabled-overlay.dts
|
||
|
deleted file mode 100644
|
||
|
index 59001bb2ac67..000000000000
|
||
|
--- a/arch/arm64/boot/dts/rockchip/overlays/console-disabled-overlay.dts
|
||
|
+++ /dev/null
|
||
|
@@ -1,16 +0,0 @@
|
||
|
-// Definitions for disabling ttyFIQ0 console
|
||
|
-/dts-v1/;
|
||
|
-/plugin/;
|
||
|
-
|
||
|
-/ {
|
||
|
- model = "ROCK PI 4B";
|
||
|
- compatible = "rockchip,rockpi","rockchip,rk3399";
|
||
|
-
|
||
|
- fragment@0 {
|
||
|
- target = <&fiq_debugger>;
|
||
|
-
|
||
|
- __overlay__ {
|
||
|
- status = "disabled";
|
||
|
- };
|
||
|
- };
|
||
|
-};
|
||
|
diff --git a/arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS2-overlay.dts b/arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS2-overlay.dts
|
||
|
new file mode 100644
|
||
|
index 000000000000..086e2219d6ac
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS2-overlay.dts
|
||
|
@@ -0,0 +1,32 @@
|
||
|
+// Definitions for setting uart4 pins as ttyFIQ0 console pins
|
||
|
+/dts-v1/;
|
||
|
+/plugin/;
|
||
|
+
|
||
|
+/ {
|
||
|
+ model = "ROCK PI 4B";
|
||
|
+ compatible = "rockchip,rockpi","rockchip,rk3399";
|
||
|
+
|
||
|
+ fragment@0 {
|
||
|
+ target = <&uart2>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ status = "disabled";
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ fragment@1 {
|
||
|
+ target = <&fiq_debugger>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ status = "okay";
|
||
|
+ compatible = "rockchip,fiq-debugger";
|
||
|
+ rockchip,serial-id = <2>;
|
||
|
+ rockchip,signal-irq = <182>;
|
||
|
+ rockchip,wake-irq = <0>;
|
||
|
+ rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */
|
||
|
+ rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&uart2c_xfer>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
diff --git a/arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS4-overlay.dts b/arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS4-overlay.dts
|
||
|
new file mode 100644
|
||
|
index 000000000000..f5549778c9f2
|
||
|
--- /dev/null
|
||
|
+++ b/arch/arm64/boot/dts/rockchip/overlays/console-on-ttyS4-overlay.dts
|
||
|
@@ -0,0 +1,32 @@
|
||
|
+// Definitions for setting uart4 pins as ttyFIQ0 console pins
|
||
|
+/dts-v1/;
|
||
|
+/plugin/;
|
||
|
+
|
||
|
+/ {
|
||
|
+ model = "ROCK PI 4B";
|
||
|
+ compatible = "rockchip,rockpi","rockchip,rk3399";
|
||
|
+
|
||
|
+ fragment@0 {
|
||
|
+ target = <&uart4>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ status = "disabled";
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+ fragment@1 {
|
||
|
+ target = <&fiq_debugger>;
|
||
|
+
|
||
|
+ __overlay__ {
|
||
|
+ status = "okay";
|
||
|
+ compatible = "rockchip,fiq-debugger";
|
||
|
+ rockchip,serial-id = <4>;
|
||
|
+ rockchip,signal-irq = <182>;
|
||
|
+ rockchip,wake-irq = <0>;
|
||
|
+ rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */
|
||
|
+ rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */
|
||
|
+ pinctrl-names = "default";
|
||
|
+ pinctrl-0 = <&uart4_xfer>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
diff --git a/arch/arm64/boot/dts/rockchip/overlays/console-on-uart4-overlay.dts b/arch/arm64/boot/dts/rockchip/overlays/console-on-uart4-overlay.dts
|
||
|
deleted file mode 100644
|
||
|
index 2ecafe7aa18b..000000000000
|
||
|
--- a/arch/arm64/boot/dts/rockchip/overlays/console-on-uart4-overlay.dts
|
||
|
+++ /dev/null
|
||
|
@@ -1,32 +0,0 @@
|
||
|
-// Definitions for setting uart4 pins as ttyFIQ0 console pins
|
||
|
-/dts-v1/;
|
||
|
-/plugin/;
|
||
|
-
|
||
|
-/ {
|
||
|
- model = "ROCK PI 4B";
|
||
|
- compatible = "rockchip,rockpi","rockchip,rk3399";
|
||
|
-
|
||
|
- fragment@0 {
|
||
|
- target = <&uart4>;
|
||
|
-
|
||
|
- __overlay__ {
|
||
|
- status = "disabled";
|
||
|
- };
|
||
|
- };
|
||
|
-
|
||
|
- fragment@1 {
|
||
|
- target = <&fiq_debugger>;
|
||
|
-
|
||
|
- __overlay__ {
|
||
|
- status = "okay";
|
||
|
- compatible = "rockchip,fiq-debugger";
|
||
|
- rockchip,serial-id = <4>;
|
||
|
- rockchip,signal-irq = <182>;
|
||
|
- rockchip,wake-irq = <0>;
|
||
|
- rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */
|
||
|
- rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */
|
||
|
- pinctrl-names = "default";
|
||
|
- pinctrl-0 = <&uart4_xfer>;
|
||
|
- };
|
||
|
- };
|
||
|
-};
|
||
|
--
|
||
|
2.25.1
|
||
|
|