diff options
| author | Chen-Yu Tsai <wens@csie.org> | 2015-01-20 10:46:31 -0500 |
|---|---|---|
| committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2015-01-20 11:14:38 -0500 |
| commit | 7a6fca879f59824963cd456d8cc5db24ac5acfc0 (patch) | |
| tree | c9519f6cb366fe1c3a3545c55f89e664f88e6a54 /Documentation/devicetree/bindings | |
| parent | 61af4d8dceeb179b62cb342f4008ce3774d3d1fd (diff) | |
clk: sunxi: Add driver for A80 MMC config clocks/resets
On the A80 SoC, the 4 mmc controllers each have a separate register
controlling their register access clocks and reset controls. These
registers in turn share a ahb clock gate and reset control.
This patch adds a platform device driver for these controls. It
requires both clocks and reset controls to be available, so using
CLK_OF_DECLARE might not be the best way.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'Documentation/devicetree/bindings')
| -rw-r--r-- | Documentation/devicetree/bindings/clock/sunxi.txt | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index 0dfd018ba47b..60b44285250d 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt | |||
| @@ -57,6 +57,7 @@ Required properties: | |||
| 57 | "allwinner,sun5i-a13-mbus-clk" - for the MBUS clock on A13 | 57 | "allwinner,sun5i-a13-mbus-clk" - for the MBUS clock on A13 |
| 58 | "allwinner,sun4i-a10-mmc-clk" - for the MMC clock | 58 | "allwinner,sun4i-a10-mmc-clk" - for the MMC clock |
| 59 | "allwinner,sun9i-a80-mmc-clk" - for mmc module clocks on A80 | 59 | "allwinner,sun9i-a80-mmc-clk" - for mmc module clocks on A80 |
| 60 | "allwinner,sun9i-a80-mmc-config-clk" - for mmc gates + resets on A80 | ||
| 60 | "allwinner,sun4i-a10-mod0-clk" - for the module 0 family of clocks | 61 | "allwinner,sun4i-a10-mod0-clk" - for the module 0 family of clocks |
| 61 | "allwinner,sun9i-a80-mod0-clk" - for module 0 (storage) clocks on A80 | 62 | "allwinner,sun9i-a80-mod0-clk" - for module 0 (storage) clocks on A80 |
| 62 | "allwinner,sun8i-a23-mbus-clk" - for the MBUS clock on A23 | 63 | "allwinner,sun8i-a23-mbus-clk" - for the MBUS clock on A23 |
| @@ -75,7 +76,8 @@ Required properties for all clocks: | |||
| 75 | the following compatibles where it shall be set to 1: | 76 | the following compatibles where it shall be set to 1: |
| 76 | "allwinner,*-gates-clk", "allwinner,sun4i-pll5-clk", | 77 | "allwinner,*-gates-clk", "allwinner,sun4i-pll5-clk", |
| 77 | "allwinner,sun4i-pll6-clk", "allwinner,sun6i-a31-pll6-clk", | 78 | "allwinner,sun4i-pll6-clk", "allwinner,sun6i-a31-pll6-clk", |
| 78 | "allwinner,*-usb-clk", "allwinner,*-mmc-clk" | 79 | "allwinner,*-usb-clk", "allwinner,*-mmc-clk", |
| 80 | "allwinner,*-mmc-config-clk" | ||
| 79 | - clock-output-names : shall be the corresponding names of the outputs. | 81 | - clock-output-names : shall be the corresponding names of the outputs. |
| 80 | If the clock module only has one output, the name shall be the | 82 | If the clock module only has one output, the name shall be the |
| 81 | module name. | 83 | module name. |
| @@ -83,6 +85,10 @@ Required properties for all clocks: | |||
| 83 | And "allwinner,*-usb-clk" clocks also require: | 85 | And "allwinner,*-usb-clk" clocks also require: |
| 84 | - reset-cells : shall be set to 1 | 86 | - reset-cells : shall be set to 1 |
| 85 | 87 | ||
| 88 | The "allwinner,sun9i-a80-mmc-config-clk" clock also requires: | ||
| 89 | - #reset-cells : shall be set to 1 | ||
| 90 | - resets : shall be the reset control phandle for the mmc block. | ||
| 91 | |||
| 86 | For "allwinner,sun7i-a20-gmac-clk", the parent clocks shall be fixed rate | 92 | For "allwinner,sun7i-a20-gmac-clk", the parent clocks shall be fixed rate |
| 87 | dummy clocks at 25 MHz and 125 MHz, respectively. See example. | 93 | dummy clocks at 25 MHz and 125 MHz, respectively. See example. |
| 88 | 94 | ||
| @@ -101,6 +107,10 @@ The "allwinner,*-mmc-clk" clocks have three different outputs: the | |||
| 101 | main clock, with the ID 0, and the output and sample clocks, with the | 107 | main clock, with the ID 0, and the output and sample clocks, with the |
| 102 | IDs 1 and 2, respectively. | 108 | IDs 1 and 2, respectively. |
| 103 | 109 | ||
| 110 | The "allwinner,sun9i-a80-mmc-config-clk" clock has one clock/reset output | ||
| 111 | per mmc controller. The number of outputs is determined by the size of | ||
| 112 | the address block, which is related to the overall mmc block. | ||
| 113 | |||
| 104 | For example: | 114 | For example: |
| 105 | 115 | ||
| 106 | osc24M: clk@01c20050 { | 116 | osc24M: clk@01c20050 { |
| @@ -176,3 +186,16 @@ gmac_clk: clk@01c20164 { | |||
| 176 | clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>; | 186 | clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>; |
| 177 | clock-output-names = "gmac"; | 187 | clock-output-names = "gmac"; |
| 178 | }; | 188 | }; |
| 189 | |||
| 190 | mmc_config_clk: clk@01c13000 { | ||
| 191 | compatible = "allwinner,sun9i-a80-mmc-config-clk"; | ||
| 192 | reg = <0x01c13000 0x10>; | ||
| 193 | clocks = <&ahb0_gates 8>; | ||
| 194 | clock-names = "ahb"; | ||
| 195 | resets = <&ahb0_resets 8>; | ||
| 196 | reset-names = "ahb"; | ||
| 197 | #clock-cells = <1>; | ||
| 198 | #reset-cells = <1>; | ||
| 199 | clock-output-names = "mmc0_config", "mmc1_config", | ||
| 200 | "mmc2_config", "mmc3_config"; | ||
| 201 | }; | ||
