linux/drivers/clk/meson
Martin Blumenstingl 762c69e6ed clk: meson: gxbb: Limit the HDMI PLL OD to /4 on GXL/GXM SoCs
[ Upstream commit 5b1a43950f ]

GXBB has the HDMI PLL OD in the HHI_HDMI_PLL_CNTL2 register while for
GXL/GXM the OD has moved to HHI_HDMI_PLL_CNTL3. At first glance the rest
of the OD setup seems identical.

However, looking at the downstream kernel sources as well as testing
shows that GXL only supports three OD values:
- register value 0 means: divide by 1
- register value 1 means: divide by 2
- register value 2 means: divide by 4

Using register value 3 (which on GXBB means: divide by 8) still divides
by 4 as verified using meson-clk-measure. Downstream sources are also
only using OD register values 0, 1 and 2 for GXL (while for GXBB the
downstream kernel sources are also using value 3).

Add clk_div_table and have it replace the CLK_DIVIDER_POWER_OF_TWO flag
to make the kernel's view of this register match with how the hardware
actually works.

Fixes: 69d9229327 ("clk: meson: add the gxl hdmi pll")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20260105204710.447779-2-martin.blumenstingl@googlemail.com
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:25 -05:00
..
a1-peripherals.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
a1-peripherals.h clk: meson: a1: move bindings include to main driver 2023-08-08 16:06:17 +02:00
a1-pll.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
a1-pll.h clk: meson: a1: move bindings include to main driver 2023-08-08 16:06:17 +02:00
axg-aoclk.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
axg-audio.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
axg-audio.h clk: meson: axg-audio: add sm1 earcrx clocks 2024-07-29 16:47:00 +02:00
axg.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
axg.h clk: meson: eeclk: move bindings include to main driver 2023-08-08 16:06:17 +02:00
c3-peripherals.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
c3-pll.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
clk-cpu-dyndiv.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
clk-cpu-dyndiv.h clk: meson: add g12a cpu dynamic divider driver 2019-08-09 12:10:03 +02:00
clk-dualdiv.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
clk-dualdiv.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-mpll.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
clk-mpll.h clk: meson: mpll: add init callback and regs 2019-05-20 12:19:29 +02:00
clk-phase.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
clk-phase.h clk: meson: add sclk-ws driver 2020-08-17 15:58:02 +02:00
clk-pll.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
clk-pll.h clk: meson: add 'NOINIT_ENABLED' flag to eliminate init for enabled PLL 2024-06-10 12:16:01 +02:00
clk-regmap.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
clk-regmap.h clk: define to_clk_regmap() as inline function 2020-10-28 16:34:44 -07:00
g12a-aoclk.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
g12a.c clk: meson-g12a: add missing fclk_div2 to spicc 2025-06-27 11:11:22 +01:00
g12a.h clk: meson: g12a: add MIPI ISP clocks 2023-11-24 18:08:48 +01:00
gxbb-aoclk.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
gxbb.c clk: meson: gxbb: Limit the HDMI PLL OD to /4 on GXL/GXM SoCs 2026-03-04 07:20:25 -05:00
gxbb.h clk: meson: eeclk: move bindings include to main driver 2023-08-08 16:06:17 +02:00
Kconfig clk: meson: c3: add c3 clock peripherals controller driver 2024-06-04 10:38:32 +02:00
Makefile clk: meson: c3: add c3 clock peripherals controller driver 2024-06-04 10:38:32 +02:00
meson-aoclk.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
meson-aoclk.h clk: meson: migrate meson-aoclk out of hw_onecell_data to drop NR_CLKS 2023-08-08 16:06:16 +02:00
meson-clkc-utils.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
meson-clkc-utils.h clk: meson: introduce meson-clkc-utils 2023-08-08 16:06:16 +02:00
meson-eeclk.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
meson-eeclk.h clk: meson: migrate meson-eeclk out of hw_onecell_data to drop NR_CLKS 2023-08-08 16:06:16 +02:00
meson8-ddr.c clk: meson: add a driver for the Meson8/8b/8m2 DDR clock controller 2019-12-11 14:06:29 +01:00
meson8b.c clk: meson: meson8b: move bindings include to main driver 2023-08-08 16:06:17 +02:00
meson8b.h clk: meson: meson8b: move bindings include to main driver 2023-08-08 16:06:17 +02:00
parm.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
s4-peripherals.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
s4-peripherals.h clk: meson: S4: add support for Amlogic S4 SoC peripheral clock controller 2023-09-27 11:01:03 +02:00
s4-pll.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
s4-pll.h clk: meson: S4: add support for Amlogic S4 SoC PLL clock driver 2023-09-27 10:54:24 +02:00
sclk-div.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
sclk-div.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
vclk.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
vclk.h clk: meson: add vclk driver 2024-04-10 09:46:21 +02:00
vid-pll-div.c clk: meson: introduce symbol namespace for amlogic clocks 2024-07-29 16:47:33 +02:00
vid-pll-div.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00