1
0
Fork 0
Commit Graph

4564 Commits (redonkable)

Author SHA1 Message Date
Bai Ping e59e354f65 MLK-20136-02 driver: clk: imx: keep DRAM PLL always on for i.MX8MQ
Keep the DRAM PLL always on by default on i.MX8MQ.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-11-02 18:27:19 +08:00
Abel Vesa e3f28a4fa3 MLK-19966 clk: imx: Skip disabling uart clocks if m4 is active
No way of knowing when any of the uart clocks is currently
in use by m4 so just skip the gating for all of them.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-31 11:34:57 +02:00
Abel Vesa 4954072ba6 MLK-19966 clk: imx: Ignore gating unused composite clocks if m4 active
Ignoring the gating of composite clocks if m4 is active is necessary
since any of those clocks can be in use by m4 at any given time.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-31 11:34:57 +02:00
Irina Tirdea 031191234e MLK-13869 Revert "ARM: imx: add sleep for pllv3 relock"
This reverts commit 322503a157.
The driver for clk-pllv3 has moved from arch/arm/mach-imx/clk-pllv3.c
to drivers/clk/imx/clk-pllv3.c since the orginal change was made,
so the revert is done to the new file instead.

Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
(cherry picked from commit dd50ef8f53be467f59947e4f2b3d03c093ec9783)
2018-10-29 11:10:38 +08:00
Abel Vesa 6d9c8ad2e7 clk: imx8mq: Switch to newly added composite-8m clock
This needs to be one individual change since otherwise the driver
and the dtbs won't build anymore. This updates all the dts and dtsi files,
the clock index defines and the imx8mq clock driver itself

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Abel Vesa 9e755e74f5 clk: imx: Add composite-8m clock
Since a lot of clocks on imx8m are formed by a mux, gate, predivider and
divider, the idea here is to combine all of those into one composite clock,
but we need to deal with both predivider and divider at the same time and
therefore we add the imx8m_clk_composite_divider_ops and register
the composite clock with those.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Suggested-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Abel Vesa 29d9fe12f5 clk: imx: Rename clk-composite clock to clk-composite-7ulp
The imx/clk-composite is only used by 7ulp. It makes more sense
to mention that in the name of the file and the register function
since later imx-composite clocks may be added.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Oliver Brown a3bf4645d1 MLK-19420-1 clk: imx8mq: Remove video pll 2
Moving video pll2 control to the display driver to allow more flexibility
for setting rates.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 76fd604d28 MLK-19589-02 driver: clk: add imx6ulz clock support
Add i.MX6ULZ clock driver support. i.MX6ULZ clock
tree is same as i.MX6ULL. so reuse the i.MX6ULL
clock compatible check.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Ye Li f4675d804a MLK-19575-1 imx8mm: clock: Add gpmi and apbh-dma clock
The gpmi clock is from NAND clock root, while aphb-dma clock is from NAND_USDHC_BUS_CLK_ROOT.
Both share same clock gate CCGR_NAND. We use imx_clk_gate2_shared2 to
create two clocks for them.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang 7fbd6e9a2e MLK-19179: clk: imx8mm: change audio ahb and ipg clock to 400M
According to ADD, the audio ahb and ipg clock should be in 1:1 mode
and the frequency is 400MHz

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit ee175a8cea1a7d27954a73c3447bb16edd71f4c8)
2018-10-29 11:10:38 +08:00
Shengjiu Wang 952614ee98 MLK-19125: clk: imx8mm: change audio ahb clock to 500M
With the 800M clock source, there is noise on SAI5 (PDM, or AK5558)
recording with some chips, but it may be ok for other chips.
The reason is not clear.
This patch is to switch the clock source to 500M.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 3f4e34d26ceb8569eeb6cbb2e5a410d0332a9e62)
2018-10-29 11:10:38 +08:00
Peng Fan 9a73237206 MLK-19195 clk: imx8qm: fix audio lpcg usage
Need use LPCG_BASE to wrap the lpcg gate, otherwise XEN DomU
will dump when doing ioremap for the lpcgs, because the lpcg
conflicts with DomU RAM space.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit caf4564bf4fe70fc6466ce18a84b5c73c80d21a0)
2018-10-29 11:10:38 +08:00
Daniel Baluta a1056eb853 MLK-17481-1: clk: imx8qm: Add DSP clocks
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 8bc09ad559237c136f88d93bd696fe10dc4658db)
2018-10-29 11:10:38 +08:00
Andy Duan f2590c653b MLK-19191 clk: imx8qm/qxp: correct lpspi1 scu resource ID
Correct lpspi1 scu resource ID.

