| .. | .. |
|---|
| 7 | 7 | #ifndef _ROCKCHIP_CONNECTOR_H_ |
|---|
| 8 | 8 | #define _ROCKCHIP_CONNECTOR_H_ |
|---|
| 9 | 9 | |
|---|
| 10 | +#ifdef CONFIG_SPL_BUILD |
|---|
| 11 | +struct rockchip_connector { |
|---|
| 12 | + struct rockchip_phy *phy; |
|---|
| 13 | + int id; |
|---|
| 14 | + int type; |
|---|
| 15 | + bool hpd; |
|---|
| 16 | + |
|---|
| 17 | + const struct rockchip_connector_funcs *funcs; |
|---|
| 18 | + void *data; |
|---|
| 19 | +}; |
|---|
| 20 | +#else |
|---|
| 10 | 21 | #include "rockchip_bridge.h" |
|---|
| 11 | 22 | #include "rockchip_panel.h" |
|---|
| 12 | 23 | |
|---|
| .. | .. |
|---|
| 18 | 29 | struct list_head head; |
|---|
| 19 | 30 | int id; |
|---|
| 20 | 31 | int type; |
|---|
| 32 | + bool hpd; |
|---|
| 21 | 33 | |
|---|
| 22 | 34 | const struct rockchip_connector_funcs *funcs; |
|---|
| 23 | 35 | void *data; |
|---|
| 24 | 36 | }; |
|---|
| 37 | +#endif |
|---|
| 38 | + |
|---|
| 39 | +/** |
|---|
| 40 | + * enum drm_bus_flags - bus_flags info for &drm_display_info |
|---|
| 41 | + * |
|---|
| 42 | + * This enum defines signal polarities and clock edge information for signals on |
|---|
| 43 | + * a bus as bitmask flags. |
|---|
| 44 | + * |
|---|
| 45 | + * The clock edge information is conveyed by two sets of symbols, |
|---|
| 46 | + * DRM_BUS_FLAGS_*_DRIVE_\* and DRM_BUS_FLAGS_*_SAMPLE_\*. When this enum is |
|---|
| 47 | + * used to describe a bus from the point of view of the transmitter, the |
|---|
| 48 | + * \*_DRIVE_\* flags should be used. When used from the point of view of the |
|---|
| 49 | + * receiver, the \*_SAMPLE_\* flags should be used. The \*_DRIVE_\* and |
|---|
| 50 | + * \*_SAMPLE_\* flags alias each other, with the \*_SAMPLE_POSEDGE and |
|---|
| 51 | + * \*_SAMPLE_NEGEDGE flags being equal to \*_DRIVE_NEGEDGE and \*_DRIVE_POSEDGE |
|---|
| 52 | + * respectively. This simplifies code as signals are usually sampled on the |
|---|
| 53 | + * opposite edge of the driving edge. Transmitters and receivers may however |
|---|
| 54 | + * need to take other signal timings into account to convert between driving |
|---|
| 55 | + * and sample edges. |
|---|
| 56 | + */ |
|---|
| 57 | +enum drm_bus_flags { |
|---|
| 58 | + /** |
|---|
| 59 | + * @DRM_BUS_FLAG_DE_LOW: |
|---|
| 60 | + * |
|---|
| 61 | + * The Data Enable signal is active low |
|---|
| 62 | + */ |
|---|
| 63 | + DRM_BUS_FLAG_DE_LOW = BIT(0), |
|---|
| 64 | + |
|---|
| 65 | + /** |
|---|
| 66 | + * @DRM_BUS_FLAG_DE_HIGH: |
|---|
| 67 | + * |
|---|
| 68 | + * The Data Enable signal is active high |
|---|
| 69 | + */ |
|---|
| 70 | + DRM_BUS_FLAG_DE_HIGH = BIT(1), |
|---|
| 71 | + |
|---|
| 72 | + /** |
|---|
| 73 | + * @DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE: |
|---|
| 74 | + * |
|---|
| 75 | + * Data is driven on the rising edge of the pixel clock |
|---|
| 76 | + */ |
|---|
| 77 | + DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE = BIT(2), |
|---|
| 78 | + |
|---|
| 79 | + /** |
|---|
| 80 | + * @DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE: |
|---|
| 81 | + * |
|---|
| 82 | + * Data is driven on the falling edge of the pixel clock |
|---|
| 83 | + */ |
|---|
| 84 | + DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE = BIT(3), |
|---|
| 85 | + |
|---|
| 86 | + /** |
|---|
| 87 | + * @DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE: |
|---|
| 88 | + * |
|---|
| 89 | + * Data is sampled on the rising edge of the pixel clock |
|---|
| 90 | + */ |
|---|
| 91 | + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, |
|---|
| 92 | + |
|---|
| 93 | + /** |
|---|
| 94 | + * @DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE: |
|---|
| 95 | + * |
|---|
| 96 | + * Data is sampled on the falling edge of the pixel clock |
|---|
| 97 | + */ |
|---|
| 98 | + DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
|---|
| 99 | + |
|---|
| 100 | + /** |
|---|
| 101 | + * @DRM_BUS_FLAG_DATA_MSB_TO_LSB: |
|---|
| 102 | + * |
|---|
| 103 | + * Data is transmitted MSB to LSB on the bus |
|---|
| 104 | + */ |
|---|
| 105 | + DRM_BUS_FLAG_DATA_MSB_TO_LSB = BIT(4), |
|---|
| 106 | + |
|---|
| 107 | + /** |
|---|
| 108 | + * @DRM_BUS_FLAG_DATA_LSB_TO_MSB: |
|---|
| 109 | + * |
|---|
| 110 | + * Data is transmitted LSB to MSB on the bus |
|---|
| 111 | + */ |
|---|
| 112 | + DRM_BUS_FLAG_DATA_LSB_TO_MSB = BIT(5), |
|---|
| 113 | + |
|---|
| 114 | + /** |
|---|
| 115 | + * @DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE: |
|---|
| 116 | + * |
|---|
| 117 | + * Sync signals are driven on the rising edge of the pixel clock |
|---|
| 118 | + */ |
|---|
| 119 | + DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE = BIT(6), |
|---|
| 120 | + |
|---|
| 121 | + /** |
|---|
| 122 | + * @DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE: |
|---|
| 123 | + * |
|---|
| 124 | + * Sync signals are driven on the falling edge of the pixel clock |
|---|
| 125 | + */ |
|---|
| 126 | + DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = BIT(7), |
|---|
| 127 | + |
|---|
| 128 | + /** |
|---|
| 129 | + * @DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE: |
|---|
| 130 | + * |
|---|
| 131 | + * Sync signals are sampled on the rising edge of the pixel clock |
|---|
| 132 | + */ |
|---|
| 133 | + DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE, |
|---|
| 134 | + |
|---|
| 135 | + /** |
|---|
| 136 | + * @DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE: |
|---|
| 137 | + * |
|---|
| 138 | + * Sync signals are sampled on the falling edge of the pixel clock |
|---|
| 139 | + */ |
|---|
| 140 | + DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, |
|---|
| 141 | + |
|---|
| 142 | + /** |
|---|
| 143 | + * @DRM_BUS_FLAG_SHARP_SIGNALS: |
|---|
| 144 | + * |
|---|
| 145 | + * Set if the Sharp-specific signals (SPL, CLS, PS, REV) must be used |
|---|
| 146 | + */ |
|---|
| 147 | + DRM_BUS_FLAG_SHARP_SIGNALS = BIT(8), |
|---|
| 148 | +}; |
|---|
| 25 | 149 | |
|---|
| 26 | 150 | struct rockchip_connector_funcs { |
|---|
| 27 | 151 | /* |
|---|