Skip to content

Commit 0409ac4

Browse files
committed
Merge tag 'sunxi-clk-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull Allwinner clk driver updates from Chen-Yu Tsai: - Add support for DE (display engine) 3.3 clocks on H616 - Add missing LVDS reset control on H616 - Do not enable by default during compile testing * tag 'sunxi-clk-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33) support dt-bindings: allwinner: add H616 DE33 clock binding clk: sunxi-ng: h616: Add LVDS reset for LCD TCON dt-bindings: clock: sun50i-h616-ccu: Add LVDS reset clk: sunxi: Do not enable by default during compile testing clk: sunxi-ng: Do not enable by default during compile testing
2 parents 0af2f6b + be0e9a3 commit 0409ac4

File tree

6 files changed

+57
-29
lines changed

6 files changed

+57
-29
lines changed

Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ properties:
2525
- const: allwinner,sun50i-a64-de2-clk
2626
- const: allwinner,sun50i-h5-de2-clk
2727
- const: allwinner,sun50i-h6-de3-clk
28+
- const: allwinner,sun50i-h616-de33-clk
2829
- items:
2930
- const: allwinner,sun8i-r40-de2-clk
3031
- const: allwinner,sun8i-h3-de2-clk

drivers/clk/sunxi-ng/Kconfig

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,123 +9,123 @@ if SUNXI_CCU
99

1010
config SUNIV_F1C100S_CCU
1111
tristate "Support for the Allwinner newer F1C100s CCU"
12-
default y
12+
default ARCH_SUNXI
1313
depends on MACH_SUNIV || COMPILE_TEST
1414

1515
config SUN20I_D1_CCU
1616
tristate "Support for the Allwinner D1/R528/T113 CCU"
17-
default y
17+
default ARCH_SUNXI
1818
depends on MACH_SUN8I || RISCV || COMPILE_TEST
1919

2020
config SUN20I_D1_R_CCU
2121
tristate "Support for the Allwinner D1/R528/T113 PRCM CCU"
22-
default y
22+
default ARCH_SUNXI
2323
depends on MACH_SUN8I || RISCV || COMPILE_TEST
2424

2525
config SUN50I_A64_CCU
2626
tristate "Support for the Allwinner A64 CCU"
27-
default y
27+
default ARCH_SUNXI
2828
depends on ARM64 || COMPILE_TEST
2929

3030
config SUN50I_A100_CCU
3131
tristate "Support for the Allwinner A100 CCU"
32-
default y
32+
default ARCH_SUNXI
3333
depends on ARM64 || COMPILE_TEST
3434

3535
config SUN50I_A100_R_CCU
3636
tristate "Support for the Allwinner A100 PRCM CCU"
37-
default y
37+
default ARCH_SUNXI
3838
depends on ARM64 || COMPILE_TEST
3939

4040
config SUN50I_H6_CCU
4141
tristate "Support for the Allwinner H6 CCU"
42-
default y
42+
default ARCH_SUNXI
4343
depends on ARM64 || COMPILE_TEST
4444

4545
config SUN50I_H616_CCU
4646
tristate "Support for the Allwinner H616 CCU"
47-
default y
47+
default ARCH_SUNXI
4848
depends on ARM64 || COMPILE_TEST
4949

5050
config SUN50I_H6_R_CCU
5151
tristate "Support for the Allwinner H6 and H616 PRCM CCU"
52-
default y
52+
default ARCH_SUNXI
5353
depends on ARM64 || COMPILE_TEST
5454

5555
config SUN55I_A523_CCU
5656
tristate "Support for the Allwinner A523/T527 CCU"
57-
default y
57+
default ARCH_SUNXI
5858
depends on ARM64 || COMPILE_TEST
5959

6060
config SUN55I_A523_R_CCU
6161
tristate "Support for the Allwinner A523/T527 PRCM CCU"
62-
default y
62+
default ARCH_SUNXI
6363
depends on ARM64 || COMPILE_TEST
6464

6565
config SUN4I_A10_CCU
6666
tristate "Support for the Allwinner A10/A20 CCU"
67-
default y
67+
default ARCH_SUNXI
6868
depends on MACH_SUN4I || MACH_SUN7I || COMPILE_TEST
6969

