Commit 02f5bea9 authored by Dong Aisheng's avatar Dong Aisheng Committed by Shawn Guo
Browse files

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: default avatarShawn Guo <shawnguo@kernel.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 3650b228
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -89,7 +89,10 @@ Required properties:
			  "fsl,imx8qm-clock"
			  "fsl,imx8qxp-clock"
			followed by "fsl,scu-clk"
- #clock-cells:		Should be 1. Contains the Clock ID value.
- #clock-cells:		Should be either
			2: Contains the Resource and Clock ID value.
			or
			1: Contains the Clock ID value. (DEPRECATED)
- clocks:		List of clock specifiers, must contain an entry for
			each required entry in clock-names
- clock-names:		Should include entries "xtal_32KHz", "xtal_24MHz"
@@ -208,7 +211,7 @@ firmware {

		clk: clk {
			compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
			#clock-cells = <1>;
			#clock-cells = <2>;
		};

		iomuxc {
@@ -263,8 +266,7 @@ serial@5a060000 {
	...
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_lpuart0>;
	clocks = <&clk IMX8QXP_UART0_CLK>,
		 <&clk IMX8QXP_UART0_IPG_CLK>;
	clock-names = "per", "ipg";
	clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>;
	clock-names = "ipg";
	power-domains = <&pd IMX_SC_R_UART_0>;
};