linux-stable/drivers/clk/sunxi-ng
Roman Stratiienko 4167ac8a65 clk: sunxi-ng: sun50i: h6: Modify GPU clock configuration to support DFS
Using simple bash script it was discovered that not all CCU registers
can be safely used for DFS, e.g.:

    while true
    do
        devmem 0x3001030 4 0xb0003e02
        devmem 0x3001030 4 0xb0001e02
    done

Script above changes the GPU_PLL multiplier register value. While the
script is running, the user should interact with the user interface.

Using this method the following results were obtained:

| Register  | Name           | Bits  | Values | Result |
| --        | --             | --    | --     | --     |
| 0x3001030 | GPU_PLL.MULT   | 15..8 | 20-62  | OK     |
| 0x3001030 | GPU_PLL.INDIV  |     1 | 0-1    | OK     |
| 0x3001030 | GPU_PLL.OUTDIV |     0 | 0-1    | FAIL   |
| 0x3001670 | GPU_CLK.DIV    |  3..0 | ANY    | FAIL   |

DVFS started to work seamlessly once dividers which caused the
glitches were set to fixed values.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220705075226.359475-1-r.stratiienko@gmail.com
2022-07-08 18:13:50 +02:00
..
ccu-sun4i-a10.c clk: sunxi-ng: Convert early providers to platform drivers 2021-11-23 10:29:05 +01:00
ccu-sun4i-a10.h
ccu-sun5i.c clk: sunxi-ng: Unregister clocks/resets when unbinding 2021-09-13 09:03:20 +02:00
ccu-sun5i.h
ccu-sun6i-a31.c clk: sunxi-ng: Convert early providers to platform drivers 2021-11-23 10:29:05 +01:00
ccu-sun6i-a31.h clk: sunxi: a31: Export the MIPI PLL 2020-01-04 09:45:09 +01:00
ccu-sun6i-rtc.c Revert "clk: sunxi-ng: sun6i-rtc: Add support for H6" 2022-05-17 00:25:57 -07:00
ccu-sun6i-rtc.h clk: sunxi-ng: Add support for the sun6i RTC clocks 2022-03-23 19:58:38 +01:00
ccu-sun8i-a23-a33.h clk: sunxi: a23/a33: Export the MIPI PLL 2020-01-04 09:45:19 +01:00
ccu-sun8i-a23.c clk: sunxi-ng: Convert early providers to platform drivers 2021-11-23 10:29:05 +01:00
ccu-sun8i-a33.c clk: sunxi-ng: Convert early providers to platform drivers 2021-11-23 10:29:05 +01:00
ccu-sun8i-a83t.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun8i-a83t.h
ccu-sun8i-de2.c clk: sunxi-ng: Deduplicate ccu_clks arrays 2022-06-06 23:13:28 +02:00
ccu-sun8i-de2.h
ccu-sun8i-h3.c clk: sunxi-ng: Deduplicate ccu_clks arrays 2022-06-06 23:13:28 +02:00
ccu-sun8i-h3.h dt-bindings: clock: sunxi: Export CLK_DRAM for devfreq 2021-11-23 11:29:35 +01:00
ccu-sun8i-r.c clk: sunxi-ng: Deduplicate ccu_clks arrays 2022-06-06 23:13:28 +02:00
ccu-sun8i-r.h
ccu-sun8i-r40.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun8i-r40.h clk: sunxi-ng: r40: Export MBUS clock 2020-01-03 10:37:14 +01:00
ccu-sun8i-v3s.c clk: sunxi-ng: Deduplicate ccu_clks arrays 2022-06-06 23:13:28 +02:00
ccu-sun8i-v3s.h clk: sunxi-ng: v3s: Fix incorrect number of hw_clks. 2019-12-09 08:49:31 +01:00
ccu-sun9i-a80-de.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun9i-a80-de.h
ccu-sun9i-a80-usb.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun9i-a80-usb.h
ccu-sun9i-a80.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun9i-a80.h
ccu-sun20i-d1-r.c clk: sunxi-ng: Add support for the D1 SoC clocks 2021-11-23 10:29:05 +01:00
ccu-sun20i-d1-r.h clk: sunxi-ng: Add support for the D1 SoC clocks 2021-11-23 10:29:05 +01:00
ccu-sun20i-d1.c clk: sunxi-ng: Add support for the D1 SoC clocks 2021-11-23 10:29:05 +01:00
ccu-sun20i-d1.h clk: sunxi-ng: Add support for the D1 SoC clocks 2021-11-23 10:29:05 +01:00
ccu-sun50i-a64.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun50i-a64.h dt-bindings: clock: sunxi: Export CLK_DRAM for devfreq 2021-11-23 11:29:35 +01:00
ccu-sun50i-a100-r.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun50i-a100-r.h clk: sunxi-ng: add support for the Allwinner A100 CCU 2020-08-25 10:52:18 +02:00
ccu-sun50i-a100.c clk: sunxi-ng: Allow drivers to be built as modules 2021-11-22 10:02:21 +01:00
ccu-sun50i-a100.h clk: sunxi-ng: add support for the Allwinner A100 CCU 2020-08-25 10:52:18 +02:00
ccu-sun50i-h6-r.c clk: sunxi-ng: Deduplicate ccu_clks arrays 2022-06-06 23:13:28 +02:00
ccu-sun50i-h6-r.h clk: sunxi-ng: h6-r: Add RTC gate clock 2022-05-06 18:02:40 +02:00
ccu-sun50i-h6.c clk: sunxi-ng: sun50i: h6: Modify GPU clock configuration to support DFS 2022-07-08 18:13:50 +02:00
ccu-sun50i-h6.h
ccu-sun50i-h616.c clk: sunxi-ng: h616: Add PLL derived 32KHz clock 2022-05-06 18:03:52 +02:00
ccu-sun50i-h616.h clk: sunxi-ng: h616: Add PLL derived 32KHz clock 2022-05-06 18:03:52 +02:00
ccu-suniv-f1c100s.c clk: sunxi-ng: Convert early providers to platform drivers 2021-11-23 10:29:05 +01:00
ccu-suniv-f1c100s.h
ccu_common.c clk: sunxi-ng: Allow the CCU core to be built as a module 2021-11-23 10:29:05 +01:00
ccu_common.h clk: sunxi-ng: mux: Allow muxes to have keys 2022-03-23 19:58:38 +01:00
ccu_div.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_div.h clk: sunxi-ng: div: Add macros using clk_parent_data and clk_hw 2021-11-23 10:29:05 +01:00
ccu_frac.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_frac.h
ccu_gate.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_gate.h clk: sunxi-ng: gate: Add macros for gates with fixed dividers 2021-11-23 10:29:05 +01:00
ccu_mmc_timing.c
ccu_mp.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_mp.h clk: sunxi-ng: mp: Add macros using clk_parent_data and clk_hw 2021-11-23 10:29:05 +01:00
ccu_mult.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_mult.h
ccu_mux.c clk: sunxi-ng: mux: Allow muxes to have keys 2022-03-23 19:58:38 +01:00
ccu_mux.h clk: sunxi-ng: mux: Add macros using clk_parent_data and clk_hw 2021-11-23 10:29:05 +01:00
ccu_nk.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_nk.h
ccu_nkm.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_nkm.h
ccu_nkmp.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_nkmp.h
ccu_nm.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_nm.h
ccu_phase.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_phase.h
ccu_reset.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_reset.h
ccu_sdm.c clk: sunxi-ng: Export symbols used by CCU drivers 2021-11-22 10:02:21 +01:00
ccu_sdm.h
Kconfig clk: sunxi-ng: Add support for the sun6i RTC clocks 2022-03-23 19:58:38 +01:00
Makefile clk: sunxi-ng: Add support for the sun6i RTC clocks 2022-03-23 19:58:38 +01:00