[PATCH v2 0/8] xen/arm: Add support for S32CC platforms and LINFlexD UART

Andrei Cherechesu (OSS) posted 8 patches 5 days, 9 hours ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20240930114715.642978-1-andrei.cherechesu@oss.nxp.com
CHANGELOG.md                            |   4 +
MAINTAINERS                             |   8 +
SUPPORT.md                              |   8 +
xen/arch/arm/Kconfig                    |  10 +
xen/arch/arm/Kconfig.debug              |  12 +
xen/arch/arm/Makefile                   |   1 +
xen/arch/arm/arm64/debug-linflex.inc    |  58 ++++
xen/arch/arm/include/asm/linflex-uart.h |  63 ++++
xen/arch/arm/include/asm/scmi-smc.h     |  52 ++++
xen/arch/arm/platforms/Kconfig          |  11 +
xen/arch/arm/platforms/Makefile         |   1 +
xen/arch/arm/platforms/s32cc.c          |  32 ++
xen/arch/arm/scmi-smc.c                 | 163 ++++++++++
xen/arch/arm/vsmc.c                     |  19 +-
xen/drivers/char/Kconfig                |   8 +
xen/drivers/char/Makefile               |   1 +
xen/drivers/char/linflex-uart.c         | 381 ++++++++++++++++++++++++
17 files changed, 831 insertions(+), 1 deletion(-)
create mode 100644 xen/arch/arm/arm64/debug-linflex.inc
create mode 100644 xen/arch/arm/include/asm/linflex-uart.h
create mode 100644 xen/arch/arm/include/asm/scmi-smc.h
create mode 100644 xen/arch/arm/platforms/s32cc.c
create mode 100644 xen/arch/arm/scmi-smc.c
create mode 100644 xen/drivers/char/linflex-uart.c
[PATCH v2 0/8] xen/arm: Add support for S32CC platforms and LINFlexD UART
Posted by Andrei Cherechesu (OSS) 5 days, 9 hours ago
From: Andrei Cherechesu <andrei.cherechesu@nxp.com>

This patch series adds support for NXP Automotive S32CC platform
family, which includes S32G [0] and S32R [1].

First patch adds the driver for the NXP LINFlexD UART, available
on S32V, S32G and S32R automotive processors. The compatibles in
the driver match the ones in upstream Linux [2]. The 2nd patch
adds early printk support via LINFlexD UART.

The 3rd patch introduces a generic mechanism for forwarding SCMI
over SMC calls to firmware running at EL3, selected via
CONFIG_SCMI_SMC. The 4th patch refactors the SiP SMC handling in
vSMC mechanism, to rely firstly on `platform_smc()` if implemented,
then on the previously introduced generic SCMI handling/forwarding
mechanism if enabled.

The 5th patch adds S32CC platform code stub and configs to enable
the required drivers for S32CC platforms.

The 6th, 7th and 8th patches modify the CHANGELOG.md, SUPPORT.md
and MAINTAINERS files, respectively, to add mentions about LINFlexD
UART support, S32CC platforms support, and the new SCMI-SMC layer
introduced.

[0] https://www.nxp.com/products/processors-and-microcontrollers/s32-automotive-platform/s32g-vehicle-network-processors:S32G-PROCESSORS
[1] https://www.nxp.com/products/processors-and-microcontrollers/s32-automotive-platform/s32r-radar-processing:S32R-FAMILY
[2] https://elixir.bootlin.com/linux/v6.11/source/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml#L27

v1->v2:
  - linflex-uart: 
    - Addressed coding style comments from Julien:
      - spaces vs. tabs
      - indentation
      - license issue
      - comments format
      - code reusage
      - misplaced loop exit
    - Made the pointer to struct linflex_uart const in most functions
    since it's not modified
    - Added support for customizable baud rate through console options,
    parsing what Xen gets in its bootargs. other parameters following
    <baud> are discarded for the moment.
  - SCMI SMC handling:
    - Added a generic `scmi-smc` layer (enabled by CONFIG_SCMI_SMC)
    to enable forwarding SCMI requests over SMC to EL3 FW if issued
    by Dom0. If the SCMI firmware node is not found in Dom0's DT during
    initialization, it fails silently as it's not mandatory.
    - Changed the handling for SiP SMCs in vsmc.c to firstly try
    the `platform_smc()` callback if implemented, then try to
    handle the SiP SMC as SCMI if enabled and SMC ID matches.
  - S32CC Platform support:
    - Added dependency on CONFIG_SCMI_SMC
    - Removed the S32CC platform-specific forwarding to EL3 mechanism.
    - Dropped unused headers
  - CHANGELOG.md:
    - Added mentions about S32CC support and SCMI-SMC layer.
  - SUPPORT.md:
    - Added SCMI over SMC forwarding to EL3 feature for Arm as supported.
  - MAINTAINERS:
    - Added myself as maintainer for S32CC platforms and NXP S32 Linux Team
    as reviewer list.

Andrei Cherechesu (8):
  xen/arm: Add NXP LINFlexD UART Driver
  xen/arm: Add NXP LINFlexD UART early printk support
  xen/arm: Add SCMI over SMC calls handling layer
  xen/arm: vsmc: Enable handling SiP-owned SCMI SMC calls
  xen/arm: platforms: Add NXP S32CC platform code
  CHANGELOG.md: Add NXP S32CC and SCMI-SMC layer support mentions
  SUPPORT.md: Describe SCMI-SMC layer feature
  MAINTAINERS: Add myself as maintainer for NXP S32CC

 CHANGELOG.md                            |   4 +
 MAINTAINERS                             |   8 +
 SUPPORT.md                              |   8 +
 xen/arch/arm/Kconfig                    |  10 +
 xen/arch/arm/Kconfig.debug              |  12 +
 xen/arch/arm/Makefile                   |   1 +
 xen/arch/arm/arm64/debug-linflex.inc    |  58 ++++
 xen/arch/arm/include/asm/linflex-uart.h |  63 ++++
 xen/arch/arm/include/asm/scmi-smc.h     |  52 ++++
 xen/arch/arm/platforms/Kconfig          |  11 +
 xen/arch/arm/platforms/Makefile         |   1 +
 xen/arch/arm/platforms/s32cc.c          |  32 ++
 xen/arch/arm/scmi-smc.c                 | 163 ++++++++++
 xen/arch/arm/vsmc.c                     |  19 +-
 xen/drivers/char/Kconfig                |   8 +
 xen/drivers/char/Makefile               |   1 +
 xen/drivers/char/linflex-uart.c         | 381 ++++++++++++++++++++++++
 17 files changed, 831 insertions(+), 1 deletion(-)
 create mode 100644 xen/arch/arm/arm64/debug-linflex.inc
 create mode 100644 xen/arch/arm/include/asm/linflex-uart.h
 create mode 100644 xen/arch/arm/include/asm/scmi-smc.h
 create mode 100644 xen/arch/arm/platforms/s32cc.c
 create mode 100644 xen/arch/arm/scmi-smc.c
 create mode 100644 xen/drivers/char/linflex-uart.c

-- 
2.45.2