Reviewed-by: Anson Huang <anson.huang@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Andy Duan 5a951715ba MLK-19169 clk: imx8mm/mq: keep earlycon uart port clocks on during bootconsole enable period
Keep earlycon uart port clocks on during bootconsole enable period
to avoid messy chars print out.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Oliver Brown d5edc217b5 MLK-19120-2 clk: imx8qm: Add AVPLL support for DisplayPort on iMX8QM
Removed the IMX8QM_HDMI_AV_PLL_BYPASS_CLK because it is not supported by SCFW.
Changed the selector array to use the IMX8QM_HDMI_AV_PLL_CLK as the bypass parent.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan 39eeafc19f MLK-19130-2 clk: imx8mm: parse clk init on from device tree
Add a new init-on-array property, the clk driver will
parse this array and prepare enable the related clocks.

Previously, the clocks needs to be init on are hardcoded in SoC
clk driver. When we need to support two OSes, some clks
needs to be ini on, however such clocks does not need to be init on
for Single Linux OS environment.

At current stage using Jailhouse hypervisor supporting Two Linux OS,
OS1 use SDHC2, OS2 use SDHC3, they share one IMX8MM_CLK_NAND_USDHC_BUS_CG,
because no power management supported, so we need clk_ignore_unused
and make sure this clk being enabled, to make sure the 2nd OS
could has SDHC3 working.

The i.MX8MQ also has same code, but there is no good place to hold
it in common place, so duplicate it clk-imx8mm.c for now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 58d25fb00099142f15bcf2a66432b25da75ef38e)
2018-10-29 11:10:38 +08:00
Teo Hall ba122f4f58 MLK-19034 clk: imx8qm: Fix clk_unused crash
Remove unused ROMCP clks and related as LPCG
no longer exists

Signed-off-by: Teo Hall <teo.hall@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 1c15332dffe7e41f0b9d367b96dd426798ec8b06)
2018-10-29 11:10:38 +08:00
Haibo Chen 5b6ea4de30 MLK-18724-3 clk: imx7d: remove IMX7D_NAND_USDHC_BUS_ROOT_CLK out from clks_init_on[]
No need to enable IMX7D_NAND_USDHC_BUS_ROOT_CLK during the imx7d clock
driver init, so remove it from the clks_init_on[].

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit d63d8a2d501ddc93a3406111134242090a713c4a)
2018-10-29 11:10:38 +08:00
Haibo Chen 6577429246 MLK-18724-2 clk: imx8mq: remove IMX8MQ_CLK_NAND_USDHC_BUS_CG out from clks_init_on[]
No need to enable IMX8MQ_CLK_NAND_USDHC_BUS_CG during the imx8mq clock driver
init, so remove it from the clks_init_on[].

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 6c90e1bfc38eab27921d26b1218993e5cd52a425)
2018-10-29 11:10:38 +08:00
Haibo Chen 42790de7ae MLK-18724-1 clk: imx8mm: remove IMX8MM_CLK_NAND_USDHC_BUS_CG out from clks_init_on[]
No need to enable IMX8MM_CLK_NAND_USDHC_BUS_CG during the imx8mm clock driver
init, so remove it from the clks_init_on[].

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 7a8f9c1917dec30fc37b6b8ea74461e80ecdbc30)
2018-10-29 11:10:38 +08:00
Viorel Suman 148dcf50c5 MLK-19041: clk: imx8mq: remove IMX8MQ_CLK_AUDIO_AHB_DIV from clks_init_on[]
No need to enable IMX8MQ_CLK_AUDIO_AHB_DIV during imx8mq clock
driver init, so remove it from the clks_init_on[].

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit b13900ec3296f579f54581483858cc053d2bbff3)
2018-10-29 11:10:38 +08:00
Peng Fan f7128803d3 MLK-19002 clk: imx8qxp: no fail/err when no np_acm and ENODEV
No fail when no no_acm node. We do not have np_acm node
for the 2nd OS, so let's ignore np_acm.

