sf_hdmi.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
  4. */
  5. #ifndef __SF_HDMI_H__
  6. #define __SF_HDMI_H__
  7. #include <clk.h>
  8. #include <reset.h>
  9. #define HDMI_STATUS 0xc8
  10. #define m_HOTPLUG (1 << 7)
  11. #define m_MASK_INT_HOTPLUG (1 << 5)
  12. #define m_INT_HOTPLUG (1 << 1)
  13. #define v_MASK_INT_HOTPLUG(n) ((n & 0x1) << 5)
  14. typedef struct
  15. {
  16. /* TODO: add hdmi inno registers define */
  17. } hdmi_regs_t;
  18. typedef struct register_value {
  19. u16 reg;
  20. u8 value;
  21. }reg_value_t;
  22. struct sf_hdmi_priv {
  23. struct dw_hdmi hdmi;
  24. void *grf;
  25. void __iomem *base;
  26. struct clk pclk;
  27. struct clk sys_clk;
  28. struct clk mclk;
  29. struct clk bclk;
  30. struct clk phy_clk;
  31. struct reset_ctl tx_rst;
  32. };
  33. typedef enum {
  34. RES_1440_480I_60HZ = 0,
  35. RES_640_480P_60HZ,
  36. RES_720_480P_60HZ,
  37. RES_1280_720P_60HZ,
  38. RES_1920_1080P_60HZ,
  39. RES_3840_2160P_30HZ,
  40. RES_3840_2160P_60HZ,
  41. }resolution_t;
  42. typedef enum {
  43. VIC_1440x480i60 = 6,
  44. VIC_640x480p60 = 1,
  45. VIC_720x480p60 = 2,
  46. VIC_1280x720p60 = 4,
  47. VIC_1920x1080p60 = 16,
  48. VIC_3840x2160p30 = 95,
  49. VIC_3840x2160p60 = 97,
  50. }vic_code_t;
  51. #endif