mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Merge commit 'a77252e2b5b7be3780a141e93692bb0d08c172a6'
* commit 'a77252e2b5b7be3780a141e93692bb0d08c172a6': arm64: dts: rockchip: rk3576: Add vop-bw-dmc-level for dmc PM / devfreq: rockchip_dmc: Add bandwidth level table support arm64: dts: rockchip: rk3588-vehicle-serdes-mfd-display-rohm.dtsi: fix i2c7 and i2c8 are disabled error arm64: dts: rockchip: rk3588-vehicle-evb-v22: fix dcphy1 gpio conflict with backlight arm64: dts: rockchip: rk3588-vehicle-evb-maxim-max96712-dphy3-os04a10.dtsi: enable multi-raw arm64: dts: rockchip: add rk3588-vehicle-evb-maxim-max96712-dphy3-os04a10.dtsi arm64: configs: rk3588_vehicle.config: add CONFIG_VIDEO_MAXIM_CAM_OS04A10=y media: i2c: maxim: remote: add omnivision os04a10 sensor driver media: i2c: maxim: driver version v3.04.00 Change-Id: I899d3fe86de1b32cb90461e33f6161c5f2348c96
This commit is contained in:
@@ -786,10 +786,10 @@
|
||||
clocks = <&scmi_clk SCLK_DDR>;
|
||||
clock-names = "dmc_clk";
|
||||
operating-points-v2 = <&dmc_opp_table>;
|
||||
vop-bw-dmc-freq = <
|
||||
/* min_bw(MB/s) max_bw(MB/s) freq(KHz) */
|
||||
0 1999 528000
|
||||
2000 99999 1068000
|
||||
vop-bw-dmc-level = <
|
||||
/* min_bw(MB/s) max_bw(MB/s) freq_level */
|
||||
0 999 DMC_FREQ_LEVEL_LOW
|
||||
1000 99999 DMC_FREQ_LEVEL_MID_LOW
|
||||
>;
|
||||
upthreshold = <40>;
|
||||
downdifferential = <20>;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -432,11 +432,7 @@
|
||||
|
||||
bl {
|
||||
bl0_enable_pin: bl0-enable-pin {
|
||||
rockchip,pins =
|
||||
<1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
<4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
<4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
|
||||
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
bl1_enable_pin: bl1-enable-pin {
|
||||
|
||||
@@ -1993,12 +1993,11 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c7m3_xfer>;
|
||||
clock-frequency = <400000>;
|
||||
status = "disabled";
|
||||
|
||||
i2c7_bu18tl82: i2c7-bu18tl82@10 {
|
||||
compatible = "rohm,bu18tl82";
|
||||
reg = <0x10>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
serdes-init-sequence = [
|
||||
0013 001a
|
||||
@@ -2071,7 +2070,7 @@
|
||||
compatible = "rohm,bu18tl82-pinctrl";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c7_bu18tl82_panel_pins>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
i2c7_bu18tl82_panel_pins: panel-pins {
|
||||
lcd-bl-pwm {
|
||||
@@ -2098,7 +2097,7 @@
|
||||
|
||||
i2c7_bu18tl82_gpio: i2c7-bu18tl82-gpio {
|
||||
compatible = "rohm,bu18tl82-gpio";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
@@ -2108,7 +2107,7 @@
|
||||
|
||||
i2c7_bu18tl82_bridge: i2c7-bu18tl82-bridge {
|
||||
compatible = "rohm,bu18tl82-bridge";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
@@ -2136,7 +2135,8 @@
|
||||
i2c7_bu18rl82: i2c7-bu18rl82@30 {
|
||||
compatible = "rohm,bu18rl82";
|
||||
reg = <0x30>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
serdes-init-sequence = [
|
||||
0011 000b
|
||||
0012 0003
|
||||
@@ -2200,11 +2200,12 @@
|
||||
0645 0020
|
||||
0646 001f
|
||||
];
|
||||
|
||||
i2c7_bu18rl82_pinctrl: i2c7-bu18rl82-pinctrl {
|
||||
compatible = "rohm,bu18rl82-pinctrl";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c7_bu18rl82_panel_pins>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
i2c7_bu18rl82_panel_pins: panel-pins {
|
||||
lcd-bl-pwm {
|
||||
@@ -2240,7 +2241,7 @@
|
||||
|
||||
i2c7_bu18rl82_gpio: i2c7-bu18rl82-gpio {
|
||||
compatible = "rohm,bu18rl82-gpio";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
@@ -2250,7 +2251,7 @@
|
||||
|
||||
i2c7_bu18rl82_bridge: i2c7-bu18rl82-bridge {
|
||||
compatible = "rohm,bu18rl82-bridge";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
@@ -2280,7 +2281,7 @@
|
||||
compatible = "lontium,lt7911d-fb-notifier";
|
||||
reg = <0x2b>;
|
||||
reset-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2288,12 +2289,11 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c8m2_xfer>;
|
||||
clock-frequency = <400000>;
|
||||
status = "disabled";
|
||||
|
||||
i2c8_bu18tl82: i2c8-bu18tl82@10 {
|
||||
compatible = "rohm,bu18tl82";
|
||||
reg = <0x10>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
serdes-init-sequence = [
|
||||
0013 001a //013h[3]1-lane1 enable 013h[3] 1-LVDS Receiver Port-A
|
||||
@@ -2369,11 +2369,12 @@
|
||||
0444 0090 //h_blank=144
|
||||
0446 00d2 //v_blank=210
|
||||
];
|
||||
|
||||
i2c8_bu18tl82_pinctrl: i2c8-bu18tl82-pinctrl {
|
||||
compatible = "rohm,bu18tl82-pinctrl";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c8_bu18tl82_panel_pins>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
i2c8_bu18tl82_panel_pins: panel-pins {
|
||||
lcd-bl-pwm {
|
||||
@@ -2400,7 +2401,7 @@
|
||||
|
||||
i2c8_bu18tl82_gpio: i2c8-bu18tl82-gpio {
|
||||
compatible = "rohm,bu18tl82-gpio";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
@@ -2410,7 +2411,7 @@
|
||||
|
||||
i2c8_bu18tl82_bridge: i2c8-bu18tl82-bridge {
|
||||
compatible = "rohm,bu18tl82-bridge";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
@@ -2439,7 +2440,8 @@
|
||||
i2c8_bu18rl82: i2c8-bu18rl82@30 {
|
||||
compatible = "rohm,bu18rl82";
|
||||
reg = <0x30>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
serdes-init-sequence = [
|
||||
0011 0003 //Clockless Link Receiver Lane-0+ LVDS portA
|
||||
0012 0003 //Clockless Link Receiver Lane-1+ LVDS portB
|
||||
@@ -2507,11 +2509,12 @@
|
||||
0644 0090
|
||||
0646 00d2
|
||||
];
|
||||
|
||||
i2c8_bu18rl82_pinctrl: i2c8-bu18rl82-pinctrl {
|
||||
compatible = "rohm,bu18rl82-pinctrl";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c8_bu18rl82_panel_pins>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
i2c8_bu18rl82_panel_pins: panel-pins {
|
||||
lcd-bl-pwm {
|
||||
@@ -2547,7 +2550,7 @@
|
||||
|
||||
i2c8_bu18rl82_gpio: i2c8-bu18rl82-gpio {
|
||||
compatible = "rohm,bu18rl82-gpio";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
@@ -2557,7 +2560,7 @@
|
||||
|
||||
i2c8_bu18rl82_bridge: i2c8-bu18rl82-bridge {
|
||||
compatible = "rohm,bu18rl82-bridge";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
@@ -2587,7 +2590,7 @@
|
||||
compatible = "lontium,lt7911d-fb-notifier";
|
||||
reg = <0x2b>;
|
||||
reset-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ CONFIG_VIDEO_MAXIM_CAM_DUMMY=y
|
||||
CONFIG_VIDEO_MAXIM_CAM_OV231X=y
|
||||
CONFIG_VIDEO_MAXIM_CAM_OX01F10=y
|
||||
CONFIG_VIDEO_MAXIM_CAM_OX03J10=y
|
||||
CONFIG_VIDEO_MAXIM_CAM_OS04A10=y
|
||||
CONFIG_VIDEO_MAXIM_CAM_SC320AT=y
|
||||
# CONFIG_VIDEO_MAXIM_DES_MAXIM2C is not set
|
||||
CONFIG_VIDEO_MAXIM_DES_MAXIM4C=y
|
||||
|
||||
@@ -58,10 +58,11 @@
|
||||
#define input_hd_to_dmcfreq(hd) container_of(hd, struct rockchip_dmcfreq, \
|
||||
input_handler)
|
||||
|
||||
#define VIDEO_1080P_SIZE (1920 * 1080)
|
||||
#define DTS_PAR_OFFSET (4096)
|
||||
#define VIDEO_1080P_SIZE (1920 * 1080)
|
||||
#define DTS_PAR_OFFSET (4096)
|
||||
|
||||
#define FALLBACK_STATIC_TEMPERATURE 55000
|
||||
#define FALLBACK_STATIC_TEMPERATURE 55000
|
||||
#define MAX_FREQ_COUNT 6
|
||||
|
||||
struct dmc_freq_table {
|
||||
unsigned long freq;
|
||||
@@ -90,7 +91,7 @@ struct share_params {
|
||||
u32 update_deskew_cfg;
|
||||
|
||||
u32 freq_count;
|
||||
u32 freq_info_mhz[6];
|
||||
u32 freq_info_mhz[MAX_FREQ_COUNT];
|
||||
u32 wait_mode;
|
||||
u32 vop_scan_line_time_ns;
|
||||
/* if need, add parameter after */
|
||||
@@ -145,7 +146,7 @@ struct rockchip_dmcfreq {
|
||||
unsigned long low_power_rate;
|
||||
|
||||
unsigned long freq_count;
|
||||
unsigned long freq_info_rate[6];
|
||||
unsigned long freq_info_rate[MAX_FREQ_COUNT];
|
||||
unsigned long rate_low;
|
||||
unsigned long rate_mid_low;
|
||||
unsigned long rate_mid_high;
|
||||
@@ -1200,7 +1201,7 @@ static __maybe_unused int rockchip_get_freq_info(struct rockchip_dmcfreq *dmcfre
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (ddr_psci_param->freq_count == 0 || ddr_psci_param->freq_count > 6) {
|
||||
if (ddr_psci_param->freq_count == 0 || ddr_psci_param->freq_count > MAX_FREQ_COUNT) {
|
||||
dev_err(dmcfreq->dev, "it is no available frequencies!\n");
|
||||
return -EPERM;
|
||||
}
|
||||
@@ -1281,7 +1282,7 @@ rockchip_dmcfreq_adjust_opp_table(struct rockchip_dmcfreq *dmcfreq)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (ddr_psci_param->freq_count == 0 || ddr_psci_param->freq_count > 6) {
|
||||
if (ddr_psci_param->freq_count == 0 || ddr_psci_param->freq_count > MAX_FREQ_COUNT) {
|
||||
dev_err(dev, "there is no available frequencies!\n");
|
||||
return -EPERM;
|
||||
}
|
||||
@@ -2348,6 +2349,55 @@ static unsigned long rockchip_freq_level_2_rate(struct rockchip_dmcfreq *dmcfreq
|
||||
return rate;
|
||||
}
|
||||
|
||||
static int rockchip_get_level_map_talbe(struct device_node *np, char *porp_name,
|
||||
struct rockchip_dmcfreq *dmcfreq,
|
||||
struct freq_map_table **table)
|
||||
{
|
||||
struct freq_map_table *tbl;
|
||||
const struct property *prop;
|
||||
unsigned int level = 0;
|
||||
int count, i;
|
||||
|
||||
if (dmcfreq->rate_low == 0)
|
||||
return -EINVAL;
|
||||
|
||||
prop = of_find_property(np, porp_name, NULL);
|
||||
if (!prop)
|
||||
return -EINVAL;
|
||||
|
||||
if (!prop->value)
|
||||
return -ENODATA;
|
||||
|
||||
count = of_property_count_u32_elems(np, porp_name);
|
||||
if (count < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (count % 3)
|
||||
return -EINVAL;
|
||||
|
||||
tbl = kzalloc(sizeof(*tbl) * (count / 3 + 1), GFP_KERNEL);
|
||||
if (!tbl)
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < count / 3; i++) {
|
||||
of_property_read_u32_index(np, porp_name, 3 * i, &tbl[i].min);
|
||||
of_property_read_u32_index(np, porp_name, 3 * i + 1,
|
||||
&tbl[i].max);
|
||||
of_property_read_u32_index(np, porp_name, 3 * i + 2,
|
||||
&level);
|
||||
tbl[i].freq = rockchip_freq_level_2_rate(dmcfreq, level);
|
||||
|
||||
}
|
||||
|
||||
tbl[i].min = 0;
|
||||
tbl[i].max = 0;
|
||||
tbl[i].freq = DMCFREQ_TABLE_END;
|
||||
|
||||
*table = tbl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rockchip_get_system_status_level(struct device_node *np,
|
||||
char *porp_name,
|
||||
struct rockchip_dmcfreq *dmcfreq)
|
||||
@@ -2357,6 +2407,9 @@ static int rockchip_get_system_status_level(struct device_node *np,
|
||||
unsigned long temp_rate = 0;
|
||||
int count, i;
|
||||
|
||||
if (dmcfreq->rate_low == 0)
|
||||
return -EINVAL;
|
||||
|
||||
prop = of_find_property(np, porp_name, NULL);
|
||||
if (!prop)
|
||||
return -ENODEV;
|
||||
@@ -2371,37 +2424,6 @@ static int rockchip_get_system_status_level(struct device_node *np,
|
||||
if (count % 2)
|
||||
return -EINVAL;
|
||||
|
||||
if (dmcfreq->freq_count == 1) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[0];
|
||||
} else if (dmcfreq->freq_count == 2) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[1];
|
||||
} else if (dmcfreq->freq_count == 3) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[2];
|
||||
} else if (dmcfreq->freq_count == 4) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[2];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[3];
|
||||
} else if (dmcfreq->freq_count == 5 || dmcfreq->freq_count == 6) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[dmcfreq->freq_count - 2];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[dmcfreq->freq_count - 1];
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dmcfreq->auto_min_rate = dmcfreq->rate_low;
|
||||
|
||||
for (i = 0; i < count / 2; i++) {
|
||||
of_property_read_u32_index(np, porp_name, 2 * i,
|
||||
&status);
|
||||
@@ -2986,6 +3008,41 @@ static int rockchip_dmcfreq_dmc_init(struct platform_device *pdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rockchip_dmcfreq_level_rate_init(struct rockchip_dmcfreq *dmcfreq)
|
||||
{
|
||||
if (dmcfreq->freq_count == 0 || dmcfreq->freq_count > MAX_FREQ_COUNT)
|
||||
return;
|
||||
|
||||
if (dmcfreq->freq_count == 1) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[0];
|
||||
} else if (dmcfreq->freq_count == 2) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[1];
|
||||
} else if (dmcfreq->freq_count == 3) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[2];
|
||||
} else if (dmcfreq->freq_count == 4) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[2];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[3];
|
||||
} else if (dmcfreq->freq_count == 5 || dmcfreq->freq_count == 6) {
|
||||
dmcfreq->rate_low = dmcfreq->freq_info_rate[0];
|
||||
dmcfreq->rate_mid_low = dmcfreq->freq_info_rate[1];
|
||||
dmcfreq->rate_mid_high = dmcfreq->freq_info_rate[dmcfreq->freq_count - 2];
|
||||
dmcfreq->rate_high = dmcfreq->freq_info_rate[dmcfreq->freq_count - 1];
|
||||
}
|
||||
|
||||
dmcfreq->auto_min_rate = dmcfreq->rate_low;
|
||||
}
|
||||
|
||||
static void rockchip_dmcfreq_parse_dt(struct rockchip_dmcfreq *dmcfreq)
|
||||
{
|
||||
struct device *dev = dmcfreq->dev;
|
||||
@@ -3011,15 +3068,25 @@ static void rockchip_dmcfreq_parse_dt(struct rockchip_dmcfreq *dmcfreq)
|
||||
dmcfreq->auto_min_rate *= 1000;
|
||||
}
|
||||
|
||||
if (rockchip_get_freq_map_talbe(np, "cpu-bw-dmc-freq",
|
||||
&dmcfreq->cpu_bw_tbl))
|
||||
dev_dbg(dev, "failed to get cpu bandwidth to dmc rate\n");
|
||||
if (rockchip_get_freq_map_talbe(np, "vop-frame-bw-dmc-freq",
|
||||
&dmcfreq->info.vop_frame_bw_tbl))
|
||||
dev_dbg(dev, "failed to get vop frame bandwidth to dmc rate\n");
|
||||
if (rockchip_get_freq_map_talbe(np, "vop-bw-dmc-freq",
|
||||
&dmcfreq->info.vop_bw_tbl))
|
||||
dev_err(dev, "failed to get vop bandwidth to dmc rate\n");
|
||||
if (rockchip_get_level_map_talbe(np, "cpu-bw-dmc-level", dmcfreq,
|
||||
&dmcfreq->cpu_bw_tbl)) {
|
||||
if (rockchip_get_freq_map_talbe(np, "cpu-bw-dmc-freq",
|
||||
&dmcfreq->cpu_bw_tbl))
|
||||
dev_dbg(dev, "failed to get cpu bandwidth to dmc rate\n");
|
||||
}
|
||||
if (rockchip_get_level_map_talbe(np, "vop-frame-bw-dmc-level", dmcfreq,
|
||||
&dmcfreq->info.vop_frame_bw_tbl)) {
|
||||
if (rockchip_get_freq_map_talbe(np, "vop-frame-bw-dmc-freq",
|
||||
&dmcfreq->info.vop_frame_bw_tbl))
|
||||
dev_dbg(dev, "failed to get vop frame bandwidth to dmc rate\n");
|
||||
}
|
||||
if (rockchip_get_level_map_talbe(np, "vop-bw-dmc-level", dmcfreq,
|
||||
&dmcfreq->info.vop_bw_tbl)) {
|
||||
if (rockchip_get_freq_map_talbe(np, "vop-bw-dmc-freq",
|
||||
&dmcfreq->info.vop_bw_tbl))
|
||||
dev_err(dev, "failed to get vop bandwidth to dmc rate\n");
|
||||
}
|
||||
|
||||
if (rockchip_get_rl_map_talbe(np, "vop-pn-msch-readlatency",
|
||||
&dmcfreq->info.vop_pn_rl_tbl))
|
||||
dev_err(dev, "failed to get vop pn to msch rl\n");
|
||||
@@ -3257,6 +3324,7 @@ static int rockchip_dmcfreq_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
rockchip_dmcfreq_level_rate_init(data);
|
||||
rockchip_dmcfreq_parse_dt(data);
|
||||
|
||||
platform_set_drvdata(pdev, data);
|
||||
|
||||
@@ -38,6 +38,11 @@
|
||||
* 1. remote sensor Makefile rename module ko
|
||||
* 2. remote sensor rename driver name
|
||||
*
|
||||
* V3.04.00
|
||||
* 1. fix g_mbus_config flag setting error for ISP
|
||||
* 2. support remote raw sensor s_power and s_stream control by cif
|
||||
* 3. support vicap multi channel to multi ISP mode
|
||||
*
|
||||
*/
|
||||
#include <linux/clk.h>
|
||||
#include <linux/i2c.h>
|
||||
@@ -65,7 +70,7 @@
|
||||
|
||||
#include "maxim2c_api.h"
|
||||
|
||||
#define DRIVER_VERSION KERNEL_VERSION(3, 0x02, 0x00)
|
||||
#define DRIVER_VERSION KERNEL_VERSION(3, 0x04, 0x00)
|
||||
|
||||
#define MAXIM2C_NAME "maxim2c"
|
||||
|
||||
@@ -437,6 +442,8 @@ static int maxim2c_module_parse_dt(maxim2c_t *maxim2c)
|
||||
{
|
||||
struct device *dev = &maxim2c->client->dev;
|
||||
struct device_node *node = NULL;
|
||||
u32 value = 0;
|
||||
int ret = 0;
|
||||
|
||||
// maxim serdes local
|
||||
node = of_get_child_by_name(dev->of_node, "serdes-local-device");
|
||||
@@ -454,6 +461,12 @@ static int maxim2c_module_parse_dt(maxim2c_t *maxim2c)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(node, "remote-routing-to-isp", &value);
|
||||
if (ret == 0) {
|
||||
dev_info(dev, "remote-routing-to-isp property: %d\n", value);
|
||||
maxim2c->remote_routing_to_isp = value;
|
||||
}
|
||||
|
||||
/* gmsl link parse dt */
|
||||
maxim2c_link_parse_dt(maxim2c, node);
|
||||
|
||||
|
||||
@@ -82,6 +82,8 @@ typedef struct maxim2c {
|
||||
|
||||
u32 chipid;
|
||||
|
||||
bool remote_routing_to_isp;
|
||||
|
||||
bool streaming;
|
||||
bool power_on;
|
||||
bool hot_plug;
|
||||
|
||||
@@ -336,6 +336,7 @@ static long maxim2c_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
{
|
||||
maxim2c_t *maxim2c = v4l2_get_subdevdata(sd);
|
||||
struct rkmodule_csi_dphy_param *dphy_param;
|
||||
struct rkmodule_capture_info *capture_info;
|
||||
long ret = 0;
|
||||
|
||||
dev_dbg(&maxim2c->client->dev, "ioctl cmd = 0x%08x\n", cmd);
|
||||
@@ -362,6 +363,13 @@ static long maxim2c_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
*dphy_param = rk3588_dcphy_param;
|
||||
dev_dbg(&maxim2c->client->dev, "get dcphy param\n");
|
||||
break;
|
||||
case RKMODULE_GET_CAPTURE_MODE:
|
||||
capture_info = (struct rkmodule_capture_info *)arg;
|
||||
if (maxim2c->remote_routing_to_isp != 0)
|
||||
capture_info->mode = RKMODULE_MULTI_CH_TO_MULTI_ISP;
|
||||
else
|
||||
capture_info->mode = RKMODULE_CAPTURE_MODE_NONE;
|
||||
break;
|
||||
default:
|
||||
ret = -ENOIOCTLCMD;
|
||||
break;
|
||||
@@ -378,6 +386,7 @@ static long maxim2c_compat_ioctl32(struct v4l2_subdev *sd, unsigned int cmd,
|
||||
struct rkmodule_inf *inf;
|
||||
struct rkmodule_vicap_reset_info *vicap_rst_inf;
|
||||
struct rkmodule_csi_dphy_param *dphy_param;
|
||||
struct rkmodule_capture_info *capture_info;
|
||||
long ret = 0;
|
||||
|
||||
switch (cmd) {
|
||||
@@ -454,6 +463,22 @@ static long maxim2c_compat_ioctl32(struct v4l2_subdev *sd, unsigned int cmd,
|
||||
}
|
||||
kfree(dphy_param);
|
||||
break;
|
||||
case RKMODULE_GET_CAPTURE_MODE:
|
||||
capture_info = kzalloc(sizeof(*capture_info), GFP_KERNEL);
|
||||
if (!capture_info) {
|
||||
ret = -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = maxim2c_ioctl(sd, cmd, capture_info);
|
||||
if (!ret) {
|
||||
ret = copy_to_user(up, capture_info,
|
||||
sizeof(*capture_info));
|
||||
if (ret)
|
||||
ret = -EFAULT;
|
||||
}
|
||||
kfree(capture_info);
|
||||
break;
|
||||
default:
|
||||
ret = -ENOIOCTLCMD;
|
||||
break;
|
||||
@@ -492,10 +517,14 @@ static int __maxim2c_start_stream(maxim2c_t *maxim2c)
|
||||
|
||||
#if (MAXIM2C_TEST_PATTERN == 0)
|
||||
// remote devices power on
|
||||
ret = maxim2c_remote_devices_power(maxim2c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices power on error\n");
|
||||
return ret;
|
||||
if (maxim2c->remote_routing_to_isp == 0) {
|
||||
ret = maxim2c_remote_devices_power(maxim2c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices power on error\n");
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
dev_info(dev, "remote devices power on by cif\n");
|
||||
}
|
||||
#endif /* MAXIM2C_TEST_PATTERN */
|
||||
|
||||
@@ -516,10 +545,14 @@ static int __maxim2c_start_stream(maxim2c_t *maxim2c)
|
||||
|
||||
#if (MAXIM2C_TEST_PATTERN == 0)
|
||||
// remote devices start stream
|
||||
ret = maxim2c_remote_devices_s_stream(maxim2c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices start stream error\n");
|
||||
return ret;
|
||||
if (maxim2c->remote_routing_to_isp == 0) {
|
||||
ret = maxim2c_remote_devices_s_stream(maxim2c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices start stream error\n");
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
dev_info(dev, "remote devices start stream by cif\n");
|
||||
}
|
||||
#endif /* MAXIM2C_TEST_PATTERN */
|
||||
|
||||
@@ -603,10 +636,14 @@ static int __maxim2c_stop_stream(maxim2c_t *maxim2c)
|
||||
ret |= maxim2c_video_pipe_mask_enable(maxim2c, pipe_mask, false);
|
||||
|
||||
#if (MAXIM2C_TEST_PATTERN == 0)
|
||||
// remote devices stop stream
|
||||
ret |= maxim2c_remote_devices_s_stream(maxim2c, link_mask, 0);
|
||||
// remote devices power off
|
||||
ret |= maxim2c_remote_devices_power(maxim2c, link_mask, 0);
|
||||
if (maxim2c->remote_routing_to_isp == 0) {
|
||||
// remote devices stop stream
|
||||
ret |= maxim2c_remote_devices_s_stream(maxim2c, link_mask, 0);
|
||||
// remote devices power off
|
||||
ret |= maxim2c_remote_devices_power(maxim2c, link_mask, 0);
|
||||
} else {
|
||||
dev_info(dev, "remote devices control by cif\n");
|
||||
}
|
||||
#endif /* MAXIM2C_TEST_PATTERN */
|
||||
|
||||
// i2c mux enable: default disable all remote channel
|
||||
@@ -891,13 +928,15 @@ static int maxim2c_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
|
||||
{
|
||||
maxim2c_t *maxim2c = v4l2_get_subdevdata(sd);
|
||||
u32 val = 0;
|
||||
const struct maxim2c_mode *mode = maxim2c->cur_mode;
|
||||
u8 data_lanes = maxim2c->bus_cfg.bus.mipi_csi2.num_data_lanes;
|
||||
int i = 0;
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
val |= (1 << (data_lanes - 1));
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CHANNEL_3 | V4L2_MBUS_CSI2_CHANNEL_2 |
|
||||
V4L2_MBUS_CSI2_CHANNEL_1 | V4L2_MBUS_CSI2_CHANNEL_0;
|
||||
for (i = 0; i < PAD_MAX; i++)
|
||||
val |= (mode->vc[i] & V4L2_MBUS_CSI2_CHANNELS);
|
||||
|
||||
config->type = V4L2_MBUS_CSI2_DPHY;
|
||||
config->flags = val;
|
||||
@@ -910,13 +949,15 @@ static int maxim2c_g_mbus_config(struct v4l2_subdev *sd,
|
||||
{
|
||||
maxim2c_t *maxim2c = v4l2_get_subdevdata(sd);
|
||||
u32 val = 0;
|
||||
const struct maxim2c_mode *mode = maxim2c->cur_mode;
|
||||
u8 data_lanes = maxim2c->bus_cfg.bus.mipi_csi2.num_data_lanes;
|
||||
int i = 0;
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
val |= (1 << (data_lanes - 1));
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CHANNEL_3 | V4L2_MBUS_CSI2_CHANNEL_2 |
|
||||
V4L2_MBUS_CSI2_CHANNEL_1 | V4L2_MBUS_CSI2_CHANNEL_0;
|
||||
for (i = 0; i < PAD_MAX; i++)
|
||||
val |= (mode->vc[i] & V4L2_MBUS_CSI2_CHANNELS);
|
||||
|
||||
config->type = V4L2_MBUS_CSI2;
|
||||
config->flags = val;
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
* 1. remote sensor Makefile rename module ko
|
||||
* 2. remote sensor rename driver name
|
||||
*
|
||||
* V3.04.00
|
||||
* 1. fix g_mbus_config flag setting error for ISP
|
||||
* 2. support remote raw sensor s_power and s_stream control by cif
|
||||
* 3. support vicap multi channel to multi ISP mode
|
||||
*
|
||||
*/
|
||||
#include <linux/clk.h>
|
||||
#include <linux/i2c.h>
|
||||
@@ -88,7 +93,7 @@
|
||||
|
||||
#include "maxim4c_api.h"
|
||||
|
||||
#define DRIVER_VERSION KERNEL_VERSION(3, 0x02, 0x00)
|
||||
#define DRIVER_VERSION KERNEL_VERSION(3, 0x04, 0x00)
|
||||
|
||||
#define MAXIM4C_NAME "maxim4c"
|
||||
|
||||
@@ -527,6 +532,8 @@ static int maxim4c_module_parse_dt(maxim4c_t *maxim4c)
|
||||
{
|
||||
struct device *dev = &maxim4c->client->dev;
|
||||
struct device_node *node = NULL;
|
||||
u32 value = 0;
|
||||
int ret = 0;
|
||||
|
||||
// maxim serdes local
|
||||
node = of_get_child_by_name(dev->of_node, "serdes-local-device");
|
||||
@@ -544,6 +551,12 @@ static int maxim4c_module_parse_dt(maxim4c_t *maxim4c)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = of_property_read_u32(node, "remote-routing-to-isp", &value);
|
||||
if (ret == 0) {
|
||||
dev_info(dev, "remote-routing-to-isp property: %d\n", value);
|
||||
maxim4c->remote_routing_to_isp = value;
|
||||
}
|
||||
|
||||
/* gmsl link parse dt */
|
||||
maxim4c_link_parse_dt(maxim4c, node);
|
||||
|
||||
|
||||
@@ -88,6 +88,8 @@ typedef struct maxim4c {
|
||||
|
||||
u32 chipid;
|
||||
|
||||
bool remote_routing_to_isp;
|
||||
|
||||
bool streaming;
|
||||
bool power_on;
|
||||
bool hot_plug;
|
||||
|
||||
@@ -336,6 +336,7 @@ static long maxim4c_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
{
|
||||
maxim4c_t *maxim4c = v4l2_get_subdevdata(sd);
|
||||
struct rkmodule_csi_dphy_param *dphy_param;
|
||||
struct rkmodule_capture_info *capture_info;
|
||||
long ret = 0;
|
||||
|
||||
dev_dbg(&maxim4c->client->dev, "ioctl cmd = 0x%08x\n", cmd);
|
||||
@@ -362,6 +363,13 @@ static long maxim4c_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
*dphy_param = rk3588_dcphy_param;
|
||||
dev_dbg(&maxim4c->client->dev, "get dcphy param\n");
|
||||
break;
|
||||
case RKMODULE_GET_CAPTURE_MODE:
|
||||
capture_info = (struct rkmodule_capture_info *)arg;
|
||||
if (maxim4c->remote_routing_to_isp != 0)
|
||||
capture_info->mode = RKMODULE_MULTI_CH_TO_MULTI_ISP;
|
||||
else
|
||||
capture_info->mode = RKMODULE_CAPTURE_MODE_NONE;
|
||||
break;
|
||||
default:
|
||||
ret = -ENOIOCTLCMD;
|
||||
break;
|
||||
@@ -378,6 +386,7 @@ static long maxim4c_compat_ioctl32(struct v4l2_subdev *sd, unsigned int cmd,
|
||||
struct rkmodule_inf *inf;
|
||||
struct rkmodule_vicap_reset_info *vicap_rst_inf;
|
||||
struct rkmodule_csi_dphy_param *dphy_param;
|
||||
struct rkmodule_capture_info *capture_info;
|
||||
long ret = 0;
|
||||
|
||||
switch (cmd) {
|
||||
@@ -454,6 +463,22 @@ static long maxim4c_compat_ioctl32(struct v4l2_subdev *sd, unsigned int cmd,
|
||||
}
|
||||
kfree(dphy_param);
|
||||
break;
|
||||
case RKMODULE_GET_CAPTURE_MODE:
|
||||
capture_info = kzalloc(sizeof(*capture_info), GFP_KERNEL);
|
||||
if (!capture_info) {
|
||||
ret = -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = maxim4c_ioctl(sd, cmd, capture_info);
|
||||
if (!ret) {
|
||||
ret = copy_to_user(up, capture_info,
|
||||
sizeof(*capture_info));
|
||||
if (ret)
|
||||
ret = -EFAULT;
|
||||
}
|
||||
kfree(capture_info);
|
||||
break;
|
||||
default:
|
||||
ret = -ENOIOCTLCMD;
|
||||
break;
|
||||
@@ -492,10 +517,14 @@ static int __maxim4c_start_stream(maxim4c_t *maxim4c)
|
||||
|
||||
#if (MAXIM4C_TEST_PATTERN == 0)
|
||||
// remote devices power on
|
||||
ret = maxim4c_remote_devices_power(maxim4c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices power on error\n");
|
||||
return ret;
|
||||
if (maxim4c->remote_routing_to_isp == 0) {
|
||||
ret = maxim4c_remote_devices_power(maxim4c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices power on error\n");
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
dev_info(dev, "remote devices power on by cif\n");
|
||||
}
|
||||
#endif /* MAXIM4C_TEST_PATTERN */
|
||||
|
||||
@@ -516,10 +545,14 @@ static int __maxim4c_start_stream(maxim4c_t *maxim4c)
|
||||
|
||||
#if (MAXIM4C_TEST_PATTERN == 0)
|
||||
// remote devices start stream
|
||||
ret = maxim4c_remote_devices_s_stream(maxim4c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices start stream error\n");
|
||||
return ret;
|
||||
if (maxim4c->remote_routing_to_isp == 0) {
|
||||
ret = maxim4c_remote_devices_s_stream(maxim4c, link_mask, 1);
|
||||
if (ret) {
|
||||
dev_err(dev, "remote devices start stream error\n");
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
dev_info(dev, "remote devices start stream by cif\n");
|
||||
}
|
||||
#endif /* MAXIM4C_TEST_PATTERN */
|
||||
|
||||
@@ -603,10 +636,14 @@ static int __maxim4c_stop_stream(maxim4c_t *maxim4c)
|
||||
ret |= maxim4c_video_pipe_mask_enable(maxim4c, pipe_mask, false);
|
||||
|
||||
#if (MAXIM4C_TEST_PATTERN == 0)
|
||||
// remote devices stop stream
|
||||
ret |= maxim4c_remote_devices_s_stream(maxim4c, link_mask, 0);
|
||||
// remote devices power off
|
||||
ret |= maxim4c_remote_devices_power(maxim4c, link_mask, 0);
|
||||
if (maxim4c->remote_routing_to_isp == 0) {
|
||||
// remote devices stop stream
|
||||
ret |= maxim4c_remote_devices_s_stream(maxim4c, link_mask, 0);
|
||||
// remote devices power off
|
||||
ret |= maxim4c_remote_devices_power(maxim4c, link_mask, 0);
|
||||
} else {
|
||||
dev_info(dev, "remote devices control by cif\n");
|
||||
}
|
||||
#endif /* MAXIM4C_TEST_PATTERN */
|
||||
|
||||
// i2c mux enable: default disable all remote channel
|
||||
@@ -888,13 +925,15 @@ static int maxim4c_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
|
||||
{
|
||||
maxim4c_t *maxim4c = v4l2_get_subdevdata(sd);
|
||||
u32 val = 0;
|
||||
const struct maxim4c_mode *mode = maxim4c->cur_mode;
|
||||
u8 data_lanes = maxim4c->bus_cfg.bus.mipi_csi2.num_data_lanes;
|
||||
int i = 0;
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
val |= (1 << (data_lanes - 1));
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CHANNEL_3 | V4L2_MBUS_CSI2_CHANNEL_2 |
|
||||
V4L2_MBUS_CSI2_CHANNEL_1 | V4L2_MBUS_CSI2_CHANNEL_0;
|
||||
for (i = 0; i < PAD_MAX; i++)
|
||||
val |= (mode->vc[i] & V4L2_MBUS_CSI2_CHANNELS);
|
||||
|
||||
config->type = V4L2_MBUS_CSI2_DPHY;
|
||||
config->flags = val;
|
||||
@@ -907,13 +946,15 @@ static int maxim4c_g_mbus_config(struct v4l2_subdev *sd,
|
||||
{
|
||||
maxim4c_t *maxim4c = v4l2_get_subdevdata(sd);
|
||||
u32 val = 0;
|
||||
const struct maxim4c_mode *mode = maxim4c->cur_mode;
|
||||
u8 data_lanes = maxim4c->bus_cfg.bus.mipi_csi2.num_data_lanes;
|
||||
int i = 0;
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
val |= (1 << (data_lanes - 1));
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CHANNEL_3 | V4L2_MBUS_CSI2_CHANNEL_2 |
|
||||
V4L2_MBUS_CSI2_CHANNEL_1 | V4L2_MBUS_CSI2_CHANNEL_0;
|
||||
for (i = 0; i < PAD_MAX; i++)
|
||||
val |= (mode->vc[i] & V4L2_MBUS_CSI2_CHANNELS);
|
||||
|
||||
config->type = V4L2_MBUS_CSI2;
|
||||
config->flags = val;
|
||||
|
||||
@@ -83,4 +83,13 @@ config VIDEO_MAXIM_CAM_OX03J10
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called ox03j10.
|
||||
|
||||
config VIDEO_MAXIM_CAM_OS04A10
|
||||
tristate "Maxim Remote Sensor os04a10 support"
|
||||
depends on VIDEO_MAXIM_SERDES
|
||||
help
|
||||
This driver supports the remote sensor os04a10.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called os04a10.
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -9,9 +9,11 @@ maxim-sc320at-objs := sc320at.o
|
||||
maxim-ox01f10-objs := ox01f10.o
|
||||
maxim-ov231x-objs := ov231x.o
|
||||
maxim-ox03j10-objs := ox03j10.o
|
||||
maxim-os04a10-objs := os04a10.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_MAXIM_CAM_DUMMY) += maxim-dummy.o
|
||||
obj-$(CONFIG_VIDEO_MAXIM_CAM_SC320AT) += maxim-sc320at.o
|
||||
obj-$(CONFIG_VIDEO_MAXIM_CAM_OX01F10) += maxim-ox01f10.o
|
||||
obj-$(CONFIG_VIDEO_MAXIM_CAM_OV231X) += maxim-ov231x.o
|
||||
obj-$(CONFIG_VIDEO_MAXIM_CAM_OX03J10) += maxim-ox03j10.o
|
||||
obj-$(CONFIG_VIDEO_MAXIM_CAM_OS04A10) += maxim-os04a10.o
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "maxim_remote.h"
|
||||
|
||||
#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x01)
|
||||
#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x02)
|
||||
|
||||
#ifndef V4L2_CID_DIGITAL_GAIN
|
||||
#define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN
|
||||
@@ -166,14 +166,8 @@ static const struct sensor_mode supported_modes[] = {
|
||||
.reg_list = sensor_1920x1080_30fps_init_regs,
|
||||
#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
|
||||
.vc[PAD0] = 0,
|
||||
.vc[PAD1] = 1,
|
||||
.vc[PAD2] = 2,
|
||||
.vc[PAD3] = 3,
|
||||
#else
|
||||
.vc[PAD0] = V4L2_MBUS_CSI2_CHANNEL_0,
|
||||
.vc[PAD1] = V4L2_MBUS_CSI2_CHANNEL_1,
|
||||
.vc[PAD2] = V4L2_MBUS_CSI2_CHANNEL_2,
|
||||
.vc[PAD3] = V4L2_MBUS_CSI2_CHANNEL_3,
|
||||
#endif /* LINUX_VERSION_CODE */
|
||||
},
|
||||
};
|
||||
@@ -973,13 +967,15 @@ static int sensor_g_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
|
||||
{
|
||||
struct sensor *sensor = v4l2_get_subdevdata(sd);
|
||||
u32 val = 0;
|
||||
const struct sensor_mode *mode = sensor->cur_mode;
|
||||
u8 data_lanes = sensor->bus_cfg.bus.mipi_csi2.num_data_lanes;
|
||||
int i = 0;
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
val |= (1 << (data_lanes - 1));
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CHANNEL_3 | V4L2_MBUS_CSI2_CHANNEL_2 |
|
||||
V4L2_MBUS_CSI2_CHANNEL_1 | V4L2_MBUS_CSI2_CHANNEL_0;
|
||||
for (i = 0; i < PAD_MAX; i++)
|
||||
val |= (mode->vc[i] & V4L2_MBUS_CSI2_CHANNELS);
|
||||
|
||||
config->type = V4L2_MBUS_CSI2_DPHY;
|
||||
config->flags = val;
|
||||
@@ -992,13 +988,15 @@ static int sensor_g_mbus_config(struct v4l2_subdev *sd,
|
||||
{
|
||||
struct sensor *sensor = v4l2_get_subdevdata(sd);
|
||||
u32 val = 0;
|
||||
const struct sensor_mode *mode = sensor->cur_mode;
|
||||
u8 data_lanes = sensor->bus_cfg.bus.mipi_csi2.num_data_lanes;
|
||||
int i = 0;
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
|
||||
val |= (1 << (data_lanes - 1));
|
||||
|
||||
val |= V4L2_MBUS_CSI2_CHANNEL_3 | V4L2_MBUS_CSI2_CHANNEL_2 |
|
||||
V4L2_MBUS_CSI2_CHANNEL_1 | V4L2_MBUS_CSI2_CHANNEL_0;
|
||||
for (i = 0; i < PAD_MAX; i++)
|
||||
val |= (mode->vc[i] & V4L2_MBUS_CSI2_CHANNELS);
|
||||
|
||||
config->type = V4L2_MBUS_CSI2;
|
||||
config->flags = val;
|
||||
|
||||
3074
drivers/media/i2c/maxim/remote/os04a10.c
Normal file
3074
drivers/media/i2c/maxim/remote/os04a10.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user