Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 1 | /* |
| 2 | * phy-ti-pipe3 - PIPE3 PHY driver. |
| 3 | * |
| 4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * Author: Kishon Vijay Abraham I <kishon@ti.com> |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | */ |
| 18 | |
| 19 | #include <linux/module.h> |
| 20 | #include <linux/platform_device.h> |
| 21 | #include <linux/slab.h> |
| 22 | #include <linux/phy/phy.h> |
| 23 | #include <linux/of.h> |
| 24 | #include <linux/clk.h> |
| 25 | #include <linux/err.h> |
| 26 | #include <linux/io.h> |
| 27 | #include <linux/pm_runtime.h> |
| 28 | #include <linux/delay.h> |
Kishon Vijay Abraham I | 14da699 | 2014-03-06 16:38:37 +0200 | [diff] [blame] | 29 | #include <linux/phy/omap_control_phy.h> |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 30 | #include <linux/of_platform.h> |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 31 | #include <linux/mfd/syscon.h> |
| 32 | #include <linux/regmap.h> |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 33 | |
| 34 | #define PLL_STATUS 0x00000004 |
| 35 | #define PLL_GO 0x00000008 |
| 36 | #define PLL_CONFIGURATION1 0x0000000C |
| 37 | #define PLL_CONFIGURATION2 0x00000010 |
| 38 | #define PLL_CONFIGURATION3 0x00000014 |
| 39 | #define PLL_CONFIGURATION4 0x00000020 |
| 40 | |
| 41 | #define PLL_REGM_MASK 0x001FFE00 |
| 42 | #define PLL_REGM_SHIFT 0x9 |
| 43 | #define PLL_REGM_F_MASK 0x0003FFFF |
| 44 | #define PLL_REGM_F_SHIFT 0x0 |
| 45 | #define PLL_REGN_MASK 0x000001FE |
| 46 | #define PLL_REGN_SHIFT 0x1 |
| 47 | #define PLL_SELFREQDCO_MASK 0x0000000E |
| 48 | #define PLL_SELFREQDCO_SHIFT 0x1 |
| 49 | #define PLL_SD_MASK 0x0003FC00 |
Roger Quadros | 1562864f | 2014-03-07 11:27:09 +0530 | [diff] [blame] | 50 | #define PLL_SD_SHIFT 10 |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 51 | #define SET_PLL_GO 0x1 |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 52 | #define PLL_LDOPWDN BIT(15) |
| 53 | #define PLL_TICOPWDN BIT(16) |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 54 | #define PLL_LOCK 0x2 |
| 55 | #define PLL_IDLE 0x1 |
| 56 | |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 57 | #define SATA_PLL_SOFT_RESET BIT(18) |
| 58 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 59 | /* |
| 60 | * This is an Empirical value that works, need to confirm the actual |
| 61 | * value required for the PIPE3PHY_PLL_CONFIGURATION2.PLL_IDLE status |
| 62 | * to be correctly reflected in the PIPE3PHY_PLL_STATUS register. |
| 63 | */ |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 64 | #define PLL_IDLE_TIME 100 /* in milliseconds */ |
| 65 | #define PLL_LOCK_TIME 100 /* in milliseconds */ |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 66 | |
| 67 | struct pipe3_dpll_params { |
| 68 | u16 m; |
| 69 | u8 n; |
| 70 | u8 freq:3; |
| 71 | u8 sd; |
| 72 | u32 mf; |
| 73 | }; |
| 74 | |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 75 | struct pipe3_dpll_map { |
| 76 | unsigned long rate; |
| 77 | struct pipe3_dpll_params params; |
| 78 | }; |
| 79 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 80 | struct ti_pipe3 { |
| 81 | void __iomem *pll_ctrl_base; |
| 82 | struct device *dev; |
| 83 | struct device *control_dev; |
| 84 | struct clk *wkupclk; |
| 85 | struct clk *sys_clk; |
Roger Quadros | 1562864f | 2014-03-07 11:27:09 +0530 | [diff] [blame] | 86 | struct clk *refclk; |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 87 | struct clk *div_clk; |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 88 | struct pipe3_dpll_map *dpll_map; |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 89 | struct regmap *dpll_reset_syscon; /* ctrl. reg. acces */ |
| 90 | unsigned int dpll_reset_reg; /* reg. index within syscon */ |
| 91 | bool sata_refclk_enabled; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 92 | }; |
| 93 | |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 94 | static struct pipe3_dpll_map dpll_map_usb[] = { |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 95 | {12000000, {1250, 5, 4, 20, 0} }, /* 12 MHz */ |
| 96 | {16800000, {3125, 20, 4, 20, 0} }, /* 16.8 MHz */ |
| 97 | {19200000, {1172, 8, 4, 20, 65537} }, /* 19.2 MHz */ |
| 98 | {20000000, {1000, 7, 4, 10, 0} }, /* 20 MHz */ |
| 99 | {26000000, {1250, 12, 4, 20, 0} }, /* 26 MHz */ |
| 100 | {38400000, {3125, 47, 4, 20, 92843} }, /* 38.4 MHz */ |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 101 | { }, /* Terminator */ |
| 102 | }; |
| 103 | |
| 104 | static struct pipe3_dpll_map dpll_map_sata[] = { |
| 105 | {12000000, {1000, 7, 4, 6, 0} }, /* 12 MHz */ |
| 106 | {16800000, {714, 7, 4, 6, 0} }, /* 16.8 MHz */ |
| 107 | {19200000, {625, 7, 4, 6, 0} }, /* 19.2 MHz */ |
| 108 | {20000000, {600, 7, 4, 6, 0} }, /* 20 MHz */ |
| 109 | {26000000, {461, 7, 4, 6, 0} }, /* 26 MHz */ |
| 110 | {38400000, {312, 7, 4, 6, 0} }, /* 38.4 MHz */ |
| 111 | { }, /* Terminator */ |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 112 | }; |
| 113 | |
| 114 | static inline u32 ti_pipe3_readl(void __iomem *addr, unsigned offset) |
| 115 | { |
| 116 | return __raw_readl(addr + offset); |
| 117 | } |
| 118 | |
| 119 | static inline void ti_pipe3_writel(void __iomem *addr, unsigned offset, |
| 120 | u32 data) |
| 121 | { |
| 122 | __raw_writel(data, addr + offset); |
| 123 | } |
| 124 | |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 125 | static struct pipe3_dpll_params *ti_pipe3_get_dpll_params(struct ti_pipe3 *phy) |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 126 | { |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 127 | unsigned long rate; |
| 128 | struct pipe3_dpll_map *dpll_map = phy->dpll_map; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 129 | |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 130 | rate = clk_get_rate(phy->sys_clk); |
| 131 | |
| 132 | for (; dpll_map->rate; dpll_map++) { |
| 133 | if (rate == dpll_map->rate) |
| 134 | return &dpll_map->params; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 135 | } |
| 136 | |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 137 | dev_err(phy->dev, "No DPLL configuration for %lu Hz SYS CLK\n", rate); |
| 138 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 139 | return NULL; |
| 140 | } |
| 141 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 142 | static int ti_pipe3_enable_clocks(struct ti_pipe3 *phy); |
| 143 | static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy); |
| 144 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 145 | static int ti_pipe3_power_off(struct phy *x) |
| 146 | { |
| 147 | struct ti_pipe3 *phy = phy_get_drvdata(x); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 148 | |
Kishon Vijay Abraham I | 14da699 | 2014-03-06 16:38:37 +0200 | [diff] [blame] | 149 | omap_control_phy_power(phy->control_dev, 0); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 150 | |
| 151 | return 0; |
| 152 | } |
| 153 | |
| 154 | static int ti_pipe3_power_on(struct phy *x) |
| 155 | { |
| 156 | struct ti_pipe3 *phy = phy_get_drvdata(x); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 157 | |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 158 | omap_control_phy_power(phy->control_dev, 1); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 159 | |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 160 | return 0; |
| 161 | } |
| 162 | |
| 163 | static int ti_pipe3_dpll_wait_lock(struct ti_pipe3 *phy) |
| 164 | { |
| 165 | u32 val; |
| 166 | unsigned long timeout; |
| 167 | |
| 168 | timeout = jiffies + msecs_to_jiffies(PLL_LOCK_TIME); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 169 | do { |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 170 | cpu_relax(); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 171 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS); |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 172 | if (val & PLL_LOCK) |
Axel Lin | a5e5d3c | 2015-03-03 20:04:55 +0800 | [diff] [blame] | 173 | return 0; |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 174 | } while (!time_after(jiffies, timeout)); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 175 | |
Axel Lin | a5e5d3c | 2015-03-03 20:04:55 +0800 | [diff] [blame] | 176 | dev_err(phy->dev, "DPLL failed to lock\n"); |
| 177 | return -EBUSY; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 178 | } |
| 179 | |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 180 | static int ti_pipe3_dpll_program(struct ti_pipe3 *phy) |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 181 | { |
| 182 | u32 val; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 183 | struct pipe3_dpll_params *dpll_params; |
| 184 | |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 185 | dpll_params = ti_pipe3_get_dpll_params(phy); |
| 186 | if (!dpll_params) |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 187 | return -EINVAL; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 188 | |
| 189 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION1); |
| 190 | val &= ~PLL_REGN_MASK; |
| 191 | val |= dpll_params->n << PLL_REGN_SHIFT; |
| 192 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_CONFIGURATION1, val); |
| 193 | |
| 194 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION2); |
| 195 | val &= ~PLL_SELFREQDCO_MASK; |
| 196 | val |= dpll_params->freq << PLL_SELFREQDCO_SHIFT; |
| 197 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_CONFIGURATION2, val); |
| 198 | |
| 199 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION1); |
| 200 | val &= ~PLL_REGM_MASK; |
| 201 | val |= dpll_params->m << PLL_REGM_SHIFT; |
| 202 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_CONFIGURATION1, val); |
| 203 | |
| 204 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION4); |
| 205 | val &= ~PLL_REGM_F_MASK; |
| 206 | val |= dpll_params->mf << PLL_REGM_F_SHIFT; |
| 207 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_CONFIGURATION4, val); |
| 208 | |
| 209 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION3); |
| 210 | val &= ~PLL_SD_MASK; |
| 211 | val |= dpll_params->sd << PLL_SD_SHIFT; |
| 212 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_CONFIGURATION3, val); |
| 213 | |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 214 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_GO, SET_PLL_GO); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 215 | |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 216 | return ti_pipe3_dpll_wait_lock(phy); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 217 | } |
| 218 | |
| 219 | static int ti_pipe3_init(struct phy *x) |
| 220 | { |
| 221 | struct ti_pipe3 *phy = phy_get_drvdata(x); |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 222 | u32 val; |
| 223 | int ret = 0; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 224 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 225 | ti_pipe3_enable_clocks(phy); |
Vignesh R | 0bc09f9 | 2014-12-16 14:52:50 +0530 | [diff] [blame] | 226 | /* |
| 227 | * Set pcie_pcs register to 0x96 for proper functioning of phy |
| 228 | * as recommended in AM572x TRM SPRUHZ6, section 18.5.2.2, table |
| 229 | * 18-1804. |
| 230 | */ |
Kishon Vijay Abraham I | f0e2cf7 | 2014-06-25 23:22:57 +0530 | [diff] [blame] | 231 | if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-pcie")) { |
Vignesh R | 0bc09f9 | 2014-12-16 14:52:50 +0530 | [diff] [blame] | 232 | omap_control_pcie_pcs(phy->control_dev, 0x96); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 233 | return 0; |
Kishon Vijay Abraham I | f0e2cf7 | 2014-06-25 23:22:57 +0530 | [diff] [blame] | 234 | } |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 235 | |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 236 | /* Bring it out of IDLE if it is IDLE */ |
| 237 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION2); |
| 238 | if (val & PLL_IDLE) { |
| 239 | val &= ~PLL_IDLE; |
| 240 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_CONFIGURATION2, val); |
| 241 | ret = ti_pipe3_dpll_wait_lock(phy); |
| 242 | } |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 243 | |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 244 | /* Program the DPLL only if not locked */ |
| 245 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS); |
| 246 | if (!(val & PLL_LOCK)) |
| 247 | if (ti_pipe3_dpll_program(phy)) |
| 248 | return -EINVAL; |
| 249 | |
| 250 | return ret; |
| 251 | } |
| 252 | |
| 253 | static int ti_pipe3_exit(struct phy *x) |
| 254 | { |
| 255 | struct ti_pipe3 *phy = phy_get_drvdata(x); |
| 256 | u32 val; |
| 257 | unsigned long timeout; |
| 258 | |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 259 | /* If dpll_reset_syscon is not present we wont power down SATA DPLL |
| 260 | * due to Errata i783 |
| 261 | */ |
| 262 | if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-sata") && |
| 263 | !phy->dpll_reset_syscon) |
Roger Quadros | 56042e4 | 2014-03-06 16:38:44 +0200 | [diff] [blame] | 264 | return 0; |
| 265 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 266 | /* PCIe doesn't have internal DPLL */ |
| 267 | if (!of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-pcie")) { |
| 268 | /* Put DPLL in IDLE mode */ |
| 269 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION2); |
| 270 | val |= PLL_IDLE; |
| 271 | ti_pipe3_writel(phy->pll_ctrl_base, PLL_CONFIGURATION2, val); |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 272 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 273 | /* wait for LDO and Oscillator to power down */ |
| 274 | timeout = jiffies + msecs_to_jiffies(PLL_IDLE_TIME); |
| 275 | do { |
| 276 | cpu_relax(); |
| 277 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS); |
| 278 | if ((val & PLL_TICOPWDN) && (val & PLL_LDOPWDN)) |
| 279 | break; |
| 280 | } while (!time_after(jiffies, timeout)); |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 281 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 282 | if (!(val & PLL_TICOPWDN) || !(val & PLL_LDOPWDN)) { |
| 283 | dev_err(phy->dev, "Failed to power down: PLL_STATUS 0x%x\n", |
| 284 | val); |
| 285 | return -EBUSY; |
| 286 | } |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 287 | } |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 288 | |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 289 | /* i783: SATA needs control bit toggle after PLL unlock */ |
| 290 | if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-sata")) { |
| 291 | regmap_update_bits(phy->dpll_reset_syscon, phy->dpll_reset_reg, |
| 292 | SATA_PLL_SOFT_RESET, SATA_PLL_SOFT_RESET); |
| 293 | regmap_update_bits(phy->dpll_reset_syscon, phy->dpll_reset_reg, |
| 294 | SATA_PLL_SOFT_RESET, 0); |
| 295 | } |
| 296 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 297 | ti_pipe3_disable_clocks(phy); |
| 298 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 299 | return 0; |
| 300 | } |
Axel Lin | 4a9e5ca | 2015-07-15 15:33:51 +0800 | [diff] [blame] | 301 | static const struct phy_ops ops = { |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 302 | .init = ti_pipe3_init, |
Roger Quadros | 629138d | 2014-03-06 16:38:43 +0200 | [diff] [blame] | 303 | .exit = ti_pipe3_exit, |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 304 | .power_on = ti_pipe3_power_on, |
| 305 | .power_off = ti_pipe3_power_off, |
| 306 | .owner = THIS_MODULE, |
| 307 | }; |
| 308 | |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 309 | static const struct of_device_id ti_pipe3_id_table[]; |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 310 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 311 | static int ti_pipe3_probe(struct platform_device *pdev) |
| 312 | { |
| 313 | struct ti_pipe3 *phy; |
| 314 | struct phy *generic_phy; |
| 315 | struct phy_provider *phy_provider; |
| 316 | struct resource *res; |
| 317 | struct device_node *node = pdev->dev.of_node; |
| 318 | struct device_node *control_node; |
| 319 | struct platform_device *control_pdev; |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 320 | const struct of_device_id *match; |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 321 | struct clk *clk; |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 322 | struct device *dev = &pdev->dev; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 323 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 324 | phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); |
Peter Griffin | 3a4cfcb | 2014-08-15 13:40:11 +0100 | [diff] [blame] | 325 | if (!phy) |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 326 | return -ENOMEM; |
Peter Griffin | 3a4cfcb | 2014-08-15 13:40:11 +0100 | [diff] [blame] | 327 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 328 | phy->dev = dev; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 329 | |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 330 | if (!of_device_is_compatible(node, "ti,phy-pipe3-pcie")) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 331 | match = of_match_device(ti_pipe3_id_table, dev); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 332 | if (!match) |
| 333 | return -EINVAL; |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 334 | |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 335 | phy->dpll_map = (struct pipe3_dpll_map *)match->data; |
| 336 | if (!phy->dpll_map) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 337 | dev_err(dev, "no DPLL data\n"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 338 | return -EINVAL; |
| 339 | } |
| 340 | |
| 341 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, |
| 342 | "pll_ctrl"); |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 343 | phy->pll_ctrl_base = devm_ioremap_resource(dev, res); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 344 | if (IS_ERR(phy->pll_ctrl_base)) |
| 345 | return PTR_ERR(phy->pll_ctrl_base); |
| 346 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 347 | phy->sys_clk = devm_clk_get(dev, "sysclk"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 348 | if (IS_ERR(phy->sys_clk)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 349 | dev_err(dev, "unable to get sysclk\n"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 350 | return -EINVAL; |
| 351 | } |
| 352 | } |
| 353 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 354 | phy->refclk = devm_clk_get(dev, "refclk"); |
Roger Quadros | 7f33912 | 2015-01-13 14:23:20 +0200 | [diff] [blame] | 355 | if (IS_ERR(phy->refclk)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 356 | dev_err(dev, "unable to get refclk\n"); |
Roger Quadros | 7f33912 | 2015-01-13 14:23:20 +0200 | [diff] [blame] | 357 | /* older DTBs have missing refclk in SATA PHY |
| 358 | * so don't bail out in case of SATA PHY. |
| 359 | */ |
| 360 | if (!of_device_is_compatible(node, "ti,phy-pipe3-sata")) |
| 361 | return PTR_ERR(phy->refclk); |
| 362 | } |
| 363 | |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 364 | if (!of_device_is_compatible(node, "ti,phy-pipe3-sata")) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 365 | phy->wkupclk = devm_clk_get(dev, "wkupclk"); |
Roger Quadros | 9c7f044 | 2014-03-06 16:38:42 +0200 | [diff] [blame] | 366 | if (IS_ERR(phy->wkupclk)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 367 | dev_err(dev, "unable to get wkupclk\n"); |
Roger Quadros | 9c7f044 | 2014-03-06 16:38:42 +0200 | [diff] [blame] | 368 | return PTR_ERR(phy->wkupclk); |
| 369 | } |
Roger Quadros | 9c7f044 | 2014-03-06 16:38:42 +0200 | [diff] [blame] | 370 | } else { |
| 371 | phy->wkupclk = ERR_PTR(-ENODEV); |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 372 | phy->dpll_reset_syscon = syscon_regmap_lookup_by_phandle(node, |
| 373 | "syscon-pllreset"); |
| 374 | if (IS_ERR(phy->dpll_reset_syscon)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 375 | dev_info(dev, |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 376 | "can't get syscon-pllreset, sata dpll won't idle\n"); |
| 377 | phy->dpll_reset_syscon = NULL; |
| 378 | } else { |
| 379 | if (of_property_read_u32_index(node, |
| 380 | "syscon-pllreset", 1, |
| 381 | &phy->dpll_reset_reg)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 382 | dev_err(dev, |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 383 | "couldn't get pllreset reg. offset\n"); |
| 384 | return -EINVAL; |
| 385 | } |
| 386 | } |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 387 | } |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 388 | |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 389 | if (of_device_is_compatible(node, "ti,phy-pipe3-pcie")) { |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 390 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 391 | clk = devm_clk_get(dev, "dpll_ref"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 392 | if (IS_ERR(clk)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 393 | dev_err(dev, "unable to get dpll ref clk\n"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 394 | return PTR_ERR(clk); |
| 395 | } |
| 396 | clk_set_rate(clk, 1500000000); |
| 397 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 398 | clk = devm_clk_get(dev, "dpll_ref_m2"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 399 | if (IS_ERR(clk)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 400 | dev_err(dev, "unable to get dpll ref m2 clk\n"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 401 | return PTR_ERR(clk); |
| 402 | } |
| 403 | clk_set_rate(clk, 100000000); |
| 404 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 405 | clk = devm_clk_get(dev, "phy-div"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 406 | if (IS_ERR(clk)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 407 | dev_err(dev, "unable to get phy-div clk\n"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 408 | return PTR_ERR(clk); |
| 409 | } |
| 410 | clk_set_rate(clk, 100000000); |
| 411 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 412 | phy->div_clk = devm_clk_get(dev, "div-clk"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 413 | if (IS_ERR(phy->div_clk)) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 414 | dev_err(dev, "unable to get div-clk\n"); |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 415 | return PTR_ERR(phy->div_clk); |
| 416 | } |
| 417 | } else { |
| 418 | phy->div_clk = ERR_PTR(-ENODEV); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 419 | } |
| 420 | |
| 421 | control_node = of_parse_phandle(node, "ctrl-module", 0); |
| 422 | if (!control_node) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 423 | dev_err(dev, "Failed to get control device phandle\n"); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 424 | return -EINVAL; |
| 425 | } |
| 426 | |
| 427 | control_pdev = of_find_device_by_node(control_node); |
| 428 | if (!control_pdev) { |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 429 | dev_err(dev, "Failed to get control device\n"); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 430 | return -EINVAL; |
| 431 | } |
| 432 | |
| 433 | phy->control_dev = &control_pdev->dev; |
| 434 | |
Kishon Vijay Abraham I | 14da699 | 2014-03-06 16:38:37 +0200 | [diff] [blame] | 435 | omap_control_phy_power(phy->control_dev, 0); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 436 | |
| 437 | platform_set_drvdata(pdev, phy); |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 438 | pm_runtime_enable(dev); |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 439 | |
| 440 | /* |
| 441 | * Prevent auto-disable of refclk for SATA PHY due to Errata i783 |
| 442 | */ |
| 443 | if (of_device_is_compatible(node, "ti,phy-pipe3-sata")) { |
| 444 | if (!IS_ERR(phy->refclk)) { |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 445 | clk_prepare_enable(phy->refclk); |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 446 | phy->sata_refclk_enabled = true; |
| 447 | } |
| 448 | } |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 449 | |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 450 | generic_phy = devm_phy_create(dev, NULL, &ops); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 451 | if (IS_ERR(generic_phy)) |
| 452 | return PTR_ERR(generic_phy); |
| 453 | |
| 454 | phy_set_drvdata(generic_phy, phy); |
Kishon Vijay Abraham I | d65ff52 | 2015-12-21 14:24:05 +0530 | [diff] [blame^] | 455 | phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 456 | if (IS_ERR(phy_provider)) |
| 457 | return PTR_ERR(phy_provider); |
| 458 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 459 | return 0; |
| 460 | } |
| 461 | |
| 462 | static int ti_pipe3_remove(struct platform_device *pdev) |
| 463 | { |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 464 | pm_runtime_disable(&pdev->dev); |
| 465 | |
| 466 | return 0; |
| 467 | } |
| 468 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 469 | static int ti_pipe3_enable_clocks(struct ti_pipe3 *phy) |
Roger Quadros | 7f33912 | 2015-01-13 14:23:20 +0200 | [diff] [blame] | 470 | { |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 471 | int ret = 0; |
Roger Quadros | 7f33912 | 2015-01-13 14:23:20 +0200 | [diff] [blame] | 472 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 473 | if (!IS_ERR(phy->refclk)) { |
Roger Quadros | 7f33912 | 2015-01-13 14:23:20 +0200 | [diff] [blame] | 474 | ret = clk_prepare_enable(phy->refclk); |
| 475 | if (ret) { |
| 476 | dev_err(phy->dev, "Failed to enable refclk %d\n", ret); |
| 477 | return ret; |
| 478 | } |
Roger Quadros | 7f33912 | 2015-01-13 14:23:20 +0200 | [diff] [blame] | 479 | } |
| 480 | |
Roger Quadros | 1562864f | 2014-03-07 11:27:09 +0530 | [diff] [blame] | 481 | if (!IS_ERR(phy->wkupclk)) { |
| 482 | ret = clk_prepare_enable(phy->wkupclk); |
| 483 | if (ret) { |
| 484 | dev_err(phy->dev, "Failed to enable wkupclk %d\n", ret); |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 485 | goto disable_refclk; |
Roger Quadros | 1562864f | 2014-03-07 11:27:09 +0530 | [diff] [blame] | 486 | } |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 487 | } |
| 488 | |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 489 | if (!IS_ERR(phy->div_clk)) { |
| 490 | ret = clk_prepare_enable(phy->div_clk); |
| 491 | if (ret) { |
| 492 | dev_err(phy->dev, "Failed to enable div_clk %d\n", ret); |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 493 | goto disable_wkupclk; |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 494 | } |
| 495 | } |
Roger Quadros | 6e73843 | 2015-01-13 14:23:19 +0200 | [diff] [blame] | 496 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 497 | return 0; |
| 498 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 499 | disable_wkupclk: |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 500 | if (!IS_ERR(phy->wkupclk)) |
| 501 | clk_disable_unprepare(phy->wkupclk); |
| 502 | |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 503 | disable_refclk: |
Roger Quadros | 1562864f | 2014-03-07 11:27:09 +0530 | [diff] [blame] | 504 | if (!IS_ERR(phy->refclk)) |
| 505 | clk_disable_unprepare(phy->refclk); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 506 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 507 | return ret; |
| 508 | } |
| 509 | |
Roger Quadros | 6e73843 | 2015-01-13 14:23:19 +0200 | [diff] [blame] | 510 | static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy) |
| 511 | { |
Roger Quadros | 6e73843 | 2015-01-13 14:23:19 +0200 | [diff] [blame] | 512 | if (!IS_ERR(phy->wkupclk)) |
| 513 | clk_disable_unprepare(phy->wkupclk); |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 514 | if (!IS_ERR(phy->refclk)) { |
Roger Quadros | 0a0830f | 2015-06-02 12:10:40 +0300 | [diff] [blame] | 515 | clk_disable_unprepare(phy->refclk); |
Roger Quadros | c934b36 | 2015-07-17 16:47:22 +0300 | [diff] [blame] | 516 | /* |
| 517 | * SATA refclk needs an additional disable as we left it |
| 518 | * on in probe to avoid Errata i783 |
| 519 | */ |
| 520 | if (phy->sata_refclk_enabled) { |
| 521 | clk_disable_unprepare(phy->refclk); |
| 522 | phy->sata_refclk_enabled = false; |
| 523 | } |
| 524 | } |
| 525 | |
Roger Quadros | 6e73843 | 2015-01-13 14:23:19 +0200 | [diff] [blame] | 526 | if (!IS_ERR(phy->div_clk)) |
| 527 | clk_disable_unprepare(phy->div_clk); |
Roger Quadros | 6e73843 | 2015-01-13 14:23:19 +0200 | [diff] [blame] | 528 | } |
| 529 | |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 530 | static const struct of_device_id ti_pipe3_id_table[] = { |
Roger Quadros | 61f5467 | 2014-03-07 11:43:39 +0530 | [diff] [blame] | 531 | { |
| 532 | .compatible = "ti,phy-usb3", |
| 533 | .data = dpll_map_usb, |
| 534 | }, |
| 535 | { |
| 536 | .compatible = "ti,omap-usb3", |
| 537 | .data = dpll_map_usb, |
| 538 | }, |
| 539 | { |
| 540 | .compatible = "ti,phy-pipe3-sata", |
| 541 | .data = dpll_map_sata, |
| 542 | }, |
Kishon Vijay Abraham I | 99bbd48 | 2014-06-25 23:22:56 +0530 | [diff] [blame] | 543 | { |
| 544 | .compatible = "ti,phy-pipe3-pcie", |
| 545 | }, |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 546 | {} |
| 547 | }; |
| 548 | MODULE_DEVICE_TABLE(of, ti_pipe3_id_table); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 549 | |
| 550 | static struct platform_driver ti_pipe3_driver = { |
| 551 | .probe = ti_pipe3_probe, |
| 552 | .remove = ti_pipe3_remove, |
| 553 | .driver = { |
| 554 | .name = "ti-pipe3", |
Axel Lin | 298fe56 | 2015-03-05 18:20:53 +0800 | [diff] [blame] | 555 | .of_match_table = ti_pipe3_id_table, |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 556 | }, |
| 557 | }; |
| 558 | |
| 559 | module_platform_driver(ti_pipe3_driver); |
| 560 | |
Axel Lin | dd64ad38 | 2015-03-07 00:01:21 +0800 | [diff] [blame] | 561 | MODULE_ALIAS("platform:ti_pipe3"); |
Kishon Vijay Abraham I | a70143b | 2014-03-03 17:08:12 +0530 | [diff] [blame] | 562 | MODULE_AUTHOR("Texas Instruments Inc."); |
| 563 | MODULE_DESCRIPTION("TI PIPE3 phy driver"); |
| 564 | MODULE_LICENSE("GPL v2"); |