7070
config SUN5I_CCU
7171
bool "Support for the Allwinner sun5i family CCM"
72-
default y
72+
default ARCH_SUNXI
7373
depends on MACH_SUN5I || COMPILE_TEST
7474
depends on SUNXI_CCU=y
7575

7676
config SUN6I_A31_CCU
7777
tristate "Support for the Allwinner A31/A31s CCU"
78-
default y
78+
default ARCH_SUNXI
7979
depends on MACH_SUN6I || COMPILE_TEST
8080

8181
config SUN6I_RTC_CCU
8282
tristate "Support for the Allwinner H616/R329 RTC CCU"
83-
default y
83+
default ARCH_SUNXI
8484
depends on MACH_SUN8I || ARM64 || RISCV || COMPILE_TEST
8585

8686
config SUN8I_A23_CCU
8787
tristate "Support for the Allwinner A23 CCU"
88-
default y
88+
default ARCH_SUNXI
8989
depends on MACH_SUN8I || COMPILE_TEST
9090

9191
config SUN8I_A33_CCU
9292
tristate "Support for the Allwinner A33 CCU"
93-
default y
93+
default ARCH_SUNXI
9494
depends on MACH_SUN8I || COMPILE_TEST
9595

9696
config SUN8I_A83T_CCU
9797
tristate "Support for the Allwinner A83T CCU"
98-
default y
98+
default ARCH_SUNXI
9999
depends on MACH_SUN8I || COMPILE_TEST
100100

101101
config SUN8I_H3_CCU
102102
tristate "Support for the Allwinner H3 CCU"
103-
default y
103+
default ARCH_SUNXI
104104
depends on MACH_SUN8I || ARM64 || COMPILE_TEST
105105

106106
config SUN8I_V3S_CCU
107107
tristate "Support for the Allwinner V3s CCU"
108-
default y
108+
default ARCH_SUNXI
109109
depends on MACH_SUN8I || COMPILE_TEST
110110

111111
config SUN8I_DE2_CCU
112112
tristate "Support for the Allwinner SoCs DE2 CCU"
113-
default y
113+
default ARCH_SUNXI
114114
depends on MACH_SUN8I || ARM64 || RISCV || COMPILE_TEST
115115

116116
config SUN8I_R40_CCU
117117
tristate "Support for the Allwinner R40 CCU"
118-
default y
118+
default ARCH_SUNXI
119119
depends on MACH_SUN8I || COMPILE_TEST
120120

121121
config SUN9I_A80_CCU
122122
tristate "Support for the Allwinner A80 CCU"
123-
default y
123+
default ARCH_SUNXI
124124
depends on MACH_SUN9I || COMPILE_TEST
125125

126126
config SUN8I_R_CCU
127127
tristate "Support for Allwinner SoCs' PRCM CCUs"
128-
default y
128+
default ARCH_SUNXI
129129
depends on MACH_SUN8I || ARM64 || COMPILE_TEST
130130

