mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
atv_demod: add xtal config for tuner [1/3]
PD#171245: add xtal config for tuner Change-Id: Id682294ea1e0de265df56509fa5fc4480212f7a7 Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
This commit is contained in:
@@ -418,7 +418,8 @@
|
||||
tuner_name = "r842_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0xf6>;
|
||||
tuner_xtal = <3>;
|
||||
tuner_xtal = <1>; /* 0: 16MHz, 1: 24MHz, 3: 27MHz */
|
||||
tuner_xtal_mode = <3>;
|
||||
/* NO_SHARE_XTAL(0)
|
||||
* MASTER_TO_SLAVE_XTAL_IN(1)
|
||||
* MASTER_TO_SLAVE_XTAL_OUT(2)
|
||||
|
||||
@@ -419,7 +419,8 @@
|
||||
tuner_name = "r842_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0xf6>;
|
||||
tuner_xtal = <3>;
|
||||
tuner_xtal = <1>; /* 0: 16MHz, 1: 24MHz, 3: 27MHz */
|
||||
tuner_xtal_mode = <3>;
|
||||
/* NO_SHARE_XTAL(0)
|
||||
* MASTER_TO_SLAVE_XTAL_IN(1)
|
||||
* MASTER_TO_SLAVE_XTAL_OUT(2)
|
||||
|
||||
@@ -410,7 +410,8 @@
|
||||
tuner_name = "si2151_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0x60>;
|
||||
/* tuner_xtal = <0>; */
|
||||
/* tuner_xtal = <0>; */ /* unuse for si2151 */
|
||||
/* tuner_xtal_mode = <0>; */
|
||||
/* tuner_xtal_cap = <0>; */
|
||||
};
|
||||
|
||||
|
||||
@@ -409,7 +409,8 @@
|
||||
tuner_name = "r842_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0xf6>;
|
||||
tuner_xtal = <0>;
|
||||
tuner_xtal = <1>; /* 0: 16MHz, 1: 24MHz, 3: 27MHz */
|
||||
tuner_xtal_mode = <0>;
|
||||
/* NO_SHARE_XTAL(0)
|
||||
* MASTER_TO_SLAVE_XTAL_IN(1)
|
||||
* MASTER_TO_SLAVE_XTAL_OUT(2)
|
||||
|
||||
@@ -610,7 +610,8 @@
|
||||
tuner_name = "si2151_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0x60>;
|
||||
/* tuner_xtal = <0>; */
|
||||
/* tuner_xtal = <0>; */ /* unuse for si2151 */
|
||||
/* tuner_xtal_mode = <0>; */
|
||||
/* tuner_xtal_cap = <0>; */
|
||||
};
|
||||
|
||||
|
||||
@@ -653,7 +653,8 @@
|
||||
tuner_name = "si2151_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0x60>;
|
||||
/* tuner_xtal = <0>; */
|
||||
/* tuner_xtal = <0>; */ /* unuse for si2151 */
|
||||
/* tuner_xtal_mode = <0>; */
|
||||
/* tuner_xtal_cap = <0>; */
|
||||
};
|
||||
|
||||
|
||||
@@ -603,8 +603,12 @@
|
||||
tuner_name = "mxl661_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0x60>;
|
||||
/* tuner_xtal = <0>; */
|
||||
/* tuner_xtal_cap = <0>; */
|
||||
tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */
|
||||
tuner_xtal_mode = <0>;
|
||||
/* NO_SHARE_XTAL(0)
|
||||
* SLAVE_XTAL_SHARE(1)
|
||||
*/
|
||||
tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */
|
||||
};
|
||||
|
||||
atv-demod {
|
||||
|
||||
@@ -603,8 +603,12 @@
|
||||
tuner_name = "mxl661_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0x60>;
|
||||
/* tuner_xtal = <0>; */
|
||||
/* tuner_xtal_cap = <0>; */
|
||||
tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */
|
||||
tuner_xtal_mode = <0>;
|
||||
/* NO_SHARE_XTAL(0)
|
||||
* SLAVE_XTAL_SHARE(1)
|
||||
*/
|
||||
tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */
|
||||
};
|
||||
|
||||
atv-demod {
|
||||
|
||||
@@ -602,8 +602,12 @@
|
||||
tuner_name = "mxl661_tuner";
|
||||
tuner_i2c_adap = <&i2c1>;
|
||||
tuner_i2c_addr = <0x60>;
|
||||
/* tuner_xtal = <0>; */
|
||||
/* tuner_xtal_cap = <0>; */
|
||||
tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */
|
||||
tuner_xtal_mode = <0>;
|
||||
/* NO_SHARE_XTAL(0)
|
||||
* SLAVE_XTAL_SHARE(1)
|
||||
*/
|
||||
tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */
|
||||
};
|
||||
|
||||
atv-demod {
|
||||
|
||||
@@ -458,11 +458,17 @@ static void aml_atvdemod_dt_parse(struct aml_atvdemod_device *pdev)
|
||||
else
|
||||
pdev->tuner_xtal = val;
|
||||
|
||||
ret = of_property_read_u32(node_tuner, "tuner_xtal_mode", &val);
|
||||
if (ret)
|
||||
pr_err("can't find tuner_xtal_mode.\n");
|
||||
else
|
||||
pdev->tuner_xtal_mode = val;
|
||||
|
||||
ret = of_property_read_u32(node_tuner, "tuner_xtal_cap", &val);
|
||||
if (ret)
|
||||
pr_err("can't find tuner_xtal_cap.\n");
|
||||
else
|
||||
pdev->tuner_xtal = val;
|
||||
pdev->tuner_xtal_cap = val;
|
||||
|
||||
of_node_put(node_tuner);
|
||||
}
|
||||
@@ -491,6 +497,7 @@ int aml_attach_demod_tuner(struct aml_atvdemod_device *dev)
|
||||
cfg.id = dev->tuner_id;
|
||||
cfg.i2c_addr = dev->i2c_addr;
|
||||
cfg.xtal = dev->tuner_xtal;
|
||||
cfg.xtal_mode = dev->tuner_xtal_mode;
|
||||
cfg.xtal_cap = dev->tuner_xtal_cap;
|
||||
|
||||
if (!dev->tuner_attached) {
|
||||
|
||||
@@ -41,6 +41,7 @@ struct aml_atvdemod_device {
|
||||
|
||||
unsigned int tuner_id;
|
||||
unsigned int tuner_xtal;
|
||||
unsigned int tuner_xtal_mode;
|
||||
unsigned int tuner_xtal_cap;
|
||||
unsigned int i2c_addr;
|
||||
unsigned int i2c_adapter_id;
|
||||
|
||||
@@ -144,8 +144,9 @@ enum tuner_type {
|
||||
struct tuner_config {
|
||||
u8 id;
|
||||
u8 i2c_addr;
|
||||
u8 xtal;
|
||||
u8 xtal; /* 0: 16MHz, 1: 24MHz, 3: 27MHz */
|
||||
u8 xtal_cap;
|
||||
u8 xtal_mode;
|
||||
};
|
||||
|
||||
extern struct dvb_frontend *mxl661_attach(struct dvb_frontend *fe,
|
||||
|
||||
Reference in New Issue
Block a user