AMLOGIC ADD DTS FOR T312 PLATFORM
M: hualing chen <hualing.chen@amlogic.com>
F: arch/arm64/boot/dts/amlogic/mesontm2_t962x3_t312-panel.dtsi
-F: arch/arm/boot/dts/amlogic/mesontm2_t962x3_t312-panel.dtsi
\ No newline at end of file
+F: arch/arm/boot/dts/amlogic/mesontm2_t962x3_t312-panel.dtsi
#include "hw_clk.h"
#include <linux/arm-smccc.h>
#include "checksha.h"
+#include <linux/amlogic/media/sound/hdmi_earc.h>
static void mode420_half_horizontal_para(void);
static void hdmi_phy_suspend(void);
hdev->HWOp.CntlMisc(hdev, MISC_AVMUTE_OP, CLR_AVMUTE);
}
+static void hdmitx_phy_bandgap_en(struct hdmitx_dev *hdev)
+{
+ switch (hdev->chip_type) {
+ case MESON_CPU_ID_TM2:
+ hd_write_reg(P_TM2_HHI_HDMI_PHY_CNTL0, 0x0b4242);
+ break;
+ case MESON_CPU_ID_SM1:
+ hd_write_reg(P_HHI_HDMI_PHY_CNTL0, 0x0b4242);
+ break;
+ default:
+ break;
+ }
+}
+
static irqreturn_t intr_handler(int irq, void *dev)
{
/* get interrupt status */
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGIN;
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGOUT;
hdev->rhpd_state = 1;
+ hdmitx_phy_bandgap_en(hdev);
+ earc_hdmitx_hpdst(1);
queue_delayed_work(hdev->hdmi_wq,
&hdev->work_hpd_plugin, HZ / 2);
}
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGOUT;
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGIN;
hdev->rhpd_state = 0;
+ earc_hdmitx_hpdst(0);
queue_delayed_work(hdev->hdmi_wq,
&hdev->work_hpd_plugout, HZ / 20);
}
--- /dev/null
+/*
+ * include/linux/amlogic/media/sound/hdmi_earc.h
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#ifndef __HDMI_EARC_H__
+#define __HDMI_EARC_H__
+
+extern void earc_hdmitx_hpdst(bool st);
+
+void earc_hdmitx_hpdst(bool st)
+{
+};
+#endif