summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2014-09-09 12:42:22 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-04-14 14:00:25 -0500
commita8143f8cacacff9cc36861cb3e5d4caeb920aaf1 (patch)
tree03162d1ccb91b8dc53274dd1dbf09042f67b9bf8
parent44ff271d2d9cecbc25b83c20de942254febcd1ba (diff)
ENGR01330740-2 ARM: IMX6SL-EVK: EPDC: add epdc module support to 3.14 kernel
1. Add epdc related properties to dts file. 2. Set the epdc related clocks correctly. 3. Add epdc firmware compiling support. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
-rw-r--r--arch/arm/boot/dts/imx6sl-evk.dts111
-rw-r--r--arch/arm/boot/dts/imx6sl.dtsi3
-rw-r--r--arch/arm/mach-imx/clk-imx6sl.c7
-rw-r--r--drivers/video/mxc/mxc_epdc_fb.c4
-rw-r--r--firmware/Makefile4
5 files changed, 126 insertions, 3 deletions
diff --git a/arch/arm/boot/dts/imx6sl-evk.dts b/arch/arm/boot/dts/imx6sl-evk.dts
index 7a312923d53e..b09d590ead05 100644
--- a/arch/arm/boot/dts/imx6sl-evk.dts
+++ b/arch/arm/boot/dts/imx6sl-evk.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -163,6 +163,15 @@
};
};
+&epdc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_epdc_0>;
+ V3P3-supply = <&V3P3_reg>;
+ VCOM-supply = <&VCOM_reg>;
+ DISPLAY-supply = <&DISPLAY_reg>;
+ status = "okay";
+};
+
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec>;
@@ -288,6 +297,73 @@
compatible = "fsl,mma8450";
reg = <0x1c>;
};
+
+ max17135@48 {
+ compatible = "maxim,max17135";
+ reg = <0x48>;
+ vneg_pwrup = <1>;
+ gvee_pwrup = <2>;
+ vpos_pwrup = <10>;
+ gvdd_pwrup = <12>;
+ gvdd_pwrdn = <1>;
+ vpos_pwrdn = <2>;
+ gvee_pwrdn = <8>;
+ vneg_pwrdn = <10>;
+ gpio_pmic_pwrgood = <&gpio2 13 0>;
+ gpio_pmic_vcom_ctrl = <&gpio2 3 0>;
+ gpio_pmic_wakeup = <&gpio2 14 0>;
+ gpio_pmic_v3p3 = <&gpio2 7 0>;
+ gpio_pmic_intr = <&gpio2 12 0>;
+
+ regulators {
+ DISPLAY_reg: DISPLAY {
+ regulator-name = "DISPLAY";
+ };
+
+ GVDD_reg: GVDD {
+ /* 20v */
+ regulator-name = "GVDD";
+ };
+
+ GVEE_reg: GVEE {
+ /* -22v */
+ regulator-name = "GVEE";
+ };
+
+ HVINN_reg: HVINN {
+ /* -22v */
+ regulator-name = "HVINN";
+ };
+
+ HVINP_reg: HVINP {
+ /* 20v */
+ regulator-name = "HVINP";
+ };
+
+ VCOM_reg: VCOM {
+ regulator-name = "VCOM";
+ /* 2's-compliment, -4325000 */
+ regulator-min-microvolt = <0xffbe0178>;
+ /* 2's-compliment, -500000 */
+ regulator-max-microvolt = <0xfff85ee0>;
+ };
+
+ VNEG_reg: VNEG {
+ /* -15v */
+ regulator-name = "VNEG";
+ };
+
+ VPOS_reg: VPOS {
+ /* 15v */
+ regulator-name = "VPOS";
+ };
+
+ V3P3_reg: V3P3 {
+ regulator-name = "V3P3";
+ };
+ };
+ };
+
};
&i2c2 {
@@ -360,6 +436,39 @@
>;
};
+ pinctrl_epdc_0: epdcgrp-0 {
+ fsl,pins = <
+ MX6SL_PAD_EPDC_D0__EPDC_DATA00 0x80000000
+ MX6SL_PAD_EPDC_D1__EPDC_DATA01 0x80000000
+ MX6SL_PAD_EPDC_D2__EPDC_DATA02 0x80000000
+ MX6SL_PAD_EPDC_D3__EPDC_DATA03 0x80000000
+ MX6SL_PAD_EPDC_D4__EPDC_DATA04 0x80000000
+ MX6SL_PAD_EPDC_D5__EPDC_DATA05 0x80000000
+ MX6SL_PAD_EPDC_D6__EPDC_DATA06 0x80000000
+ MX6SL_PAD_EPDC_D7__EPDC_DATA07 0x80000000
+ MX6SL_PAD_EPDC_D8__EPDC_DATA08 0x80000000
+ MX6SL_PAD_EPDC_D9__EPDC_DATA09 0x80000000
+ MX6SL_PAD_EPDC_D10__EPDC_DATA10 0x80000000
+ MX6SL_PAD_EPDC_D11__EPDC_DATA11 0x80000000
+ MX6SL_PAD_EPDC_D12__EPDC_DATA12 0x80000000
+ MX6SL_PAD_EPDC_D13__EPDC_DATA13 0x80000000
+ MX6SL_PAD_EPDC_D14__EPDC_DATA14 0x80000000
+ MX6SL_PAD_EPDC_D15__EPDC_DATA15 0x80000000
+ MX6SL_PAD_EPDC_GDCLK__EPDC_GDCLK 0x80000000
+ MX6SL_PAD_EPDC_GDSP__EPDC_GDSP 0x80000000
+ MX6SL_PAD_EPDC_GDOE__EPDC_GDOE 0x80000000
+ MX6SL_PAD_EPDC_GDRL__EPDC_GDRL 0x80000000
+ MX6SL_PAD_EPDC_SDCLK__EPDC_SDCLK_P 0x80000000
+ MX6SL_PAD_EPDC_SDOE__EPDC_SDOE 0x80000000
+ MX6SL_PAD_EPDC_SDLE__EPDC_SDLE 0x80000000
+ MX6SL_PAD_EPDC_SDSHR__EPDC_SDSHR 0x80000000
+ MX6SL_PAD_EPDC_BDR0__EPDC_BDR0 0x80000000
+ MX6SL_PAD_EPDC_SDCE0__EPDC_SDCE0 0x80000000
+ MX6SL_PAD_EPDC_SDCE1__EPDC_SDCE1 0x80000000
+ MX6SL_PAD_EPDC_SDCE2__EPDC_SDCE2 0x80000000
+ >;
+ };
+
pinctrl_fec: fecgrp {
fsl,pins = <
MX6SL_PAD_FEC_MDC__FEC_MDC 0x1b0b0
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
index 8c0b6991bfc3..018884cdc82c 100644
--- a/arch/arm/boot/dts/imx6sl.dtsi
+++ b/arch/arm/boot/dts/imx6sl.dtsi
@@ -660,8 +660,11 @@
};
epdc: epdc@020f4000 {
+ compatible = "fsl,imx6sl-epdc", "fsl,imx6dl-epdc";
reg = <0x020f4000 0x4000>;
interrupts = <0 97 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clks IMX6SL_CLK_EPDC_AXI>, <&clks IMX6SL_CLK_EPDC_PIX>;
+ clock-names = "epdc_axi", "epdc_pix";
};
lcdif: lcdif@020f8000 {
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c
index 06ffb6f7861f..d40f858548ea 100644
--- a/arch/arm/mach-imx/clk-imx6sl.c
+++ b/arch/arm/mach-imx/clk-imx6sl.c
@@ -460,5 +460,12 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt");
mxc_timer_init_dt(np);
+
+ /* Configure EPDC clocks */
+ clk_set_parent(clks[IMX6SL_CLK_EPDC_PIX_SEL],
+ clks[IMX6SL_CLK_PLL5_VIDEO_DIV]);
+ clk_set_parent(clks[IMX6SL_CLK_EPDC_AXI_SEL],
+ clks[IMX6SL_CLK_PLL2_PFD2]);
+ clk_set_rate(clks[IMX6SL_CLK_EPDC_AXI], 200000000);
}
CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init);
diff --git a/drivers/video/mxc/mxc_epdc_fb.c b/drivers/video/mxc/mxc_epdc_fb.c
index e536e781db9e..88fabf4aabe1 100644
--- a/drivers/video/mxc/mxc_epdc_fb.c
+++ b/drivers/video/mxc/mxc_epdc_fb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2010-2014 Freescale Semiconductor, Inc.
*
* 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
@@ -4305,7 +4305,6 @@ static void mxc_epdc_fb_fw_handler(const struct firmware *fw,
target_pix_clk = fb_data->cur_mode->vmode->pixclock;
/* Enable pix clk for EPDC */
- clk_prepare_enable(fb_data->epdc_clk_pix);
rounded_pix_clk = clk_round_rate(fb_data->epdc_clk_pix, target_pix_clk);
if (((rounded_pix_clk >= target_pix_clk + target_pix_clk/100) ||
@@ -4329,6 +4328,7 @@ static void mxc_epdc_fb_fw_handler(const struct firmware *fw,
}
clk_set_rate(fb_data->epdc_clk_pix, rounded_pix_clk);
+ clk_prepare_enable(fb_data->epdc_clk_pix);
epdc_init_sequence(fb_data);
diff --git a/firmware/Makefile b/firmware/Makefile
index eb82601a4f7c..fc975f9c597d 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -136,6 +136,10 @@ fw-shipped-$(CONFIG_USB_SERIAL_XIRCOM) += keyspan_pda/xircom_pgs.fw
fw-shipped-$(CONFIG_USB_VICAM) += vicam/firmware.fw
fw-shipped-$(CONFIG_VIDEO_CPIA2) += cpia2/stv0672_vp4.bin
fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin
+fw-shipped-$(CONFIG_FB_MXC_EINK_PANEL) += imx/epdc_E60_V110.fw \
+ imx/epdc_E60_V220.fw \
+ imx/epdc_E97_V110.fw \
+ imx/epdc_E060SCM.fw
fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)