nxp: imx8ulp: enable clock control

Enable clock control for i.MX8ULP. This consists of:
	1) Adding a PCC node in the DTS
	2) Adding a header file containing the definitions
	of the clocks used by the peripherals to be enabled.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This commit is contained in:
Laurentiu Mihalcea 2024-03-20 16:53:42 +02:00 committed by Fabio Baltieri
commit 02f18bc5f5
3 changed files with 27 additions and 0 deletions

View file

@ -5,3 +5,5 @@ CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_DYNAMIC_INTERRUPTS=y
CONFIG_LOG=y
CONFIG_CLOCK_CONTROL=y

View file

@ -6,6 +6,7 @@
#include <xtensa/xtensa.dtsi>
#include <mem.h>
#include <zephyr/dt-bindings/clock/imx8ulp_clock.h>
/ {
cpus {
@ -30,4 +31,10 @@
compatible = "mmio-sram";
reg = <0x8e800000 DT_SIZE_K(512)>;
};
pcc4: clock-controller@29800000 {
compatible = "nxp,kinetis-pcc";
reg = <0x29800000 DT_SIZE_K(64)>;
#clock-cells = <2>;
};
};

View file

@ -0,0 +1,18 @@
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _INCLUDE_ZEPHYR_DT_BINDINGS_CLOCK_IMX8ULP_CLOCK_H_
#define _INCLUDE_ZEPHYR_DT_BINDINGS_CLOCK_IMX8ULP_CLOCK_H_
/* IMPORTANT: the indexes used by these macros need to
* match the indexes in the PCC driver LUT at which the
* corresponding clock ID encoding can be found.
*/
/* clocks managed by PCC4 */
#define IMX8ULP_CLOCK_LPUART7 0
#endif /* _INCLUDE_ZEPHYR_DT_BINDINGS_CLOCK_IMX8ULP_CLOCK_H_ */