hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
u-boot/drivers/video/drm/rockchip_connector.h
....@@ -7,6 +7,17 @@
77 #ifndef _ROCKCHIP_CONNECTOR_H_
88 #define _ROCKCHIP_CONNECTOR_H_
99
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
1021 #include "rockchip_bridge.h"
1122 #include "rockchip_panel.h"
1223
....@@ -18,10 +29,123 @@
1829 struct list_head head;
1930 int id;
2031 int type;
32
+ bool hpd;
2133
2234 const struct rockchip_connector_funcs *funcs;
2335 void *data;
2436 };
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
+};
25149
26150 struct rockchip_connector_funcs {
27151 /*