drivers: serial: sedi: add new dts attri peripheral-id

It's used to pass right device index to hal_intel module.
DT_INST_FOREACH_STATUS_OKAY() does not guarantee the node ordering.

Signed-off-by: Dong D Wang <dong.d.wang@intel.com>
This commit is contained in:
Dong D Wang 2023-07-29 09:06:40 +08:00 committed by Anas Nashif
commit c896e1ed15
3 changed files with 8 additions and 1 deletions

View file

@ -3,6 +3,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/drivers/uart.h>
@ -61,7 +62,7 @@ static void uart_sedi_cb(struct device *port);
static K_SEM_DEFINE(uart_##n##_sync_read_sem, 0, 1); \
static const struct uart_sedi_config_info config_info_##n = { \
DEVICE_MMIO_ROM_INIT(DT_DRV_INST(n)), \
.instance = SEDI_UART_##n, \
.instance = DT_INST_PROP(n, peripheral_id), \
.baud_rate = DT_INST_PROP(n, current_speed), \
UART_CONFIG_FLOW_CTRL_SET(n), \
UART_CONFIG_LINE_CTRL_SET, \

View file

@ -14,3 +14,8 @@ properties:
interrupts:
required: true
peripheral-id:
type: int
description: peripheral ID
required: true

View file

@ -55,6 +55,7 @@
reg = <0x08100000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <23 IRQ_TYPE_LOWEST_EDGE_RISING 6>;
peripheral-id = <0>;
current-speed = <115200>;
status = "okay";
};