Skip to content

Commit 002cf0d

Browse files
macromorganwens
authored andcommitted
clk: sunxi-ng: h616: Add clock/reset for GPADC
Add the GPADC required clock and reset which is used for the onboard GPADC. Signed-off-by: Chris Morgan <[email protected]> Acked-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Chen-Yu Tsai <[email protected]>
1 parent 29f1841 commit 002cf0d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ static SUNXI_CCU_MP_WITH_MUX_GATE(ts_clk, "ts", ts_parents, 0x9b0,
489489

490490
static SUNXI_CCU_GATE(bus_ts_clk, "bus-ts", "ahb3", 0x9bc, BIT(0), 0);
491491

492+
static SUNXI_CCU_GATE(bus_gpadc_clk, "bus-gpadc", "apb1", 0x9ec, BIT(0), 0);
493+
492494
static SUNXI_CCU_GATE(bus_ths_clk, "bus-ths", "apb1", 0x9fc, BIT(0), 0);
493495

494496
static const char * const audio_parents[] = { "pll-audio-1x", "pll-audio-2x",
@@ -807,6 +809,7 @@ static struct ccu_common *sun50i_h616_ccu_clks[] = {
807809
&bus_emac1_clk.common,
808810
&ts_clk.common,
809811
&bus_ts_clk.common,
812+
&bus_gpadc_clk.common,
810813
&bus_ths_clk.common,
811814
&spdif_clk.common,
812815
&bus_spdif_clk.common,
@@ -940,6 +943,7 @@ static struct clk_hw_onecell_data sun50i_h616_hw_clks = {
940943
[CLK_BUS_EMAC1] = &bus_emac1_clk.common.hw,
941944
[CLK_TS] = &ts_clk.common.hw,
942945
[CLK_BUS_TS] = &bus_ts_clk.common.hw,
946+
[CLK_BUS_GPADC] = &bus_gpadc_clk.common.hw,
943947
[CLK_BUS_THS] = &bus_ths_clk.common.hw,
944948
[CLK_SPDIF] = &spdif_clk.common.hw,
945949
[CLK_BUS_SPDIF] = &bus_spdif_clk.common.hw,
@@ -1021,6 +1025,7 @@ static struct ccu_reset_map sun50i_h616_ccu_resets[] = {
10211025
[RST_BUS_EMAC0] = { 0x97c, BIT(16) },
10221026
[RST_BUS_EMAC1] = { 0x97c, BIT(17) },
10231027
[RST_BUS_TS] = { 0x9bc, BIT(16) },
1028+
[RST_BUS_GPADC] = { 0x9ec, BIT(16) },
10241029
[RST_BUS_THS] = { 0x9fc, BIT(16) },
10251030
[RST_BUS_SPDIF] = { 0xa2c, BIT(16) },
10261031
[RST_BUS_DMIC] = { 0xa4c, BIT(16) },

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@
5151

5252
#define CLK_BUS_DRAM 56
5353

54-
#define CLK_NUMBER (CLK_PLL_SYSTEM_32K + 1)
54+
#define CLK_NUMBER (CLK_BUS_GPADC + 1)
5555

5656
#endif /* _CCU_SUN50I_H616_H_ */

0 commit comments

Comments
 (0)