diff options
23 files changed, 1645 insertions, 71 deletions
diff --git a/Documentation/devicetree/bindings/clock/imx6sll-clock.txt b/Documentation/devicetree/bindings/clock/imx6sll-clock.txt new file mode 100644 index 000000000000..fee849d5fdd1 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx6sll-clock.txt | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | * Clock bindings for Freescale i.MX6 SLL | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "fsl,imx6sll-ccm" | ||
| 5 | - reg: Address and length of the register set | ||
| 6 | - #clock-cells: Should be <1> | ||
| 7 | - clocks: list of clock specifiers, must contain an entry for each required | ||
| 8 | entry in clock-names | ||
| 9 | - clock-names: should include entries "ckil", "osc", "ipp_di0" and "ipp_di1" | ||
| 10 | |||
| 11 | The clock consumer should specify the desired clock by having the clock | ||
| 12 | ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sll-clock.h | ||
| 13 | for the full list of i.MX6 SLL clock IDs. | ||
| 14 | |||
| 15 | Examples: | ||
| 16 | |||
| 17 | #include <dt-bindings/clock/imx6sll-clock.h> | ||
| 18 | |||
| 19 | clks: clock-controller@20c4000 { | ||
| 20 | compatible = "fsl,imx6sll-ccm"; | ||
| 21 | reg = <0x020c4000 0x4000>; | ||
| 22 | interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>, | ||
| 23 | <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>; | ||
| 24 | #clock-cells = <1>; | ||
| 25 | clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>; | ||
| 26 | clock-names = "ckil", "osc", "ipp_di0", "ipp_di1"; | ||
| 27 | }; | ||
| 28 | |||
| 29 | uart1: serial@2020000 { | ||
| 30 | compatible = "fsl,imx6sl-uart", "fsl,imx6q-uart", "fsl,imx21-uart"; | ||
| 31 | reg = <0x02020000 0x4000>; | ||
| 32 | interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; | ||
| 33 | clocks = <&clks IMX6SLL_CLK_UART1_IPG>, | ||
| 34 | <&clks IMX6SLL_CLK_UART1_SERIAL>; | ||
| 35 | clock-names = "ipg", "per"; | ||
| 36 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/intc_stratix10.txt b/Documentation/devicetree/bindings/clock/intc_stratix10.txt new file mode 100644 index 000000000000..9f4ec5cb5c6b --- /dev/null +++ b/Documentation/devicetree/bindings/clock/intc_stratix10.txt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | Device Tree Clock bindings for Intel's SoCFPGA Stratix10 platform | ||
| 2 | |||
| 3 | This binding uses the common clock binding[1]. | ||
| 4 | |||
| 5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | - compatible : shall be | ||
| 9 | "intel,stratix10-clkmgr" | ||
| 10 | |||
| 11 | - reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. | ||
| 12 | |||
| 13 | - #clock-cells : from common clock binding, shall be set to 1. | ||
| 14 | |||
| 15 | Example: | ||
| 16 | clkmgr: clock-controller@ffd10000 { | ||
| 17 | compatible = "intel,stratix10-clkmgr"; | ||
| 18 | reg = <0xffd10000 0x1000>; | ||
| 19 | #clock-cells = <1>; | ||
| 20 | }; | ||
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index fdbffc5249f3..f0aeffc3abd6 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile | |||
| @@ -91,6 +91,7 @@ obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/ | |||
| 91 | obj-$(CONFIG_PLAT_SPEAR) += spear/ | 91 | obj-$(CONFIG_PLAT_SPEAR) += spear/ |
| 92 | obj-$(CONFIG_ARCH_SPRD) += sprd/ | 92 | obj-$(CONFIG_ARCH_SPRD) += sprd/ |
| 93 | obj-$(CONFIG_ARCH_STI) += st/ | 93 | obj-$(CONFIG_ARCH_STI) += st/ |
| 94 | obj-$(CONFIG_ARCH_STRATIX10) += socfpga/ | ||
| 94 | obj-$(CONFIG_ARCH_SUNXI) += sunxi/ | 95 | obj-$(CONFIG_ARCH_SUNXI) += sunxi/ |
| 95 | obj-$(CONFIG_ARCH_SUNXI) += sunxi-ng/ | 96 | obj-$(CONFIG_ARCH_SUNXI) += sunxi-ng/ |
| 96 | obj-$(CONFIG_ARCH_TEGRA) += tegra/ | 97 | obj-$(CONFIG_ARCH_TEGRA) += tegra/ |
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 44301a3d9963..40acb8ebfb42 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c | |||
| @@ -602,9 +602,7 @@ static void bcm2835_pll_off(struct clk_hw *hw) | |||
| 602 | const struct bcm2835_pll_data *data = pll->data; | 602 | const struct bcm2835_pll_data *data = pll->data; |
| 603 | 603 | ||
| 604 | spin_lock(&cprman->regs_lock); | 604 | spin_lock(&cprman->regs_lock); |
| 605 | cprman_write(cprman, data->cm_ctrl_reg, | 605 | cprman_write(cprman, data->cm_ctrl_reg, CM_PLL_ANARST); |
| 606 | cprman_read(cprman, data->cm_ctrl_reg) | | ||
| 607 | CM_PLL_ANARST); | ||
| 608 | cprman_write(cprman, data->a2w_ctrl_reg, | 606 | cprman_write(cprman, data->a2w_ctrl_reg, |
| 609 | cprman_read(cprman, data->a2w_ctrl_reg) | | 607 | cprman_read(cprman, data->a2w_ctrl_reg) | |
| 610 | A2W_PLL_CTRL_PWRDN); | 608 | A2W_PLL_CTRL_PWRDN); |
| @@ -638,6 +636,10 @@ static int bcm2835_pll_on(struct clk_hw *hw) | |||
| 638 | cpu_relax(); | 636 | cpu_relax(); |
| 639 | } | 637 | } |
| 640 | 638 | ||
| 639 | cprman_write(cprman, data->a2w_ctrl_reg, | ||
| 640 | cprman_read(cprman, data->a2w_ctrl_reg) | | ||
| 641 | A2W_PLL_CTRL_PRST_DISABLE); | ||
| 642 | |||
| 641 | return 0; | 643 | return 0; |
| 642 | } | 644 | } |
| 643 | 645 | ||
diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c index e8ea81c30f0c..c58019750b7e 100644 --- a/drivers/clk/clk-cs2000-cp.c +++ b/drivers/clk/clk-cs2000-cp.c | |||
| @@ -549,7 +549,7 @@ static int cs2000_resume(struct device *dev) | |||
| 549 | } | 549 | } |
| 550 | 550 | ||
| 551 | static const struct dev_pm_ops cs2000_pm_ops = { | 551 | static const struct dev_pm_ops cs2000_pm_ops = { |
| 552 | .resume_early = cs2000_resume, | 552 | SET_LATE_SYSTEM_SLEEP_PM_OPS(NULL, cs2000_resume) |
| 553 | }; | 553 | }; |
| 554 | 554 | ||
| 555 | static struct i2c_driver cs2000_driver = { | 555 | static struct i2c_driver cs2000_driver = { |
diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index f91f2b2e11cd..8c3baa7e6496 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile | |||
| @@ -22,6 +22,7 @@ obj-$(CONFIG_SOC_IMX35) += clk-imx35.o | |||
| 22 | obj-$(CONFIG_SOC_IMX5) += clk-imx51-imx53.o | 22 | obj-$(CONFIG_SOC_IMX5) += clk-imx51-imx53.o |
| 23 | obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o | 23 | obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o |
| 24 | obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o | 24 | obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o |
| 25 | obj-$(CONFIG_SOC_IMX6SLL) += clk-imx6sll.o | ||
| 25 | obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o | 26 | obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o |
| 26 | obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o | 27 | obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o |
| 27 | obj-$(CONFIG_SOC_IMX7D) += clk-imx7d.o | 28 | obj-$(CONFIG_SOC_IMX7D) += clk-imx7d.o |
diff --git a/drivers/clk/imx/clk-busy.c b/drivers/clk/imx/clk-busy.c index 6df3389687bc..99036527eb0d 100644 --- a/drivers/clk/imx/clk-busy.c +++ b/drivers/clk/imx/clk-busy.c | |||
| @@ -101,7 +101,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name, | |||
| 101 | 101 | ||
| 102 | init.name = name; | 102 | init.name = name; |
| 103 | init.ops = &clk_busy_divider_ops; | 103 | init.ops = &clk_busy_divider_ops; |
| 104 | init.flags = CLK_SET_RATE_PARENT; | 104 | init.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL; |
| 105 | init.parent_names = &parent_name; | 105 | init.parent_names = &parent_name; |
| 106 | init.num_parents = 1; | 106 | init.num_parents = 1; |
| 107 | 107 | ||
| @@ -175,7 +175,7 @@ struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, | |||
| 175 | 175 | ||
| 176 | init.name = name; | 176 | init.name = name; |
| 177 | init.ops = &clk_busy_mux_ops; | 177 | init.ops = &clk_busy_mux_ops; |
| 178 | init.flags = 0; | 178 | init.flags = CLK_IS_CRITICAL; |
| 179 | init.parent_names = parent_names; | 179 | init.parent_names = parent_names; |
| 180 | init.num_parents = num_parents; | 180 | init.num_parents = num_parents; |
| 181 | 181 | ||
diff --git a/drivers/clk/imx/clk-imx6sll.c b/drivers/clk/imx/clk-imx6sll.c new file mode 100644 index 000000000000..3651c77fbabe --- /dev/null +++ b/drivers/clk/imx/clk-imx6sll.c | |||
| @@ -0,0 +1,340 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0 | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. | ||
| 4 | * Copyright 2017-2018 NXP. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <dt-bindings/clock/imx6sll-clock.h> | ||
| 8 | #include <linux/clk.h> | ||
| 9 | #include <linux/clkdev.h> | ||
| 10 | #include <linux/err.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/io.h> | ||
| 13 | #include <linux/of.h> | ||
| 14 | #include <linux/of_address.h> | ||
| 15 | |||
| 16 | #include "clk.h" | ||
| 17 | |||
| 18 | #define CCM_ANALOG_PLL_BYPASS (0x1 << 16) | ||
