- 13 7月, 2019 1 次提交
-
-
由 Stephen Rothwell 提交于
Without this we were getting errors like: In file included from drivers/clk/clkdev.c:22:0: drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declaration include/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was here Fixes: 59fcdce4 ("clk: Remove ifdef for COMMON_CLK in clk-provider.h") fixes: 73e0e496 ("clkdev: Always allocate a struct clk and call __clk_get() w/ CCF") Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
- 18 6月, 2019 1 次提交
-
-
由 Arnd Bergmann 提交于
The imx6q_obtain_fixed_clk_hw lacks an __init marker, which leads to this otherwise harmless warning: WARNING: vmlinux.o(.text+0x495358): Section mismatch in reference from the function imx6q_obtain_fixed_clk_hw() to the function .init.text:imx_obtain_fixed_clock_hw() The function imx6q_obtain_fixed_clk_hw() references the function __init imx_obtain_fixed_clock_hw(). This is often because imx6q_obtain_fixed_clk_hw lacks a __init annotation or the annotation of imx_obtain_fixed_clock_hw is wrong. Fixes: 992b703b ("clk: imx6q: Switch to clk_hw based API") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 07 6月, 2019 2 次提交
-
-
由 Abel Vesa 提交于
Switch the entire clk-imx6q driver to clk_hw based API. Add imx6q_obtain_fixed_clk_hw helper to clean up the registration of the clocks that are either found in device tree or are assigned a fixed zero rate. This switch allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: NAbel Vesa <abel.vesa@nxp.com> Reviewed-by: NStephen Boyd <sboyd@kernel.org> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
由 Abel Vesa 提交于
The clock is registered later than these two re-parentings. Signed-off-by: NAbel Vesa <abel.vesa@nxp.com> Reviewed-by: NStephen Boyd <sboyd@kernel.org> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 23 5月, 2019 1 次提交
-
-
由 Anson Huang 提交于
Use imx_mmdc_mask_handshake() API instead of programming CCM register directly in each platform to mask unused MMDC channel's handshake. Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Reviewed-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 29 12月, 2018 1 次提交
-
-
由 Yangtao Li 提交于
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount. Signed-off-by: NYangtao Li <tiny.windzz@gmail.com> Fixes: 2acd1b6f ("ARM: i.MX6: implement clocks using common clock framework") Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
- 11 12月, 2018 4 次提交
-
-
由 Lucas Stach 提交于
The ENET PLL is different from the other i.MX6 PLLs, as it has multiple outputs with different post-dividers, which are all bypassed if the single bypass bit is activated. The hardware setup looks something like this: _ refclk-o---PLL---o----DIV1-----| \ | | |M |----OUT1 o-----------------------|_/ | | _ | o----DIV2-----| \ | | |M |----OUT2 o-----------------------|_/ | | _ | `----DIV3-----| \ | |M |----OUT3 `-----------------------|_/ The bypass bit not only bypasses the PLL, but also the attached post-dividers. This would be reasonbly straight forward to model with a single output, or with different bypass bits for each output, but sadly the HW guys decided that it would be good to actuate all 3 muxes with a single bit. So the need to have the PLL bypassed for one of the outputs always affects 2 other (in our model) independent branches of the clock tree. This means the decision to bypass this PLL is a system wide design choice and should not be changed on-the-fly, so we can treat any bapass configuration as static. As such we can just register the post-dividiers with a ratio that reflects the bypass status, which allows us to bypass the PLL without breaking our abstraction model and with it DT stability. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
由 Lucas Stach 提交于
When specifying external clock inputs to the CCM the current code requires the clocks to be in a "clocks" child node of the DT root. This is not really conformant with DT best practices. To avoid the need to deviate from those best practices, allow the clock inputs to be specified via standard clock handles. This is in line with how drivers of the later CCM driver revisions on newer i.MX SoCs handle this. As we can't retroactively change the DT binding, allow this as an option with a fallback to the old way of how this has been handled. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Acked-by: NRob Herring <robh@kernel.org> Reviewed-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
由 Lucas Stach 提交于
The exclusive gates may be set up in the wrong way by software running before the clock driver comes up. In that case the exclusive setup is locked in its initial state, as the complementary function can't be activated without disabling the initial setup first. To avoid this lock situation, reset the exclusive gates to the off state and allow the kernel to provide the proper setup. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Reviewed-by: NDong Aisheng <Aisheng.dong@nxp.com> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
由 Anson Huang 提交于
On i.MX6QP/i.MX6Q/i.MX6DL, there are DCIC1/DCIC2 clocks gate in CCM_CCGR0 register, add them into clock tree for clock management. Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
- 18 10月, 2018 1 次提交
-
-
由 Anson Huang 提交于
i.MX6Q has MMDC0 ipg clock in CCM CCGR, add it into clock tree for clock management. Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
- 30 6月, 2018 2 次提交
-
-
由 Philipp Puschmann 提交于
q/dl datasheets list the 5th selection value for ck01_sel as video_27M_clk_root. By replacing the dummy value we then can set IMX6QDL_CLK_VIDEO_27M as parent for IMX6QDL_CLK_CKO1_SEL. Signed-off-by: NPhilipp Puschmann <pp@emlix.com> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
由 Anson Huang 提交于
Clock framework will enable those clocks registered with CLK_IS_CRITICAL flag, so no need to have clks_init_on array during clock initialization now. ARM clock is busy divider type which has the CLK_IS_CRITICAL flag set by default when registered. Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
- 02 6月, 2018 1 次提交
-
-
由 Colin Didier 提交于
Add EPIT clock support to the i.MX6Q clocking infrastructure. Signed-off-by: NColin Didier <colin.didier@devialet.com> Signed-off-by: NClément Peron <clement.peron@devialet.com> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
-
- 02 11月, 2017 1 次提交
-
-
由 Sébastien Szymanski 提交于
On i.MX6 SoCs without VPU (in my case MCIMX6D4AVT10AC), the hdmi driver fails to probe: [ 2.540030] dwhdmi-imx 120000.hdmi: Unsupported HDMI controller (0000:00:00) [ 2.548199] imx-drm display-subsystem: failed to bind 120000.hdmi (ops dw_hdmi_imx_ops): -19 [ 2.557403] imx-drm display-subsystem: master bind failed: -19 That's because hdmi_isfr's parent, video_27m, is not correctly ungated. As explained in commit 5ccc248c ("ARM: imx6q: clk: Add support for mipi_core_cfg clock as a shared clock gate"), video_27m is gated by CCM_CCGR3[CG8]. On i.MX6 SoCs with VPU, the hdmi is working thanks to the CCM_CMEOR[mod_en_ov_vpu] bit which makes the video_27m ungated whatever is in CCM_CCGR3[CG8]. The issue can be reproduced by setting CCMEOR[mod_en_ov_vpu] to 0. Make the HDMI work in every case by setting hdmi_isfr's parent to mipi_core_cfg. Signed-off-by: NSébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 21 1月, 2017 1 次提交
-
-
由 Lucas Stach 提交于
The LDB mux/gate layout has been fixed on QuadPlus, so there is no need to restrict the LDB mux changes on this hardware, as the erratum preventing this from working properly is gone. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 01 11月, 2016 3 次提交
-
-
由 Fabio Estevam 提交于
Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk tree, the glitchy parent mux of ldb_di[x]_clk can cause a glitch to enter the ldb_di_ipu_div divider. If the divider gets locked up, no ldb_di[x]_clk is generated, and the LVDS display will hang when the ipu_di_clk is sourced from ldb_di_clk. To fix the problem, both the new and current parent of the ldb_di_clk should be disabled before the switch. This patch ensures that correct steps are followed when ldb_di_clk parent is switched in the beginning of boot. The glitchy muxes are then registered as read-only. The clock parent can be selected using the assigned-clocks and assigned-clock-parents properties of the ccm device tree node: &clks { assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>; assigned-clock-parents = <&clks IMX6QDL_CLK_MMDC_CH1_AXI>, <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>; }; The issue is explained in detail in EB821 ("LDB Clock Switch Procedure & i.MX6 Asynchronous Clock Switching Guidelines") [1]. [1] http://www.nxp.com/files/32bit/doc/eng_bulletin/EB821.pdfSigned-off-by: NRanjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Reviewed-by: NAkshay Bhat <akshay.bhat@timesys.com> Tested-by Joshua Clayton <stillcompiling@gmail.com> Tested-by: NCharles Kang <Charles.Kang@advantech.com.tw> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
由 Philipp Zabel 提交于
Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk tree, the glitchy parent mux of ldb_di[x]_clk can cause a glitch to enter the ldb_di_ipu_div divider. If the divider gets locked up, no ldb_di[x]_clk is generated, and the LVDS display will hang when the ipu_di_clk is sourced from ldb_di_clk. To fix the problem, both the new and current parent of the ldb_di_clk should be disabled before the switch. As this can not be guaranteed by the clock framework during runtime, make the ldb_di[x]_sel muxes read-only. A workaround to set the muxes once during boot could be added to the kernel or bootloader. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
由 Philipp Zabel 提交于
MMDC CH1 is not used on i.MX6Q, so the handshake needed to change the parent of periph2_sel or the divider of mmdc_ch1_axi_podf will never succeed. Disable the handshake mechanism to allow changing the frequency of mmdc_ch1_axi, allowing to use it as a possible source for the LDB DI clock. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 21 9月, 2016 2 次提交
-
-
由 Lucas Stach 提交于
Initialize the GPU clock muxes to sane inputs. Until now they have not been changed from their default values, which means that both GPU3D shader and GPU2D core were fed by clock inputs whose rates exceed the maximium allowed frequency of the cores by as much as 200MHz. This fixes a severe GPU stability issue on i.MX6DL. Cc: stable@vger.kernel.org Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Acked-by: NShawn Guo <shawnguo@kernel.org> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
由 Lucas Stach 提交于
The current clock tree only implements the minimal set of differences between the i.MX6Q and the i.MX6DL, but that doesn't really reflect reality. Apply the following fixes to match the RM: - DL has no GPU3D_SHADER_SEL/PODF, the shader domain is clocked by GPU3D_CORE - GPU3D_SHADER_SEL/PODF has been repurposed as GPU2D_CORE_SEL/PODF - GPU2D_CORE_SEL/PODF has been repurposed as MLB_SEL/PODF Cc: stable@vger.kernel.org Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Acked-by: NShawn Guo <shawnguo@kernel.org> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 12 6月, 2016 1 次提交
-
-
由 Dong Aisheng 提交于
pllx_bypass_src mux shouldn't be the parent of pllx clock since it's only valid when when pllx BYPASS bit is set. Thus it is actually one parent of pllx_bypass only. Instead, pllx parent should be fixed to osc according to reference manual. Other plls have the same issue. e.g. before fix, the pll tree is: osc 6 6 24000000 0 0 pll1_bypass_src 0 0 24000000 0 0 pll1 0 0 792000000 0 0 pll1_bypass 0 0 792000000 0 0 pll1_sys 0 0 792000000 0 0 After the fix, it's: osc 6 6 24000000 0 0 pll1 0 0 792000000 0 0 pll1_bypass 0 0 792000000 0 0 pll1_sys 0 0 792000000 0 0 Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 13 4月, 2016 1 次提交
-
-
由 Lothar Waßmann 提交于
commit ee360274 ("clk: imx: Add clock support for imx6qp") introduced a regression due to a subtle typo in the 'can_root' clock definition. The effect is that trying to configure the bitrate of the can interfaces fails with -EDOM or produces a division by zero error due to the clock_freq of the can serial clock being reported as '0'. Signed-off-by: NLothar Waßmann <LW@KARO-electronics.de> Fixes: ee360274 ("clk: imx: Add clock support for imx6qp") Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 14 2月, 2016 1 次提交
-
-
由 Bai Ping 提交于
most of the clock tree structures on i.MX6 Quad Plus are same as on i.MX6Q. there still some differences between these two SOCs. compared to the i.XM6Q, the differents of clocks on i.MX6QP is mainly on: 1. New clock gate added to support the PRE and PRG modules 2. 24MHz OSC clock option added to the UART, IPG, ECSPI, and CAN clock roots. 3. MMDC channel 1 clock gate is now controllable. 4. clock gating added to the LDB_DIx_IPU clocks on i.MX6QP 5. EMI clock root divider fix 6. other updates fo CSCMRx, CSCDRx and CS2CDR registers. detailed infomation, please refer to the i.MX6QP RM. Signed-off-by: NBai Ping <ping.bai@nxp.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 25 11月, 2015 1 次提交
-
-
由 Michael Trimarchi 提交于
OSC can be used as USB hub source clock. An example we can route to CLK2_P imx6 pin. This show a usage example: [...] usb_hub: usb-hub { compatible = "smsc,usb3503a"; clocks = <&clks IMX6QDL_CLK_LVDS2_GATE>; clock-names = "refclk"; }; }; [...] &clks { assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>; assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>; }; /sys/kernel/debug/clk/clk_summary osc 5 5 24000000 0 0 [...] lvds2_sel 1 1 24000000 0 0 lvds2_gate 1 1 24000000 0 0 [...] Signed-off-by: NMichael Trimarchi <michael@amarulasolutions.com> Reviewed-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 12 10月, 2015 1 次提交
-
-
由 Shengjiu Wang 提交于
Correct SPDIF clock setting issue in clock tree, the SPDIF_GCLK is also one clock of SPDIF, which is missed before. We found an issue that imx can't enter low power mode with spdif if IMX6x_CLK_SPDIF is used as the core clock of spdif. Because spdif driver will register IMX6x_CLK_SPDIF clock to regmap, regmap will do clk_prepare in init function, then IMX6x_CLK_SPDIF clock is prepared in probe, so its parent clock (PLL clock) is prepared, the prepare operation of PLL clock is to enable the clock. But I.MX needs all PLL clock is disabled, then it can enter low power mode. So we can't use IMX6x_CLK_SPDIF as the core clock of spdif, the correct spdif core clock is SPDIF_GCLK, which share same gate bit with IMX6x_CLK_SPDIF clock. SPDIF_GCLK's parent clock is ipg clock. Signed-off-by: NShengjiu Wang <shengjiu.wang@freescale.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 26 9月, 2015 1 次提交
-
-
由 Lucas Stach 提交于
Make sure to keep UART clocks enabled during kernel init if earlyprintk or earlycon are active. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 10 8月, 2015 1 次提交
-
-
由 Victoria Milhoan 提交于
Add CAAM clock support to the i.MX6 clocking infrastructure. Signed-off-by: NVictoria Milhoan <vicki.milhoan@freescale.com> Tested-by: NHoria Geantă <horia.geanta@freescale.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 13 7月, 2015 1 次提交
-
-
由 Fabio Estevam 提交于
Currently it is not possible to use HDMI and LVDS at the same time on a imx6dl-sabresd board. Fix this usecase by setting IMX6QDL_CLK_PLL3_PFD1_540M to 540MHz and also by setting it as the parent of IMX6QDL_CLK_IPU1_SEL. Based on the configuration done in the FSL kernel. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NShawn Guo <shawnguo@kernel.org>
-
- 03 6月, 2015 6 次提交
-
-
由 Sébastien Szymanski 提交于
According to IMX6D/Q RM, table 18-3, sata clock's parent is ahb, not ipg. Signed-off-by: NSébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Shawn Guo 提交于
After the cleanup on clock drivers, they are now ready to be moved into drivers/clk. Let's move them into drivers/clk/imx folder. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NStephen Boyd <sboyd@codeaurora.org>
-
由 Shawn Guo 提交于
With the cleanup done before, we now can simply define base address and irq as needed in clock driver, to get those platform header inclusions removed. Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Shawn Guo 提交于
As we're about to move clock drivers out of arch/arm/mach-imx, cpu_is_xxx() shouldn't be used any more. Let's avoid the call by looking at the device tree machine compatible string to determine which SoC the clock driver is running on. Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Shawn Guo 提交于
We are about to move imx6 clock driver into drivers/clk, so let's get imx6 pm code map CCM block on its own rather than relying on clock driver to do the mapping. Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Shawn Guo 提交于
Rather than setting initial low-power mode in every single i.MX6 clock initialization function, we should really do that in pm code. Let's move imx6q_set_lpm(WAIT_CLOCKED) call into imx6_pm_common_init(). While at it, let's rename the function to imx6_set_lpm() since it's actually common for all i.MX6 SoCs. Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 02 3月, 2015 5 次提交
-
-
由 Liu Ying 提交于
The CG8 field of the CCM CCGR3 register is the 'mipi_core_cfg' gate clock, according to the i.MX6q/sdl reference manuals. This clock is actually the gate for several clocks, including the ipg clock's output. The MIPI DSI host controller embedded in the i.MX6q/sdl SoCs takes the ipg clock as the pclk - the APB clock signal . In order to gate/ungate the ipg clock, this patch adds a new shared clock gate named as "mipi_ipg". Signed-off-by: NLiu Ying <Ying.Liu@freescale.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Liu Ying 提交于
The CG8 field of the CCM CCGR3 register is named as 'mipi_core_cfg' clock, according to the i.MX6q/sdl reference manuals. This clock is actually the gate for several clocks, including the hsi_tx_sel clock's output and the video_27m clock's output. The MIPI DSI host controller embedded in the i.MX6q/sdl SoCs uses the video_27m clock to generate PLL reference clock and MIPI core configuration clock. In order to gate/ungate the two MIPI DSI host controller relevant clocks, this patch adds the mipi_core_cfg clock as a shared clock gate. Suggested-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NLiu Ying <Ying.Liu@freescale.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Liu Ying 提交于
The CG8 field of the CCM CCGR3 register is named as 'mipi_core_cfg' clock, according to the i.MX6q/sdl reference manuals. This clock is actually the gate for several clocks, including the hsi_tx_sel clock's output and the video_27m clock's output. So, this patch changes the hsi_tx clock to be a shared clock gate. Suggested-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NLiu Ying <Ying.Liu@freescale.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Liu Ying 提交于
According to the table 33-1 in the i.MX6Q reference manual, the hdmi_isfr clock's parent should be the video_27m clock. The i.MX6DL reference manual has the same statement. This patch changes the hdmi_isfr clock's parent from the pll3_pfd1_540m clock to the video_27m clock. Suggested-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NLiu Ying <Ying.Liu@freescale.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
由 Liu Ying 提交于
This patch supports the video_27m clock which is a fixed factor clock of the pll3_pfd1_540m clock. Signed-off-by: NLiu Ying <Ying.Liu@freescale.com> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-