CLK: tegra: convert device tree files to use CLK defines
Subsystems (3)
v2 cover CLK: tegra: convert device tree files to use CLK defines
This patchset converts device tree files to use CLK defines. This version was updated along with the latest DT changes.
The following changes since commit 7479d8bb5650f43053d0e82fa44db668cf968f11:
TESTING: Build Tegra USB as a module (2013-05-20 13:11:19 -0600)
are available in the git repository at:
git://nv-tegra.nvidia.com/user/hdoyu/linux.git dt-replace-clkid
for you to fetch changes up to cfafa8272866ecc3e8baad7f3066921b279890fe:
ARM: tegra114: convert device tree files to use CLK defines (2013-05-21 11:16:47 +0300)
----------------------------------------------------------------
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 | 252 +-------------- .../bindings/clock/nvidia,tegra20-car.txt | 154 +--------- .../bindings/clock/nvidia,tegra30-car.txt | 211 +------------ 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 | 4 +- 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 | 116 +++---- 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, 984 insertions(+), 755 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
A message that is not in the archive (sent off-list or not yet received): 1369127450-15203-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
PATCH v2 1/6 ARM: tegra20: create a DT header defining CLK IDs
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.
--- .../bindings/clock/nvidia,tegra20-car.txt | 154 +------------------- include/dt-bindings/clk/tegra20-car.h | 158 +++++++++++++++++++++ 2 files changed, 162 insertions(+), 150 deletions(-) create mode 100644 include/dt-bindings/clk/tegra20-car.h
Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +4 -150
@@ -12,155 +12,9 @@ Required properties : - clocks : Should contain phandle and clock specifiers for two clocks: the 32 KHz "32k_in", and the board-specific oscillator "osc". - #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 + 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>. Example SoC include file:
@@ -172,7 +26,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA20_CLK_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 v2 2/6 ARM: tegra20: convert device tree files to use CLK defines
In reply to a message not in the archiveUse 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-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 | 4 +- 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 | 116 +++++++++++++++-------------- 11 files changed, 91 insertions(+), 65 deletions(-)
arch/arm/boot/dts/tegra20-colibri-512.dtsi +3 -1
@@ -492,7 +492,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
@@ -702,7 +702,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 +2 -2
@@ -277,7 +277,7 @@ 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"; };
@@ -535,7 +535,7 @@ 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
@@ -853,7 +853,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
@@ -427,7 +427,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
@@ -654,7 +654,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
@@ -613,7 +613,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 +62 -54
394 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH v2 2/6 ARM: tegra20: convert device tree files to use CLK defines
arch/arm/boot/dts/tegra20-paz00.dts line 538
Quoted 10 lines · Hiroshi Doyu
Use the Tegra20 CAR binding header (
tegra20-car.h) to replace magic numbers in the device tree. For example,(quoted diff) +1
-1- clocks = <&tegra_car 28>; + clocks = <&tegra_car CLK_HOST1X>;arch/arm/boot/dts/tegra20-paz00.dts +1
-1- 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>;
That's well over 80 columns. Can you wrap it and make sure there aren't any other instances of this? I guess checkpatch doesn't actually impose this rule on *.dts files, since it didn't complain about this.
PATCH v2 3/6 ARM: tegra30: create a DT header defining CLK IDs
In reply to a message not in the archiveCreate a header file to define the clock IDs used by the Tegra30 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.
--- .../bindings/clock/nvidia,tegra30-car.txt | 211 +--------------- include/dt-bindings/clk/tegra30-car.h | 265 +++++++++++++++++++++ 2 files changed, 269 insertions(+), 207 deletions(-) create mode 100644 include/dt-bindings/clk/tegra30-car.h
Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt +4 -207
@@ -12,212 +12,9 @@ Required properties : - clocks : Should contain phandle and clock specifiers for two clocks: the 32 KHz "32k_in", and the board-specific oscillator "osc". - #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 + In clock consumers, this cell represents the clock ID exposed by the + CAR. The assignments may be found in header file + <dt-bindings/clk/tegra30-car.h>. Example SoC include file:
@@ -229,7 +26,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA30_CLK_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 v2 4/6 ARM: tegra30: convert device tree files to use CLK defines
In reply to a message not in the archiveUse the Tegra30 CAR binding header (tegra30-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/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
@@ -426,7 +426,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
377 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH v2 5/6 ARM: tegra114: create a DT header defining CLK IDs
In reply to a message not in the archiveCreate a header file to define the clock IDs used by the Tegra114 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.
--- .../bindings/clock/nvidia,tegra114-car.txt | 252 +-------------- include/dt-bindings/clk/tegra114-car.h | 342 +++++++++++++++++++++ 2 files changed, 346 insertions(+), 248 deletions(-) create mode 100644 include/dt-bindings/clk/tegra114-car.h
Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt +4 -248
@@ -12,253 +12,9 @@ Required properties : - clocks : Should contain phandle and clock specifiers for two clocks: the 32 KHz "32k_in", and the board-specific oscillator "osc". - #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 + In clock consumers, this cell represents the clock ID exposed by the + CAR. The assignments may be found in header file + <dt-bindings/clk/tegra114-car.h>. Example SoC include file:
@@ -270,7 +26,7 @@ Example SoC include file: }; usb@c5004000 { - clocks = <&tegra_car 58>; /* usb2 */ + clocks = <&tegra_car TEGRA114_CLK_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 v2 6/6 ARM: tegra114: convert device tree files to use CLK defines
In reply to a message not in the archiveUse the Tegra114 CAR binding header (tegra114-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/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
@@ -972,7 +972,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
268 lines not on this page · raw message
Signature · 1 line
1.8.1.5
v2 cover CLK: tegra: convert device tree files to use CLK defines
In reply to Hiroshi DoyuQuoted 6 lines · Hiroshi Doyu
This patchset converts device tree files to use CLK defines. This version was updated along with the latest DT changes.
The following changes since commit
7479d8bb5650f43053d0e82fa44db668cf968f11:TESTING: Build Tegra USB as a module (2013-05-20 13:11:19 -0600)
That commit is in my personal work-in-progress branch. This series should be based on Tegra's for-3.11/dt branch. This will make a difference (at least) in patch 6/6, where you've edited some DT nodes that don't yet exist upstream (i.e. Tegra's for-3.11/dt branch) and hence this series won't apply there.
I assume you're planning to send a series for 3.11 that converts drivers/clk/tegra/ to use these new header files?
If so, I'll need to apply patches 1, 3, 5 to a separate branch, so it can be pulled into the branch where the drivers/clk changes are applied, then apply patches 2, 4, 6 to Tegra's for-3.11/dt after merging in the branch with the header files.
v2 cover CLK: tegra: convert device tree files to use CLK defines
Quoted 6 lines · On Tue, 21 May 2013 18:05:49 +0200 Stephen Warren <[email protected]> wrote:
Quoted 5 lines · Hiroshi Doyu
This patchset converts device tree files to use CLK defines. This version was updated along with the latest DT changes.
The following changes since commit
7479d8bb5650f43053d0e82fa44db668cf968f11:
Quoted 7 lines
Quoted 1 line
TESTING: Build Tegra USB as a module (2013-05-20 13:11:19 -0600)
That commit is in my personal work-in-progress branch. This series should be based on Tegra's for-3.11/dt branch. This will make a difference (at least) in patch 6/6, where you've edited some DT nodes that don't yet exist upstream (i.e. Tegra's for-3.11/dt branch) and hence this series won't apply there.
I'll rebase.
Quoted 2 lines
I assume you're planning to send a series for 3.11 that converts
drivers/clk/tegra/to use these new header files?
I think that I'll work on SMMU first, which diverted from the downstream now. So the above may come a bit later.
v2 cover CLK: tegra: convert device tree files to use CLK defines
Hiroshi Doyu <[email protected]> wrote @ Wed, 22 May 2013 08:12:48 +0200:
Quoted 11 lines
Quoted 8 lines · On Tue, 21 May 2013 18:05:49 +0200 Stephen Warren <[email protected]> wrote:
Quoted 6 lines · Hiroshi Doyu
This patchset converts device tree files to use CLK defines. This version was updated along with the latest DT changes.
The following changes since commit
7479d8bb5650f43053d0e82fa44db668cf968f11:TESTING: Build Tegra USB as a module (2013-05-20 13:11:19 -0600)
Quoted 7 lines
Quoted 5 lines
That commit is in my personal work-in-progress branch. This series should be based on Tegra's for-3.11/dt branch. This will make a difference (at least) in patch 6/6, where you've edited some DT nodes that don't yet exist upstream (i.e. Tegra's for-3.11/dt branch) and hence this series won't apply there.
I'll rebase.
Rebased on Tegra's for-3.11/dt, including fix: [2/6] over 80 columns.
If you want me to send patches again, please let me know.
The following changes since commit 4d0c81c723f78a2f7f6ef844ff8e1fd174180029:
ARM: tegra: Add charger subnode to tps65090 node (2013-05-20 13:14:09 -0600)
are available in the git repository at:
git://nv-tegra.nvidia.com/user/hdoyu/linux.git dt-replace-clkid3
for you to fetch changes up to 00535ac4b17af0691a73737a70b0cbd78a9d2262:
ARM: tegra114: convert device tree files to use CLK defines (2013-05-22 12:58:04 +0300)
----------------------------------------------------------------
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 | 252 +-------------- .../bindings/clock/nvidia,tegra20-car.txt | 154 +--------- .../bindings/clock/nvidia,tegra30-car.txt | 211 +------------ arch/arm/boot/dts/tegra114.dtsi | 51 +-- 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 | 116 +++---- 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 ++++++++++++++++ 20 files changed, 963 insertions(+), 743 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
v2 cover CLK: tegra: convert device tree files to use CLK defines
Quoted 19 lines · Hiroshi Doyu
Hiroshi Doyu <[email protected]> wrote @ Wed, 22 May 2013 08:12:48 +0200:
Quoted 17 lines
Quoted 13 lines · On Tue, 21 May 2013 18:05:49 +0200 Stephen Warren <[email protected]> wrote:
Quoted 6 lines · Hiroshi Doyu
This patchset converts device tree files to use CLK defines. This version was updated along with the latest DT changes.
The following changes since commit
7479d8bb5650f43053d0e82fa44db668cf968f11:TESTING: Build Tegra USB as a module (2013-05-20 13:11:19 -0600)
That commit is in my personal work-in-progress branch. This series should be based on Tegra's for-3.11/dt branch. This will make a difference (at least) in patch 6/6, where you've edited some DT nodes that don't yet exist upstream (i.e. Tegra's for-3.11/dt branch) and hence this series won't apply there.
Quoted 5 lines
Quoted 1 line
I'll rebase.
Rebased on Tegra's for-3.11/dt, including fix: [2/6] over 80 columns.
If you want me to send patches again, please let me know.
Yes, you should always send the patches for review on mailing lists.
v2 cover CLK: tegra: convert device tree files to use CLK defines
In reply to Hiroshi DoyuQuoted 17 lines · Hiroshi Doyu
Quoted 6 lines · On Tue, 21 May 2013 18:05:49 +0200 Stephen Warren <[email protected]> wrote:
Quoted 5 lines · Hiroshi Doyu
This patchset converts device tree files to use CLK defines. This version was updated along with the latest DT changes.
The following changes since commit
7479d8bb5650f43053d0e82fa44db668cf968f11:Quoted 7 lines
Quoted 1 line
TESTING: Build Tegra USB as a module (2013-05-20 13:11:19 -0600)
That commit is in my personal work-in-progress branch. This series should be based on Tegra's for-3.11/dt branch. This will make a difference (at least) in patch 6/6, where you've edited some DT nodes that don't yet exist upstream (i.e. Tegra's for-3.11/dt branch) and hence this series won't apply there.
Quoted 7 lines
I'll rebase.
Quoted 2 lines
I assume you're planning to send a series for 3.11 that converts
drivers/clk/tegra/to use these new header files?I think that I'll work on SMMU first, which diverted from the downstream now. So the above may come a bit later.
Really? SMMU support upstream is pretty low priority right now since we don't use it yet, and only converting one of the two potential users of this new binding header file means it isn't particularly useful.