hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/uapi/linux/rk-camera-module.h
....@@ -8,11 +8,12 @@
88 #define _UAPI_RKMODULE_CAMERA_H
99
1010 #include <linux/types.h>
11
+#include <linux/rk-video-format.h>
1112
1213 #define RKMODULE_API_VERSION KERNEL_VERSION(0, 1, 0x2)
1314
1415 /* using for rk3588 dual isp unite */
15
-#define RKMOUDLE_UNITE_EXTEND_PIXEL 32
16
+#define RKMOUDLE_UNITE_EXTEND_PIXEL 128
1617 /* using for rv1109 and rv1126 */
1718 #define RKMODULE_EXTEND_LINE 24
1819
....@@ -169,14 +170,20 @@
169170 #define RKMODULE_GET_READOUT_LINE_CNT_PER_LINE \
170171 _IOR('V', BASE_VIDIOC_PRIVATE + 36, __u32)
171172
173
+#define RKMODULE_GET_GROUP_ID \
174
+ _IOR('V', BASE_VIDIOC_PRIVATE + 37, __u32)
175
+
176
+#define RKMODULE_SET_GROUP_ID \
177
+ _IOW('V', BASE_VIDIOC_PRIVATE + 38, __u32)
178
+
172179 struct rkmodule_i2cdev_info {
173
- u8 slave_addr;
180
+ __u8 slave_addr;
174181 } __attribute__ ((packed));
175182
176183 struct rkmodule_dev_info {
177184 union {
178185 struct rkmodule_i2cdev_info i2c_dev;
179
- u32 reserved[8];
186
+ __u32 reserved[8];
180187 };
181188 } __attribute__ ((packed));
182189
....@@ -653,6 +660,29 @@
653660 } __attribute__ ((packed));
654661
655662 /*
663
+ * link to vicap
664
+ * linear mode: pad0~pad3 for id0~id3;
665
+ *
666
+ * HDR_X2: id0 fiexd to vc0 for long frame
667
+ * id1 fixed to vc1 for short frame;
668
+ * id2~id3 reserved, can config by PAD2~PAD3
669
+ *
670
+ * HDR_X3: id0 fiexd to vc0 for long frame
671
+ * id1 fixed to vc1 for middle frame
672
+ * id2 fixed to vc2 for short frame;
673
+ * id3 reserved, can config by PAD3
674
+ *
675
+ * link to isp, the connection relationship is as follows
676
+ */
677
+enum rkmodule_max_pad {
678
+ PAD0, /* link to isp */
679
+ PAD1, /* link to csi wr0 | hdr x2:L x3:M */
680
+ PAD2, /* link to csi wr1 | hdr x3:L */
681
+ PAD3, /* link to csi wr2 | hdr x2:M x3:S */
682
+ PAD_MAX,
683
+};
684
+
685
+/*
656686 * sensor exposure sync mode
657687 */
658688 enum rkmodule_sync_mode {
....@@ -663,10 +693,10 @@
663693 };
664694
665695 struct rkmodule_mclk_data {
666
- u32 enable;
667
- u32 mclk_index;
668
- u32 mclk_rate;
669
- u32 reserved[8];
696
+ __u32 enable;
697
+ __u32 mclk_index;
698
+ __u32 mclk_rate;
699
+ __u32 reserved[8];
670700 };
671701
672702 /*
....@@ -716,14 +746,14 @@
716746 };
717747
718748 struct rkmodule_csi_dphy_param {
719
- u32 vendor;
720
- u32 lp_vol_ref;
721
- u32 lp_hys_sw[DPHY_MAX_LANE];
722
- u32 lp_escclk_pol_sel[DPHY_MAX_LANE];
723
- u32 skew_data_cal_clk[DPHY_MAX_LANE];
724
- u32 clk_hs_term_sel;
725
- u32 data_hs_term_sel[DPHY_MAX_LANE];
726
- u32 reserved[32];
749
+ __u32 vendor;
750
+ __u32 lp_vol_ref;
751
+ __u32 lp_hys_sw[DPHY_MAX_LANE];
752
+ __u32 lp_escclk_pol_sel[DPHY_MAX_LANE];
753
+ __u32 skew_data_cal_clk[DPHY_MAX_LANE];
754
+ __u32 clk_hs_term_sel;
755
+ __u32 data_hs_term_sel[DPHY_MAX_LANE];
756
+ __u32 reserved[32];
727757 };
728758
729759 struct rkmodule_sensor_fmt {