Am 5. Dezember 2025 05:38:08 UTC schrieb Gaurav Sharma 
<[email protected]>:
>Add the Clock Control Module (CCM) device to i.MX8MM SoC.
>The CCM implementation is shared with i.MX8MP as the register
>layout is identical between the two variants.Hence iMX8MM will
>be using the source of iMX8MP CCM.

The last sentence seems a bit redundant to me. Regardless:
Reviewed-by: Bernhard Beschow <[email protected]>

>
>Signed-off-by: Gaurav Sharma <[email protected]>
>---
> docs/system/arm/imx8mm-evk.rst |  1 +
> hw/arm/Kconfig                 |  1 +
> hw/arm/fsl-imx8mm.c            | 10 ++++++++++
> include/hw/arm/fsl-imx8mm.h    |  2 ++
> 4 files changed, 14 insertions(+)
>
>diff --git a/docs/system/arm/imx8mm-evk.rst b/docs/system/arm/imx8mm-evk.rst
>index 408253193c..09aa63240a 100644
>--- a/docs/system/arm/imx8mm-evk.rst
>+++ b/docs/system/arm/imx8mm-evk.rst
>@@ -12,6 +12,7 @@ The ``imx8mm-evk`` machine implements the following devices:
>  * Up to 4 Cortex-A53 cores
>  * Generic Interrupt Controller (GICv3)
>  * 4 UARTs
>+ * Clock Tree
> 
> Boot options
> ------------
>diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>index 3737335841..758addea22 100644
>--- a/hw/arm/Kconfig
>+++ b/hw/arm/Kconfig
>@@ -630,6 +630,7 @@ config FSL_IMX8MM
>     bool
>     select ARM_GIC
>     select FSL_IMX8MP_ANALOG
>+    select FSL_IMX8MP_CCM
>     select IMX
> 
> config FSL_IMX8MM_EVK
>diff --git a/hw/arm/fsl-imx8mm.c b/hw/arm/fsl-imx8mm.c
>index 2c84e70c01..a3eddfe3f6 100644
>--- a/hw/arm/fsl-imx8mm.c
>+++ b/hw/arm/fsl-imx8mm.c
>@@ -169,6 +169,8 @@ static void fsl_imx8mm_init(Object *obj)
> 
>     object_initialize_child(obj, "gic", &s->gic, gicv3_class_name());
> 
>+    object_initialize_child(obj, "ccm", &s->ccm, TYPE_IMX8MP_CCM);
>+
>     object_initialize_child(obj, "analog", &s->analog, TYPE_IMX8MP_ANALOG);
> 
>     for (i = 0; i < FSL_IMX8MM_NUM_UARTS; i++) {
>@@ -305,6 +307,13 @@ static void fsl_imx8mm_realize(DeviceState *dev, Error 
>**errp)
>         }
>     }
> 
>+    /* CCM */
>+    if (!sysbus_realize(SYS_BUS_DEVICE(&s->ccm), errp)) {
>+        return;
>+    }
>+    sysbus_mmio_map(SYS_BUS_DEVICE(&s->ccm), 0,
>+                    fsl_imx8mm_memmap[FSL_IMX8MM_CCM].addr);
>+
>     /* Analog */
>     object_property_set_uint(OBJECT(&s->analog), "arm-pll-fdiv-ctl0-reset",
>                             0x000fa030, &error_abort);
>@@ -340,6 +349,7 @@ static void fsl_imx8mm_realize(DeviceState *dev, Error 
>**errp)
>     for (i = 0; i < ARRAY_SIZE(fsl_imx8mm_memmap); i++) {
>         switch (i) {
>         case FSL_IMX8MM_ANA_PLL:
>+        case FSL_IMX8MM_CCM:
>         case FSL_IMX8MM_GIC_DIST:
>         case FSL_IMX8MM_GIC_REDIST:
>         case FSL_IMX8MM_RAM:
>diff --git a/include/hw/arm/fsl-imx8mm.h b/include/hw/arm/fsl-imx8mm.h
>index 4601f57f2b..03ab45d94e 100644
>--- a/include/hw/arm/fsl-imx8mm.h
>+++ b/include/hw/arm/fsl-imx8mm.h
>@@ -14,6 +14,7 @@
> #include "hw/char/imx_serial.h"
> #include "hw/intc/arm_gicv3_common.h"
> #include "hw/misc/imx8mp_analog.h"
>+#include "hw/misc/imx8mp_ccm.h"
> #include "qom/object.h"
> #include "qemu/units.h"
> 
>@@ -34,6 +35,7 @@ struct FslImx8mmState {
> 
>     ARMCPU             cpu[FSL_IMX8MM_NUM_CPUS];
>     GICv3State         gic;
>+    IMX8MPCCMState     ccm;
>     IMX8MPAnalogState  analog;
>     IMXSerialState     uart[FSL_IMX8MM_NUM_UARTS];
> };

Reply via email to