OSDN Git Service

clk: imx: scu: add two cells binding support
authorDong Aisheng <aisheng.dong@nxp.com>
Wed, 29 Jul 2020 08:00:10 +0000 (16:00 +0800)
committerShawn Guo <shawnguo@kernel.org>
Mon, 26 Oct 2020 02:53:13 +0000 (10:53 +0800)
commit77d8f3068c63ee0983f0b5ba3207d3f7cce11be4
treee5387ee5c3d4cc07961a426eeda86e06c9b6e1c3
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
clk: imx: scu: add two cells binding support

This patch implements the new two cells binding for SCU clocks.
The usage is as follows:
clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>

Due to each SCU clock is associated with a power domain, without power
on the domain, the SCU clock can't work. So we create platform devices
for each domain clock respectively and manually attach the required domain
before register the clock devices, then we can register clocks in the
clock platform driver accordingly.

Note because we do not have power domain info in device tree and the SCU
resource ID is the same for power domain and clock, so we use resource ID
to find power domains.

Later, we will also use this clock platform driver to support suspend/resume
and runtime pm.

Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-imx8qxp.c
drivers/clk/imx/clk-scu.c
drivers/clk/imx/clk-scu.h