mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branches 'clk-spreadtrum', 'clk-stm32f', 'clk-stm32mp1', 'clk-hi655x' and 'clk-gpio' into clk-next
* clk-spreadtrum: clk: sprd: add RTC gate for SC9860 dt-bindings: clocks: add APB RTC gate for SC9860 * clk-stm32f: clk: stm32: Add clk entry for SDMMC2 on stm32F769 clk: stm32: Add DSI clock for STM32F469 Board clk: stm32: END_PRIMARY_CLK should be declare after CLK_SYSCLK * clk-stm32mp1: clk: stm32: add configuration flags for each of the stm32 drivers clk: stm32mp1: add Debug clocks clk: stm32mp1: add MCO clocks clk: stm32mp1: add RTC clock clk: stm32mp1: add Peripheral & Kernel Clocks clk: stm32mp1: add Kernel timers clk: stm32mp1: add Sub System clocks clk: stm32mp1: add Post-dividers for PLL clk: stm32mp1: add PLL clocks clk: stm32mp1: add Source Clocks for PLLs clk: stm32mp1: add MP1 gate for hse/hsi/csi oscillators clk: stm32mp1: Introduce STM32MP1 clock driver dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings * clk-hi655x: clk: enable hi655x common clk automatically * clk-gpio: clk: clk-gpio: Allow GPIO to sleep in set/get_parent
This commit is contained in:
commit
e8121d9867
10 changed files with 2572 additions and 12 deletions
|
|
@ -55,8 +55,10 @@ config COMMON_CLK_RK808
|
|||
by control register.
|
||||
|
||||
config COMMON_CLK_HI655X
|
||||
tristate "Clock driver for Hi655x"
|
||||
depends on MFD_HI655X_PMIC || COMPILE_TEST
|
||||
tristate "Clock driver for Hi655x" if EXPERT
|
||||
depends on (MFD_HI655X_PMIC || COMPILE_TEST)
|
||||
depends on REGMAP
|
||||
default MFD_HI655X_PMIC
|
||||
---help---
|
||||
This driver supports the hi655x PMIC clock. This
|
||||
multi-function device has one fixed-rate oscillator, clocked
|
||||
|
|
@ -238,6 +240,26 @@ config COMMON_CLK_VC5
|
|||
This driver supports the IDT VersaClock 5 and VersaClock 6
|
||||
programmable clock generators.
|
||||
|
||||
config COMMON_CLK_STM32MP157
|
||||
def_bool COMMON_CLK && MACH_STM32MP157
|
||||
help
|
||||
---help---
|
||||
Support for stm32mp157 SoC family clocks
|
||||
|
||||
config COMMON_CLK_STM32F
|
||||
bool "Clock driver for stm32f4 and stm32f7 SoC families"
|
||||
depends on MACH_STM32F429 || MACH_STM32F469 || MACH_STM32F746
|
||||
help
|
||||
---help---
|
||||
Support for stm32f4 and stm32f7 SoC families clocks
|
||||
|
||||
config COMMON_CLK_STM32H7
|
||||
bool "Clock driver for stm32h7 SoC family"
|
||||
depends on MACH_STM32H743
|
||||
help
|
||||
---help---
|
||||
Support for stm32h7 SoC family clocks
|
||||
|
||||
source "drivers/clk/bcm/Kconfig"
|
||||
source "drivers/clk/hisilicon/Kconfig"
|
||||
source "drivers/clk/imgtec/Kconfig"
|
||||
|
|
|
|||
|
|
@ -45,8 +45,9 @@ obj-$(CONFIG_COMMON_CLK_SCPI) += clk-scpi.o
|
|||
obj-$(CONFIG_COMMON_CLK_SI5351) += clk-si5351.o
|
||||
obj-$(CONFIG_COMMON_CLK_SI514) += clk-si514.o
|
||||
obj-$(CONFIG_COMMON_CLK_SI570) += clk-si570.o
|
||||
obj-$(CONFIG_ARCH_STM32) += clk-stm32f4.o
|
||||
obj-$(CONFIG_ARCH_STM32) += clk-stm32h7.o
|
||||
obj-$(CONFIG_COMMON_CLK_STM32F) += clk-stm32f4.o
|
||||
obj-$(CONFIG_COMMON_CLK_STM32H7) += clk-stm32h7.o
|
||||
obj-$(CONFIG_COMMON_CLK_STM32MP157) += clk-stm32mp1.o
|
||||
obj-$(CONFIG_ARCH_TANGO) += clk-tango4.o
|
||||
obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o
|
||||
obj-$(CONFIG_ARCH_U300) += clk-u300.o
|
||||
|
|
|
|||
|
|
@ -73,14 +73,14 @@ static u8 clk_gpio_mux_get_parent(struct clk_hw *hw)
|
|||
{
|
||||
struct clk_gpio *clk = to_clk_gpio(hw);
|
||||
|
||||
return gpiod_get_value(clk->gpiod);
|
||||
return gpiod_get_value_cansleep(clk->gpiod);
|
||||
}
|
||||
|
||||
static int clk_gpio_mux_set_parent(struct clk_hw *hw, u8 index)
|
||||
{
|
||||
struct clk_gpio *clk = to_clk_gpio(hw);
|
||||
|
||||
gpiod_set_value(clk->gpiod, index);
|
||||
gpiod_set_value_cansleep(clk->gpiod, index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ static const struct stm32f4_gate_data stm32f746_gates[] __initconst = {
|
|||
|
||||
{ STM32F4_RCC_APB2ENR, 0, "tim1", "apb2_mul" },
|
||||
{ STM32F4_RCC_APB2ENR, 1, "tim8", "apb2_mul" },
|
||||
{ STM32F4_RCC_APB2ENR, 7, "sdmmc2", "sdmux" },
|
||||
{ STM32F4_RCC_APB2ENR, 8, "adc1", "apb2_div" },
|
||||
{ STM32F4_RCC_APB2ENR, 9, "adc2", "apb2_div" },
|
||||
{ STM32F4_RCC_APB2ENR, 10, "adc3", "apb2_div" },
|
||||
|
|
@ -315,7 +316,7 @@ static const u64 stm32f46xx_gate_map[MAX_GATE_MAP] = { 0x000000f17ef417ffull,
|
|||
|
||||
static const u64 stm32f746_gate_map[MAX_GATE_MAP] = { 0x000000f17ef417ffull,
|
||||
0x0000000000000003ull,
|
||||
0x04f77f033e01c9ffull };
|
||||
0x04f77f833e01c9ffull };
|
||||
|
||||
static const u64 *stm32f4_gate_map;
|
||||
|
||||
|
|
@ -521,7 +522,7 @@ static const struct stm32f4_pll_data stm32f429_pll[MAX_PLL_DIV] = {
|
|||
};
|
||||
|
||||
static const struct stm32f4_pll_data stm32f469_pll[MAX_PLL_DIV] = {
|
||||
{ PLL, 50, { "pll", "pll-q", NULL } },
|
||||
{ PLL, 50, { "pll", "pll-q", "pll-r" } },
|
||||
{ PLL_I2S, 50, { "plli2s-p", "plli2s-q", "plli2s-r" } },
|
||||
{ PLL_SAI, 50, { "pllsai-p", "pllsai-q", "pllsai-r" } },
|
||||
};
|
||||
|
|
@ -1047,6 +1048,8 @@ static const char *rtc_parents[4] = {
|
|||
"no-clock", "lse", "lsi", "hse-rtc"
|
||||
};
|
||||
|
||||
static const char *dsi_parent[2] = { NULL, "pll-r" };
|
||||
|
||||
static const char *lcd_parent[1] = { "pllsai-r-div" };
|
||||
|
||||
static const char *i2s_parents[2] = { "plli2s-r", NULL };
|
||||
|
|
@ -1156,6 +1159,12 @@ static const struct stm32_aux_clk stm32f469_aux_clk[] = {
|
|||
NO_GATE, 0,
|
||||
0
|
||||
},
|
||||
{
|
||||
CLK_F469_DSI, "dsi", dsi_parent, ARRAY_SIZE(dsi_parent),
|
||||
STM32F4_RCC_DCKCFGR, 29, 1,
|
||||
STM32F4_RCC_APB2ENR, 27,
|
||||
CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT
|
||||
},
|
||||
};
|
||||
|
||||
static const struct stm32_aux_clk stm32f746_aux_clk[] = {
|
||||
|
|
@ -1450,6 +1459,7 @@ static void __init stm32f4_rcc_init(struct device_node *np)
|
|||
stm32f4_gate_map = data->gates_map;
|
||||
|
||||
hse_clk = of_clk_get_parent_name(np, 0);
|
||||
dsi_parent[0] = hse_clk;
|
||||
|
||||
i2s_in_clk = of_clk_get_parent_name(np, 1);
|
||||
|
||||
|
|
|
|||
2117
drivers/clk/clk-stm32mp1.c
Normal file
2117
drivers/clk/clk-stm32mp1.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -959,6 +959,44 @@ static SPRD_SC_GATE_CLK(sdio2_2x_en, "sdio2-2x-en", "aon-apb", 0x13c,
|
|||
0x1000, BIT(6), 0, 0);
|
||||
static SPRD_SC_GATE_CLK(emmc_2x_en, "emmc-2x-en", "aon-apb", 0x13c,
|
||||
0x1000, BIT(9), 0, 0);
|
||||
static SPRD_SC_GATE_CLK(arch_rtc_eb, "arch-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(0), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(kpb_rtc_eb, "kpb-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(1), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(aon_syst_rtc_eb, "aon-syst-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(2), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(ap_syst_rtc_eb, "ap-syst-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(3), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(aon_tmr_rtc_eb, "aon-tmr-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(4), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(ap_tmr0_rtc_eb, "ap-tmr0-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(5), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(eic_rtc_eb, "eic-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(6), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(eic_rtcdv5_eb, "eic-rtcdv5-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(7), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(ap_wdg_rtc_eb, "ap-wdg-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(9), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(ap_tmr1_rtc_eb, "ap-tmr1-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(15), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(ap_tmr2_rtc_eb, "ap-tmr2-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(16), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(dcxo_tmr_rtc_eb, "dcxo-tmr-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(17), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(bb_cal_rtc_eb, "bb-cal-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(18), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(avs_big_rtc_eb, "avs-big-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(20), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(avs_lit_rtc_eb, "avs-lit-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(21), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(avs_gpu0_rtc_eb, "avs-gpu0-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(22), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(avs_gpu1_rtc_eb, "avs-gpu1-rtc-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(23), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(gpu_ts_eb, "gpu-ts-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(24), CLK_IGNORE_UNUSED, 0);
|
||||
static SPRD_SC_GATE_CLK(rtcdv10_eb, "rtcdv10-eb", "aon-apb", 0x10,
|
||||
0x1000, BIT(27), CLK_IGNORE_UNUSED, 0);
|
||||
|
||||
static struct sprd_clk_common *sc9860_aon_gate[] = {
|
||||
/* address base is 0x402e0000 */
|
||||
|
|
@ -1030,6 +1068,25 @@ static struct sprd_clk_common *sc9860_aon_gate[] = {
|
|||
&sdio1_2x_en.common,
|
||||
&sdio2_2x_en.common,
|
||||
&emmc_2x_en.common,
|
||||
&arch_rtc_eb.common,
|
||||
&kpb_rtc_eb.common,
|
||||
&aon_syst_rtc_eb.common,
|
||||
&ap_syst_rtc_eb.common,
|
||||
&aon_tmr_rtc_eb.common,
|
||||
&ap_tmr0_rtc_eb.common,
|
||||
&eic_rtc_eb.common,
|
||||
&eic_rtcdv5_eb.common,
|
||||
&ap_wdg_rtc_eb.common,
|
||||
&ap_tmr1_rtc_eb.common,
|
||||
&ap_tmr2_rtc_eb.common,
|
||||
&dcxo_tmr_rtc_eb.common,
|
||||
&bb_cal_rtc_eb.common,
|
||||
&avs_big_rtc_eb.common,
|
||||
&avs_lit_rtc_eb.common,
|
||||
&avs_gpu0_rtc_eb.common,
|
||||
&avs_gpu1_rtc_eb.common,
|
||||
&gpu_ts_eb.common,
|
||||
&rtcdv10_eb.common,
|
||||
};
|
||||
|
||||
static struct clk_hw_onecell_data sc9860_aon_gate_hws = {
|
||||
|
|
@ -1102,6 +1159,25 @@ static struct clk_hw_onecell_data sc9860_aon_gate_hws = {
|
|||
[CLK_SDIO1_2X_EN] = &sdio1_2x_en.common.hw,
|
||||
[CLK_SDIO2_2X_EN] = &sdio2_2x_en.common.hw,
|
||||
[CLK_EMMC_2X_EN] = &emmc_2x_en.common.hw,
|
||||
[CLK_ARCH_RTC_EB] = &arch_rtc_eb.common.hw,
|
||||
[CLK_KPB_RTC_EB] = &kpb_rtc_eb.common.hw,
|
||||
[CLK_AON_SYST_RTC_EB] = &aon_syst_rtc_eb.common.hw,
|
||||
[CLK_AP_SYST_RTC_EB] = &ap_syst_rtc_eb.common.hw,
|
||||
[CLK_AON_TMR_RTC_EB] = &aon_tmr_rtc_eb.common.hw,
|
||||
[CLK_AP_TMR0_RTC_EB] = &ap_tmr0_rtc_eb.common.hw,
|
||||
[CLK_EIC_RTC_EB] = &eic_rtc_eb.common.hw,
|
||||
[CLK_EIC_RTCDV5_EB] = &eic_rtcdv5_eb.common.hw,
|
||||
[CLK_AP_WDG_RTC_EB] = &ap_wdg_rtc_eb.common.hw,
|
||||
[CLK_AP_TMR1_RTC_EB] = &ap_tmr1_rtc_eb.common.hw,
|
||||
[CLK_AP_TMR2_RTC_EB] = &ap_tmr2_rtc_eb.common.hw,
|
||||
[CLK_DCXO_TMR_RTC_EB] = &dcxo_tmr_rtc_eb.common.hw,
|
||||
[CLK_BB_CAL_RTC_EB] = &bb_cal_rtc_eb.common.hw,
|
||||
[CLK_AVS_BIG_RTC_EB] = &avs_big_rtc_eb.common.hw,
|
||||
[CLK_AVS_LIT_RTC_EB] = &avs_lit_rtc_eb.common.hw,
|
||||
[CLK_AVS_GPU0_RTC_EB] = &avs_gpu0_rtc_eb.common.hw,
|
||||
[CLK_AVS_GPU1_RTC_EB] = &avs_gpu1_rtc_eb.common.hw,
|
||||
[CLK_GPU_TS_EB] = &gpu_ts_eb.common.hw,
|
||||
[CLK_RTCDV10_EB] = &rtcdv10_eb.common.hw,
|
||||
},
|
||||
.num = CLK_AON_GATE_NUM,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue