CLK: tegra: convert device tree files to use CLK defines
Subsystems (3)
cover CLK: tegra: convert device tree files to use CLK defines
This patchset converts device tree files to use CLK defines.
This is against Stephen Warren's linux-next_common branch in:
git://nv-tegra.nvidia.com/user/swarren/linux-2.6
If this is ok, I'll also convert enum variables to use CLK defines in drivers/clk/tegra/clk-tegra{20,30,114}.c
Hiroshi Doyu (6):
ARM: tegra20: create a DT header defining CLK IDs
ARM: tegra20: convert device tree files to use CLK defines
ARM: tegra30: create a DT header defining CLK IDs
ARM: tegra30: convert device tree files to use CLK defines
ARM: tegra114: create a DT header defining CLK IDs
ARM: tegra114: convert device tree files to use CLK defines
.../bindings/clock/nvidia,tegra114-car.txt | 250 +-------------- .../bindings/clock/nvidia,tegra20-car.txt | 152 +-------- .../bindings/clock/nvidia,tegra30-car.txt | 209 +------------ arch/arm/boot/dts/tegra114-dalmore.dts | 4 +- arch/arm/boot/dts/tegra114.dtsi | 79 ++--- arch/arm/boot/dts/tegra20-colibri-512.dtsi | 4 +- arch/arm/boot/dts/tegra20-harmony.dts | 4 +- arch/arm/boot/dts/tegra20-medcom-wide.dts | 4 +- arch/arm/boot/dts/tegra20-paz00.dts | 7 +- arch/arm/boot/dts/tegra20-plutux.dts | 4 +- arch/arm/boot/dts/tegra20-seaboard.dts | 4 +- arch/arm/boot/dts/tegra20-tec.dts | 4 +- arch/arm/boot/dts/tegra20-trimslice.dts | 4 +- arch/arm/boot/dts/tegra20-ventana.dts | 4 +- arch/arm/boot/dts/tegra20-whistler.dts | 4 +- arch/arm/boot/dts/tegra20.dtsi | 103 ++++--- arch/arm/boot/dts/tegra30-beaver.dts | 4 +- arch/arm/boot/dts/tegra30-cardhu.dtsi | 4 +- arch/arm/boot/dts/tegra30.dtsi | 110 ++++--- include/dt-bindings/clk/tegra114-car.h | 342 +++++++++++++++++++++ include/dt-bindings/clk/tegra20-car.h | 158 ++++++++++ include/dt-bindings/clk/tegra30-car.h | 265 ++++++++++++++++ 22 files changed, 979 insertions(+), 744 deletions(-) create mode 100644 include/dt-bindings/clk/tegra114-car.h create mode 100644 include/dt-bindings/clk/tegra20-car.h create mode 100644 include/dt-bindings/clk/tegra30-car.h
Signature · 1 line
1.8.1.5
PATCH 1/6 ARM: tegra20: create a DT header defining CLK IDs
To replace magic number in tegra_car:
- clocks = <&tegra_car 28>;
+ clocks = <&tegra_car CLK_HOST1X>;
--- .../bindings/clock/nvidia,tegra20-car.txt | 152 +------------------- include/dt-bindings/clk/tegra20-car.h | 158 +++++++++++++++++++++ 2 files changed, 161 insertions(+), 149 deletions(-) create mode 100644 include/dt-bindings/clk/tegra20-car.h
Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +3 -149
@@ -3,6 +3,8 @@ NVIDIA Tegra20 Clock And Reset Controller This binding uses the common clock binding: Documentation/devicetree/bindings/clock/clock-bindings.txt +You can find the actual assignment in "dt-bindings/clk/tegra20-car.h" + The CAR (Clock And Reset) Controller on Tegra is the HW module responsible for muxing and gating Tegra's clocks, and setting their rates.
@@ -14,154 +16,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 95 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 96 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 ac97 - 4 rtc - 5 tmr - 6 uart1 - 7 unassigned (register bit affects uart2 and vfir) - 8 gpio - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 twc - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 ide - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 unassigned - 31 cache2 - - 32 mem - 33 ahbdma - 34 apbdma - 35 unassigned - 36 kbc - 37 stat_mon - 38 pmc - 39 fuse - 40 kfuse - 41 sbc1 - 42 snor - 43 spi1 - 44 sbc2 - 45 xio - 46 sbc3 - 47 dvc - 48 dsi - 49 unassigned (register bit affects tvo and cve) - 50 mipi - 51 hdmi - 52 csi - 53 tvdac - 54 i2c2 - 55 uart3 - 56 unassigned - 57 emc - 58 usb2 - 59 usb3 - 60 mpe - 61 vde - 62 bsea - 63 bsev - - 64 speedo - 65 uart4 - 66 uart5 - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 pcie - 71 owr - 72 afi - 73 csite - 74 unassigned - 75 avpucq - 76 la - 77 unassigned - 78 unassigned - 79 unassigned - 80 unassigned - 81 unassigned - 82 unassigned - 83 unassigned - 84 irama - 85 iramb - 86 iramc - 87 iramd - 88 cram2 - 89 audio_2x a/k/a audio_2x_sync_clk - 90 clk_d - 91 unassigned - 92 sus - 93 cdev2 - 94 cdev1 - 95 unassigned - - 96 uart2 - 97 vfir - 98 spdif_in - 99 spdif_out - 100 vi - 101 vi_sensor - 102 tvo - 103 cve - 104 osc - 105 clk_32k a/k/a clk_s - 106 clk_m - 107 sclk - 108 cclk - 109 hclk - 110 pclk - 111 blink - 112 pll_a - 113 pll_a_out0 - 114 pll_c - 115 pll_c_out1 - 116 pll_d - 117 pll_d_out0 - 118 pll_e - 119 pll_m - 120 pll_m_out1 - 121 pll_p - 122 pll_p_out1 - 123 pll_p_out2 - 124 pll_p_out3 - 125 pll_p_out4 - 126 pll_s - 127 pll_u - 128 pll_x - 129 cop a/k/a avp - 130 audio a/k/a audio_sync_clk - 131 pll_ref - 132 twd - Example SoC include file: / {
@@ -172,7 +26,7 @@ Example SoC include file: }; usb at c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA20_CLK_USB2>; /* usb2 */ }; };
include/dt-bindings/clk/tegra20-car.h new file +158 -0
158 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH 1/6 ARM: tegra20: create a DT header defining CLK IDs
Review
Quoted 4 lines · Hiroshi Doyu
To replace magic number in
tegra_car:(quoted diff) +1
-1- clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>;
I'd like slightly more description of the change here. What about:
=====
Create a header file to define the clock IDs used by the Tegra20 clock binding. Remove the list of definitions from the binding documentation, and refer the reader to the header file.
This will allow the same header to be used by both device tree files, and drivers implementing this binding, which guarantees that the two stay in sync. This also makes device trees more readable by using names instead of magic numbers.
=====
I'm not sure exactly how these patches will get merged. For you reference, I anticipate one of two things happening:
1)
* Patches 1, 3, 5 get put into a topic branch, and merged into both the clk tree and the Tegra tree.
* Patches 2, 4, 6 get merged into the Tegra tree.
* The patches you're going to create for the drivers/clk code get merged into Mike's clk tree
2)
* Mike ack's the patches you're going to create for the drivers/clk code.
* Everything gets merged through the Tegra tree.
This shouldn't impact you much, but just be aware that the drivers/clk changes you create shouldn't depend on anything beyond patches 1, 3, 5 here and 3.10-rc1, then I can work out the merging with Mike without any constraints.
Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt NVIDIA Tegra20 Clock And Reset Controller · line 6
Quoted 6 lines
Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +1
-0This binding uses the common clock binding: Documentation/devicetree/bindings/clock/clock-bindings.txt +You can find the actual assignment in "dt-bindings/clk/tegra20-car.h"
Can you move this text down into the description of clock-cells, i.e. where you removed the original list of IDs? That'll keep the text in the place it's most useful. I would also like to explicitly mention "include file" and use <> rather than "", since that matches the syntax that should be used in .dts files, i.e.:
=====
- #clock-cells : Should be 1.
In clock consumers, this cell represents the clock ID exposed by the CAR. The assignments may be found in header file <dt-bindings/clk/tegra20-car.h>.
=====
Similar comments for patches 3 and 5.
PATCH 1/6 ARM: tegra20: create a DT header defining CLK IDs
Stephen Warren <[email protected]> wrote @ Mon, 13 May 2013 18:46:27 +0200:
Quoted 15 lines
I'm not sure exactly how these patches will get merged. For you reference, I anticipate one of two things happening:
1)
* Patches 1, 3, 5 get put into a topic branch, and merged into both the clk tree and the Tegra tree.
* Patches 2, 4, 6 get merged into the Tegra tree.
* The patches you're going to create for the
drivers/clkcode get merged into Mike's clk tree2)
Quoted 8 lines
* Mike ack's the patches you're going to create for the
drivers/clkcode.* Everything gets merged through the Tegra tree.
This shouldn't impact you much, but just be aware that the
drivers/clkchanges you create shouldn't depend on anything beyond patches 1, 3, 5 here and 3.10-rc1, then I can work out the merging with Mike without any constraints.
Either way would work. Once Venu's USB patches are merged, mentioned in [2/6], I'll resend the update version of this series. drivers/clk/tegra replacement will follow, then.
PATCH 1/6 ARM: tegra20: create a DT header defining CLK IDs
In reply to Hiroshi DoyuDocumentation/devicetree/bindings/clock/nvidia,tegra20-car.txt Example SoC include file: · line 29
Quoted 11 lines · Hiroshi Doyu
To replace magic number in
tegra_car:Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +2
-2- clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>;@@ -172,7 +26,7 @@ Example SoC include file: }; usb at c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA20_CLK_USB2>; /* usb2 */
I forgot to mention: That comment isn't useful any more, since it's obvious this represents the USB2 clock now that the actual cell data uses a define.
PATCH 2/6 ARM: tegra20: convert device tree files to use CLK defines
In reply to Hiroshi DoyuReplace magic number in tegra_car:
- clocks = <&tegra_car 28>;
+ clocks = <&tegra_car CLK_HOST1X>;
--- arch/arm/boot/dts/tegra20-colibri-512.dtsi | 4 +- arch/arm/boot/dts/tegra20-harmony.dts | 4 +- arch/arm/boot/dts/tegra20-medcom-wide.dts | 4 +- arch/arm/boot/dts/tegra20-paz00.dts | 7 +- arch/arm/boot/dts/tegra20-plutux.dts | 4 +- arch/arm/boot/dts/tegra20-seaboard.dts | 4 +- arch/arm/boot/dts/tegra20-tec.dts | 4 +- arch/arm/boot/dts/tegra20-trimslice.dts | 4 +- arch/arm/boot/dts/tegra20-ventana.dts | 4 +- arch/arm/boot/dts/tegra20-whistler.dts | 4 +- arch/arm/boot/dts/tegra20.dtsi | 103 ++++++++++++++++------------- 11 files changed, 89 insertions(+), 57 deletions(-)
arch/arm/boot/dts/tegra20-colibri-512.dtsi +3 -1
@@ -487,7 +487,9 @@ nvidia,ac97-controller = <&ac97>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; };
arch/arm/boot/dts/tegra20-harmony.dts +3 -1
@@ -693,7 +693,9 @@ nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-medcom-wide.dts +3 -1
@@ -59,7 +59,9 @@ nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>; nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-paz00.dts +5 -2
@@ -277,7 +277,8 @@ clock-frequency = <80000>; request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; slave-addr = <138>; - clocks = <&tegra_car 67>, <&tegra_car 124>; + clocks = <&tegra_car TEGRA20_CLK_I2C3>, + <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; clock-names = "div-clk", "fast-clk"; };
@@ -526,7 +527,9 @@ nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-plutux.dts +3 -1
@@ -53,7 +53,9 @@ nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>; nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-seaboard.dts +3 -1
@@ -833,7 +833,9 @@ nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>; nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-tec.dts +3 -1
@@ -54,7 +54,9 @@ nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-trimslice.dts +3 -1
@@ -408,7 +408,9 @@ nvidia,i2s-controller = <&tegra_i2s1>; nvidia,audio-codec = <&codec>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-ventana.dts +3 -1
@@ -645,7 +645,9 @@ nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20-whistler.dts +3 -1
@@ -584,7 +584,9 @@ nvidia,i2s-controller = <&tegra_i2s1>; nvidia,audio-codec = <&codec>; - clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 94>; + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra20.dtsi +57 -46
383 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH 2/6 ARM: tegra20: convert device tree files to use CLK defines
Review
Quoted 4 lines · Hiroshi Doyu
Replace magic number in
tegra_car:(quoted diff) +1
-1- clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>;
Patches 2, 4, 6 look basically fine. I'd also like slightly more explanation in the commit description here. How about:
=====
Use the Tegra20 CAR binding header (tegra20-car.h) to replace magic numbers in the device tree. For example,
- clocks = <&tegra_car 28>;
+ clocks = <&tegra_car CLK_HOST1X>;
=====
arch/arm/boot/dts/tegra20.dtsi line 3
Quoted 5 lines
arch/arm/boot/dts/tegra20.dtsi +1
-0#include <dt-bindings/gpio/tegra-gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clk/tegra20-car.h>
Can we keep the include files sorted?
One dependency issue with patches 2: There is a series of USB patches (which Venu posted in the last couple of days) that fix the USB binding to be complete. These will change the set of clocks referenced by the EHCI and USB PHY nodes. I would like Venu's patches to be applied first, since those DT changes will need to be merged into the USB tree so that the USB tree can apply the subsequent driver changes. Can you hold off on reposting your series until after I've applied Venu's changes, and rebase this series on top of them? Hopefully it shouldn't take too long to get Venu's series applied. Thanks.
PATCH 3/6 ARM: tegra30: create a DT header defining CLK IDs
In reply to Hiroshi DoyuTo replace magic number in tegra_car:
- clocks = <&tegra_car 28>;
+ clocks = <&tegra_car CLK_HOST1X>;
--- .../bindings/clock/nvidia,tegra30-car.txt | 209 +--------------- include/dt-bindings/clk/tegra30-car.h | 265 +++++++++++++++++++++ 2 files changed, 268 insertions(+), 206 deletions(-) create mode 100644 include/dt-bindings/clk/tegra30-car.h
Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt +3 -206
@@ -3,6 +3,8 @@ NVIDIA Tegra30 Clock And Reset Controller This binding uses the common clock binding: Documentation/devicetree/bindings/clock/clock-bindings.txt +You can find the actual assignment in "dt-bindings/clk/tegra30-car.h" + The CAR (Clock And Reset) Controller on Tegra is the HW module responsible for muxing and gating Tegra's clocks, and setting their rates.
@@ -14,211 +16,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 160 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 160 and - above. - - 0 cpu - 1 unassigned - 2 unassigned - 3 unassigned - 4 rtc - 5 timer - 6 uarta - 7 unassigned (register bit affects uartb and vfir) - 8 gpio - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 unassigned - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 unassigned - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 i2s0 - 31 cop_cache - - 32 mc - 33 ahbdma - 34 apbdma - 35 unassigned - 36 kbc - 37 statmon - 38 pmc - 39 unassigned (register bit affects fuse and fuse_burn) - 40 kfuse - 41 sbc1 - 42 nor - 43 unassigned - 44 sbc2 - 45 unassigned - 46 sbc3 - 47 i2c5 - 48 dsia - 49 unassigned (register bit affects cve and tvo) - 50 mipi - 51 hdmi - 52 csi - 53 tvdac - 54 i2c2 - 55 uartc - 56 unassigned - 57 emc - 58 usb2 - 59 usb3 - 60 mpe - 61 vde - 62 bsea - 63 bsev - - 64 speedo - 65 uartd - 66 uarte - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 pcie - 71 owr - 72 afi - 73 csite - 74 pciex - 75 avpucq - 76 la - 77 unassigned - 78 unassigned - 79 dtv - 80 ndspeed - 81 i2cslow - 82 dsib - 83 unassigned - 84 irama - 85 iramb - 86 iramc - 87 iramd - 88 cram2 - 89 unassigned - 90 audio_2x a/k/a audio_2x_sync_clk - 91 unassigned - 92 csus - 93 cdev2 - 94 cdev1 - 95 unassigned - - 96 cpu_g - 97 cpu_lp - 98 3d2 - 99 mselect - 100 tsensor - 101 i2s3 - 102 i2s4 - 103 i2c4 - 104 sbc5 - 105 sbc6 - 106 d_audio - 107 apbif - 108 dam0 - 109 dam1 - 110 dam2 - 111 hda2codec_2x - 112 atomics - 113 audio0_2x - 114 audio1_2x - 115 audio2_2x - 116 audio3_2x - 117 audio4_2x - 118 audio5_2x - 119 actmon - 120 extern1 - 121 extern2 - 122 extern3 - 123 sata_oob - 124 sata - 125 hda - 127 se - 128 hda2hdmi - 129 sata_cold - - 160 uartb - 161 vfir - 162 spdif_in - 163 spdif_out - 164 vi - 165 vi_sensor - 166 fuse - 167 fuse_burn - 168 cve - 169 tvo - - 170 clk_32k - 171 clk_m - 172 clk_m_div2 - 173 clk_m_div4 - 174 pll_ref - 175 pll_c - 176 pll_c_out1 - 177 pll_m - 178 pll_m_out1 - 179 pll_p - 180 pll_p_out1 - 181 pll_p_out2 - 182 pll_p_out3 - 183 pll_p_out4 - 184 pll_a - 185 pll_a_out0 - 186 pll_d - 187 pll_d_out0 - 188 pll_d2 - 189 pll_d2_out0 - 190 pll_u - 191 pll_x - 192 pll_x_out0 - 193 pll_e - 194 spdif_in_sync - 195 i2s0_sync - 196 i2s1_sync - 197 i2s2_sync - 198 i2s3_sync - 199 i2s4_sync - 200 vimclk - 201 audio0 - 202 audio1 - 203 audio2 - 204 audio3 - 205 audio4 - 206 audio5 - 207 clk_out_1 (extern1) - 208 clk_out_2 (extern2) - 209 clk_out_3 (extern3) - 210 sclk - 211 blink - 212 cclk_g - 213 cclk_lp - 214 twd - 215 cml0 - 216 cml1 - 217 hclk - 218 pclk - Example SoC include file: / {
@@ -229,7 +26,7 @@ Example SoC include file: }; usb at c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA30_CLK_USB2>; /* usb2 */ }; };
include/dt-bindings/clk/tegra30-car.h new file +265 -0
265 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH 4/6 ARM: tegra30: convert device tree files to use CLK defines
In reply to Hiroshi DoyuReplace magic number in tegra_car:
- clocks = <&tegra_car 28>;
+ clocks = <&tegra_car CLK_HOST1X>;
--- arch/arm/boot/dts/tegra30-beaver.dts | 4 +- arch/arm/boot/dts/tegra30-cardhu.dtsi | 4 +- arch/arm/boot/dts/tegra30.dtsi | 110 +++++++++++++++++++--------------- 3 files changed, 69 insertions(+), 49 deletions(-)
arch/arm/boot/dts/tegra30-beaver.dts +3 -1
@@ -413,7 +413,9 @@ nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 184>, <&tegra_car 185>, <&tegra_car 120>; + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA30_CLK_EXTERN1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra30-cardhu.dtsi +3 -1
@@ -534,7 +534,9 @@ nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 184>, <&tegra_car 185>, <&tegra_car 120>; + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA30_CLK_EXTERN1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra30.dtsi +63 -47
379 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH 5/6 ARM: tegra114: create a DT header defining CLK IDs
In reply to Hiroshi DoyuReplace magic number in tegra_car:
- clocks = <&tegra_car 28>;
+ clocks = <&tegra_car CLK_HOST1X>;
--- .../bindings/clock/nvidia,tegra114-car.txt | 250 +-------------- include/dt-bindings/clk/tegra114-car.h | 342 +++++++++++++++++++++ 2 files changed, 345 insertions(+), 247 deletions(-) create mode 100644 include/dt-bindings/clk/tegra114-car.h
Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt +3 -247
@@ -3,6 +3,8 @@ NVIDIA Tegra114 Clock And Reset Controller This binding uses the common clock binding: Documentation/devicetree/bindings/clock/clock-bindings.txt +You can find the actual assignment in "dt-bindings/clk/tegra114-car.h" + The CAR (Clock And Reset) Controller on Tegra is the HW module responsible for muxing and gating Tegra's clocks, and setting their rates.
@@ -14,252 +16,6 @@ Required properties : - #clock-cells : Should be 1. In clock consumers, this cell represents the clock ID exposed by the CAR. - The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB - registers. These IDs often match those in the CAR's RST_DEVICES registers, - but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In - this case, those clocks are assigned IDs above 160 in order to highlight - this issue. Implementations that interpret these clock IDs as bit values - within the CLK_OUT_ENB or RST_DEVICES registers should be careful to - explicitly handle these special cases. - - The balance of the clocks controlled by the CAR are assigned IDs of 160 and - above. - - 0 unassigned - 1 unassigned - 2 unassigned - 3 unassigned - 4 rtc - 5 timer - 6 uarta - 7 unassigned (register bit affects uartb and vfir) - 8 unassigned - 9 sdmmc2 - 10 unassigned (register bit affects spdif_in and spdif_out) - 11 i2s1 - 12 i2c1 - 13 ndflash - 14 sdmmc1 - 15 sdmmc4 - 16 unassigned - 17 pwm - 18 i2s2 - 19 epp - 20 unassigned (register bit affects vi and vi_sensor) - 21 2d - 22 usbd - 23 isp - 24 3d - 25 unassigned - 26 disp2 - 27 disp1 - 28 host1x - 29 vcp - 30 i2s0 - 31 unassigned - - 32 unassigned - 33 unassigned - 34 apbdma - 35 unassigned - 36 kbc - 37 unassigned - 38 unassigned - 39 unassigned (register bit affects fuse and fuse_burn) - 40 kfuse - 41 sbc1 - 42 nor - 43 unassigned - 44 sbc2 - 45 unassigned - 46 sbc3 - 47 i2c5 - 48 dsia - 49 unassigned - 50 mipi - 51 hdmi - 52 csi - 53 unassigned - 54 i2c2 - 55 uartc - 56 mipi-cal - 57 emc - 58 usb2 - 59 usb3 - 60 msenc - 61 vde - 62 bsea - 63 bsev - - 64 unassigned - 65 uartd - 66 unassigned - 67 i2c3 - 68 sbc4 - 69 sdmmc3 - 70 unassigned - 71 owr - 72 afi - 73 csite - 74 unassigned - 75 unassigned - 76 la - 77 trace - 78 soc_therm - 79 dtv - 80 ndspeed - 81 i2cslow - 82 dsib - 83 tsec - 84 unassigned - 85 unassigned - 86 unassigned - 87 unassigned - 88 unassigned - 89 xusb_host - 90 unassigned - 91 msenc - 92 csus - 93 unassigned - 94 unassigned - 95 unassigned (bit affects xusb_dev and xusb_dev_src) - - 96 unassigned - 97 unassigned - 98 unassigned - 99 mselect - 100 tsensor - 101 i2s3 - 102 i2s4 - 103 i2c4 - 104 sbc5 - 105 sbc6 - 106 d_audio - 107 apbif - 108 dam0 - 109 dam1 - 110 dam2 - 111 hda2codec_2x - 112 unassigned - 113 audio0_2x - 114 audio1_2x - 115 audio2_2x - 116 audio3_2x - 117 audio4_2x - 118 spdif_2x - 119 actmon - 120 extern1 - 121 extern2 - 122 extern3 - 123 unassigned - 124 unassigned - 125 hda - 126 unassigned - 127 se - - 128 hda2hdmi - 129 unassigned - 130 unassigned - 131 unassigned - 132 unassigned - 133 unassigned - 134 unassigned - 135 unassigned - 136 unassigned - 137 unassigned - 138 unassigned - 139 unassigned - 140 unassigned - 141 unassigned - 142 unassigned - 143 unassigned (bit affects xusb_falcon_src, xusb_fs_src, - xusb_host_src and xusb_ss_src) - 144 cilab - 145 cilcd - 146 cile - 147 dsialp - 148 dsiblp - 149 unassigned - 150 dds - 151 unassigned - 152 dp2 - 153 amx - 154 adx - 155 unassigned (bit affects dfll_ref and dfll_soc) - 156 xusb_ss - - 192 uartb - 193 vfir - 194 spdif_in - 195 spdif_out - 196 vi - 197 vi_sensor - 198 fuse - 199 fuse_burn - 200 clk_32k - 201 clk_m - 202 clk_m_div2 - 203 clk_m_div4 - 204 pll_ref - 205 pll_c - 206 pll_c_out1 - 207 pll_c2 - 208 pll_c3 - 209 pll_m - 210 pll_m_out1 - 211 pll_p - 212 pll_p_out1 - 213 pll_p_out2 - 214 pll_p_out3 - 215 pll_p_out4 - 216 pll_a - 217 pll_a_out0 - 218 pll_d - 219 pll_d_out0 - 220 pll_d2 - 221 pll_d2_out0 - 222 pll_u - 223 pll_u_480M - 224 pll_u_60M - 225 pll_u_48M - 226 pll_u_12M - 227 pll_x - 228 pll_x_out0 - 229 pll_re_vco - 230 pll_re_out - 231 pll_e_out0 - 232 spdif_in_sync - 233 i2s0_sync - 234 i2s1_sync - 235 i2s2_sync - 236 i2s3_sync - 237 i2s4_sync - 238 vimclk_sync - 239 audio0 - 240 audio1 - 241 audio2 - 242 audio3 - 243 audio4 - 244 spdif - 245 clk_out_1 - 246 clk_out_2 - 247 clk_out_3 - 248 blink - 252 xusb_host_src - 253 xusb_falcon_src - 254 xusb_fs_src - 255 xusb_ss_src - 256 xusb_dev_src - 257 xusb_dev - 258 xusb_hs_src - 259 sclk - 260 hclk - 261 pclk - 262 cclk_g - 263 cclk_lp - 264 dfll_ref - 265 dfll_soc - Example SoC include file: / {
@@ -270,7 +26,7 @@ Example SoC include file: }; usb at c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA114_CLK_USB2>; /* usb2 */ }; };
include/dt-bindings/clk/tegra114-car.h new file +342 -0
342 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH 6/6 ARM: tegra114: convert device tree files to use CLK defines
In reply to Hiroshi DoyuReplace magic number in tegra_car:
- clocks = <&tegra_car 28>;
+ clocks = <&tegra_car CLK_HOST1X>;
--- arch/arm/boot/dts/tegra114-dalmore.dts | 4 +- arch/arm/boot/dts/tegra114.dtsi | 79 +++++++++++++++++++--------------- 2 files changed, 47 insertions(+), 36 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +3 -1
@@ -957,7 +957,9 @@ nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>; - clocks = <&tegra_car 216>, <&tegra_car 217>, <&tegra_car 120>; + clocks = <&tegra_car TEGRA114_CLK_PLL_A>, + <&tegra_car TEGRA114_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA114_CLK_EXTERN1>; clock-names = "pll_a", "pll_a_out0", "mclk"; }; };
arch/arm/boot/dts/tegra114.dtsi +44 -35
270 lines not on this page · raw message
Signature · 1 line
1.8.1.5