blob: 8cded12438b9cb050658b927583544349fe91e32 [file] [log] [blame]
Neil Armstrong5fe837d2019-02-19 15:17:29 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Meson G12A USB2 PHY driver
4 *
5 * Copyright (C) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
6 * Copyright (C) 2019 BayLibre, SAS
7 * Author: Neil Armstrong <narmstron@baylibre.com>
8 */
9
Simon Glass0f2af882020-05-10 11:40:05 -060010#include <log.h>
Simon Glass9bc15642020-02-03 07:36:16 -070011#include <malloc.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010012#include <asm/io.h>
13#include <bitfield.h>
14#include <dm.h>
15#include <errno.h>
16#include <generic-phy.h>
17#include <regmap.h>
Simon Glassdbd79542020-05-10 11:40:11 -060018#include <linux/delay.h>
Simon Glassbdd5f812023-09-14 18:21:46 -060019#include <linux/printk.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010020#include <power/regulator.h>
Alexey Romanovb2340a42023-10-05 11:54:26 +030021#include <power-domain.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010022#include <reset.h>
23#include <clk.h>
24
25#include <linux/bitops.h>
26#include <linux/compat.h>
Alexey Romanoveefd28d2023-10-05 11:54:24 +030027#include <linux/bitfield.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010028
29#define PHY_CTRL_R0 0x0
30#define PHY_CTRL_R1 0x4
31#define PHY_CTRL_R2 0x8
Alexey Romanoveefd28d2023-10-05 11:54:24 +030032
Neil Armstrong5fe837d2019-02-19 15:17:29 +010033#define PHY_CTRL_R3 0xc
Alexey Romanoveefd28d2023-10-05 11:54:24 +030034 #define PHY_CTRL_R3_SQUELCH_REF GENMASK(1, 0)
35 #define PHY_CTRL_R3_HSDIC_REF GENMASK(3, 2)
36 #define PHY_CTRL_R3_DISC_THRESH GENMASK(7, 4)
37
Neil Armstrong5fe837d2019-02-19 15:17:29 +010038#define PHY_CTRL_R4 0x10
Alexey Romanoveefd28d2023-10-05 11:54:24 +030039 #define PHY_CTRL_R4_CALIB_CODE_7_0 GENMASK(7, 0)
40 #define PHY_CTRL_R4_CALIB_CODE_15_8 GENMASK(15, 8)
41 #define PHY_CTRL_R4_CALIB_CODE_23_16 GENMASK(23, 16)
42 #define PHY_CTRL_R4_I_C2L_CAL_EN BIT(24)
43 #define PHY_CTRL_R4_I_C2L_CAL_RESET_N BIT(25)
44 #define PHY_CTRL_R4_I_C2L_CAL_DONE BIT(26)
45 #define PHY_CTRL_R4_TEST_BYPASS_MODE_EN BIT(27)
46 #define PHY_CTRL_R4_I_C2L_BIAS_TRIM_1_0 GENMASK(29, 28)
47 #define PHY_CTRL_R4_I_C2L_BIAS_TRIM_3_2 GENMASK(31, 30)
48
Neil Armstrong5fe837d2019-02-19 15:17:29 +010049#define PHY_CTRL_R5 0x14
50#define PHY_CTRL_R6 0x18
51#define PHY_CTRL_R7 0x1c
52#define PHY_CTRL_R8 0x20
53#define PHY_CTRL_R9 0x24
54#define PHY_CTRL_R10 0x28
55#define PHY_CTRL_R11 0x2c
56#define PHY_CTRL_R12 0x30
Alexey Romanoveefd28d2023-10-05 11:54:24 +030057
Neil Armstrong5fe837d2019-02-19 15:17:29 +010058#define PHY_CTRL_R13 0x34
Alexey Romanoveefd28d2023-10-05 11:54:24 +030059 #define PHY_CTRL_R13_CUSTOM_PATTERN_19 GENMASK(7, 0)
60 #define PHY_CTRL_R13_LOAD_STAT BIT(14)
61 #define PHY_CTRL_R13_UPDATE_PMA_SIGNALS BIT(15)
62 #define PHY_CTRL_R13_MIN_COUNT_FOR_SYNC_DET GENMASK(20, 16)
63 #define PHY_CTRL_R13_CLEAR_HOLD_HS_DISCONNECT BIT(21)
64 #define PHY_CTRL_R13_BYPASS_HOST_DISCONNECT_VAL BIT(22)
65 #define PHY_CTRL_R13_BYPASS_HOST_DISCONNECT_EN BIT(23)
66 #define PHY_CTRL_R13_I_C2L_HS_EN BIT(24)
67 #define PHY_CTRL_R13_I_C2L_FS_EN BIT(25)
68 #define PHY_CTRL_R13_I_C2L_LS_EN BIT(26)
69 #define PHY_CTRL_R13_I_C2L_HS_OE BIT(27)
70 #define PHY_CTRL_R13_I_C2L_FS_OE BIT(28)
71 #define PHY_CTRL_R13_I_C2L_HS_RX_EN BIT(29)
72 #define PHY_CTRL_R13_I_C2L_FSLS_RX_EN BIT(30)
73
Neil Armstrong5fe837d2019-02-19 15:17:29 +010074#define PHY_CTRL_R14 0x38
75#define PHY_CTRL_R15 0x3c
Alexey Romanoveefd28d2023-10-05 11:54:24 +030076
Neil Armstrong5fe837d2019-02-19 15:17:29 +010077#define PHY_CTRL_R16 0x40
Alexey Romanoveefd28d2023-10-05 11:54:24 +030078 #define PHY_CTRL_R16_MPLL_M GENMASK(8, 0)
79 #define PHY_CTRL_R16_MPLL_N GENMASK(14, 10)
80 #define PHY_CTRL_R16_MPLL_TDC_MODE BIT(20)
81 #define PHY_CTRL_R16_MPLL_SDM_EN BIT(21)
82 #define PHY_CTRL_R16_MPLL_LOAD BIT(22)
83 #define PHY_CTRL_R16_MPLL_DCO_SDM_EN BIT(23)
84 #define PHY_CTRL_R16_MPLL_LOCK_LONG GENMASK(25, 24)
85 #define PHY_CTRL_R16_MPLL_LOCK_F BIT(26)
86 #define PHY_CTRL_R16_MPLL_FAST_LOCK BIT(27)
87 #define PHY_CTRL_R16_MPLL_EN BIT(28)
88 #define PHY_CTRL_R16_MPLL_RESET BIT(29)
89 #define PHY_CTRL_R16_MPLL_LOCK BIT(30)
90 #define PHY_CTRL_R16_MPLL_LOCK_DIG BIT(31)
91
Neil Armstrong5fe837d2019-02-19 15:17:29 +010092#define PHY_CTRL_R17 0x44
Alexey Romanoveefd28d2023-10-05 11:54:24 +030093 #define PHY_CTRL_R17_MPLL_FRAC_IN GENMASK(13, 0)
94 #define PHY_CTRL_R17_MPLL_FIX_EN BIT(16)
95 #define PHY_CTRL_R17_MPLL_LAMBDA1 GENMASK(19, 17)
96 #define PHY_CTRL_R17_MPLL_LAMBDA0 GENMASK(22, 20)
97 #define PHY_CTRL_R17_MPLL_FILTER_MODE BIT(23)
98 #define PHY_CTRL_R17_MPLL_FILTER_PVT2 GENMASK(27, 24)
99 #define PHY_CTRL_R17_MPLL_FILTER_PVT1 GENMASK(31, 28)
100
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100101#define PHY_CTRL_R18 0x48
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300102 #define PHY_CTRL_R18_MPLL_LKW_SEL GENMASK(1, 0)
103 #define PHY_CTRL_R18_MPLL_LK_W GENMASK(5, 2)
104 #define PHY_CTRL_R18_MPLL_LK_S GENMASK(11, 6)
105 #define PHY_CTRL_R18_MPLL_DCO_M_EN BIT(12)
106 #define PHY_CTRL_R18_MPLL_DCO_CLK_SEL BIT(13)
107 #define PHY_CTRL_R18_MPLL_PFD_GAIN GENMASK(15, 14)
108 #define PHY_CTRL_R18_MPLL_ROU GENMASK(18, 16)
109 #define PHY_CTRL_R18_MPLL_DATA_SEL GENMASK(21, 19)
110 #define PHY_CTRL_R18_MPLL_BIAS_ADJ GENMASK(23, 22)
111 #define PHY_CTRL_R18_MPLL_BB_MODE GENMASK(25, 24)
112 #define PHY_CTRL_R18_MPLL_ALPHA GENMASK(28, 26)
113 #define PHY_CTRL_R18_MPLL_ADJ_LDO GENMASK(30, 29)
114 #define PHY_CTRL_R18_MPLL_ACG_RANGE BIT(31)
115
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100116#define PHY_CTRL_R19 0x4c
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300117
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100118#define PHY_CTRL_R20 0x50
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300119 #define PHY_CTRL_R20_USB2_IDDET_EN BIT(0)
120 #define PHY_CTRL_R20_USB2_OTG_VBUS_TRIM_2_0 GENMASK(3, 1)
121 #define PHY_CTRL_R20_USB2_OTG_VBUSDET_EN BIT(4)
122 #define PHY_CTRL_R20_USB2_AMON_EN BIT(5)
123 #define PHY_CTRL_R20_USB2_CAL_CODE_R5 BIT(6)
124 #define PHY_CTRL_R20_BYPASS_OTG_DET BIT(7)
125 #define PHY_CTRL_R20_USB2_DMON_EN BIT(8)
126 #define PHY_CTRL_R20_USB2_DMON_SEL_3_0 GENMASK(12, 9)
127 #define PHY_CTRL_R20_USB2_EDGE_DRV_EN BIT(13)
128 #define PHY_CTRL_R20_USB2_EDGE_DRV_TRIM_1_0 GENMASK(15, 14)
129 #define PHY_CTRL_R20_USB2_BGR_ADJ_4_0 GENMASK(20, 16)
130 #define PHY_CTRL_R20_USB2_BGR_START BIT(21)
131 #define PHY_CTRL_R20_USB2_BGR_VREF_4_0 GENMASK(28, 24)
132 #define PHY_CTRL_R20_USB2_BGR_DBG_1_0 GENMASK(30, 29)
133 #define PHY_CTRL_R20_BYPASS_CAL_DONE_R5 BIT(31)
134
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100135#define PHY_CTRL_R21 0x54
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300136 #define PHY_CTRL_R21_USB2_BGR_FORCE BIT(0)
137 #define PHY_CTRL_R21_USB2_CAL_ACK_EN BIT(1)
138 #define PHY_CTRL_R21_USB2_OTG_ACA_EN BIT(2)
139 #define PHY_CTRL_R21_USB2_TX_STRG_PD BIT(3)
140 #define PHY_CTRL_R21_USB2_OTG_ACA_TRIM_1_0 GENMASK(5, 4)
141 #define PHY_CTRL_R21_BYPASS_UTMI_CNTR GENMASK(15, 6)
142 #define PHY_CTRL_R21_BYPASS_UTMI_REG GENMASK(25, 20)
143
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100144#define PHY_CTRL_R22 0x58
145#define PHY_CTRL_R23 0x5c
146
147#define RESET_COMPLETE_TIME 1000
148#define PLL_RESET_COMPLETE_TIME 100
149
Alexey Romanovb2340a42023-10-05 11:54:26 +0300150enum meson_soc_id {
151 MESON_SOC_A1,
152 MESON_SOC_G12A,
153};
154
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100155struct phy_meson_g12a_usb2_priv {
156 struct regmap *regmap;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100157#if CONFIG_IS_ENABLED(CLK)
158 struct clk clk;
159#endif
160 struct reset_ctl reset;
Alexey Romanovb2340a42023-10-05 11:54:26 +0300161#if CONFIG_IS_ENABLED(POWER_DOMAIN)
162 struct power_domain pwrdm;
163#endif
164 int soc_id;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100165};
166
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100167static int phy_meson_g12a_usb2_init(struct phy *phy)
168{
169 struct udevice *dev = phy->dev;
170 struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
Alexey Romanovb2340a42023-10-05 11:54:26 +0300171 u32 value;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100172 int ret;
173
Alexey Romanovb4f25932023-10-05 11:54:25 +0300174#if CONFIG_IS_ENABLED(CLK)
175 ret = clk_enable(&priv->clk);
176 if (ret && ret != -ENOSYS && ret != -ENOTSUPP) {
177 pr_err("failed to enable PHY clock\n");
178 return ret;
179 }
180#endif
181
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100182 ret = reset_assert(&priv->reset);
183 udelay(1);
184 ret |= reset_deassert(&priv->reset);
185 if (ret)
186 return ret;
187
188 udelay(RESET_COMPLETE_TIME);
189
190 /* usb2_otg_aca_en == 0 */
191 regmap_update_bits(priv->regmap, PHY_CTRL_R21, BIT(2), 0);
192
193 /* PLL Setup : 24MHz * 20 / 1 = 480MHz */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300194 regmap_write(priv->regmap, PHY_CTRL_R16,
195 FIELD_PREP(PHY_CTRL_R16_MPLL_M, 20) |
196 FIELD_PREP(PHY_CTRL_R16_MPLL_N, 1) |
197 PHY_CTRL_R16_MPLL_LOAD |
198 FIELD_PREP(PHY_CTRL_R16_MPLL_LOCK_LONG, 1) |
199 PHY_CTRL_R16_MPLL_FAST_LOCK |
200 PHY_CTRL_R16_MPLL_EN |
201 PHY_CTRL_R16_MPLL_RESET);
202
203 regmap_write(priv->regmap, PHY_CTRL_R17,
204 FIELD_PREP(PHY_CTRL_R17_MPLL_FRAC_IN, 0) |
205 FIELD_PREP(PHY_CTRL_R17_MPLL_LAMBDA1, 7) |
206 FIELD_PREP(PHY_CTRL_R17_MPLL_LAMBDA0, 7) |
207 FIELD_PREP(PHY_CTRL_R17_MPLL_FILTER_PVT2, 2) |
208 FIELD_PREP(PHY_CTRL_R17_MPLL_FILTER_PVT1, 9));
209
Alexey Romanovb2340a42023-10-05 11:54:26 +0300210 value = FIELD_PREP(PHY_CTRL_R18_MPLL_LKW_SEL, 1) |
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300211 FIELD_PREP(PHY_CTRL_R18_MPLL_LK_W, 9) |
212 FIELD_PREP(PHY_CTRL_R18_MPLL_LK_S, 0x27) |
213 FIELD_PREP(PHY_CTRL_R18_MPLL_PFD_GAIN, 1) |
214 FIELD_PREP(PHY_CTRL_R18_MPLL_ROU, 7) |
215 FIELD_PREP(PHY_CTRL_R18_MPLL_DATA_SEL, 3) |
216 FIELD_PREP(PHY_CTRL_R18_MPLL_BIAS_ADJ, 1) |
217 FIELD_PREP(PHY_CTRL_R18_MPLL_BB_MODE, 0) |
218 FIELD_PREP(PHY_CTRL_R18_MPLL_ALPHA, 3) |
219 FIELD_PREP(PHY_CTRL_R18_MPLL_ADJ_LDO, 1) |
220 PHY_CTRL_R18_MPLL_ACG_RANGE;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100221
Alexey Romanovb2340a42023-10-05 11:54:26 +0300222 if (priv->soc_id == MESON_SOC_A1)
223 value |= PHY_CTRL_R18_MPLL_DCO_CLK_SEL;
224
225 regmap_write(priv->regmap, PHY_CTRL_R18, value);
226
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100227 udelay(PLL_RESET_COMPLETE_TIME);
228
229 /* UnReset PLL */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300230 regmap_write(priv->regmap, PHY_CTRL_R16,
231 FIELD_PREP(PHY_CTRL_R16_MPLL_M, 20) |
232 FIELD_PREP(PHY_CTRL_R16_MPLL_N, 1) |
233 PHY_CTRL_R16_MPLL_LOAD |
234 FIELD_PREP(PHY_CTRL_R16_MPLL_LOCK_LONG, 1) |
235 PHY_CTRL_R16_MPLL_FAST_LOCK |
236 PHY_CTRL_R16_MPLL_EN);
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100237
238 /* PHY Tuning */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300239 regmap_write(priv->regmap, PHY_CTRL_R20,
240 FIELD_PREP(PHY_CTRL_R20_USB2_OTG_VBUS_TRIM_2_0, 4) |
241 PHY_CTRL_R20_USB2_OTG_VBUSDET_EN |
242 FIELD_PREP(PHY_CTRL_R20_USB2_DMON_SEL_3_0, 15) |
243 PHY_CTRL_R20_USB2_EDGE_DRV_EN |
244 FIELD_PREP(PHY_CTRL_R20_USB2_EDGE_DRV_TRIM_1_0, 3) |
245 FIELD_PREP(PHY_CTRL_R20_USB2_BGR_ADJ_4_0, 0) |
246 FIELD_PREP(PHY_CTRL_R20_USB2_BGR_VREF_4_0, 0) |
247 FIELD_PREP(PHY_CTRL_R20_USB2_BGR_DBG_1_0, 0));
248
Alexey Romanovb2340a42023-10-05 11:54:26 +0300249 if (priv->soc_id == MESON_SOC_G12A)
250 regmap_write(priv->regmap, PHY_CTRL_R4,
251 FIELD_PREP(PHY_CTRL_R4_CALIB_CODE_7_0, 0xf) |
252 FIELD_PREP(PHY_CTRL_R4_CALIB_CODE_15_8, 0xf) |
253 FIELD_PREP(PHY_CTRL_R4_CALIB_CODE_23_16, 0xf) |
254 PHY_CTRL_R4_TEST_BYPASS_MODE_EN |
255 FIELD_PREP(PHY_CTRL_R4_I_C2L_BIAS_TRIM_1_0, 0) |
256 FIELD_PREP(PHY_CTRL_R4_I_C2L_BIAS_TRIM_3_2, 0));
257 else if (priv->soc_id == MESON_SOC_A1)
258 regmap_write(priv->regmap, PHY_CTRL_R21,
259 PHY_CTRL_R21_USB2_CAL_ACK_EN |
260 PHY_CTRL_R21_USB2_TX_STRG_PD |
261 FIELD_PREP(PHY_CTRL_R21_USB2_OTG_ACA_TRIM_1_0, 2));
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100262
263 /* Tuning Disconnect Threshold */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300264 regmap_write(priv->regmap, PHY_CTRL_R3,
265 FIELD_PREP(PHY_CTRL_R3_SQUELCH_REF, 0) |
266 FIELD_PREP(PHY_CTRL_R3_HSDIC_REF, 1) |
267 FIELD_PREP(PHY_CTRL_R3_DISC_THRESH, 3));
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100268
269 /* Analog Settings */
Alexey Romanovb2340a42023-10-05 11:54:26 +0300270 if (priv->soc_id == MESON_SOC_G12A) {
271 regmap_write(priv->regmap, PHY_CTRL_R14, 0);
272 regmap_write(priv->regmap, PHY_CTRL_R13,
273 PHY_CTRL_R13_UPDATE_PMA_SIGNALS |
274 FIELD_PREP(PHY_CTRL_R13_MIN_COUNT_FOR_SYNC_DET, 7));
275 } else if (priv->soc_id == MESON_SOC_A1) {
276 regmap_write(priv->regmap, PHY_CTRL_R13,
277 FIELD_PREP(PHY_CTRL_R13_MIN_COUNT_FOR_SYNC_DET, 7));
278 }
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100279
280 return 0;
281}
282
283static int phy_meson_g12a_usb2_exit(struct phy *phy)
284{
285 struct udevice *dev = phy->dev;
286 struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
287 int ret;
288
Alexey Romanovb4f25932023-10-05 11:54:25 +0300289#if CONFIG_IS_ENABLED(CLK)
290 clk_disable(&priv->clk);
291#endif
292
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100293 ret = reset_assert(&priv->reset);
294 if (ret)
295 return ret;
296
297 return 0;
298}
299
300struct phy_ops meson_g12a_usb2_phy_ops = {
301 .init = phy_meson_g12a_usb2_init,
302 .exit = phy_meson_g12a_usb2_exit,
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100303};
304
305int meson_g12a_usb2_phy_probe(struct udevice *dev)
306{
307 struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
308 int ret;
309
Alexey Romanovb2340a42023-10-05 11:54:26 +0300310 priv->soc_id = (enum meson_soc_id)dev_get_driver_data(dev);
311
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100312 ret = regmap_init_mem(dev_ofnode(dev), &priv->regmap);
313 if (ret)
314 return ret;
315
316 ret = reset_get_by_index(dev, 0, &priv->reset);
317 if (ret == -ENOTSUPP)
318 return 0;
319 else if (ret)
320 return ret;
321
322 ret = reset_deassert(&priv->reset);
323 if (ret) {
324 reset_release_all(&priv->reset, 1);
325 return ret;
326 }
327
Alexey Romanovb2340a42023-10-05 11:54:26 +0300328#if CONFIG_IS_ENABLED(POWER_DOMAIN)
329 ret = power_domain_get(dev, &priv->pwrdm);
Guillaume La Roque1bd93062023-10-17 20:57:25 +0200330 if (ret < 0 && ret != -ENODEV && ret != -ENOENT) {
331 pr_err("failed to get power domain : %d\n", ret);
Alexey Romanovb2340a42023-10-05 11:54:26 +0300332 return ret;
333 }
334
Guillaume La Roque1bd93062023-10-17 20:57:25 +0200335 if (ret != -ENODEV && ret != -ENOENT) {
Alexey Romanovb2340a42023-10-05 11:54:26 +0300336 ret = power_domain_on(&priv->pwrdm);
337 if (ret < 0) {
338 pr_err("failed to enable power domain\n");
339 return ret;
340 }
341 }
342#endif
343
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100344#if CONFIG_IS_ENABLED(CLK)
345 ret = clk_get_by_index(dev, 0, &priv->clk);
346 if (ret < 0)
347 return ret;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100348#endif
349
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100350 return 0;
351}
352
353static const struct udevice_id meson_g12a_usb2_phy_ids[] = {
Alexey Romanovb2340a42023-10-05 11:54:26 +0300354 {
355 .compatible = "amlogic,g12a-usb2-phy",
356 .data = (ulong)MESON_SOC_G12A,
357 },
358 {
359 .compatible = "amlogic,a1-usb2-phy",
360 .data = (ulong)MESON_SOC_A1,
361 },
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100362 { }
363};
364
365U_BOOT_DRIVER(meson_g12a_usb2_phy) = {
366 .name = "meson_g12a_usb2_phy",
367 .id = UCLASS_PHY,
368 .of_match = meson_g12a_usb2_phy_ids,
369 .probe = meson_g12a_usb2_phy_probe,
370 .ops = &meson_g12a_usb2_phy_ops,
Simon Glass8a2b47f2020-12-03 16:55:17 -0700371 .priv_auto = sizeof(struct phy_meson_g12a_usb2_priv),
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100372};