1
0
Fork 0
alistair23-linux/drivers/clk/meson
Martin Blumenstingl 7377ba16b5 clk: meson: meson8b: Don't rely on u-boot to init all GP_PLL registers
[ Upstream commit a29ae8600d ]

Not all u-boot versions initialize the HHI_GP_PLL_CNTL[2-5] registers.
In that case all HHI_GPLL_PLL_CNTL[1-5] registers are 0x0 and when
booting Linux the PLL fails to lock.
The initialization sequence from u-boot is:
- put the PLL into reset
- write 0x59C88000 to HHI_GP_PLL_CNTL2
- write 0xCA463823 to HHI_GP_PLL_CNTL3
- write 0x0286A027 to HHI_GP_PLL_CNTL4
- write 0x00003000 to HHI_GP_PLL_CNTL5
- set M, N, OD and the enable bit
- take the PLL out of reset
- check if it has locked
- disable the PLL

In Linux we already initialize M, N, OD, the enable and the reset bits.
Also the HHI_GP_PLL_CNTL[2-5] registers with these magic values (the
exact meaning is unknown) so the PLL can lock when the vendor u-boot did
not initialize these registers yet.

Fixes: b882964b37 ("clk: meson: meson8b: add support for the GP_PLL clock on Meson8m2")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200501215717.735393-1-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:23 +02:00
..
Kconfig clk: meson: add g12a cpu dynamic divider driver 2019-08-09 12:10:03 +02:00
Makefile clk: meson: add g12a cpu dynamic divider driver 2019-08-09 12:10:03 +02:00
axg-aoclk.c clk: meson: axg-aoclk: migrate to the new parent description method 2019-07-29 12:42:48 +02:00
axg-aoclk.h clk: meson: axg-ao: add 32k generation subtree 2019-01-07 15:21:43 +01:00
axg-audio.c clk: meson: axg-audio: fix regmap last register 2020-01-17 19:48:48 +01:00
axg-audio.h clk: meson: axg-audio: add g12a reset support 2019-08-20 11:51:36 +02:00
axg.c clk: meson: clk-regmap: migrate to new parent description method 2019-07-29 12:42:49 +02:00
axg.h clk: meson: clk-pll: remove od parameters 2018-09-26 12:01:57 +02:00
clk-cpu-dyndiv.c clk: meson: add g12a cpu dynamic divider driver 2019-08-09 12:10:03 +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: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-dualdiv.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-mpll.c clk: meson: mpll: add init callback and regs 2019-05-20 12:19:29 +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: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-phase.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-pll.c clk: meson: pll: Fix by 0 division in __pll_params_to_rate() 2020-02-24 08:36:23 +01:00
clk-pll.h clk: meson-pll: add reduced specific clk_ops for G12A PCIe PLL 2019-04-01 10:45:11 +02:00
clk-regmap.c clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-regmap.h clk: meson: clk-regmap: migrate to new parent description method 2019-07-29 12:42:49 +02:00
g12a-aoclk.c clk: meson: g12a-aoclk: migrate to the new parent description method 2019-07-29 12:42:48 +02:00
g12a-aoclk.h dt-bindings: clock: g12a-aoclk: expose CLKID_AO_CTS_OSCIN 2019-04-01 10:45:11 +02:00
g12a.c clk: meson: g12a: fix missing uart2 in regmap table 2020-02-14 16:34:19 -05:00
g12a.h clk: meson: g12a: add support for SM1 CPU 1, 2 & 3 clocks 2019-08-26 11:04:54 +02:00
gxbb-aoclk.c clk: meson: gxbb-aoclk: migrate to the new parent description method 2019-07-29 12:42:48 +02:00
gxbb-aoclk.h clk: meson: gxbb-ao: replace cec-32k with the dual divider 2019-01-07 15:21:22 +01:00
gxbb.c clk: meson: gxbb: let sar_adc_clk_div set the parent clock rate 2019-10-01 14:46:30 +02:00
gxbb.h dt-bindings: clk: meson-gxbb: Add Video clock bindings 2018-11-23 15:11:56 +01:00
meson-aoclk.c clk: meson: remove ao input bypass clocks 2019-07-29 12:42:48 +02:00
meson-aoclk.h clk: meson: remove ao input bypass clocks 2019-07-29 12:42:48 +02:00
meson-eeclk.c clk: meson: remove ee input bypass clocks 2019-07-29 12:42:49 +02:00
meson-eeclk.h clk: meson: remove ee input bypass clocks 2019-07-29 12:42:49 +02:00
meson8b.c clk: meson: meson8b: Don't rely on u-boot to init all GP_PLL registers 2020-06-24 17:50:23 +02:00
meson8b.h clk: meson: meson8b: Don't rely on u-boot to init all GP_PLL registers 2020-06-24 17:50:23 +02:00
parm.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
sclk-div.c clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
sclk-div.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
vid-pll-div.c clk: meson: vid-pll-div: remove warning and return 0 on invalid config 2019-03-29 09:41:30 +01:00
vid-pll-div.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00