Skip to content

Commit 92e723d

Browse files
AlessandroLuokartben
authored andcommitted
dts: uart: create ambiq uart binding file
This commit creates ambiq uart new binding file and renamed the previous one as ambiq,pl011-uart Signed-off-by: Hao Luo <hluo@ambiq.com>
1 parent be4d8b2 commit 92e723d

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

drivers/serial/uart_pl011_ambiq.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,16 @@ static int uart_ambiq_pm_action(const struct device *dev, enum pm_device_action
168168
}
169169
#endif /* CONFIG_PM_DEVICE */
170170

171-
#define AMBIQ_UART_DEFINE(n) \
171+
#define AMBIQ_PL011_UART_DEFINE(n) \
172172
PM_DEVICE_DT_INST_DEFINE(n, uart_ambiq_pm_action); \
173-
static int pwr_on_ambiq_uart_##n(void) \
173+
static int pwr_on_ambiq_pl011_uart_##n(void) \
174174
{ \
175175
uint32_t module = (DT_INST_REG_ADDR(n) - UART0_BASE) / (UART1_BASE - UART0_BASE); \
176176
am_hal_pwrctrl_periph_e eUARTPowerModule = \
177177
((am_hal_pwrctrl_periph_e)(AM_HAL_PWRCTRL_PERIPH_UART0 + module)); \
178178
return am_hal_pwrctrl_periph_enable(eUARTPowerModule); \
179179
} \
180-
static inline int clk_enable_ambiq_uart_##n(const struct device *dev, uint32_t clk) \
180+
static inline int clk_enable_ambiq_pl011_uart_##n(const struct device *dev, uint32_t clk) \
181181
{ \
182182
return clk_enable_ambiq_uart(dev, clk); \
183183
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2023 Antmicro <www.antmicro.com>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Ambiq UART controller (PL011 compatible)
5+
6+
compatible: "ambiq,pl011-uart"
7+
8+
include: ["arm,pl011.yaml", pinctrl-device.yaml]
9+
10+
properties:
11+
pinctrl-0:
12+
required: true
13+
14+
pinctrl-names:
15+
required: true

dts/bindings/serial/ambiq,uart.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1-
# Copyright (c) 2023 Antmicro <www.antmicro.com>
1+
# Copyright (c) 2025, Ambiq Micro Inc. <www.ambiq.com>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
description: Ambiq UART controller (PL011 compatible)
4+
description: Ambiq UART controller
55

66
compatible: "ambiq,uart"
77

8-
include: ["arm,pl011.yaml", pinctrl-device.yaml]
8+
include: [uart-controller.yaml, pinctrl-device.yaml]
99

1010
properties:
11+
reg:
12+
required: true
13+
14+
interrupts:
15+
required: true
16+
1117
pinctrl-0:
1218
required: true
1319

1420
pinctrl-names:
1521
required: true
22+
23+
clk-src:
24+
type: int
25+
default: 0
26+
description: |
27+
Set the UART clock source, apollo510 only
28+
0x0 - HFRC
29+
0x1 - SYSPLL

0 commit comments

Comments
 (0)