Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: firmware: imx-scu: new binding to parse clocks from device tree

There's a few limitations on the original one cell clock binding
(#clock-cells = <1>) that we have to define some SW clock IDs for device
tree to reference. This may cause troubles if we want to use common
clock IDs for multi platforms support when the clock of those platforms
are mostly the same.
e.g. Current clock IDs name are defined with SS prefix.

However the device may reside in different SS across CPUs, that means the
SS prefix may not valid anymore for a new SoC. Furthermore, the device
availability of those clocks may also vary a bit.

For such situation, we want to eliminate the using of SW Clock IDs and
change to use a more close to HW one instead.
For SCU clocks usage, only two params required: Resource id + Clock Type.
Both parameters are platform independent. So we could use two cells binding
to pass those parameters,

Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: devicetree@vger.kernel.org
Acked-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>

authored by

Dong Aisheng and committed by
Shawn Guo
02f5bea9 3650b228

+7 -5
+7 -5
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
··· 89 89 "fsl,imx8qm-clock" 90 90 "fsl,imx8qxp-clock" 91 91 followed by "fsl,scu-clk" 92 - - #clock-cells: Should be 1. Contains the Clock ID value. 92 + - #clock-cells: Should be either 93 + 2: Contains the Resource and Clock ID value. 94 + or 95 + 1: Contains the Clock ID value. (DEPRECATED) 93 96 - clocks: List of clock specifiers, must contain an entry for 94 97 each required entry in clock-names 95 98 - clock-names: Should include entries "xtal_32KHz", "xtal_24MHz" ··· 211 208 212 209 clk: clk { 213 210 compatible = "fsl,imx8qxp-clk", "fsl,scu-clk"; 214 - #clock-cells = <1>; 211 + #clock-cells = <2>; 215 212 }; 216 213 217 214 iomuxc { ··· 266 263 ... 267 264 pinctrl-names = "default"; 268 265 pinctrl-0 = <&pinctrl_lpuart0>; 269 - clocks = <&clk IMX8QXP_UART0_CLK>, 270 - <&clk IMX8QXP_UART0_IPG_CLK>; 271 - clock-names = "per", "ipg"; 266 + clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>; 267 + clock-names = "ipg"; 272 268 power-domains = <&pd IMX_SC_R_UART_0>; 273 269 };