Skip to contentSkip to conversation

arm64: dts: imx8mm: Init rates and parents configs for clocks

PATCH Superseded Abel Vesa 2 participants 4 messages Jun 25, 2019 – Jul 2, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Abel Vesa

author
#0 lore raw

PATCH 1/1 arm64: dts: imx8mm: Init rates and parents configs for clocks

Add the initial configuration for clocks that need default parent and rate setting. This is based on the vendor tree clock provider parents and rates configuration except this is doing the setup in dts rather than using clock consumer API in a clock provider driver.

---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +36 -0
index 232a741..ab92108 100644
@@ -451,6 +451,42 @@
 					 <&clk_ext3>, <&clk_ext4>;
 				clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2",
 					      "clk_ext3", "clk_ext4";
+				assigned-clocks = <&clk IMX8MM_CLK_AUDIO_AHB>,
+						<&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
+						<&clk IMX8MM_SYS_PLL3>,
+						<&clk IMX8MM_VIDEO_PLL1>,
+						<&clk IMX8MM_CLK_NOC>,
+						<&clk IMX8MM_CLK_PCIE1_CTRL>,
+						<&clk IMX8MM_CLK_PCIE1_PHY>,
+						<&clk IMX8MM_CLK_CSI1_CORE>,
+						<&clk IMX8MM_CLK_CSI1_PHY_REF>,
+						<&clk IMX8MM_CLK_CSI1_ESC>,
+						<&clk IMX8MM_CLK_DISP_AXI>,
+						<&clk IMX8MM_CLK_DISP_APB>;
+				assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_800M>,
+						<0>,
+						<0>,
+						<0>,
+						<&clk IMX8MM_SYS_PLL3_OUT>,
+						<&clk IMX8MM_SYS_PLL2_250M>,
+						<&clk IMX8MM_SYS_PLL2_100M>,
+						<&clk IMX8MM_SYS_PLL2_1000M>,
+						<&clk IMX8MM_SYS_PLL2_1000M>,
+						<&clk IMX8MM_SYS_PLL1_800M>,
+						<&clk IMX8MM_SYS_PLL2_1000M>,
+						<&clk IMX8MM_SYS_PLL1_800M>;
+				assigned-clock-rates = <400000000>,
+							<400000000>,
+							<750000000>,
+							<594000000>,
+							<0>,
+							<0>,
+							<0>,
+							<0>,
+							<0>,
+							<0>,
+							<500000000>,
+							<200000000>;
 			};
 
 			src: reset-controller@30390000 {
Signature · 1 line
2.7.4
#1 lore raw
Quoted 23 lines · Abel Vesa

Add the initial configuration for clocks that need default parent and rate setting. This is based on the vendor tree clock provider parents and rates configuration except this is doing the setup in dts rather than using clock consumer API in a clock provider driver.

---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +4 -0
index 232a741..ab92108 100644
@@ -451,6 +451,42 @@
                                         <&clk_ext3>, <&clk_ext4>;
                                clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2",
                                              "clk_ext3", "clk_ext4";
+                               assigned-clocks = <&clk IMX8MM_CLK_AUDIO_AHB>,
+                                               <&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
+                                               <&clk IMX8MM_SYS_PLL3>,
+                                               <&clk IMX8MM_VIDEO_PLL1>,

arch/arm64/boot/dts/freescale/imx8mm.dtsi line 467

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +10 -0
+                                               <&clk IMX8MM_CLK_NOC>,
+                                               <&clk IMX8MM_CLK_PCIE1_CTRL>,
+                                               <&clk IMX8MM_CLK_PCIE1_PHY>,
+                                               <&clk IMX8MM_CLK_CSI1_CORE>,
+                                               <&clk IMX8MM_CLK_CSI1_PHY_REF>,
+                                               <&clk IMX8MM_CLK_CSI1_ESC>,
+                                               <&clk IMX8MM_CLK_DISP_AXI>,
+                                               <&clk IMX8MM_CLK_DISP_APB>;
+                               assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_800M>,
+                                               <0>,

Isn't there a macro for 0? (dummy clock?)

Quoted 28 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +22 -1
+                                               <0>,
+                                               <0>,
+                                               <&clk IMX8MM_SYS_PLL3_OUT>,
+                                               <&clk IMX8MM_SYS_PLL2_250M>,
+                                               <&clk IMX8MM_SYS_PLL2_100M>,
+                                               <&clk IMX8MM_SYS_PLL2_1000M>,
+                                               <&clk IMX8MM_SYS_PLL2_1000M>,
+                                               <&clk IMX8MM_SYS_PLL1_800M>,
+                                               <&clk IMX8MM_SYS_PLL2_1000M>,
+                                               <&clk IMX8MM_SYS_PLL1_800M>;
+                               assigned-clock-rates = <400000000>,
+                                                       <400000000>,
+                                                       <750000000>,
+                                                       <594000000>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <500000000>,
+                                                       <200000000>;
                        };
 
                        src: reset-controller@30390000 {
--

2.7.4

author
#2 lore raw
Quoted 27 lines · Daniel Baluta
Quoted 26 lines · Abel Vesa

Add the initial configuration for clocks that need default parent and rate setting. This is based on the vendor tree clock provider parents and rates configuration except this is doing the setup in dts rather than using clock consumer API in a clock provider driver.

---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +7 -0
index 232a741..ab92108 100644
@@ -451,6 +451,42 @@
                                         <&clk_ext3>, <&clk_ext4>;
                                clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2",
                                              "clk_ext3", "clk_ext4";
+                               assigned-clocks = <&clk IMX8MM_CLK_AUDIO_AHB>,
+                                               <&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
+                                               <&clk IMX8MM_SYS_PLL3>,
+                                               <&clk IMX8MM_VIDEO_PLL1>,
+                                               <&clk IMX8MM_CLK_NOC>,
+                                               <&clk IMX8MM_CLK_PCIE1_CTRL>,
+                                               <&clk IMX8MM_CLK_PCIE1_PHY>,
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mm.dtsi line 467

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +7 -0
+                                               <&clk IMX8MM_CLK_CSI1_CORE>,
+                                               <&clk IMX8MM_CLK_CSI1_PHY_REF>,
+                                               <&clk IMX8MM_CLK_CSI1_ESC>,
+                                               <&clk IMX8MM_CLK_DISP_AXI>,
+                                               <&clk IMX8MM_CLK_DISP_APB>;
+                               assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_800M>,
+                                               <0>,

Isn't there a macro for 0? (dummy clock?)

I don't know about any such macro. If you're referring to IMX8MM_CLK_DUMMY, that can't be used here since all I want here is to skip setting a parent to the IMX8MM_CLK_IPG_AUDIO_ROOT. If I use IMX8MM_CLK_DUMMY (along with &clk) it will set the parent to IMX8MM_CLK_DUMMY and that's not what's needed here.

This is in accordance to the documentation:

Documentation/devicetree/bindings/clock/clock-bindings.txt:

"To skip setting parent or rate of a clock its corresponding entry should be set to 0, or can be omitted if it is not followed by any non-zero entry."

Quoted 30 lines
Quoted 30 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +22 -1
+                                               <0>,
+                                               <0>,
+                                               <&clk IMX8MM_SYS_PLL3_OUT>,
+                                               <&clk IMX8MM_SYS_PLL2_250M>,
+                                               <&clk IMX8MM_SYS_PLL2_100M>,
+                                               <&clk IMX8MM_SYS_PLL2_1000M>,
+                                               <&clk IMX8MM_SYS_PLL2_1000M>,
+                                               <&clk IMX8MM_SYS_PLL1_800M>,
+                                               <&clk IMX8MM_SYS_PLL2_1000M>,
+                                               <&clk IMX8MM_SYS_PLL1_800M>;
+                               assigned-clock-rates = <400000000>,
+                                                       <400000000>,
+                                                       <750000000>,
+                                                       <594000000>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <0>,
+                                                       <500000000>,
+                                                       <200000000>;
                        };
 
                        src: reset-controller@30390000 {
--

2.7.4

#3 lore raw
Quoted 43 lines · Abel Vesa
Quoted 27 lines · Daniel Baluta
Quoted 26 lines · Abel Vesa

Add the initial configuration for clocks that need default parent and rate setting. This is based on the vendor tree clock provider parents and rates configuration except this is doing the setup in dts rather than using clock consumer API in a clock provider driver.

---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +7 -0
index 232a741..ab92108 100644
@@ -451,6 +451,42 @@
                                         <&clk_ext3>, <&clk_ext4>;
                                clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2",
                                              "clk_ext3", "clk_ext4";
+                               assigned-clocks = <&clk IMX8MM_CLK_AUDIO_AHB>,
+                                               <&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
+                                               <&clk IMX8MM_SYS_PLL3>,
+                                               <&clk IMX8MM_VIDEO_PLL1>,
+                                               <&clk IMX8MM_CLK_NOC>,
+                                               <&clk IMX8MM_CLK_PCIE1_CTRL>,
+                                               <&clk IMX8MM_CLK_PCIE1_PHY>,
Quoted 8 lines

arch/arm64/boot/dts/freescale/imx8mm.dtsi line 467

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mm.dtsi +7 -0
+                                               <&clk IMX8MM_CLK_CSI1_CORE>,
+                                               <&clk IMX8MM_CLK_CSI1_PHY_REF>,
+                                               <&clk IMX8MM_CLK_CSI1_ESC>,
+                                               <&clk IMX8MM_CLK_DISP_AXI>,
+                                               <&clk IMX8MM_CLK_DISP_APB>;
+                               assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_800M>,
+                                               <0>,

Isn't there a macro for 0? (dummy clock?)

I don't know about any such macro. If you're referring to IMX8MM_CLK_DUMMY, that can't be used here since all I want here is to skip setting a parent to the IMX8MM_CLK_IPG_AUDIO_ROOT. If I use IMX8MM_CLK_DUMMY (along with &clk) it will set the parent to IMX8MM_CLK_DUMMY and that's not what's needed here.

Quoted 6 lines

This is in accordance to the documentation:

Documentation/devicetree/bindings/clock/clock-bindings.txt:

"To skip setting parent or rate of a clock its corresponding entry should be set to 0, or can be omitted if it is not followed by any non-zero entry."

You are right. Thanks for the explanation!