author: andy.hu <andy.hu@starfivetech.com> 2023-03-03 08:05:57 +0000
committer: andy.hu <andy.hu@starfivetech.com> 2023-03-03 08:05:57 +0000
commit: 1ee0d0608574314b4db35cb8aaa4300588516783
parent: 60926b9d030dba1bb483a7d78e5127b5bbe40897
Commit Summary:
Diffstat:
3 files changed, 54 insertions, 32 deletions
diff --git a/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi b/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi
index 507a536edaff..eb53eea70b03 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-evb-pinctrl.dtsi
@@ -1108,144 +1108,144 @@
rgb-1-pins {
starfive,pins = <PAD_GPIO37>;
starfive,pinmux = <PAD_GPIO37_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-2-pins {
starfive,pins = <PAD_GPIO38>;
starfive,pinmux = <PAD_GPIO38_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-3-pins {
starfive,pins = <PAD_GPIO39>;
starfive,pinmux = <PAD_GPIO39_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-4-pins {
starfive,pins = <PAD_GPIO40>;
starfive,pinmux = <PAD_GPIO40_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-5-pins {
starfive,pins = <PAD_GPIO41>;
starfive,pinmux = <PAD_GPIO41_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-6-pins {
starfive,pins = <PAD_GPIO42>;
starfive,pinmux = <PAD_GPIO42_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-7-pins {
starfive,pins = <PAD_GPIO43>;
starfive,pinmux = <PAD_GPIO43_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-8-pins {
starfive,pins = <PAD_GPIO44>;
starfive,pinmux = <PAD_GPIO44_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-9-pins {
starfive,pins = <PAD_GPIO45>;
starfive,pinmux = <PAD_GPIO45_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-10-pins {
starfive,pins = <PAD_GPIO46>;
starfive,pinmux = <PAD_GPIO46_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-11-pins {
starfive,pins = <PAD_GPIO47>;
starfive,pinmux = <PAD_GPIO47_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-12-pins {
starfive,pins = <PAD_GPIO48>;
starfive,pinmux = <PAD_GPIO48_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-13-pins {
starfive,pins = <PAD_GPIO49>;
starfive,pinmux = <PAD_GPIO49_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-14-pins {
starfive,pins = <PAD_GPIO50>;
starfive,pinmux = <PAD_GPIO50_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-15-pins {
starfive,pins = <PAD_GPIO51>;
starfive,pinmux = <PAD_GPIO51_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-16-pins {
starfive,pins = <PAD_GPIO52>;
starfive,pinmux = <PAD_GPIO52_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-17-pins {
starfive,pins = <PAD_GPIO53>;
starfive,pinmux = <PAD_GPIO53_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-18-pins {
starfive,pins = <PAD_GPIO54>;
starfive,pinmux = <PAD_GPIO54_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-19-pins {
starfive,pins = <PAD_GPIO55>;
starfive,pinmux = <PAD_GPIO55_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-20-pins {
starfive,pins = <PAD_GPIO56>;
starfive,pinmux = <PAD_GPIO56_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-21-pins {
starfive,pins = <PAD_GPIO57>;
starfive,pinmux = <PAD_GPIO57_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-22-pins {
starfive,pins = <PAD_GPIO58>;
starfive,pinmux = <PAD_GPIO58_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-23-pins {
starfive,pins = <PAD_GPIO59>;
starfive,pinmux = <PAD_GPIO59_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-24-pins {
starfive,pins = <PAD_GPIO60>;
starfive,pinmux = <PAD_GPIO60_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-25-pins {
starfive,pins = <PAD_GPIO61>;
starfive,pinmux = <PAD_GPIO61_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-26-pins {
starfive,pins = <PAD_GPIO62>;
starfive,pinmux = <PAD_GPIO62_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
rgb-27-pins {
starfive,pins = <PAD_GPIO63>;
starfive,pinmux = <PAD_GPIO63_FUNC_SEL 1>;
- starfive,pin-ioconfig = <IO(GPIO_IE(0))>;
+ starfive,pin-ioconfig = <IO(GPIO_IE(0)|GPIO_DS(3))>;
};
};
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index fecfb4870e2e..70a7d0ecb604 100755
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1392,13 +1392,21 @@ static enum drm_mode_status tda998x_bridge_mode_valid(struct drm_bridge *bridge,
return MODE_BAD_HVALUE;
if (mode->vtotal >= BIT(11))
return MODE_BAD_VVALUE;
- //u32 vic = drm_match_cea_mode(mode);
-
- //if (vic >= 1)
+
+ //if ((mode->hdisplay == 1280)&&(mode->vdisplay == 720)&&(mode->clock == 74250))
// return MODE_OK;
- //else
- // return MODE_BAD;
- return MODE_OK;
+ if ((mode->hdisplay == 1920)&&(mode->vdisplay == 1080)&&(mode->clock == 148500))
+ {
+ u32 vic = drm_match_cea_mode(mode);
+ //printk("====> %s, %d--vic ============== %d.\n", __func__, __LINE__,vic);
+ if(vic == 16)
+ return MODE_OK;
+ else
+ return MODE_BAD;
+ }else
+ return MODE_BAD;
+
+ //return MODE_OK;
}
static void tda998x_bridge_enable(struct drm_bridge *bridge)
diff --git a/drivers/gpu/drm/verisilicon/inno_hdmi.c b/drivers/gpu/drm/verisilicon/inno_hdmi.c
index 6cf29f9f80c4..e7e1ff5f115c 100644
--- a/drivers/gpu/drm/verisilicon/inno_hdmi.c
+++ b/drivers/gpu/drm/verisilicon/inno_hdmi.c
@@ -1035,6 +1035,23 @@ static int inno_hdmi_bind(struct device *dev, struct device *master,
pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
pm_runtime_enable(&pdev->dev);
+#ifdef CONFIG_DRM_I2C_NXP_TDA998X
+ hdmi->hdmi_data.vic = 0x10;
+ u8 val;
+
+ val = readl_relaxed(hdmi->regs + (0x1b0) * 0x04);
+ val |= 0x4;
+ hdmi_writeb(hdmi, 0x1b0, val);
+ hdmi_writeb(hdmi, 0x1cc, 0xf);
+ //hdmi->hdmi_data.vic = drm_match_cea_mode(mode);
+
+ hdmi->tmds_rate = 148500 * 1000;
+ inno_hdmi_phy_clk_set_rate(hdmi,hdmi->tmds_rate);
+
+ while (!(hdmi_readb(hdmi, 0x1a9) & 0x1));
+ while (!(hdmi_readb(hdmi, 0x1af) & 0x1));
+#endif
+
inno_hdmi_disable_clk_assert_rst(dev, hdmi);
dev_info(dev, "inno hdmi bind end\n");