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