dev_name = "amhdmitx";
status = "okay";
vend-data = <&vend_data>;
+ pinctrl-names="default", "hdmitx_i2c";
+ pinctrl-0=<&hdmitx_hpd &hdmitx_ddc>;
+ pinctrl-1=<&hdmitx_hpd_gpio>;
clocks = <&clkc CLKID_VCLK2_ENCI
&clkc CLKID_VCLK2_VENCI0
&clkc CLKID_VCLK2_VENCI1
"venci_1_gate",
"hdmi_vapb_clk",
"hdmi_vpu_clk";
+ interrupts = <0 7 1>;
+ interrupt-names = "hdmitx_hpd";
/* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
* 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
* 10:G12A 11:G12B 12:SM1 13:TM2
function = "uart_c";
};
};
+ hdmitx_hpd: hdmitx_hpd {
+ mux {
+ groups = "hdmitx_hpd_in";
+ function = "hdmitx";
+ bias-disable;
+ };
+ };
+ hdmitx_hpd_gpio: hdmitx_hpd_gpio {
+ mux {
+ groups = "GPIOH_16";
+ function = "gpio_periphs";
+ bias-disable;
+ };
+ };
+
+ hdmitx_ddc: hdmitx_ddc {
+ mux {
+ groups = "hdmitx_sda",
+ "hdmitx_sck";
+ function = "hdmitx";
+ bias-disable;
+ drive-strength = <3>;
+ };
+ };
atvdemod_agc_pins: atvdemod_agc_pins {
mux {
groups = "atv_if_agc_dv";
dev_name = "amhdmitx";
status = "okay";
vend-data = <&vend_data>;
+ pinctrl-names="default", "hdmitx_i2c";
+ pinctrl-0=<&hdmitx_hpd &hdmitx_ddc>;
+ pinctrl-1=<&hdmitx_hpd_gpio>;
clocks = <&clkc CLKID_VCLK2_ENCI
&clkc CLKID_VCLK2_VENCI0
&clkc CLKID_VCLK2_VENCI1
"venci_1_gate",
"hdmi_vapb_clk",
"hdmi_vpu_clk";
+ interrupts = <0 7 1>;
+ interrupt-names = "hdmitx_hpd";
/* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
/* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
* 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
function = "uart_c";
};
};
+ hdmitx_hpd: hdmitx_hpd {
+ mux {
+ groups = "hdmitx_hpd_in";
+ function = "hdmitx";
+ bias-disable;
+ };
+ };
+ hdmitx_hpd_gpio: hdmitx_hpd_gpio {
+ mux {
+ groups = "GPIOH_16";
+ function = "gpio_periphs";
+ bias-disable;
+ };
+ };
+
+ hdmitx_ddc: hdmitx_ddc {
+ mux {
+ groups = "hdmitx_sda",
+ "hdmitx_sck";
+ function = "hdmitx";
+ bias-disable;
+ drive-strength = <3>;
+ };
+ };
atvdemod_agc_pins: atvdemod_agc_pins {
mux {
groups = "atv_if_agc_dv";
ret = hdmitx_device.hpd_state;
mutex_unlock(&setclk_mutex);
- if (hdmitx_device.chip_type == MESON_CPU_ID_TM2)
- return 1;
return ret;
}
EXPORT_SYMBOL(get_hpd_state);
}
#endif
hdmitx_device.irq_hpd = platform_get_irq_byname(pdev, "hdmitx_hpd");
- if (hdmitx_device.chip_type == MESON_CPU_ID_TM2)
- hdmitx_device.irq_hpd = 39;
if (hdmitx_device.irq_hpd == -ENXIO) {
pr_err("%s: ERROR: hdmitx hpd irq No not found\n",
__func__);
int hdmitx_hpd_hw_op_txlx(enum hpd_op cmd);
int hdmitx_hpd_hw_op_g12a(enum hpd_op cmd);
-int hdmitx_hpd_hw_op_tm2(enum hpd_op cmd);
int read_hpd_gpio_txlx(void);
int hdmitx_ddc_hw_op_txlx(enum ddc_op cmd);
extern unsigned int hdmitx_get_format_txlx(void);
case MESON_CPU_ID_GXM:
return hdmitx_hpd_hw_op_gxl(cmd);
case MESON_CPU_ID_TXLX:
+ case MESON_CPU_ID_TM2:
return hdmitx_hpd_hw_op_txlx(cmd);
case MESON_CPU_ID_G12A:
case MESON_CPU_ID_G12B:
case MESON_CPU_ID_SM1:
return hdmitx_hpd_hw_op_g12a(cmd);
- case MESON_CPU_ID_TM2:
- return hdmitx_hpd_hw_op_tm2(cmd);
default:
break;
}
hdmitx_wr_reg(HDMITX_TOP_INTR_STAT_CLR, ~0);
hdmitx_wr_reg(HDMITX_DWC_HDCP22REG_STAT, 0xff);
- if (hdev->chip_type != MESON_CPU_ID_TM2) {
- /*tm2 has a bug, wait to fix*/
- pr_info(SYS "irq %x\n", dat_top);
- if (dat_dwc)
- pr_info(SYS "irq %x\n", dat_dwc);
- }
+ pr_info(SYS "irq %x\n", dat_top);
+ if (dat_dwc)
+ pr_info(SYS "irq %x\n", dat_dwc);
if (hdev->hpd_lock == 1) {
pr_info(HW "HDMI hpd locked\n");
return ret;
}
-int hdmitx_hpd_hw_op_tm2(enum hpd_op cmd)
-{
- int ret = 0;
-
- switch (cmd) {
- case HPD_INIT_DISABLE_PULLUP:
- hd_set_reg_bits(P_PAD_PULL_UP_REG2, 0, 16, 1);
- break;
- case HPD_INIT_SET_FILTER:
- hdmitx_wr_reg(HDMITX_TOP_HPD_FILTER,
- ((0xa << 12) | (0xa0 << 0)));
- break;
- case HPD_IS_HPD_MUXED:
- ret = !!(hd_read_reg(P_PERIPHS_PIN_MUX_9) & (6 << 0));
- break;
- case HPD_MUX_HPD:
- hd_set_reg_bits(P_PERIPHS_PIN_MUX_9, 6, 0, 4);
- break;
- case HPD_UNMUX_HPD:
- hd_set_reg_bits(P_PERIPHS_PIN_MUX_9, 0, 0, 4);
- break;
- case HPD_READ_HPD_GPIO:
- ret = hdmitx_rd_reg(HDMITX_DWC_PHY_STAT0) & (1 << 1);
- break;
- default:
- break;
- }
- return ret;
-}
-
void set_hpll_sspll_g12a(enum hdmi_vic vic)
{
struct hdmitx_dev *hdev = get_hdmitx_device();