131131
endif

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@ static const struct ccu_reset_map sun50i_h616_ccu_resets[] = {
10941094
[RST_BUS_TCON_LCD1] = { 0xb7c, BIT(17) },
10951095
[RST_BUS_TCON_TV0] = { 0xb9c, BIT(16) },
10961096
[RST_BUS_TCON_TV1] = { 0xb9c, BIT(17) },
1097+
[RST_BUS_LVDS] = { 0xbac, BIT(16) },
10971098
[RST_BUS_TVE_TOP] = { 0xbbc, BIT(16) },
10981099
[RST_BUS_TVE0] = { 0xbbc, BIT(17) },
10991100
[RST_BUS_HDCP] = { 0xc4c, BIT(16) },

drivers/clk/sunxi-ng/ccu-sun8i-de2.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <linux/clk.h>
77
#include <linux/clk-provider.h>
8+
#include <linux/io.h>
89
#include <linux/module.h>
910
#include <linux/of.h>
1011
#include <linux/platform_device.h>
@@ -239,6 +240,16 @@ static const struct sunxi_ccu_desc sun50i_h5_de2_clk_desc = {
239240
.num_resets = ARRAY_SIZE(sun50i_h5_de2_resets),
240241
};
241242

243+
static const struct sunxi_ccu_desc sun50i_h616_de33_clk_desc = {
244+
.ccu_clks = sun8i_de2_ccu_clks,
245+
.num_ccu_clks = ARRAY_SIZE(sun8i_de2_ccu_clks),
246+
247+
.hw_clks = &sun8i_h3_de2_hw_clks,
248+
249+
.resets = sun50i_h5_de2_resets,
250+
.num_resets = ARRAY_SIZE(sun50i_h5_de2_resets),
251+
};
252+
242253
static int sunxi_de2_clk_probe(struct platform_device *pdev)
243254
{
244255
struct clk *bus_clk, *mod_clk;
@@ -291,6 +302,16 @@ static int sunxi_de2_clk_probe(struct platform_device *pdev)
291302
goto err_disable_mod_clk;
292303
}
293304

305+
/*
306+
* The DE33 requires these additional (unknown) registers set
307+
* during initialisation.
308+
*/
309+
if (of_device_is_compatible(pdev->dev.of_node,
310+
"allwinner,sun50i-h616-de33-clk")) {
311+
writel(0, reg + 0x24);
312+
writel(0x0000a980, reg + 0x28);
313+
}
314+
294315
ret = devm_sunxi_ccu_probe(&pdev->dev, reg, ccu_desc);
295316
if (ret)
296317
goto err_assert_reset;
@@ -335,6 +356,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
335356
.compatible = "allwinner,sun50i-h6-de3-clk",
336357
.data = &sun50i_h5_de2_clk_desc,
337358
},
359+
{
360+
.compatible = "allwinner,sun50i-h616-de33-clk",
361+
.data = &sun50i_h616_de33_clk_desc,
362+
},
338363
{ }
339364
};
340365
MODULE_DEVICE_TABLE(of, sunxi_de2_clk_ids);

drivers/clk/sunxi/Kconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
menuconfig CLK_SUNXI
33
bool "Legacy clock support for Allwinner SoCs"
44
depends on (ARM && ARCH_SUNXI) || COMPILE_TEST
5-
default y
5+
default (ARM && ARCH_SUNXI)
66

77
if CLK_SUNXI
88

99
config CLK_SUNXI_CLOCKS
1010
bool "Legacy clock drivers"
11-
default y
11+
default ARCH_SUNXI
1212
help
1313
Legacy clock drivers being used on older (A10, A13, A20,
1414
A23, A31, A80) SoCs. These drivers are kept around for
@@ -19,22 +19,22 @@ config CLK_SUNXI_CLOCKS
1919

2020
config CLK_SUNXI_PRCM_SUN6I
2121
bool "Legacy A31 PRCM driver"
22-
default y
22+
default ARCH_SUNXI
2323
help
2424
Legacy clock driver for the A31 PRCM clocks. Those are
2525
usually needed for the PMIC communication, mostly.
2626

2727
config CLK_SUNXI_PRCM_SUN8I
2828
bool "Legacy sun8i PRCM driver"
29-
default y
29+
default ARCH_SUNXI
3030
help
3131
Legacy clock driver for the sun8i family PRCM clocks.
3232
Those are usually needed for the PMIC communication,
3333
mostly.
3434

3535
config CLK_SUNXI_PRCM_SUN9I
3636
bool "Legacy A80 PRCM driver"
37-
default y
37+
default ARCH_SUNXI
3838
help
3939
Legacy clock driver for the A80 PRCM clocks. Those are
4040
usually needed for the PMIC communication, mostly.

include/dt-bindings/reset/sun50i-h616-ccu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,6 @@
6969
#define RST_BUS_GPADC 60
7070
#define RST_BUS_TCON_LCD0 61
7171
#define RST_BUS_TCON_LCD1 62
72+
#define RST_BUS_LVDS 63
7273

7374
#endif /* _DT_BINDINGS_RESET_SUN50I_H616_H_ */

0 commit comments

Comments
 (0)