Skip to content

UPSTREAM-PEND: add AM13Ex clock control support - #69

Open
natto1784 wants to merge 8 commits into
TexasInstruments:v4.4.0-ti-nextfrom
natto1784:v4.4.0-ti/drivers/clock-control-am13
Open

natto1784 wants to merge 8 commits into
TexasInstruments:v4.4.0-ti-nextfrom
natto1784:v4.4.0-ti/drivers/clock-control-am13

Conversation

@natto1784

Copy link
Copy Markdown
Collaborator

Contains all the patches from the draft PR upstream with number 118541. Prerequisite patches for MSPM0 clock control are already merged downstream.

PR: 118541

AM13 (Cortex-M33) shares the same SYSCTL/CKM register layout as MSPM33C.

Therefore, move these headers to soc/ti/common, and make both family trees
include this directory.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
PR: 118541

There is a different register layout in SYSCTL and FACTORYREGION for
MSPM33. AM13E uses this exact same layout so enable this layout for AM13E
as well.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
…config

PR: 118541

AM13E's SYSCTL/CKM shares MSPM33C's offset map and MCLK/SYSPLL layout so
extend similar behavior to AM13E. However AM13 does not have TRIMENGRRWAIT
and RAM_WS_CONFIG since SRAM always has zero wait states. So split this
behavior using a new macro MSPM0_HAS_RAM_WAIT_STATES which is exclusive to
MSPM33C.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
…AM13E

PR: 118541

AM13E has no HSCLKEN.HFXTEN or HFCLKCLKCFG.HFXTRSEL (both reserved on
AM13E). The crystal is instead powered up via a dedicated XTALCR.OSCOFF
bit and its startup confirmed by polling X1CNT for saturation.

For this, factor out the clock_mspm0_wait_clkstatus into a more generic
clock_mspm0_wait_reg function.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
PR: 118541

Add the ckm/clocks/oscillators nodes and sysctl/factoryregion/memcfg
syscon nodes for AM13E.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
PR: 118541

Use SYSPLL for the CPUCLK at 200MHz, also configure the external high
frequency oscillator at 48MHz, and enable HFCLK.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
PR: 118541

Make sure syscon instances are initialized before clock control if clock
control is enabled.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
PR: 118541

Set CLOCK_CONTROL to y for the aforementioned board in its defconfig file.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant