nxp,mcg-lite

Description

NXP Multipurpose Clock Generator Lite (MCG_Lite)

MCG_Lite is the reduced MCG on MCXC and K32L2 parts. It has no FLL
or PLL. MCGOUTCLK is taken from one of three sources:

  - HIRC: 48 MHz high-frequency internal reference clock
  - LIRC: 8 MHz or 2 MHz low-frequency internal reference clock,
    divided by 2^fcrdiv (LIRC_DIV1)
  - EXT: the external clock or crystal oscillator (OSC0)

MCGIRCLK is LIRC_DIV1 further divided by 2^lircdiv2. MCGPCLK is the HIRC
output for peripherals.

Examples

# LIRC 8 MHz as MCGOUTCLK, with HIRC kept running for peripherals:
&mcg {
        clock-source = "lirc";
        lirc-frequency = <DT_FREQ_M(8)>;
        fcrdiv = <1>;
        lirc-enable;
        hirc-enable;
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

#clock-cells

int

Number of items to expect in a Clock specifier

This property is required.

Constant value: 1

clock-source

string

MCGOUTCLK source, programmed to MCG_C1[CLKS]. Out of reset the part
runs from LIRC 8 MHz; the default here selects HIRC 48 MHz.

Default value: hirc

Legal values: hirc, lirc, ext

lirc-frequency

int

LIRC frequency in Hz, programmed to MCG_C2[IRCS]. The default is the
reset value of MCG_C2[IRCS].

Default value: 8000000

Legal values: 2000000, 8000000

fcrdiv

int

First LIRC divider (MCG_SC[FCRDIV]). Division factor is 2^fcrdiv.
The default is the reset value.

Default value: 0

Value range: 0 to 7

lircdiv2

int

Second LIRC divider (MCG_MC[LIRC_DIV2]), applied after fcrdiv to
produce MCGIRCLK. Division factor is 2^lircdiv2. The default is the
reset value.

Default value: 0

Value range: 0 to 7

lirc-enable

boolean

Keep LIRC running when it is not the MCGOUTCLK source, so MCGIRCLK
and LIRC_CLK stay available to peripherals (MCG_C1[IRCLKEN]).

lirc-stop-enable

boolean

Keep LIRC running in Stop mode (MCG_C1[IREFSTEN]). Only takes effect
together with lirc-enable.

hirc-enable

boolean

Keep HIRC running when it is not the MCGOUTCLK source, so MCGPCLK
stays available to peripherals (MCG_MC[HIRCEN]). Must be left out
before entering VLPR.

Specifier cell names

  • clock cells: name