rk_vop.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
  4. */
  5. #ifndef __RK_VOP_H__
  6. #define __RK_VOP_H__
  7. #include <asm/arch-rockchip/vop_rk3288.h>
  8. struct rk_vop_priv {
  9. void *grf;
  10. void *regs;
  11. };
  12. enum vop_features {
  13. VOP_FEATURE_OUTPUT_10BIT = (1 << 0),
  14. };
  15. struct rkvop_driverdata {
  16. /* configuration */
  17. u32 features;
  18. /* block-specific setters/getters */
  19. void (*set_pin_polarity)(struct udevice *, enum vop_modes, u32);
  20. };
  21. /**
  22. * rk_vop_probe() - common probe implementation
  23. *
  24. * Performs the rk_display_init on each port-subnode until finding a
  25. * working port (or returning an error if none of the ports could be
  26. * successfully initialised).
  27. *
  28. * @dev: device
  29. * @return 0 if OK, -ve if something went wrong
  30. */
  31. int rk_vop_probe(struct udevice *dev);
  32. /**
  33. * rk_vop_bind() - common bind implementation
  34. *
  35. * Sets the plat->size field to the amount of memory to be reserved for
  36. * the framebuffer: this is always
  37. * (32 BPP) x VIDEO_ROCKCHIP_MAX_XRES x VIDEO_ROCKCHIP_MAX_YRES
  38. *
  39. * @dev: device
  40. * @return 0 (always OK)
  41. */
  42. int rk_vop_bind(struct udevice *dev);
  43. /**
  44. * rk_vop_probe_regulators() - probe (autoset + enable) regulators
  45. *
  46. * Probes a list of regulators by performing autoset and enable
  47. * operations on them. The list of regulators is an array of string
  48. * pointers and any individual regulator-probe may fail without
  49. * counting as an error.
  50. *
  51. * @dev: device
  52. * @names: array of string-pointers to regulator names to probe
  53. * @cnt: number of elements in the 'names' array
  54. */
  55. void rk_vop_probe_regulators(struct udevice *dev,
  56. const char * const *names, int cnt);
  57. #endif