Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/amlogic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ dtb-y += sc2_s905x4_buzztv_x5_2g.dtb
dtb-y += sc2_s905x4_buzztv_x5_2g_1gbit.dtb
dtb-y += sc2_s905x4_buzztv_x5_4g.dtb
dtb-y += sc2_s905x4_buzztv_x5_4g_1gbit.dtb
dtb-y += sc2_s905x4_mecool_kt1.dtb
dtb-y += sc2_s905x4_sei_smb_280_id5.dtb
dtb-y += sc2_s905x4_sei_smb_280_id6.dtb
dtb-y += sc2_s905x4_sei_smb_280_id7.dtb
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/amlogic/coreelec_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
pinctrl-0 = <&remote_pins>;
protocol = <REMOTE_TYPE_NEC>;
max_frame_time = <200>; /*set software decoder max frame time*/
led_blink = <1>;
};

openvfd {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/amlogic/coreelec_sc2_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
key_name = "power";
key_code = <116>;
};

/delete-node/ gpio_leds;
};

&aml_wifi {
Expand Down
116 changes: 116 additions & 0 deletions arch/arm64/boot/dts/amlogic/sc2_s905x4_mecool_kt1.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#include "sc2_s905x4_ah212_drm.dts"
#include "coreelec_sc2_common.dtsi"

/ {
model = "Mecool KT1";
coreelec-dt-id = "sc2_s905x4_mecool_kt1";

auge_sound {
/delete-property/ avout_mute-gpios;
};

gpioleds {
sys_led {
label = "sys_led";
gpios = <&gpio GPIOD_11 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "default-on";
};
net_led {
label = "net_led";
gpios=<&gpio GPIOD_4 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "none";
};
rc_led {
label = "rc_led";
gpios=<&gpio GPIOD_6 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "rc-feedback";
};
};

gpio_keypad {
status = "disabled";
};

/delete-node/ dvb-extern;
dvb-extern {
compatible = "amlogic, dvb-extern";
dev_name = "dvb-extern";
status = "okay";

fe_num = <1>;
fe0_demod = "avl68xx";
fe0_i2c_adap_id = <&i2c3>;
fe0_demod_i2c_addr = <0x14>;
fe0_ts_out_mode = <1>;
fe0_ts = <1>;
fe0_tuner0 = <0>;

tuner_num = <1>;
tuner0_name = "mxl603_tuner";
tuner0_i2c_adap = <&i2c3>;
tuner0_i2c_addr = <0x60>;
tuner0_xtal = <0>;
tuner0_if_hz = <6>;
tuner0_if_agc = <0>;
tuner0_xtal_cap = <25>;
tuner0_if_invert = <1>;
tuner0_lt_out = <0>;
tuner0_xtal_mode = <0>;
tuner0_dual_power = <0>;
};

/delete-node/ dvb-demux;
dvb-demux {
compatible = "amlogic sc2, dvb-demux";
dev_name = "dvb-demux";
status = "okay";

reg = <0x0 0xfe000000 0x0 0x480000>;

dmxdev_num = <3>;

tsn_from = "demod";
ts_clone = <0>;
tee_compat = <1>;

ts1_sid = <0x20>;
ts1 = "parallel";
ts1_control = <0>;
ts1_invert = <0>;

pinctrl-names = "p_ts1";
pinctrl-0 = <&dvb_p_ts1_pins>;
};
};

&i2c2 {
status = "disabled";
};

&i2c3 {
status = "okay";
};

&sd_emmc_b {
max-frequency = <150000000>;
};

&periphs_pinctrl {
dvb_p_ts1_pins: dvb_p_ts1_pins {
tsin_b {
groups = "tsin_b_sop",
"tsin_b_valid",
"tsin_b_clk",
"tsin_b_fail",
"tsin_b_din0",
"tsin_b_din1",
"tsin_b_din2",
"tsin_b_din3",
"tsin_b_din4",
"tsin_b_din5",
"tsin_b_din6",
"tsin_b_din7";
function = "tsin_b";
};
};
};
2 changes: 0 additions & 2 deletions arch/arm64/boot/dts/amlogic/sc2_s905x4_ugoos_x4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
model = "Ugoos X4";
coreelec-dt-id = "sc2_s905x4_ugoos_x4";

/delete-node/ gpio_leds;

gpioleds {
/delete-node/ net_red;
/delete-node/ net_green;
Expand Down
6 changes: 0 additions & 6 deletions drivers/dvb/aml_dtvdemod.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ static const struct demod_module demod_modules[] = {
.register_frontend = aml_dvb_register_frontend,
.unregister_frontend = aml_dvb_unregister_frontend
},
#ifdef DEMOD_UNUSED
{
.name = "m1",
.id = AM_DTV_DEMOD_M1,
Expand All @@ -64,7 +63,6 @@ static const struct demod_module demod_modules[] = {
.register_frontend = aml_dvb_register_frontend,
.unregister_frontend = aml_dvb_unregister_frontend
},
#endif //DEMOD_UNUSED
{
.name = "avl6211",
.id = AM_DTV_DEMOD_AVL6211,
Expand All @@ -89,7 +87,6 @@ static const struct demod_module demod_modules[] = {
.register_frontend = aml_dvb_register_frontend,
.unregister_frontend = aml_dvb_unregister_frontend
},
#ifdef DEMOD_UNUSED
{
.name = "ite9173",
.id = AM_DTV_DEMOD_ITE9173,
Expand Down Expand Up @@ -162,7 +159,6 @@ static const struct demod_module demod_modules[] = {
.register_frontend = aml_dvb_register_frontend,
.unregister_frontend = aml_dvb_unregister_frontend
},
#endif //DEMOD_UNUSED
{
.name = "atbm8881",
.id = AM_DTV_DEMOD_ATBM8881,
Expand Down Expand Up @@ -247,7 +243,6 @@ static const struct demod_module demod_modules[] = {
.register_frontend = aml_dvb_register_frontend,
.unregister_frontend = aml_dvb_unregister_frontend
},
#ifdef DEMOD_UNUSED
{
.name = "mxl212c",
.id = AM_DTV_DEMOD_MXL212C,
Expand Down Expand Up @@ -320,7 +315,6 @@ static const struct demod_module demod_modules[] = {
.register_frontend = aml_dvb_register_frontend,
.unregister_frontend = aml_dvb_unregister_frontend
},
#endif //DEMOD_UNUSED
{
.name = "mxl258c", //compatible with mxl212c/213c/214c/252c/254c/256c.
.id = AM_DTV_DEMOD_MXL258C,
Expand Down
4 changes: 0 additions & 4 deletions drivers/dvb/aml_tuner.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ static int aml_tuner_match(const struct tuner_module *module, int std);
static int aml_tuner_detect(const struct tuner_config *cfg);

static const struct tuner_module tuner_modules[] = {
#ifdef TUNER_UNUSED
{
.name = "si2176",
.id = AM_TUNER_SI2176,
Expand Down Expand Up @@ -98,7 +97,6 @@ static const struct tuner_module tuner_modules[] = {
.match = aml_tuner_match,
.detect = aml_tuner_detect
},
#endif //TUNER_UNUSED
{
.name = "r840",
.id = AM_TUNER_R840,
Expand All @@ -116,7 +114,6 @@ static const struct tuner_module tuner_modules[] = {
.match = aml_tuner_match,
.detect = aml_tuner_detect
},
#ifdef TUNER_UNUSED
{
.name = "si2157",
.id = AM_TUNER_SI2157,
Expand All @@ -134,7 +131,6 @@ static const struct tuner_module tuner_modules[] = {
.match = aml_tuner_match,
.detect = aml_tuner_detect
},
#endif //TUNER_UNUSED
{
.name = "si2151",
.id = AM_TUNER_SI2151,
Expand Down
32 changes: 27 additions & 5 deletions drivers/dvb/demux/aml_dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,16 @@ static int force_tsn_source;

int is_security_dmx;

static void demux_config_pipeline(int cfg_demod_tsn, int cfg_tsn_out)
static void demux_config_pipeline(int cfg_demod_tsn, int cfg_tsn_out, int tee_compat)
{
u32 value = 0;
int ret = 0;

if (tee_compat) {
tee_demux_config_pipeline(cfg_demod_tsn, cfg_tsn_out);
return;
}

value = cfg_demod_tsn;
value += cfg_tsn_out << 1;

Expand Down Expand Up @@ -332,7 +337,7 @@ ssize_t tsn_source_store(struct class *class,
// pr_dbg("tsn_in:%d, tsn_out:%d\n", tsn_in_reg, tsn_out);
advb->dsc_pipeline = tsn_in_reg;
//set demod/local
demux_config_pipeline(tsn_in_reg, tsn_out);
demux_config_pipeline(tsn_in_reg, tsn_out, advb->tee_compat);

mutex_unlock(&advb->mutex);
return count;
Expand All @@ -341,6 +346,7 @@ ssize_t tsn_source_store(struct class *class,
int tsn_set_double_out(int flag)
{
int tsn_in_reg = 0;
struct aml_dvb *advb = aml_get_dvb_device();

if (tsn_out == flag)
return 0;
Expand All @@ -350,7 +356,7 @@ int tsn_set_double_out(int flag)
if (tsn_in == INPUT_DEMOD)
tsn_in_reg = 1;

demux_config_pipeline(tsn_in_reg, tsn_out);
demux_config_pipeline(tsn_in_reg, tsn_out, advb->tee_compat);
return 0;
}

Expand All @@ -369,7 +375,7 @@ int tsn_source_force_set(int source)
tsn_in = source;
advb->dsc_pipeline = tsn_in_reg;

demux_config_pipeline(tsn_in_reg, 0);
demux_config_pipeline(tsn_in_reg, 0, advb->tee_compat);
force_tsn_source = 1;
return 0;
}
Expand Down Expand Up @@ -678,6 +684,21 @@ int dmx_get_tsn_flag(struct platform_device *pdev, int *tsn_in, int *tsn_out)
return 0;
}

u32 dmx_get_tee_compat_flag(struct platform_device *pdev)
{
char buf[32];
u32 tee_compat = 0;
int ret = 0;

memset(buf, 0, sizeof(buf));
snprintf(buf, sizeof(buf), "tee_compat");
ret = of_property_read_u32(pdev->dev.of_node, buf, &tee_compat);
if (!ret)
dprint_i("%s:%d\n", buf, tee_compat);

return tee_compat;
}

struct aml_dvb *aml_get_dvb_device(void)
{
return &aml_dvb_device;
Expand Down Expand Up @@ -843,8 +864,9 @@ static int aml_dvb_probe(struct platform_device *pdev)

pr_dbg("tsn_in:%d, tsn_out:%d\n", tsn_in_reg, tsn_out);
advb->dsc_pipeline = tsn_in_reg;
advb->tee_compat = dmx_get_tee_compat_flag(pdev);
//set demod/local
demux_config_pipeline(tsn_in_reg, tsn_out);
demux_config_pipeline(tsn_in_reg, tsn_out, advb->tee_compat);

dmx_init_hw();

Expand Down
1 change: 1 addition & 0 deletions drivers/dvb/demux/aml_dvb.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ struct aml_dvb {
unsigned int tsn_flag;
unsigned char loop_tsn;
unsigned char ts_clone;
unsigned char tee_compat;
};

struct aml_dvb *aml_get_dvb_device(void);
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/ir/meson_ir_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ static int meson_ir_probe(struct platform_device *pdev)

device_init_wakeup(&pdev->dev, true);

led_trigger_register_simple("ir_led", &dev->led_feedback);
led_trigger_register_simple("rc-feedback", &dev->led_feedback);

if (MULTI_IR_SOFTWARE_DECODE(dev->rc_type))
meson_ir_raw_event_register(dev);
Expand Down