Skip to contentSkip to conversation

board: beacon: imx8mp: Fix GIC clock for Overdrive mode

PATCH In review Adam Ford 2 participants 4 messages Mar 24, 2025 – Mar 25, 2025 Arm i.MX and Layerscape

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 board: beacon: imx8mp: Fix GIC clock for Overdrive mode

There is a config option to run the PMIC at nominal voltages which is not enabled on the i.MX8MP Beacon kit, so it the PMIC
runs at overdrive voltages. Unfortuately, the check for this
condition to set the GIC clock parent and rate is backwards from what it should be, and accidentally sets the GIC clock to nominal if the PMIC is in overdrive, and sets the GIC clock to overdrive if the PMIC is in nominal. Fix this by inverting the logic on the check.

Fixes ab53bd43dbde ("arm64: imx: Add support for imx8mp-beacon-kit")
board/beacon/imx8mp/spl.c +1 -1
index 6b357d90a3f..027fae38278 100644
@@ -50,7 +50,7 @@ void spl_board_init(void)
 	 * setting done. Default is 400Mhz (system_pll1_800m with div = 2)
 	 * set by ROM for ND VDD_SOC
 	 */
-	if (IS_ENABLED(CONFIG_IMX8M_VDD_SOC_850MV)) {
+	if (!IS_ENABLED(CONFIG_IMX8M_VDD_SOC_850MV)) {
 		clock_enable(CCGR_GIC, 0);
 		clock_set_target_val(GIC_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(5));
 		clock_enable(CCGR_GIC, 1);
Signature · 1 line
2.45.2
reviewer
#1 lore raw

Hi Adam,

Quoted 10 lines · Adam Ford

There is a config option to run the PMIC at nominal voltages which is not enabled on the i.MX8MP Beacon kit, so it the PMIC
runs at overdrive voltages. Unfortuately, the check for this
condition to set the GIC clock parent and rate is backwards from what it should be, and accidentally sets the GIC clock to nominal if the PMIC is in overdrive, and sets the GIC clock to overdrive if the PMIC is in nominal. Fix this by inverting the logic on the check.

Quoted 2 lines
Fixes ab53bd43dbde ("arm64: imx: Add support for imx8mp-beacon-kit")

Is this U-Boot 2025.04 material, or can it wait until 2025.07?

author
#2 lore raw
Quoted 14 lines · Fabio Estevam

Hi Adam,

Quoted 10 lines · Adam Ford

There is a config option to run the PMIC at nominal voltages which is not enabled on the i.MX8MP Beacon kit, so it the PMIC
runs at overdrive voltages. Unfortuately, the check for this
condition to set the GIC clock parent and rate is backwards from what it should be, and accidentally sets the GIC clock to nominal if the PMIC is in overdrive, and sets the GIC clock to overdrive if the PMIC is in nominal. Fix this by inverting the logic on the check.

Quoted 4 lines
Quoted 2 lines
Fixes ab53bd43dbde ("arm64: imx: Add support for imx8mp-beacon-kit")

Is this U-Boot 2025.04 material, or can it wait until 2025.07?

It's been wrong since the beginning, and I only ran into it by accident, so it's not obvious. It can wait until 2025.07.

thanks

adam

reviewer
#3 lore raw
In reply to Adam Ford
Quoted 10 lines · Adam Ford

There is a config option to run the PMIC at nominal voltages which is not enabled on the i.MX8MP Beacon kit, so it the PMIC
runs at overdrive voltages. Unfortuately, the check for this
condition to set the GIC clock parent and rate is backwards from what it should be, and accidentally sets the GIC clock to nominal if the PMIC is in overdrive, and sets the GIC clock to overdrive if the PMIC is in nominal. Fix this by inverting the logic on the check.

Quoted 2 lines
Fixes ab53bd43dbde ("arm64: imx: Add support for imx8mp-beacon-kit")

Applied to u-boot-imx/next, thanks.