media: i2c: maxim4c: driver version v2.02.00

1. Force all MIPI clocks running Setting in csi out enable.
2. Pattern mode force_clock_out_en default enable.

Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I44e89309704cba4ee5d03762b9b42fad4bc92af6
This commit is contained in:
Cai Wenzhong
2023-09-18 17:54:34 +08:00
parent 83d56e1a33
commit bad8789647
2 changed files with 16 additions and 3 deletions

View File

@@ -220,11 +220,22 @@ int maxim4c_mipi_csi_output(maxim4c_t *maxim4c, bool enable)
{
struct i2c_client *client = maxim4c->client;
struct device *dev = &client->dev;
maxim4c_mipi_txphy_t *mipi_txphy = &maxim4c->mipi_txphy;
u8 reg_mask = 0, reg_value = 0;
int ret = 0;
dev_dbg(dev, "%s: enable = %d\n", __func__, enable);
if (mipi_txphy->force_clock_out_en != 0) {
reg_mask = BIT(7);
reg_value = enable ? BIT(7) : 0;
// Force all MIPI clocks running Config
ret |= maxim4c_i2c_update_byte(client,
0x08A0, MAXIM4C_I2C_REG_ADDR_16BITS,
reg_mask, reg_value);
}
/* Bit1 of the register 0x040B: CSI_OUT_EN
* 1 = CSI output enabled
* 0 = CSI output disabled
@@ -484,9 +495,6 @@ int maxim4c_mipi_txphy_hw_init(maxim4c_t *maxim4c)
phy_cfg->clock_master = 1;
break;
}
// MIPI clocks running mode
if (mipi_txphy->force_clock_out_en != 0)
mode |= BIT(7);
// MIPI TXPHY Mode setting
ret |= maxim4c_i2c_write_byte(client,

View File

@@ -280,6 +280,7 @@ int maxim4c_pattern_data_init(maxim4c_t *maxim4c)
struct device_node *node = NULL;
struct maxim4c_mode *supported_mode = NULL;
struct maxim4c_pattern *pattern = NULL;
maxim4c_mipi_txphy_t *mipi_txphy = &maxim4c->mipi_txphy;
int ret = 0;
// maxim serdes local
@@ -306,6 +307,10 @@ int maxim4c_pattern_data_init(maxim4c_t *maxim4c)
return ret;
}
// pattern need enable force_clock_out_en
dev_info(dev, "Pattern mode force_clock_out_en default enable\n");
mipi_txphy->force_clock_out_en = 1;
// pattern generator and mode init
pattern = &maxim4c->pattern;
pattern->pattern_generator = PATTERN_GENERATOR_0;