You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/asciidoc/computers/configuration/uart.adoc
+39-25Lines changed: 39 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ All UARTs on the Raspberry Pi are 3.3V only - damage will occur if they are conn
6
6
7
7
=== Raspberry Pi 5
8
8
9
-
On the Raspberry Pi 5, the primary UART is the mini UART port. The Raspberry Pi 5 also has an additional four PL011s, which are disabled by default:
9
+
The Raspberry Pi 5 has an additional four PL011s, which are disabled by default:
10
10
11
11
|===
12
12
| Name | Type
@@ -15,7 +15,7 @@ On the Raspberry Pi 5, the primary UART is the mini UART port. The Raspberry Pi
15
15
| PL011
16
16
17
17
| UART1
18
-
| mini UART
18
+
| PL011
19
19
20
20
| UART2
21
21
| PL011
@@ -26,8 +26,6 @@ On the Raspberry Pi 5, the primary UART is the mini UART port. The Raspberry Pi
26
26
| UART4
27
27
| PL011
28
28
29
-
| UART5
30
-
| PL011
31
29
|===
32
30
33
31
=== Raspberry Pi Zero, 1, 2 and 3
@@ -93,43 +91,49 @@ The secondary UART is not normally present on the GPIO connector. By default, th
93
91
The following table summarises the assignment of the first two UARTs:
94
92
95
93
|===
96
-
| Model | first PL011 (UART0) | mini UART
94
+
| Model | Primary | Secondary | Bluetooth
97
95
98
96
| Raspberry Pi Zero
99
-
| primary
100
-
| secondary
97
+
| UART0
98
+
| UART1
99
+
| -
101
100
102
101
| Raspberry Pi Zero W / Raspberry Pi Zero 2 W
103
-
| secondary (Bluetooth)
104
-
| primary
102
+
| UART1
103
+
| UART0
104
+
| UART1
105
105
106
106
| Raspberry Pi 1
107
-
| primary
108
-
| secondary
107
+
| UART0
108
+
| UART1
109
+
| -
109
110
110
111
| Raspberry Pi 2
111
-
| primary
112
-
| secondary
112
+
| UART0
113
+
| UART1
114
+
| -
113
115
114
116
| Raspberry Pi 3
115
-
| secondary (Bluetooth)
116
-
| primary
117
+
| UART1
118
+
| UART0
119
+
| UART1
117
120
118
121
| Compute Module 3 & 3+
119
-
| primary
120
-
| secondary
122
+
| UART0
123
+
| UART1
124
+
| -
121
125
122
126
| Raspberry Pi 4
123
-
| secondary (Bluetooth)
124
-
| primary
127
+
| UART1
128
+
| UART0
129
+
| UART1
125
130
126
131
| Raspberry Pi 5
127
-
| secondary (Bluetooth)
128
-
| primary
132
+
| UART1
133
+
| UART0
134
+
| -
129
135
|===
130
136
131
-
NOTE: The mini UART is disabled by default, whether it is designated primary or secondary UART.
132
-
133
137
Linux devices on Raspberry Pi OS:
134
138
135
139
|===
@@ -150,15 +154,19 @@ Linux devices on Raspberry Pi OS:
150
154
151
155
`/dev/serial0` and `/dev/serial1` are symbolic links which point to either `/dev/ttyS0` or `/dev/ttyAMA0`.
152
156
153
-
On the Raspberry Pi 5 `serial0` maps by default to `/dev/ttyAMA10`. Due to changes in Bookworm, `/dev/serial1` does not exist by default. You can enable `serial1` by setting the following values in `confix.txt`:
157
+
On the Raspberry Pi 5, `/dev/serial0` is a symbolic link that points to `/dev/ttyAMA10`. Due to changes in Bookworm, `/dev/serial1` does not exist by default on the Raspberry Pi 5. You can enable `serial1` by setting the following values in `confix.txt`:
154
158
155
159
[source,bash]
156
160
----
157
161
dtparam=krnbt=off
158
162
----
159
163
164
+
TIP: This option may not work on all models in the future.
165
+
160
166
=== Mini-UART and CPU Core Frequency
161
167
168
+
NOTE: The mini UART is disabled by default if it is the primary or when Bluetooth is disabled.
169
+
162
170
In order to use the mini UART, you need to configure the Raspberry Pi to use a fixed VPU core clock frequency. This is because the mini UART clock is linked to the VPU core clock, so that when the core clock frequency changes, the UART baud rate will also change. The `enable_uart` and `core_freq` settings can be added to `config.txt` to change the behaviour of the mini UART. The following table summarises the possible combinations:
163
171
164
172
|===
@@ -208,7 +216,13 @@ By default, the primary UART is assigned to the Linux console. If you wish to us
208
216
209
217
Although the Linux kernel starts the UARTs relatively early in the boot process, it is still long after some critical bits of infrastructure have been set up. A failure in those early stages can be hard to diagnose without access to the kernel log messages from that time. To enable `earlycon` support for one of the UARTs, add one of the following options to `cmdline.txt`, depending on which UART is the primary:
210
218
211
-
For Raspberry Pi 5, 4, 400 and Compute Module 4:
219
+
For Raspberry Pi 5, `earlycon` output only appears on the 3-pin debug connector with the following configuration:
0 commit comments