anxedp.c revision 1.7 1 1.7 riastrad /* $NetBSD: anxedp.c,v 1.7 2021/12/19 11:00:47 riastradh Exp $ */
2 1.1 jmcneill
3 1.1 jmcneill /*-
4 1.1 jmcneill * Copyright (c) 2019 Jared D. McNeill <jmcneill (at) invisible.ca>
5 1.1 jmcneill * All rights reserved.
6 1.1 jmcneill *
7 1.1 jmcneill * Redistribution and use in source and binary forms, with or without
8 1.1 jmcneill * modification, are permitted provided that the following conditions
9 1.1 jmcneill * are met:
10 1.1 jmcneill * 1. Redistributions of source code must retain the above copyright
11 1.1 jmcneill * notice, this list of conditions and the following disclaimer.
12 1.1 jmcneill * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 jmcneill * notice, this list of conditions and the following disclaimer in the
14 1.1 jmcneill * documentation and/or other materials provided with the distribution.
15 1.1 jmcneill *
16 1.1 jmcneill * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 1.1 jmcneill * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 1.1 jmcneill * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 1.1 jmcneill * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 1.1 jmcneill * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 1.1 jmcneill * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 1.1 jmcneill * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 1.1 jmcneill * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 1.1 jmcneill * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 1.1 jmcneill * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 1.1 jmcneill * SUCH DAMAGE.
27 1.1 jmcneill */
28 1.1 jmcneill
29 1.1 jmcneill #include <sys/cdefs.h>
30 1.7 riastrad __KERNEL_RCSID(0, "$NetBSD: anxedp.c,v 1.7 2021/12/19 11:00:47 riastradh Exp $");
31 1.1 jmcneill
32 1.1 jmcneill #include <sys/param.h>
33 1.1 jmcneill #include <sys/bus.h>
34 1.1 jmcneill #include <sys/device.h>
35 1.1 jmcneill #include <sys/intr.h>
36 1.1 jmcneill #include <sys/systm.h>
37 1.1 jmcneill #include <sys/kernel.h>
38 1.1 jmcneill #include <sys/conf.h>
39 1.1 jmcneill
40 1.1 jmcneill #include <dev/ic/dw_hdmi.h>
41 1.1 jmcneill
42 1.1 jmcneill #include <dev/i2c/i2cvar.h>
43 1.1 jmcneill #include <dev/i2c/ddcvar.h>
44 1.1 jmcneill #include <dev/i2c/ddcreg.h>
45 1.1 jmcneill #include <dev/videomode/videomode.h>
46 1.1 jmcneill #include <dev/videomode/edidvar.h>
47 1.1 jmcneill
48 1.1 jmcneill #include <dev/fdt/fdtvar.h>
49 1.1 jmcneill #include <dev/fdt/fdt_port.h>
50 1.1 jmcneill
51 1.7 riastrad #include <drm/drm_drv.h>
52 1.7 riastrad #include <drm/drm_connector.h>
53 1.1 jmcneill #include <drm/drm_crtc.h>
54 1.1 jmcneill #include <drm/drm_crtc_helper.h>
55 1.1 jmcneill #include <drm/drm_edid.h>
56 1.7 riastrad #include <drm/drm_probe_helper.h>
57 1.1 jmcneill
58 1.1 jmcneill #define ANX_DP_AUX_CH_CTL_1 0xe5
59 1.1 jmcneill #define ANX_AUX_LENGTH __BITS(7,4)
60 1.1 jmcneill #define ANX_AUX_TX_COMM __BITS(3,0)
61 1.1 jmcneill #define ANX_AUX_TX_COMM_MOT 4
62 1.1 jmcneill #define ANX_AUX_TX_COMM_READ 1
63 1.1 jmcneill #define ANX_DP_AUX_ADDR(n) (0xe6 + (n))
64 1.1 jmcneill #define ANX_DP_AUX_CH_CTL_2 0xe9
65 1.1 jmcneill #define ANX_ADDR_ONLY __BIT(1)
66 1.1 jmcneill #define ANX_AUX_EN __BIT(0)
67 1.1 jmcneill #define ANX_BUF_DATA(n) (0xf0 + (n))
68 1.1 jmcneill
69 1.1 jmcneill #define ANX_DP_INT_STA 0xf7
70 1.1 jmcneill #define ANX_RPLY_RECEIV __BIT(1)
71 1.1 jmcneill
72 1.1 jmcneill static const struct device_compatible_entry compat_data[] = {
73 1.4 thorpej { .compat = "analogix,anx6345" },
74 1.6 thorpej DEVICE_COMPAT_EOL
75 1.1 jmcneill };
76 1.1 jmcneill
77 1.1 jmcneill struct anxedp_softc;
78 1.1 jmcneill
79 1.1 jmcneill struct anxedp_connector {
80 1.1 jmcneill struct drm_connector base;
81 1.1 jmcneill struct anxedp_softc *sc;
82 1.1 jmcneill };
83 1.1 jmcneill
84 1.1 jmcneill struct anxedp_softc {
85 1.1 jmcneill device_t sc_dev;
86 1.1 jmcneill i2c_tag_t sc_i2c;
87 1.1 jmcneill i2c_addr_t sc_addr;
88 1.1 jmcneill int sc_phandle;
89 1.1 jmcneill
90 1.1 jmcneill struct anxedp_connector sc_connector;
91 1.1 jmcneill struct drm_bridge sc_bridge;
92 1.1 jmcneill
93 1.1 jmcneill struct fdt_device_ports sc_ports;
94 1.1 jmcneill struct drm_display_mode sc_curmode;
95 1.1 jmcneill };
96 1.1 jmcneill
97 1.1 jmcneill #define to_anxedp_connector(x) container_of(x, struct anxedp_connector, base)
98 1.1 jmcneill
99 1.1 jmcneill static uint8_t
100 1.1 jmcneill anxedp_read(struct anxedp_softc *sc, u_int off, uint8_t reg)
101 1.1 jmcneill {
102 1.1 jmcneill uint8_t val;
103 1.1 jmcneill
104 1.3 thorpej if (iic_smbus_read_byte(sc->sc_i2c, sc->sc_addr + off, reg, &val, 0) != 0)
105 1.1 jmcneill val = 0xff;
106 1.1 jmcneill
107 1.1 jmcneill return val;
108 1.1 jmcneill }
109 1.1 jmcneill
110 1.1 jmcneill static void
111 1.1 jmcneill anxedp_write(struct anxedp_softc *sc, u_int off, uint8_t reg, uint8_t val)
112 1.1 jmcneill {
113 1.3 thorpej (void)iic_smbus_write_byte(sc->sc_i2c, sc->sc_addr + off, reg, val, 0);
114 1.1 jmcneill }
115 1.1 jmcneill
116 1.2 jmcneill static int
117 1.2 jmcneill anxedp_connector_dpms(struct drm_connector *connector, int mode)
118 1.2 jmcneill {
119 1.2 jmcneill int error;
120 1.2 jmcneill
121 1.2 jmcneill if (mode != DRM_MODE_DPMS_ON)
122 1.2 jmcneill pmf_event_inject(NULL, PMFE_DISPLAY_OFF);
123 1.2 jmcneill
124 1.2 jmcneill error = drm_helper_connector_dpms(connector, mode);
125 1.2 jmcneill
126 1.2 jmcneill if (mode == DRM_MODE_DPMS_ON)
127 1.2 jmcneill pmf_event_inject(NULL, PMFE_DISPLAY_ON);
128 1.2 jmcneill
129 1.2 jmcneill return error;
130 1.2 jmcneill }
131 1.2 jmcneill
132 1.1 jmcneill static enum drm_connector_status
133 1.1 jmcneill anxedp_connector_detect(struct drm_connector *connector, bool force)
134 1.1 jmcneill {
135 1.1 jmcneill return connector_status_connected;
136 1.1 jmcneill }
137 1.1 jmcneill
138 1.1 jmcneill static void
139 1.1 jmcneill anxedp_connector_destroy(struct drm_connector *connector)
140 1.1 jmcneill {
141 1.1 jmcneill drm_connector_unregister(connector);
142 1.1 jmcneill drm_connector_cleanup(connector);
143 1.1 jmcneill }
144 1.1 jmcneill
145 1.1 jmcneill static const struct drm_connector_funcs anxedp_connector_funcs = {
146 1.2 jmcneill .dpms = anxedp_connector_dpms,
147 1.1 jmcneill .detect = anxedp_connector_detect,
148 1.1 jmcneill .fill_modes = drm_helper_probe_single_connector_modes,
149 1.1 jmcneill .destroy = anxedp_connector_destroy,
150 1.1 jmcneill };
151 1.1 jmcneill
152 1.1 jmcneill static int
153 1.1 jmcneill anxedp_aux_wait(struct anxedp_softc *sc)
154 1.1 jmcneill {
155 1.1 jmcneill uint8_t val;
156 1.1 jmcneill int retry;
157 1.1 jmcneill
158 1.1 jmcneill for (retry = 1000; retry > 0; retry--) {
159 1.1 jmcneill val = anxedp_read(sc, 0, ANX_DP_AUX_CH_CTL_2);
160 1.1 jmcneill if ((val & ANX_AUX_EN) == 0)
161 1.1 jmcneill break;
162 1.1 jmcneill delay(100);
163 1.1 jmcneill }
164 1.1 jmcneill if (retry == 0) {
165 1.1 jmcneill device_printf(sc->sc_dev, "aux transfer timeout\n");
166 1.1 jmcneill return ETIMEDOUT;
167 1.1 jmcneill }
168 1.1 jmcneill
169 1.1 jmcneill for (retry = 1000; retry > 0; retry--) {
170 1.1 jmcneill val = anxedp_read(sc, 1, ANX_DP_INT_STA);
171 1.1 jmcneill if ((val & ANX_RPLY_RECEIV) != 0) {
172 1.1 jmcneill anxedp_write(sc, 1, ANX_DP_INT_STA, val);
173 1.1 jmcneill break;
174 1.1 jmcneill }
175 1.1 jmcneill delay(100);
176 1.1 jmcneill }
177 1.1 jmcneill if (retry == 0) {
178 1.1 jmcneill device_printf(sc->sc_dev, "aux transfer timeout\n");
179 1.1 jmcneill return ETIMEDOUT;
180 1.1 jmcneill }
181 1.1 jmcneill
182 1.1 jmcneill return 0;
183 1.1 jmcneill }
184 1.1 jmcneill
185 1.1 jmcneill static int
186 1.1 jmcneill anxedp_aux_transfer(struct anxedp_softc *sc, uint8_t comm, uint32_t addr,
187 1.1 jmcneill uint8_t *buf, int buflen)
188 1.1 jmcneill {
189 1.1 jmcneill uint8_t ctrl[2];
190 1.1 jmcneill int n, error;
191 1.1 jmcneill
192 1.1 jmcneill ctrl[0] = __SHIFTIN(comm, ANX_AUX_TX_COMM);
193 1.1 jmcneill if (buflen > 0)
194 1.1 jmcneill ctrl[0] |= __SHIFTIN(buflen - 1, ANX_AUX_LENGTH);
195 1.1 jmcneill ctrl[1] = ANX_AUX_EN;
196 1.1 jmcneill if (buflen == 0)
197 1.1 jmcneill ctrl[1] |= ANX_ADDR_ONLY;
198 1.1 jmcneill
199 1.1 jmcneill if (comm != ANX_AUX_TX_COMM_READ) {
200 1.1 jmcneill for (n = 0; n < buflen; n++)
201 1.1 jmcneill anxedp_write(sc, 0, ANX_BUF_DATA(n), buf[n]);
202 1.1 jmcneill }
203 1.1 jmcneill
204 1.1 jmcneill anxedp_write(sc, 0, ANX_DP_AUX_ADDR(0), addr & 0xff);
205 1.1 jmcneill anxedp_write(sc, 0, ANX_DP_AUX_ADDR(1), (addr >> 8) & 0xff);
206 1.1 jmcneill anxedp_write(sc, 0, ANX_DP_AUX_ADDR(2), (addr >> 16) & 0xf);
207 1.1 jmcneill anxedp_write(sc, 0, ANX_DP_AUX_CH_CTL_1, ctrl[0]);
208 1.1 jmcneill anxedp_write(sc, 0, ANX_DP_AUX_CH_CTL_2, ctrl[1]);
209 1.1 jmcneill
210 1.1 jmcneill error = anxedp_aux_wait(sc);
211 1.1 jmcneill if (error != 0)
212 1.1 jmcneill return error;
213 1.1 jmcneill
214 1.1 jmcneill if (comm == ANX_AUX_TX_COMM_READ) {
215 1.1 jmcneill for (n = 0; n < buflen; n++)
216 1.1 jmcneill buf[n] = anxedp_read(sc, 0, ANX_BUF_DATA(n));
217 1.1 jmcneill }
218 1.1 jmcneill
219 1.1 jmcneill return 0;
220 1.1 jmcneill }
221 1.1 jmcneill
222 1.1 jmcneill static int
223 1.1 jmcneill anxedp_read_edid(struct anxedp_softc *sc, uint8_t *edid, int edidlen)
224 1.1 jmcneill {
225 1.1 jmcneill int error;
226 1.1 jmcneill uint8_t n;
227 1.1 jmcneill
228 1.1 jmcneill for (n = 0; n < edidlen; n += 16) {
229 1.1 jmcneill const int xferlen = MIN(edidlen - n, 16);
230 1.1 jmcneill
231 1.1 jmcneill error = anxedp_aux_transfer(sc, ANX_AUX_TX_COMM_MOT, DDC_ADDR, &n, 1);
232 1.1 jmcneill if (error != 0)
233 1.1 jmcneill return error;
234 1.1 jmcneill
235 1.1 jmcneill error = anxedp_aux_transfer(sc, ANX_AUX_TX_COMM_READ, DDC_ADDR, &edid[n], xferlen);
236 1.1 jmcneill if (error != 0)
237 1.1 jmcneill return error;
238 1.1 jmcneill }
239 1.1 jmcneill
240 1.1 jmcneill return 0;
241 1.1 jmcneill }
242 1.1 jmcneill
243 1.1 jmcneill static int
244 1.1 jmcneill anxedp_connector_get_modes(struct drm_connector *connector)
245 1.1 jmcneill {
246 1.1 jmcneill struct anxedp_connector *anxedp_connector = to_anxedp_connector(connector);
247 1.1 jmcneill struct anxedp_softc * const sc = anxedp_connector->sc;
248 1.1 jmcneill char edid[EDID_LENGTH];
249 1.1 jmcneill struct edid *pedid = NULL;
250 1.1 jmcneill int error;
251 1.1 jmcneill
252 1.3 thorpej iic_acquire_bus(sc->sc_i2c, 0);
253 1.1 jmcneill error = anxedp_read_edid(sc, edid, sizeof(edid));
254 1.3 thorpej iic_release_bus(sc->sc_i2c, 0);
255 1.1 jmcneill if (error == 0)
256 1.1 jmcneill pedid = (struct edid *)edid;
257 1.1 jmcneill
258 1.7 riastrad drm_connector_update_edid_property(connector, pedid);
259 1.1 jmcneill if (pedid == NULL)
260 1.1 jmcneill return 0;
261 1.1 jmcneill
262 1.7 riastrad return drm_add_edid_modes(connector, pedid);
263 1.1 jmcneill }
264 1.1 jmcneill
265 1.1 jmcneill static const struct drm_connector_helper_funcs anxedp_connector_helper_funcs = {
266 1.1 jmcneill .get_modes = anxedp_connector_get_modes,
267 1.1 jmcneill };
268 1.1 jmcneill
269 1.1 jmcneill static int
270 1.1 jmcneill anxedp_bridge_attach(struct drm_bridge *bridge)
271 1.1 jmcneill {
272 1.1 jmcneill struct anxedp_softc * const sc = bridge->driver_private;
273 1.1 jmcneill struct anxedp_connector *anxedp_connector = &sc->sc_connector;
274 1.1 jmcneill struct drm_connector *connector = &anxedp_connector->base;
275 1.1 jmcneill int error;
276 1.1 jmcneill
277 1.1 jmcneill anxedp_connector->sc = sc;
278 1.1 jmcneill
279 1.1 jmcneill connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
280 1.1 jmcneill connector->interlace_allowed = 0;
281 1.1 jmcneill connector->doublescan_allowed = 0;
282 1.1 jmcneill
283 1.1 jmcneill drm_connector_init(bridge->dev, connector, &anxedp_connector_funcs,
284 1.1 jmcneill connector->connector_type);
285 1.1 jmcneill drm_connector_helper_add(connector, &anxedp_connector_helper_funcs);
286 1.1 jmcneill
287 1.7 riastrad error = drm_connector_attach_encoder(connector, bridge->encoder);
288 1.1 jmcneill if (error != 0)
289 1.1 jmcneill return error;
290 1.1 jmcneill
291 1.1 jmcneill return drm_connector_register(connector);
292 1.1 jmcneill }
293 1.1 jmcneill
294 1.1 jmcneill static void
295 1.1 jmcneill anxedp_bridge_enable(struct drm_bridge *bridge)
296 1.1 jmcneill {
297 1.1 jmcneill }
298 1.1 jmcneill
299 1.1 jmcneill static void
300 1.1 jmcneill anxedp_bridge_pre_enable(struct drm_bridge *bridge)
301 1.1 jmcneill {
302 1.1 jmcneill }
303 1.1 jmcneill
304 1.1 jmcneill static void
305 1.1 jmcneill anxedp_bridge_disable(struct drm_bridge *bridge)
306 1.1 jmcneill {
307 1.1 jmcneill }
308 1.1 jmcneill
309 1.1 jmcneill static void
310 1.1 jmcneill anxedp_bridge_post_disable(struct drm_bridge *bridge)
311 1.1 jmcneill {
312 1.1 jmcneill }
313 1.1 jmcneill
314 1.1 jmcneill static void
315 1.1 jmcneill anxedp_bridge_mode_set(struct drm_bridge *bridge,
316 1.7 riastrad const struct drm_display_mode *mode,
317 1.7 riastrad const struct drm_display_mode *adjusted_mode)
318 1.1 jmcneill {
319 1.1 jmcneill struct anxedp_softc * const sc = bridge->driver_private;
320 1.1 jmcneill
321 1.1 jmcneill sc->sc_curmode = *adjusted_mode;
322 1.1 jmcneill }
323 1.1 jmcneill
324 1.1 jmcneill static bool
325 1.1 jmcneill anxedp_bridge_mode_fixup(struct drm_bridge *bridge,
326 1.1 jmcneill const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
327 1.1 jmcneill {
328 1.1 jmcneill return true;
329 1.1 jmcneill }
330 1.1 jmcneill
331 1.1 jmcneill static const struct drm_bridge_funcs anxedp_bridge_funcs = {
332 1.1 jmcneill .attach = anxedp_bridge_attach,
333 1.1 jmcneill .enable = anxedp_bridge_enable,
334 1.1 jmcneill .pre_enable = anxedp_bridge_pre_enable,
335 1.1 jmcneill .disable = anxedp_bridge_disable,
336 1.1 jmcneill .post_disable = anxedp_bridge_post_disable,
337 1.1 jmcneill .mode_set = anxedp_bridge_mode_set,
338 1.1 jmcneill .mode_fixup = anxedp_bridge_mode_fixup,
339 1.1 jmcneill };
340 1.1 jmcneill
341 1.1 jmcneill static int
342 1.1 jmcneill anxedp_ep_activate(device_t dev, struct fdt_endpoint *ep, bool activate)
343 1.1 jmcneill {
344 1.1 jmcneill struct anxedp_softc * const sc = device_private(dev);
345 1.1 jmcneill struct fdt_endpoint *in_ep = fdt_endpoint_remote(ep);
346 1.1 jmcneill struct drm_encoder *encoder;
347 1.1 jmcneill struct drm_bridge *bridge;
348 1.1 jmcneill int error;
349 1.1 jmcneill
350 1.1 jmcneill if (!activate)
351 1.1 jmcneill return EINVAL;
352 1.1 jmcneill
353 1.1 jmcneill if (fdt_endpoint_port_index(ep) != 0)
354 1.1 jmcneill return EINVAL;
355 1.1 jmcneill
356 1.1 jmcneill switch (fdt_endpoint_type(in_ep)) {
357 1.1 jmcneill case EP_DRM_ENCODER:
358 1.1 jmcneill encoder = fdt_endpoint_get_data(in_ep);
359 1.1 jmcneill break;
360 1.1 jmcneill case EP_DRM_BRIDGE:
361 1.1 jmcneill bridge = fdt_endpoint_get_data(in_ep);
362 1.1 jmcneill encoder = bridge->encoder;
363 1.1 jmcneill break;
364 1.1 jmcneill default:
365 1.1 jmcneill encoder = NULL;
366 1.1 jmcneill break;
367 1.1 jmcneill }
368 1.1 jmcneill
369 1.1 jmcneill if (encoder == NULL)
370 1.1 jmcneill return EINVAL;
371 1.1 jmcneill
372 1.1 jmcneill sc->sc_connector.base.connector_type = DRM_MODE_CONNECTOR_eDP;
373 1.1 jmcneill
374 1.1 jmcneill sc->sc_bridge.driver_private = sc;
375 1.1 jmcneill sc->sc_bridge.funcs = &anxedp_bridge_funcs;
376 1.1 jmcneill sc->sc_bridge.encoder = encoder;
377 1.1 jmcneill
378 1.7 riastrad error = drm_bridge_attach(encoder, &sc->sc_bridge, NULL);
379 1.1 jmcneill if (error != 0)
380 1.1 jmcneill return EIO;
381 1.1 jmcneill
382 1.1 jmcneill return 0;
383 1.1 jmcneill }
384 1.1 jmcneill
385 1.1 jmcneill static void *
386 1.1 jmcneill anxedp_ep_get_data(device_t dev, struct fdt_endpoint *ep)
387 1.1 jmcneill {
388 1.1 jmcneill struct anxedp_softc * const sc = device_private(dev);
389 1.1 jmcneill
390 1.1 jmcneill return &sc->sc_bridge;
391 1.1 jmcneill }
392 1.1 jmcneill
393 1.1 jmcneill static int
394 1.1 jmcneill anxedp_match(device_t parent, cfdata_t match, void *aux)
395 1.1 jmcneill {
396 1.1 jmcneill struct i2c_attach_args *ia = aux;
397 1.1 jmcneill int match_result;
398 1.1 jmcneill
399 1.1 jmcneill if (iic_use_direct_match(ia, match, compat_data, &match_result))
400 1.1 jmcneill return match_result;
401 1.1 jmcneill
402 1.1 jmcneill /* This device is direct-config only */
403 1.1 jmcneill
404 1.1 jmcneill return 0;
405 1.1 jmcneill }
406 1.1 jmcneill
407 1.1 jmcneill static void
408 1.1 jmcneill anxedp_attach(device_t parent, device_t self, void *aux)
409 1.1 jmcneill {
410 1.1 jmcneill struct anxedp_softc * const sc = device_private(self);
411 1.1 jmcneill struct i2c_attach_args * const ia = aux;
412 1.1 jmcneill
413 1.1 jmcneill sc->sc_dev = self;
414 1.1 jmcneill sc->sc_i2c = ia->ia_tag;
415 1.1 jmcneill sc->sc_addr = ia->ia_addr;
416 1.1 jmcneill sc->sc_phandle = ia->ia_cookie;
417 1.1 jmcneill
418 1.1 jmcneill aprint_naive("\n");
419 1.1 jmcneill aprint_normal(": eDP TX\n");
420 1.1 jmcneill
421 1.1 jmcneill sc->sc_ports.dp_ep_activate = anxedp_ep_activate;
422 1.1 jmcneill sc->sc_ports.dp_ep_get_data = anxedp_ep_get_data;
423 1.1 jmcneill fdt_ports_register(&sc->sc_ports, self, sc->sc_phandle, EP_DRM_BRIDGE);
424 1.1 jmcneill }
425 1.1 jmcneill
426 1.1 jmcneill CFATTACH_DECL_NEW(anxedp, sizeof(struct anxedp_softc),
427 1.1 jmcneill anxedp_match, anxedp_attach, NULL, NULL);
428