Also we use partition for the 2nd OS, the registeration of some
clocks are not owned by the 2nd OS, so it will return -ENODEV.
Let's suppress the error message for -ENODEV.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 39d196d84ed80237d0d9e669965903c785146727)
2018-10-29 11:10:38 +08:00
Peng Fan 1afdd5020d MLK-19001-1 clk: imx8mq: parse clk init on from device tree
Add a new init-on-array property, the clk driver will
parse this array and prepare enable the related clocks.

Previously, the clocks needs to be init on are hardcoded in SoC
clk driver. When we need to support two OSes, some clks
needs to be ini on, however such clocks does not need to be init on
for Single Linux OS environment.

At current stage using Jailhouse hypervisor supporting Two Linux OS,
OS1 use SDHC2, OS2 use SDHC0, they share one IMX8MQ_CLK_NAND_USDHC_BUS_CG,
because no power management supported, so we need clk_ignore_unused
and make sure this clk being enabled, to make sure the 2nd OS
could has SDHC0 working.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 9e6e0ffe8876d5f52ee372ec438ab30ef01c4a5d)
2018-10-29 11:10:38 +08:00
Bai Ping d7d529da67 MLK-18427-01 driver: clk: imx: Add dram core and alt root clk
On i.MX8MM, it has an dram_alt clock source that can be used when
DDRC clock rate is lower than 667MHz, so add this clock.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 303867c769e3c0758b9ee8fcf31d8cc3c632a80d)
2018-10-29 11:10:38 +08:00
Adriana Reus a8d539e9dd MLK-18861: mx8qxp: Add the missing LCDIF clocks to clock driver
Add LCDIF PLL resource and clocks, and power domain for it.
Add Pixel link clocks and set it from bypass path.
Muxes were added so that the slices can choose the bypass input
(lcd_pxl_bypass_div and elcdif_pll_div).

clk summary example:

lcd_pxl_bypass_div                       2            2    24000000
   lcd_pxl_sel                           1            1    24000000
      lcd_pxl_div                        1            1    24000000
         lcd_pxl_clk                     1            1    24000000
elcdif_pll_div                           1            1   792000000
   elcdif_pll                            2            2   792000000
      lcd_sel                            1            1   792000000
         lcd_div                         1            1    79200000
            lcd_clk                      1            1    79200000

Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
2018-10-29 11:10:38 +08:00
Robby Cai aa42b9c074 MLK-18615-1 clk: imx8mm: change camera's mclk clock source
correct the clock name typo.
change the MCLK to use osc_24m.
remove unnecessary rate setting for MCLK in dts file.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu b0d0965e29 MLK-18660-2 clk: imx: define the clocks of the lsio mu
In order to replace the M4_MU# by the LSIO MU in the
RPMSG usage.
Define the clocks of the LSIO MU for iMX8

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu 7522d5c27f MLK-18580 clk: imx: imx8qm: correct the pd of the phyx1 per clk
Correct the power domain of the phyx1 per clk.
Otherwise, the system would be hang when SATA is not
built-in in the kernel config.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying e6ef6c06be MLK-18617-2 clk: imx: clk-imx8qxp: Add MIPI PWM_DIV & PWM_CLK clk definitions
This patch adds the MIPI PWM_DIV and PWM_CLK clock definitions.
The PWM_DIV clock is the parent clock of PWM_CLK clock.
The PWM_CLK will be used as the 'per' clock by the PWM driver.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit a32d7b4bcca3da7bd154eaf46cf04852279d2c87)
2018-10-29 11:10:38 +08:00
Liu Ying 22c9383e7c MLK-18617-1 clk: imx: clk-imx8qxp: Correct MIPI PWM IPG/IPG_S clk definitions
The bit index of MIPI PWM IPG/IPG_S gate clocks in the LPCG register
is 16 instead of 0.  This patch corrects the bit index.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 43cbe1a1dfcd3fa7bc7d41996d1b9b77d3fd3f3e)
2018-10-29 11:10:38 +08:00
Viorel Suman ad7b34102d MLK-18621: clk: imx8mm: fix SAI2/SAI3 ipg parent and ipg_audio_root rate
The 'ipg_audio_root' clk rate must be 400MHz according to ADD.
Set SAI2/SAI3 IPG clk parent as 'ipg_audio_root' according to ADD.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit cbac7bbea2953e9cba0a9f6a6a84333ca85c5109)
2018-10-29 11:10:38 +08:00
Adrian Alonso 8aa0f6570e MLK-18625-1 clocks: imx8mq phy_27m clk source for all plls
External differential clock phy_27m can be set to all
plls, rename from VIDEO2_PHY_27M to CLK_PHY_27M to avoid
confusion as clock source is the same option for all plls

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit 513eb64189903ca24c7f5ae140703831159b0578)
2018-10-29 11:10:38 +08:00
Fancy Fang 797b08e7c5 MLK-18535-2 clk: imx8mm: set video_pll1 rate to 594MHz
The 'video_pll1' PLL will be used as LCDIF pixel clock
source, and also used as MIPI DSI PHY reference clock
source. And 594MHz clock rate is better to derive the
27MHz PHY reference clock and the LCDIF pixel clocks
requied for most popular display modes.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Viorel Suman b5f1b7acc4 MLK-18533: clk: imx8mm: reparent audio_ahb_src clk
Reparent audio_ahb_src clock as it is on imx8mq.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-10-29 11:10:38 +08:00
Guoniu.Zhou 7f266f91aa MLK-18407: clk: accommodate scfw change for QXP PI ss
Change pixel clock register of qxp PI ss in order to
accommodate scfw change for PI ss

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 1a769a426f4dcbd145280b3ff613607fbf6bcaa4)
2018-10-29 11:10:38 +08:00
Robby Cai 33f9fb9a43 MLK-18362-1 clk: imx8mm: add clock for csi
add csi clock, CLKO1 for MCLK, and also BUS clock

