blob: 3958d2404b85d8a35cff66281714cc317b1c3983 [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
10#include <common.h>
Simon Glass0f2af882020-05-10 11:40:05 -060011#include <log.h>
Simon Glass9bc15642020-02-03 07:36:16 -070012#include <malloc.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010013#include <asm/io.h>
14#include <bitfield.h>
15#include <dm.h>
16#include <errno.h>
17#include <generic-phy.h>
18#include <regmap.h>
Simon Glassdbd79542020-05-10 11:40:11 -060019#include <linux/delay.h>
Simon Glassbdd5f812023-09-14 18:21:46 -060020#include <linux/printk.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010021#include <power/regulator.h>
Alexey Romanovb2340a42023-10-05 11:54:26 +030022#include <power-domain.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010023#include <reset.h>
24#include <clk.h>
25
26#include <linux/bitops.h>
27#include <linux/compat.h>
Alexey Romanoveefd28d2023-10-05 11:54:24 +030028#include <linux/bitfield.h>
Neil Armstrong5fe837d2019-02-19 15:17:29 +010029
30#define PHY_CTRL_R0 0x0
31#define PHY_CTRL_R1 0x4
32#define PHY_CTRL_R2 0x8
Alexey Romanoveefd28d2023-10-05 11:54:24 +030033
Neil Armstrong5fe837d2019-02-19 15:17:29 +010034#define PHY_CTRL_R3 0xc
Alexey Romanoveefd28d2023-10-05 11:54:24 +030035 #define PHY_CTRL_R3_SQUELCH_REF GENMASK(1, 0)
36 #define PHY_CTRL_R3_HSDIC_REF GENMASK(3, 2)
37 #define PHY_CTRL_R3_DISC_THRESH GENMASK(7, 4)
38
Neil Armstrong5fe837d2019-02-19 15:17:29 +010039#define PHY_CTRL_R4 0x10
Alexey Romanoveefd28d2023-10-05 11:54:24 +030040 #define PHY_CTRL_R4_CALIB_CODE_7_0 GENMASK(7, 0)
41 #define PHY_CTRL_R4_CALIB_CODE_15_8 GENMASK(15, 8)
42 #define PHY_CTRL_R4_CALIB_CODE_23_16 GENMASK(23, 16)
43 #define PHY_CTRL_R4_I_C2L_CAL_EN BIT(24)
44 #define PHY_CTRL_R4_I_C2L_CAL_RESET_N BIT(25)
45 #define PHY_CTRL_R4_I_C2L_CAL_DONE BIT(26)
46 #define PHY_CTRL_R4_TEST_BYPASS_MODE_EN BIT(27)
47 #define PHY_CTRL_R4_I_C2L_BIAS_TRIM_1_0 GENMASK(29, 28)
48 #define PHY_CTRL_R4_I_C2L_BIAS_TRIM_3_2 GENMASK(31, 30)
49
Neil Armstrong5fe837d2019-02-19 15:17:29 +010050#define PHY_CTRL_R5 0x14
51#define PHY_CTRL_R6 0x18
52#define PHY_CTRL_R7 0x1c
53#define PHY_CTRL_R8 0x20
54#define PHY_CTRL_R9 0x24
55#define PHY_CTRL_R10 0x28
56#define PHY_CTRL_R11 0x2c
57#define PHY_CTRL_R12 0x30
Alexey Romanoveefd28d2023-10-05 11:54:24 +030058
Neil Armstrong5fe837d2019-02-19 15:17:29 +010059#define PHY_CTRL_R13 0x34
Alexey Romanoveefd28d2023-10-05 11:54:24 +030060 #define PHY_CTRL_R13_CUSTOM_PATTERN_19 GENMASK(7, 0)
61 #define PHY_CTRL_R13_LOAD_STAT BIT(14)
62 #define PHY_CTRL_R13_UPDATE_PMA_SIGNALS BIT(15)
63 #define PHY_CTRL_R13_MIN_COUNT_FOR_SYNC_DET GENMASK(20, 16)
64 #define PHY_CTRL_R13_CLEAR_HOLD_HS_DISCONNECT BIT(21)
65 #define PHY_CTRL_R13_BYPASS_HOST_DISCONNECT_VAL BIT(22)
66 #define PHY_CTRL_R13_BYPASS_HOST_DISCONNECT_EN BIT(23)
67 #define PHY_CTRL_R13_I_C2L_HS_EN BIT(24)
68 #define PHY_CTRL_R13_I_C2L_FS_EN BIT(25)
69 #define PHY_CTRL_R13_I_C2L_LS_EN BIT(26)
70 #define PHY_CTRL_R13_I_C2L_HS_OE BIT(27)
71 #define PHY_CTRL_R13_I_C2L_FS_OE BIT(28)
72 #define PHY_CTRL_R13_I_C2L_HS_RX_EN BIT(29)
73 #define PHY_CTRL_R13_I_C2L_FSLS_RX_EN BIT(30)
74
Neil Armstrong5fe837d2019-02-19 15:17:29 +010075#define PHY_CTRL_R14 0x38
76#define PHY_CTRL_R15 0x3c
Alexey Romanoveefd28d2023-10-05 11:54:24 +030077
Neil Armstrong5fe837d2019-02-19 15:17:29 +010078#define PHY_CTRL_R16 0x40
Alexey Romanoveefd28d2023-10-05 11:54:24 +030079 #define PHY_CTRL_R16_MPLL_M GENMASK(8, 0)
80 #define PHY_CTRL_R16_MPLL_N GENMASK(14, 10)
81 #define PHY_CTRL_R16_MPLL_TDC_MODE BIT(20)
82 #define PHY_CTRL_R16_MPLL_SDM_EN BIT(21)
83 #define PHY_CTRL_R16_MPLL_LOAD BIT(22)
84 #define PHY_CTRL_R16_MPLL_DCO_SDM_EN BIT(23)
85 #define PHY_CTRL_R16_MPLL_LOCK_LONG GENMASK(25, 24)
86 #define PHY_CTRL_R16_MPLL_LOCK_F BIT(26)
87 #define PHY_CTRL_R16_MPLL_FAST_LOCK BIT(27)
88 #define PHY_CTRL_R16_MPLL_EN BIT(28)
89 #define PHY_CTRL_R16_MPLL_RESET BIT(29)
90 #define PHY_CTRL_R16_MPLL_LOCK BIT(30)
91 #define PHY_CTRL_R16_MPLL_LOCK_DIG BIT(31)
92
Neil Armstrong5fe837d2019-02-19 15:17:29 +010093#define PHY_CTRL_R17 0x44
Alexey Romanoveefd28d2023-10-05 11:54:24 +030094 #define PHY_CTRL_R17_MPLL_FRAC_IN GENMASK(13, 0)
95 #define PHY_CTRL_R17_MPLL_FIX_EN BIT(16)
96 #define PHY_CTRL_R17_MPLL_LAMBDA1 GENMASK(19, 17)
97 #define PHY_CTRL_R17_MPLL_LAMBDA0 GENMASK(22, 20)
98 #define PHY_CTRL_R17_MPLL_FILTER_MODE BIT(23)
99 #define PHY_CTRL_R17_MPLL_FILTER_PVT2 GENMASK(27, 24)
100 #define PHY_CTRL_R17_MPLL_FILTER_PVT1 GENMASK(31, 28)
101
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100102#define PHY_CTRL_R18 0x48
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300103 #define PHY_CTRL_R18_MPLL_LKW_SEL GENMASK(1, 0)
104 #define PHY_CTRL_R18_MPLL_LK_W GENMASK(5, 2)
105 #define PHY_CTRL_R18_MPLL_LK_S GENMASK(11, 6)
106 #define PHY_CTRL_R18_MPLL_DCO_M_EN BIT(12)
107 #define PHY_CTRL_R18_MPLL_DCO_CLK_SEL BIT(13)
108 #define PHY_CTRL_R18_MPLL_PFD_GAIN GENMASK(15, 14)
109 #define PHY_CTRL_R18_MPLL_ROU GENMASK(18, 16)
110 #define PHY_CTRL_R18_MPLL_DATA_SEL GENMASK(21, 19)
111 #define PHY_CTRL_R18_MPLL_BIAS_ADJ GENMASK(23, 22)
112 #define PHY_CTRL_R18_MPLL_BB_MODE GENMASK(25, 24)
113 #define PHY_CTRL_R18_MPLL_ALPHA GENMASK(28, 26)
114 #define PHY_CTRL_R18_MPLL_ADJ_LDO GENMASK(30, 29)
115 #define PHY_CTRL_R18_MPLL_ACG_RANGE BIT(31)
116
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100117#define PHY_CTRL_R19 0x4c
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300118
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100119#define PHY_CTRL_R20 0x50
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300120 #define PHY_CTRL_R20_USB2_IDDET_EN BIT(0)
121 #define PHY_CTRL_R20_USB2_OTG_VBUS_TRIM_2_0 GENMASK(3, 1)
122 #define PHY_CTRL_R20_USB2_OTG_VBUSDET_EN BIT(4)
123 #define PHY_CTRL_R20_USB2_AMON_EN BIT(5)
124 #define PHY_CTRL_R20_USB2_CAL_CODE_R5 BIT(6)
125 #define PHY_CTRL_R20_BYPASS_OTG_DET BIT(7)
126 #define PHY_CTRL_R20_USB2_DMON_EN BIT(8)
127 #define PHY_CTRL_R20_USB2_DMON_SEL_3_0 GENMASK(12, 9)
128 #define PHY_CTRL_R20_USB2_EDGE_DRV_EN BIT(13)
129 #define PHY_CTRL_R20_USB2_EDGE_DRV_TRIM_1_0 GENMASK(15, 14)
130 #define PHY_CTRL_R20_USB2_BGR_ADJ_4_0 GENMASK(20, 16)
131 #define PHY_CTRL_R20_USB2_BGR_START BIT(21)
132 #define PHY_CTRL_R20_USB2_BGR_VREF_4_0 GENMASK(28, 24)
133 #define PHY_CTRL_R20_USB2_BGR_DBG_1_0 GENMASK(30, 29)
134 #define PHY_CTRL_R20_BYPASS_CAL_DONE_R5 BIT(31)
135
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100136#define PHY_CTRL_R21 0x54
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300137 #define PHY_CTRL_R21_USB2_BGR_FORCE BIT(0)
138 #define PHY_CTRL_R21_USB2_CAL_ACK_EN BIT(1)
139 #define PHY_CTRL_R21_USB2_OTG_ACA_EN BIT(2)
140 #define PHY_CTRL_R21_USB2_TX_STRG_PD BIT(3)
141 #define PHY_CTRL_R21_USB2_OTG_ACA_TRIM_1_0 GENMASK(5, 4)
142 #define PHY_CTRL_R21_BYPASS_UTMI_CNTR GENMASK(15, 6)
143 #define PHY_CTRL_R21_BYPASS_UTMI_REG GENMASK(25, 20)
144
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100145#define PHY_CTRL_R22 0x58
146#define PHY_CTRL_R23 0x5c
147
148#define RESET_COMPLETE_TIME 1000
149#define PLL_RESET_COMPLETE_TIME 100
150
Alexey Romanovb2340a42023-10-05 11:54:26 +0300151enum meson_soc_id {
152 MESON_SOC_A1,
153 MESON_SOC_G12A,
154};
155
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100156struct phy_meson_g12a_usb2_priv {
157 struct regmap *regmap;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100158#if CONFIG_IS_ENABLED(CLK)
159 struct clk clk;
160#endif
161 struct reset_ctl reset;
Alexey Romanovb2340a42023-10-05 11:54:26 +0300162#if CONFIG_IS_ENABLED(POWER_DOMAIN)
163 struct power_domain pwrdm;
164#endif
165 int soc_id;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100166};
167
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100168static int phy_meson_g12a_usb2_init(struct phy *phy)
169{
170 struct udevice *dev = phy->dev;
171 struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
Alexey Romanovb2340a42023-10-05 11:54:26 +0300172 u32 value;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100173 int ret;
174
Alexey Romanovb4f25932023-10-05 11:54:25 +0300175#if CONFIG_IS_ENABLED(CLK)
176 ret = clk_enable(&priv->clk);
177 if (ret && ret != -ENOSYS && ret != -ENOTSUPP) {
178 pr_err("failed to enable PHY clock\n");
179 return ret;
180 }
181#endif
182
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100183 ret = reset_assert(&priv->reset);
184 udelay(1);
185 ret |= reset_deassert(&priv->reset);
186 if (ret)
187 return ret;
188
189 udelay(RESET_COMPLETE_TIME);
190
191 /* usb2_otg_aca_en == 0 */
192 regmap_update_bits(priv->regmap, PHY_CTRL_R21, BIT(2), 0);
193
194 /* PLL Setup : 24MHz * 20 / 1 = 480MHz */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300195 regmap_write(priv->regmap, PHY_CTRL_R16,
196 FIELD_PREP(PHY_CTRL_R16_MPLL_M, 20) |
197 FIELD_PREP(PHY_CTRL_R16_MPLL_N, 1) |
198 PHY_CTRL_R16_MPLL_LOAD |
199 FIELD_PREP(PHY_CTRL_R16_MPLL_LOCK_LONG, 1) |
200 PHY_CTRL_R16_MPLL_FAST_LOCK |
201 PHY_CTRL_R16_MPLL_EN |
202 PHY_CTRL_R16_MPLL_RESET);
203
204 regmap_write(priv->regmap, PHY_CTRL_R17,
205 FIELD_PREP(PHY_CTRL_R17_MPLL_FRAC_IN, 0) |
206 FIELD_PREP(PHY_CTRL_R17_MPLL_LAMBDA1, 7) |
207 FIELD_PREP(PHY_CTRL_R17_MPLL_LAMBDA0, 7) |
208 FIELD_PREP(PHY_CTRL_R17_MPLL_FILTER_PVT2, 2) |
209 FIELD_PREP(PHY_CTRL_R17_MPLL_FILTER_PVT1, 9));
210
Alexey Romanovb2340a42023-10-05 11:54:26 +0300211 value = FIELD_PREP(PHY_CTRL_R18_MPLL_LKW_SEL, 1) |
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300212 FIELD_PREP(PHY_CTRL_R18_MPLL_LK_W, 9) |
213 FIELD_PREP(PHY_CTRL_R18_MPLL_LK_S, 0x27) |
214 FIELD_PREP(PHY_CTRL_R18_MPLL_PFD_GAIN, 1) |
215 FIELD_PREP(PHY_CTRL_R18_MPLL_ROU, 7) |
216 FIELD_PREP(PHY_CTRL_R18_MPLL_DATA_SEL, 3) |
217 FIELD_PREP(PHY_CTRL_R18_MPLL_BIAS_ADJ, 1) |
218 FIELD_PREP(PHY_CTRL_R18_MPLL_BB_MODE, 0) |
219 FIELD_PREP(PHY_CTRL_R18_MPLL_ALPHA, 3) |
220 FIELD_PREP(PHY_CTRL_R18_MPLL_ADJ_LDO, 1) |
221 PHY_CTRL_R18_MPLL_ACG_RANGE;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100222
Alexey Romanovb2340a42023-10-05 11:54:26 +0300223 if (priv->soc_id == MESON_SOC_A1)
224 value |= PHY_CTRL_R18_MPLL_DCO_CLK_SEL;
225
226 regmap_write(priv->regmap, PHY_CTRL_R18, value);
227
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100228 udelay(PLL_RESET_COMPLETE_TIME);
229
230 /* UnReset PLL */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300231 regmap_write(priv->regmap, PHY_CTRL_R16,
232 FIELD_PREP(PHY_CTRL_R16_MPLL_M, 20) |
233 FIELD_PREP(PHY_CTRL_R16_MPLL_N, 1) |
234 PHY_CTRL_R16_MPLL_LOAD |
235 FIELD_PREP(PHY_CTRL_R16_MPLL_LOCK_LONG, 1) |
236 PHY_CTRL_R16_MPLL_FAST_LOCK |
237 PHY_CTRL_R16_MPLL_EN);
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100238
239 /* PHY Tuning */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300240 regmap_write(priv->regmap, PHY_CTRL_R20,
241 FIELD_PREP(PHY_CTRL_R20_USB2_OTG_VBUS_TRIM_2_0, 4) |
242 PHY_CTRL_R20_USB2_OTG_VBUSDET_EN |
243 FIELD_PREP(PHY_CTRL_R20_USB2_DMON_SEL_3_0, 15) |
244 PHY_CTRL_R20_USB2_EDGE_DRV_EN |
245 FIELD_PREP(PHY_CTRL_R20_USB2_EDGE_DRV_TRIM_1_0, 3) |
246 FIELD_PREP(PHY_CTRL_R20_USB2_BGR_ADJ_4_0, 0) |
247 FIELD_PREP(PHY_CTRL_R20_USB2_BGR_VREF_4_0, 0) |
248 FIELD_PREP(PHY_CTRL_R20_USB2_BGR_DBG_1_0, 0));
249
Alexey Romanovb2340a42023-10-05 11:54:26 +0300250 if (priv->soc_id == MESON_SOC_G12A)
251 regmap_write(priv->regmap, PHY_CTRL_R4,
252 FIELD_PREP(PHY_CTRL_R4_CALIB_CODE_7_0, 0xf) |
253 FIELD_PREP(PHY_CTRL_R4_CALIB_CODE_15_8, 0xf) |
254 FIELD_PREP(PHY_CTRL_R4_CALIB_CODE_23_16, 0xf) |
255 PHY_CTRL_R4_TEST_BYPASS_MODE_EN |
256 FIELD_PREP(PHY_CTRL_R4_I_C2L_BIAS_TRIM_1_0, 0) |
257 FIELD_PREP(PHY_CTRL_R4_I_C2L_BIAS_TRIM_3_2, 0));
258 else if (priv->soc_id == MESON_SOC_A1)
259 regmap_write(priv->regmap, PHY_CTRL_R21,
260 PHY_CTRL_R21_USB2_CAL_ACK_EN |
261 PHY_CTRL_R21_USB2_TX_STRG_PD |
262 FIELD_PREP(PHY_CTRL_R21_USB2_OTG_ACA_TRIM_1_0, 2));
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100263
264 /* Tuning Disconnect Threshold */
Alexey Romanoveefd28d2023-10-05 11:54:24 +0300265 regmap_write(priv->regmap, PHY_CTRL_R3,
266 FIELD_PREP(PHY_CTRL_R3_SQUELCH_REF, 0) |
267 FIELD_PREP(PHY_CTRL_R3_HSDIC_REF, 1) |
268 FIELD_PREP(PHY_CTRL_R3_DISC_THRESH, 3));
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100269
270 /* Analog Settings */
Alexey Romanovb2340a42023-10-05 11:54:26 +0300271 if (priv->soc_id == MESON_SOC_G12A) {
272 regmap_write(priv->regmap, PHY_CTRL_R14, 0);
273 regmap_write(priv->regmap, PHY_CTRL_R13,
274 PHY_CTRL_R13_UPDATE_PMA_SIGNALS |
275 FIELD_PREP(PHY_CTRL_R13_MIN_COUNT_FOR_SYNC_DET, 7));
276 } else if (priv->soc_id == MESON_SOC_A1) {
277 regmap_write(priv->regmap, PHY_CTRL_R13,
278 FIELD_PREP(PHY_CTRL_R13_MIN_COUNT_FOR_SYNC_DET, 7));
279 }
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100280
281 return 0;
282}
283
284static int phy_meson_g12a_usb2_exit(struct phy *phy)
285{
286 struct udevice *dev = phy->dev;
287 struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
288 int ret;
289
Alexey Romanovb4f25932023-10-05 11:54:25 +0300290#if CONFIG_IS_ENABLED(CLK)
291 clk_disable(&priv->clk);
292#endif
293
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100294 ret = reset_assert(&priv->reset);
295 if (ret)
296 return ret;
297
298 return 0;
299}
300
301struct phy_ops meson_g12a_usb2_phy_ops = {
302 .init = phy_meson_g12a_usb2_init,
303 .exit = phy_meson_g12a_usb2_exit,
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100304};
305
306int meson_g12a_usb2_phy_probe(struct udevice *dev)
307{
308 struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
309 int ret;
310
Alexey Romanovb2340a42023-10-05 11:54:26 +0300311 priv->soc_id = (enum meson_soc_id)dev_get_driver_data(dev);
312
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100313 ret = regmap_init_mem(dev_ofnode(dev), &priv->regmap);
314 if (ret)
315 return ret;
316
317 ret = reset_get_by_index(dev, 0, &priv->reset);
318 if (ret == -ENOTSUPP)
319 return 0;
320 else if (ret)
321 return ret;
322
323 ret = reset_deassert(&priv->reset);
324 if (ret) {
325 reset_release_all(&priv->reset, 1);
326 return ret;
327 }
328
Alexey Romanovb2340a42023-10-05 11:54:26 +0300329#if CONFIG_IS_ENABLED(POWER_DOMAIN)
330 ret = power_domain_get(dev, &priv->pwrdm);
Guillaume La Roque1bd93062023-10-17 20:57:25 +0200331 if (ret < 0 && ret != -ENODEV && ret != -ENOENT) {
332 pr_err("failed to get power domain : %d\n", ret);
Alexey Romanovb2340a42023-10-05 11:54:26 +0300333 return ret;
334 }
335
Guillaume La Roque1bd93062023-10-17 20:57:25 +0200336 if (ret != -ENODEV && ret != -ENOENT) {
Alexey Romanovb2340a42023-10-05 11:54:26 +0300337 ret = power_domain_on(&priv->pwrdm);
338 if (ret < 0) {
339 pr_err("failed to enable power domain\n");
340 return ret;
341 }
342 }
343#endif
344
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100345#if CONFIG_IS_ENABLED(CLK)
346 ret = clk_get_by_index(dev, 0, &priv->clk);
347 if (ret < 0)
348 return ret;
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100349#endif
350
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100351 return 0;
352}
353
354static const struct udevice_id meson_g12a_usb2_phy_ids[] = {
Alexey Romanovb2340a42023-10-05 11:54:26 +0300355 {
356 .compatible = "amlogic,g12a-usb2-phy",
357 .data = (ulong)MESON_SOC_G12A,
358 },
359 {
360 .compatible = "amlogic,a1-usb2-phy",
361 .data = (ulong)MESON_SOC_A1,
362 },
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100363 { }
364};
365
366U_BOOT_DRIVER(meson_g12a_usb2_phy) = {
367 .name = "meson_g12a_usb2_phy",
368 .id = UCLASS_PHY,
369 .of_match = meson_g12a_usb2_phy_ids,
370 .probe = meson_g12a_usb2_phy_probe,
371 .ops = &meson_g12a_usb2_phy_ops,
Simon Glass8a2b47f2020-12-03 16:55:17 -0700372 .priv_auto = sizeof(struct phy_meson_g12a_usb2_priv),
Neil Armstrong5fe837d2019-02-19 15:17:29 +0100373};