From: Cheng Tong Date: Tue, 9 Jul 2019 09:08:12 +0000 (+0800) Subject: dts: T312 add config for dtv tuner si2169 [1/2] X-Git-Tag: hardkernel-4.9.236-104~969 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35d05d4d14ce9b72991faff18395b415ccc8fe0a;p=platform%2Fkernel%2Flinux-amlogic.git dts: T312 add config for dtv tuner si2169 [1/2] PD#SWPL-10672 Problem: Add config for dtv tuner si2169 Solution: Add dtv tuner si2169 as default and add tuner i2c config Verify: Verified by T312 Change-Id: Ib64871f37e03f84beb8d8174e9e5b5ec0f722115 Signed-off-by: Cheng Tong --- diff --git a/arch/arm/boot/dts/amlogic/tm2_t962x3_t312.dts b/arch/arm/boot/dts/amlogic/tm2_t962x3_t312.dts index 7a4ec50..e9904a1 100644 --- a/arch/arm/boot/dts/amlogic/tm2_t962x3_t312.dts +++ b/arch/arm/boot/dts/amlogic/tm2_t962x3_t312.dts @@ -270,30 +270,6 @@ dat1_ch_sel = <1>; }; - aml_dtv_demod { - compatible = "amlogic, ddemod-tm2"; - dev_name = "aml_dtv_demod"; - status = "okay"; - - //pinctrl-names="dtvdemod_agc"; - //pinctrl-0=<&dtvdemod_agc>; - - clocks = <&clkc CLKID_DAC_CLK>; - clock-names = "vdac_clk_gate"; - - reg = <0xff650000 0x4000 /*dtv demod base*/ - 0xff63c000 0x2000 /*hiu reg base*/ - 0xff800000 0x1000 /*io_aobus_base*/ - 0xffd01000 0x1000 /*reset*/ - >; - - dtv_demod0_mem = <0>; // need move to aml_dtv_demod ? - spectrum = <1>; - cma_flag = <1>; - cma_mem_size = <8>; - memory-region = <&demod_cma_reserved>;//<&demod_reserved>; - }; - auge_sound { compatible = "amlogic, tm2-sound-card"; aml-audio-card,name = "AML-AUGESOUND"; @@ -473,31 +449,39 @@ dvb { compatible = "amlogic, dvb"; + dev_name = "dvb"; status = "okay"; - fe0_mode = "internal"; - fe0_tuner = <&tuner>; - - /*"parallel","serial","disable"*/ - ts2 = "parallel"; - ts2_control = <0>; - ts2_invert = <0>; + fe0_mode = "external"; + fe0_demod = "Si2168"; + fe0_i2c_adap_id = <&i2c0>; + fe0_demod_i2c_addr = <0x64>; + fe0_ts = <0>; + fe0_reset_value = <0>; + fe0_reset_gpio = <&gpio GPIODV_11 GPIO_ACTIVE_HIGH>; + + ts0 = "serial"; + ts0_control = <0x800>; + ts0_invert = <0>; interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 17 1>; + 0 5 1 + 0 53 1 + 0 19 1 + 0 25 1 + 0 18 1 + 0 24 1>; interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvr2_irq"; + "demux1_irq", + "demux2_irq", + "dvr0_irq", + "dvr1_irq", + "dvrfill0_fill", + "dvrfill1_flush"; + pinctrl-names = "s_ts0"; + pinctrl-0 = <&dvb_s_ts0_pins>; clocks = <&clkc CLKID_DEMUX &clkc CLKID_ASYNC_FIFO &clkc CLKID_AHB_ARB0 -/* &clkc CLKID_DOS_PARSER>;*/ - &clkc CLKID_U_PARSER>; + &clkc CLKID_U_PARSER>; clock-names = "demux", "asyncfifo", "ahbarb0", "uparsertop"; }; @@ -1200,33 +1184,8 @@ tuner: tuner { compatible = "amlogic, tuner"; status = "okay"; - tuner_cur = <0>; /* default use tuner */ - tuner_num = <1>; /* tuner number, multi tuner support */ - tuner_name_0 = "mxl661_tuner"; - tuner_i2c_adap_0 = <&i2c0>; - tuner_i2c_addr_0 = <0x60>; - tuner_xtal_0 = <1>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode_0 = <3>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(3) - */ - tuner_xtal_cap_0 = <25>; /* when tuner_xtal_mode = 3, set 25 */ - }; - - atv-demod { - compatible = "amlogic, atv-demod"; - status = "okay"; - tuner = <&tuner>; - btsc_sap_mode = <1>; - interrupts = <0 236 1>; - /* pinctrl-names="atvdemod_agc_pins"; */ - /* pinctrl-0=<&atvdemod_agc_pins>; */ - reg = <0xff656000 0x2000 /* demod reg */ - 0xff63c000 0x2000 /* hiu reg */ - 0xff634000 0x2000 /* periphs reg */ - 0xff64a000 0x2000>; /* audio reg */ - reg_23cf = <0x88188832>; - /*default:0x88188832;r840 on haier:0x48188832*/ + tuner0_i2c_addr = <0x60>; + tuner1_i2c_addr = <0x62>; }; bt-dev{ @@ -1429,8 +1388,8 @@ &clkc CLKID_MPLL2>; clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_c &tdmin_c>; + //pinctrl-names = "tdm_pins"; + //pinctrl-0 = <&tdmout_c &tdmin_c>; status = "okay"; }; @@ -1931,7 +1890,15 @@ output-low; }; }; - + dvb_s_ts0_pins: dvb_s_ts0_pins { + mux { + groups = "tsin_a_din0", + "tsin_a_clk", + "tsin_a_sop", + "tsin_a_valid"; + function = "tsin_a"; + }; + }; }; /* end of pinctrl_periphs */ &pinctrl_aobus { diff --git a/arch/arm/boot/dts/amlogic/txlx_t962x_r314.dts b/arch/arm/boot/dts/amlogic/txlx_t962x_r314.dts index dfe73d8..68165ac 100644 --- a/arch/arm/boot/dts/amlogic/txlx_t962x_r314.dts +++ b/arch/arm/boot/dts/amlogic/txlx_t962x_r314.dts @@ -623,18 +623,9 @@ tuner: tuner { compatible = "amlogic, tuner"; - status = "disabled"; - tuner_cur = <0>; /* default use tuner */ - tuner_num = <1>; /* tuner number, multi tuner support */ - tuner_name_0 = "mxl661_tuner"; - tuner_i2c_adap_0 = <&i2c1>; - tuner_i2c_addr_0 = <0x60>; - tuner_xtal_0 = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode_0 = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap_0 = <30>; /* when tuner_xtal_mode = 1, set 25 */ + status = "okay"; + tuner0_i2c_addr = <0x61>; + tuner1_i2c_addr = <0x62>; }; atv-demod { diff --git a/arch/arm64/boot/dts/amlogic/tm2_t962x3_t312.dts b/arch/arm64/boot/dts/amlogic/tm2_t962x3_t312.dts index 127231a..99a3ec3 100644 --- a/arch/arm64/boot/dts/amlogic/tm2_t962x3_t312.dts +++ b/arch/arm64/boot/dts/amlogic/tm2_t962x3_t312.dts @@ -268,30 +268,6 @@ dat1_ch_sel = <1>; }; - aml_dtv_demod { - compatible = "amlogic, ddemod-tm2"; - dev_name = "aml_dtv_demod"; - status = "okay"; - - //pinctrl-names="dtvdemod_agc"; - //pinctrl-0=<&dtvdemod_agc>; - - clocks = <&clkc CLKID_DAC_CLK>; - clock-names = "vdac_clk_gate"; - - reg = <0x0 0xff650000 0x0 0x4000 /*dtv demod base*/ - 0x0 0xff63c000 0x0 0x2000 /*hiu reg base*/ - 0x0 0xff800000 0x0 0x1000 /*io_aobus_base*/ - 0x0 0xffd01000 0x0 0x1000 /*reset*/ - >; - - dtv_demod0_mem = <0>; // need move to aml_dtv_demod ? - spectrum = <1>; - cma_flag = <1>; - cma_mem_size = <8>; - memory-region = <&demod_cma_reserved>;//<&demod_reserved>; - }; - auge_sound { compatible = "amlogic, tm2-sound-card"; aml-audio-card,name = "AML-AUGESOUND"; @@ -471,31 +447,39 @@ dvb { compatible = "amlogic, dvb"; + dev_name = "dvb"; status = "okay"; - fe0_mode = "internal"; - fe0_tuner = <&tuner>; - - /*"parallel","serial","disable"*/ - ts2 = "parallel"; - ts2_control = <0>; - ts2_invert = <0>; + fe0_mode = "external"; + fe0_demod = "Si2168"; + fe0_i2c_adap_id = <&i2c0>; + fe0_demod_i2c_addr = <0x64>; + fe0_ts = <0>; + fe0_reset_value = <0>; + fe0_reset_gpio = <&gpio GPIODV_11 GPIO_ACTIVE_HIGH>; + + ts0 = "serial"; + ts0_control = <0x800>; + ts0_invert = <0>; interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 17 1>; + 0 5 1 + 0 53 1 + 0 19 1 + 0 25 1 + 0 18 1 + 0 24 1>; interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvr2_irq"; + "demux1_irq", + "demux2_irq", + "dvr0_irq", + "dvr1_irq", + "dvrfill0_fill", + "dvrfill1_flush"; + pinctrl-names = "s_ts0"; + pinctrl-0 = <&dvb_s_ts0_pins>; clocks = <&clkc CLKID_DEMUX &clkc CLKID_ASYNC_FIFO &clkc CLKID_AHB_ARB0 - /*&clkc CLKID_DOS_PARSER>;*/ - &clkc CLKID_U_PARSER>; + &clkc CLKID_U_PARSER>; clock-names = "demux", "asyncfifo", "ahbarb0", "uparsertop"; }; @@ -1198,33 +1182,8 @@ tuner: tuner { compatible = "amlogic, tuner"; status = "okay"; - tuner_cur = <0>; /* default use tuner */ - tuner_num = <1>; /* tuner number, multi tuner support */ - tuner_name_0 = "mxl661_tuner"; - tuner_i2c_adap_0 = <&i2c0>; - tuner_i2c_addr_0 = <0x60>; - tuner_xtal_0 = <1>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode_0 = <3>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(3) - */ - tuner_xtal_cap_0 = <25>; /* when tuner_xtal_mode = 3, set 25 */ - }; - - atv-demod { - compatible = "amlogic, atv-demod"; - status = "okay"; - tuner = <&tuner>; - btsc_sap_mode = <1>; - interrupts = <0 236 1>; - /* pinctrl-names="atvdemod_agc_pins"; */ - /* pinctrl-0=<&atvdemod_agc_pins>; */ - reg = <0x0 0xff656000 0x0 0x2000 /* demod reg */ - 0x0 0xff63c000 0x0 0x2000 /* hiu reg */ - 0x0 0xff634000 0x0 0x2000 /* periphs reg */ - 0x0 0xff64a000 0x0 0x2000>; /* audio reg */ - reg_23cf = <0x88188832>; - /*default:0x88188832;r840 on haier:0x48188832*/ + tuner0_i2c_addr = <0x60>; + tuner1_i2c_addr = <0x62>; }; bt-dev{ @@ -1426,8 +1385,8 @@ &clkc CLKID_MPLL2>; clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_c &tdmin_c>; + //pinctrl-names = "tdm_pins"; + //pinctrl-0 = <&tdmout_c &tdmin_c>; status = "okay"; }; @@ -1928,6 +1887,15 @@ output-low; }; }; + dvb_s_ts0_pins: dvb_s_ts0_pins { + mux { + groups = "tsin_a_din0", + "tsin_a_clk", + "tsin_a_sop", + "tsin_a_valid"; + function = "tsin_a"; + }; + }; }; /* end of pinctrl_periphs */ &pinctrl_aobus { diff --git a/arch/arm64/boot/dts/amlogic/txlx_t962x_r314.dts b/arch/arm64/boot/dts/amlogic/txlx_t962x_r314.dts index 31249ae..e70112c 100644 --- a/arch/arm64/boot/dts/amlogic/txlx_t962x_r314.dts +++ b/arch/arm64/boot/dts/amlogic/txlx_t962x_r314.dts @@ -619,18 +619,9 @@ tuner: tuner { compatible = "amlogic, tuner"; - status = "disabled"; - tuner_cur = <0>; /* default use tuner */ - tuner_num = <1>; /* tuner number, multi tuner support */ - tuner_name_0 = "mxl661_tuner"; - tuner_i2c_adap_0 = <&i2c1>; - tuner_i2c_addr_0 = <0x60>; - tuner_xtal_0 = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode_0 = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap_0 = <30>; /* when tuner_xtal_mode = 1, set 25 */ + status = "okay"; + tuner0_i2c_addr = <0x61>; + tuner1_i2c_addr = <0x62>; }; atv-demod {