Skip to content

Commit 214e7a5

Browse files
committed
Merge tag 'sunxi-clk-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull Allwinner clk driver updates from Chen-Yu Tsai: Instead of forcing a particular clock parent for TCON0 on the A64, the decision is left to the device tree. Which clock parent gets assigned depends on which display output is used. If the wrong parent is assigned, the display doesn't work. Patches include adding the clock parents to the DT binding (which is shared with the DT tree), removing the now redundant macros from the clock driver, and stop forcing a particular clock parent in the driver. * tag 'sunxi-clk-for-6.14' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: a64: stop force-selecting PLL-MIPI as TCON0 parent clk: sunxi-ng: a64: drop redundant CLK_PLL_VIDEO0_2X and CLK_PLL_MIPI dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI
2 parents 40384c8 + 383ca7b commit 214e7a5

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

drivers/clk/sunxi-ng/ccu-sun50i-a64.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,11 @@ static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents,
535535
CLK_SET_RATE_PARENT);
536536

537537
/*
538-
* DSI output seems to work only when PLL_MIPI selected. Set it and prevent
539-
* the mux from reparenting.
538+
* Experiments showed that RGB output requires pll-video0-2x, while DSI
539+
* requires pll-mipi. It will not work with incorrect clock, the screen will
540+
* be blank.
541+
* sun50i-a64.dtsi assigns pll-mipi as TCON0 parent by default
540542
*/
541-
#define SUN50I_A64_TCON0_CLK_REG 0x118
542-
543543
static const char * const tcon0_parents[] = { "pll-mipi", "pll-video0-2x" };
544544
static const u8 tcon0_table[] = { 0, 2, };
545545
static SUNXI_CCU_MUX_TABLE_WITH_GATE_CLOSEST(tcon0_clk, "tcon0", tcon0_parents,
@@ -959,11 +959,6 @@ static int sun50i_a64_ccu_probe(struct platform_device *pdev)
959959

960960
writel(0x515, reg + SUN50I_A64_PLL_MIPI_REG);
961961

962-
/* Set PLL MIPI as parent for TCON0 */
963-
val = readl(reg + SUN50I_A64_TCON0_CLK_REG);
964-
val &= ~GENMASK(26, 24);
965-
writel(val | (0 << 24), reg + SUN50I_A64_TCON0_CLK_REG);
966-
967962
ret = devm_sunxi_ccu_probe(&pdev->dev, reg, &sun50i_a64_ccu_desc);
968963
if (ret)
969964
return ret;

drivers/clk/sunxi-ng/ccu-sun50i-a64.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
/* PLL_VIDEO0 exported for HDMI PHY */
2323

24-
#define CLK_PLL_VIDEO0_2X 8
2524
#define CLK_PLL_VE 9
2625
#define CLK_PLL_DDR0 10
2726

@@ -32,7 +31,6 @@
3231
#define CLK_PLL_PERIPH1_2X 14
3332
#define CLK_PLL_VIDEO1 15
3433
#define CLK_PLL_GPU 16
35-
#define CLK_PLL_MIPI 17
3634
#define CLK_PLL_HSIC 18
3735
#define CLK_PLL_DE 19
3836
#define CLK_PLL_DDR1 20

include/dt-bindings/clock/sun50i-a64-ccu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
#define _DT_BINDINGS_CLK_SUN50I_A64_H_
4545

4646
#define CLK_PLL_VIDEO0 7
47+
#define CLK_PLL_VIDEO0_2X 8
4748
#define CLK_PLL_PERIPH0 11
49+
#define CLK_PLL_MIPI 17
4850

4951
#define CLK_CPUX 21
5052
#define CLK_BUS_MIPI_DSI 28

0 commit comments

Comments
 (0)