-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: serial: uart_rtt converted to devicetree
Instantiate RTT UART instances from devicetree nodes instead of from Kconfig symbols. While RTT is implemented using software, not hardware, it is emulating a hardware device, and thus should be configured through devicetree. This allows the simulated UART device to be selected via devicetree aliases and chosen nodes. The following devicetree snippet will instantiate RTT channels 0 and 2 as UART devices. ``` / { rtt0: rtt_terminal { compatible = "segger,rtt-uart"; label = "rtt_terminal"; status = "okay"; }; rtt2: rtt_secondary { compatible = "segger,rtt-uart"; label = "rtt_app_specific"; status = "okay"; }; }; ``` Fixes the RTT portion of #10621. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
- Loading branch information
1 parent
742256f
commit 3e33d73
Showing
3 changed files
with
68 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) 2020, CSIRO. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
description: Segger RTT UART | ||
|
||
compatible: "segger,rtt-uart" | ||
|
||
include: uart-controller.yaml | ||
|
||
properties: | ||
tx-buffer-size: | ||
type: int | ||
default: 1024 | ||
description: | | ||
Size of the RTT up buffer for transmission | ||
Not used for RTT channel 0 as channel 0 is initialized at compile time, | ||
see SEGGER_RTT_BUFFER_SIZE_UP. | ||
required: false | ||
|
||
rx-buffer-size: | ||
type: int | ||
default: 16 | ||
description: | | ||
Size of the RTT down buffer for reception | ||
Not used for RTT channel 0 as channel 0 is initialized at compile time, | ||
see SEGGER_RTT_BUFFER_SIZE_DOWN. | ||
required: false |