Signed-off-by: Robby Cai <robby.cai@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu ba49d1b1ec MLK-18298-3 clk: imx8mm: set the parent clks of pcie
Set the parent clks of pcie.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu 3a619580a6 MLK-18381-2 clk: imx8mm: add the mu root clk
- mu is used by rpmsg on imx8mm, add the mu root clk.
- check the m4 is enable or not.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu 346ded6252 MLK-18267-2: clk: update clock tree for imx8qm hdmi rx
Add hdmi rx clocks define.
Add hdmi rx power domain name.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping f53ebc391b MLK-18299 clk: imx8mm: add 594mhz for video pll on imx8mm
Add 594MHz config support for video pll on imx8mm. lcdif
driver need this frequency setpoint.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang fbfc63d91a MLK-18300-2 clk: imx: imx8qm: remove csi gpio clocks
Remove CSI0/1 GPIO related clocks to make sure all
GPIOs clocks are always ON.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping cfd232d2d6 MLK-18277-01 clk: imx8mm: correct the gpu 2d/3d clock tree
fix the gpu2d/3d clock tree on i.MX8MM.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Andy Duan 9ef766bb3c MLK-18292 clk: imx8mm: correct uart1 clock source
Correct uart1 clock source.

Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 8ed73d1a91 MLK-18281 clk: imx8mm: correct mistypes for 'sys_pll1_800m'
Two 'sys_pll1_800m's are mistyped to 'sys1_pll_800m'.
So correct them.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 7ddcdac4e9 MLK-18265-2 clk: imx8qm: remove GPIO clocks definition
Remove all GPIOs LPCG clock definition to make sure they
are always ON by SCFW default setting.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Tested-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan fd2fe48243 MLK-18254 clk: imx: intpll: correct the programming flow
According to SPEC, when change the pll frequency and needs pll reset,
the t3 - t2 need to be greater than 1us and 1/FREF, respectively.
FREF is FIN / Prediv, the prediv is [1, 63], so choose
3us for safe.

The pll1443x does not have lock sel bit mask, so remove it.

Remove the bypass setting before changing frequency.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Ranjani Vaidyanathan b5adfb99bf MLK-18220-6 clk:imx8qxp: Remove all references to GPIO IPG clocks from the clock tree.
Removing all references to GPIO IPG clocks, this will leave all LPCG
clocks controlling GPIOs in an always ON state similar to earlier iMX
processors. By registering these clocks, unused GPIO clocks were disabled
at boot, causing issues during system suspend/resume as there is no easy
way to enable the clocks because the power domain associated with these
GPIOs are also disabled.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 187f4b5550 MLK-18247 clk: imx: add more pll frequency setting in clock rate table
Add 1GHz, 800MHz, 700MHz, 600MHz pll clock rate setting in the pll
clock calculation table of imx8mm. These frequency point are needed
by VPU and GPU driver.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00