You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
clk: at91: add audio pll clock drivers
This new clock driver set allows to have a fractional divided clock that would generate a precise clock particularly suitable for audio applications. The main audio pll clock has two children clocks: one that is connected to the PMC, the other that can directly drive a pad. As these two routes have different enable bits and different dividers and divider formulas, they are handled by two different drivers. Each of them could modify the rate of the main audio pll parent. The main audio pll clock can output 620MHz to 700MHz. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
33202fa32d
commit
0865805d82
@@ -26,6 +26,7 @@ config SOC_SAMA5D2
|
||||
select HAVE_AT91_USB_CLK
|
||||
select HAVE_AT91_H32MX
|
||||
select HAVE_AT91_GENERATED_CLK
|
||||
select HAVE_AT91_AUDIO_PLL
|
||||
select PINCTRL_AT91PIO4
|
||||
help
|
||||
Select this if ou are using one of Atmel's SAMA5D2 family SoC.
|
||||
@@ -125,6 +126,9 @@ config HAVE_AT91_H32MX
|
||||
config HAVE_AT91_GENERATED_CLK
|
||||
bool
|
||||
|
||||
config HAVE_AT91_AUDIO_PLL
|
||||
bool
|
||||
|
||||
config SOC_SAM_V4_V5
|
||||
bool
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ obj-y += pmc.o sckc.o
|
||||
obj-y += clk-slow.o clk-main.o clk-pll.o clk-plldiv.o clk-master.o
|
||||
obj-y += clk-system.o clk-peripheral.o clk-programmable.o
|
||||
|
||||
obj-$(CONFIG_HAVE_AT91_AUDIO_PLL) += clk-audio-pll.o
|
||||
obj-$(CONFIG_HAVE_AT91_UTMI) += clk-utmi.o
|
||||
obj-$(CONFIG_HAVE_AT91_USB_CLK) += clk-usb.o
|
||||
obj-$(CONFIG_HAVE_AT91_SMD) += clk-smd.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -185,4 +185,29 @@
|
||||
#define AT91_PMC_PCR_EN (0x1 << 28) /* Enable */
|
||||
#define AT91_PMC_PCR_GCKEN (0x1 << 29) /* GCK Enable */
|
||||
|
||||
#define AT91_PMC_AUDIO_PLL0 0x14c
|
||||
#define AT91_PMC_AUDIO_PLL_PLLEN (1 << 0)
|
||||
#define AT91_PMC_AUDIO_PLL_PADEN (1 << 1)
|
||||
#define AT91_PMC_AUDIO_PLL_PMCEN (1 << 2)
|
||||
#define AT91_PMC_AUDIO_PLL_RESETN (1 << 3)
|
||||
#define AT91_PMC_AUDIO_PLL_ND_OFFSET 8
|
||||
#define AT91_PMC_AUDIO_PLL_ND_MASK (0x7f << AT91_PMC_AUDIO_PLL_ND_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_ND(n) ((n) << AT91_PMC_AUDIO_PLL_ND_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_QDPMC_OFFSET 16
|
||||
#define AT91_PMC_AUDIO_PLL_QDPMC_MASK (0x7f << AT91_PMC_AUDIO_PLL_QDPMC_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_QDPMC(n) ((n) << AT91_PMC_AUDIO_PLL_QDPMC_OFFSET)
|
||||
|
||||
#define AT91_PMC_AUDIO_PLL1 0x150
|
||||
#define AT91_PMC_AUDIO_PLL_FRACR_MASK 0x3fffff
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_OFFSET 24
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_MASK (0x7f << AT91_PMC_AUDIO_PLL_QDPAD_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD(n) ((n) << AT91_PMC_AUDIO_PLL_QDPAD_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_DIV_OFFSET AT91_PMC_AUDIO_PLL_QDPAD_OFFSET
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_DIV_MASK (0x3 << AT91_PMC_AUDIO_PLL_QDPAD_DIV_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_DIV(n) ((n) << AT91_PMC_AUDIO_PLL_QDPAD_DIV_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_OFFSET 26
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_MAX 0x1f
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_MASK (AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_MAX << AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_OFFSET)
|
||||
#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV(n) ((n) << AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_OFFSET)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user