Commit graph

17 commits

Author SHA1 Message Date
Yong Cong Sin 0291c551a2 drivers: use DT_INST_NODE_HAS_COMPAT
Replace occurances of:

  DT_NODE_HAS_COMPAT\(DT_DRV_INST\((.*)\), (.*)\)

With:

  DT_INST_NODE_HAS_COMPAT($1, $2)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-26 20:04:38 +01:00
Mykola Kvach 448466a970 drivers: serial: add support of hscif driver for RCar boards
Add support of HSCIF UART driver for Renesas boards.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-02-26 11:34:16 +00:00
Mykola Kvach bc90724de4 drivers: serial: uart_rcar: fix reading of SCFRDR register
Fix the read size of the SCFRDR register, which has an 8-bit size
for both Gen3 and Gen4 boards.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-01-11 10:04:27 +01:00
Mykola Kvach cb9d1607b3 drivers: uart_rcar: do MMIO mapping inside driver
Add MMIO mapping for UART Renesas driver in order to avoid
mappings inside mmu_regions.c file(s).

There are a lot of changes inside SCIF driver inside this
commit, because reg addr and size may be stored in RAM or
ROM and appropriately in different driver structures data
or cfg, and, because the name of field reg base is changed.

Note: it is common approach according to Zephyr documentation.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-11 11:17:41 +02:00
Pieter De Gendt 6b532ff43e treewide: Update clock control API usage
Replace all (clock_control_subsys_t *) casts with (clock_control_subsys_t)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-05 10:55:46 +02:00
Gerard Marull-Paretas acc8cb4bc8 include: add missing irq.h include
Some modules use the IRQ API without including the necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Henrik Brix Andersen 9456eca5c0 drivers: serial: check if clock device is ready before accessing
Add check for device_is_ready() before accessing clock control devices.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-09 17:16:16 +02:00
Aymeric Aillet 9a7040303a drivers: clock: rcar: Rename global includes file
Rename r-car clock driver global include file
in order to match other files names.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-06-28 18:11:44 +02:00
Gerard Marull-Paretas fb60aab245 drivers: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:21 +02:00
Aymeric Aillet e3621e6e00 drivers: serial: rcar: drop DEV_DATA/DEV_CFG usage
Stop using redundant DEV_DATA/DEV_CFG macros and use dev->data and
dev->config instead.
Follows #41918.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-02-21 20:49:41 -05:00
Aymeric Aillet 37f5fe5e82 drivers: serial: RCar add pinctrl support
Get pin configuration from device tree to
set alternate pin function.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-01-18 13:04:53 -05:00
Daniel Leung bff37a3a6c drivers: serial: remove @return doc for void functions
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-12 16:02:16 -05:00
Maureen Helm ad1450510a drivers: serial: Refactor drivers to use shared init priority Kconfig
Refactors all of the serial drivers to use a shared driver class
initialization priority configuration, CONFIG_SERIAL_INIT_PRIORITY, to
allow configuring serial drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The one
exception is uart_lpc11u6x.c which previously used
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS.

This change was motivated by an issue on the frdm_k64f board where the
serial driver was incorrectly initialized before the clock control
driver.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-17 10:58:09 -04:00
Aymeric Aillet 54c481980e drivers: uart: Add "Interrupt driven" to R-Car
This commit add the support of "Interrupt driven UART"
to the R-Car UART driver and enable it in the related
Kconfig.

The driver is supporting nearly all the methods that are
described in the "Interrupt driven UART" part of the
uart_driver_api.

This new version of the driver has been tested on
H3ULCB board by running "uart_basic_api" test suite.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-07-13 09:42:22 -04:00
Aymeric Aillet de2e14177b drivers: uart: rcar: Fix typo in conf phase
Fix typo in configuration phase to prepare the driver
for incoming add of Interrupt driven uart mode.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-06-15 20:13:55 -05:00
Daniel Leung 4e1692f85a serial: introduce CONFIG_UART_USE_RUNTIME_CONFIGURE
This kconfig option enables runtime configuration of UART
controllers. This allows application to call uart_configure()
to configure the UART controllers and calling uart_config_get()
to retrieve configuration. If this is disabled, UART controllers
rely on UART driver's initialization function to properly
configure the controller. The main use of this option is mainly
code size reduction.

Fixes #16231

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-06-07 12:09:01 +02:00
Aymeric Aillet c5a057bc63 drivers: serial: add Renesas R-Car driver
This patch add support for polling based UART
on the Renesas R-Car SCIF (Serial Communication Interface
with FIFO)

This hardware block can be found on various Renesas R-Car
SoC series.

It allows to get console on R-Car Gen3 H3ULCB board.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-05-07 13:08:48 +02:00