From 1db901e2c9927fdbd8f548d591c421ef88fcef63 Mon Sep 17 00:00:00 2001 From: Declan Snyder Date: Tue, 30 Apr 2024 11:07:49 -0500 Subject: [PATCH] dts: bindings: Add bindings for NXP LPC resets Add binding representing the peripheral reset controller of the NXP LPC SYSCON heritage hardware including SYSCON itself and the newer RSTCTL. Signed-off-by: Declan Snyder --- dts/bindings/reset/nxp,lpc-syscon-reset.yaml | 15 +++++++++++++++ dts/bindings/reset/nxp,rstctl.yaml | 18 ++++++++++++++++++ .../reset/nxp_syscon_reset_common.h | 12 ++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 dts/bindings/reset/nxp,lpc-syscon-reset.yaml create mode 100644 dts/bindings/reset/nxp,rstctl.yaml create mode 100644 include/zephyr/dt-bindings/reset/nxp_syscon_reset_common.h diff --git a/dts/bindings/reset/nxp,lpc-syscon-reset.yaml b/dts/bindings/reset/nxp,lpc-syscon-reset.yaml new file mode 100644 index 00000000000..df4e01c2a2e --- /dev/null +++ b/dts/bindings/reset/nxp,lpc-syscon-reset.yaml @@ -0,0 +1,15 @@ +# Copyright 2024 NXP +# SPDX-License-Identifier: Apache-2.0 + +description: LPC SYSCON Peripheral reset controller + +compatible: "nxp,lpc-syscon-reset" + +include: [reset-controller.yaml] + +properties: + "#reset-cells": + const: 1 + +reset-cells: + - id diff --git a/dts/bindings/reset/nxp,rstctl.yaml b/dts/bindings/reset/nxp,rstctl.yaml new file mode 100644 index 00000000000..04a1a48d043 --- /dev/null +++ b/dts/bindings/reset/nxp,rstctl.yaml @@ -0,0 +1,18 @@ +# Copyright 2024 NXP +# SPDX-License-Identifier: Apache-2.0 + +description: NXP RSTCTL Peripheral reset controller + +compatible: "nxp,rstctl" + +include: [reset-controller.yaml, base.yaml] + +properties: + reg: + required: true + + "#reset-cells": + const: 1 + +reset-cells: + - id diff --git a/include/zephyr/dt-bindings/reset/nxp_syscon_reset_common.h b/include/zephyr/dt-bindings/reset/nxp_syscon_reset_common.h new file mode 100644 index 00000000000..9888572325a --- /dev/null +++ b/include/zephyr/dt-bindings/reset/nxp_syscon_reset_common.h @@ -0,0 +1,12 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_RESET_NXP_SYSCON_RESET_COMMON_H_ +#define ZEPHYR_INCLUDE_DT_BINDINGS_RESET_NXP_SYSCON_RESET_COMMON_H_ + +#define NXP_SYSCON_RESET(offset, bit) ((offset << 16) | bit) + +#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_RESET_NXP_SYSCON_RESET_COMMON_H_ */