From a7aa1cd6d8cf92b162dbd96fc320a8a741e4b78b Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Mon, 7 Apr 2014 10:28:28 -0500 Subject: [PATCH] cleanup: drop omap_dt_dss, new patchset comming Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- patch.sh | 58 -- .../0001-ARM-OMAP2-add-omapdss_init_of.patch | 138 ----- ...AP2-DT-compatible-tweak-for-displays.patch | 138 ----- ...003-OMAPDSS-add-label-support-for-DT.patch | 44 -- ...APDSS-get-dssdev-alias-from-DT-alias.patch | 57 -- ...APFB-clean-up-default-display-search.patch | 80 --- ...ch-for-default-display-with-DT-alias.patch | 64 --- .../0007-OMAPDSS-add-of-helpers.patch | 219 -------- ...APDSS-Improve-regulator-names-for-DT.patch | 77 --- .../0009-OMAPDSS-Add-DT-support-to-DSS.patch | 300 ---------- ...0010-OMAPDSS-Add-DT-support-to-DISPC.patch | 40 -- .../0011-OMAPDSS-Add-DT-support-to-HDMI.patch | 40 -- .../0012-OMAPDSS-Add-DT-support-to-VENC.patch | 124 ---- .../0013-OMAPDSS-Add-DT-support-to-DSI.patch | 252 --------- ...-OMAPDSS-panel-dsi-cm-Add-DT-support.patch | 125 ----- ...MAPDSS-encoder-tfp410-Add-DT-support.patch | 103 ---- ...OMAPDSS-connector-dvi-Add-DT-support.patch | 89 --- ...DSS-encoder-tpd12s015-Add-DT-support.patch | 109 ---- ...MAPDSS-hdmi-connector-Add-DT-support.patch | 83 --- ...019-OMAPDSS-panel-dpi-Add-DT-support.patch | 127 ----- ...S-connector-analog-tv-Add-DT-support.patch | 110 ---- ...021-OMAPDSS-acx565akm-Add-DT-support.patch | 94 ---- ...M-omap2.dtsi-add-omapdss-information.patch | 62 -- ...M-omap3.dtsi-add-omapdss-information.patch | 103 ---- ...M-omap4.dtsi-add-omapdss-information.patch | 113 ---- ...p4-panda.dts-add-display-information.patch | 166 ------ ...map4-sdp.dts-add-display-information.patch | 155 ----- ...3-beagle.dts-add-display-information.patch | 179 ------ ...eagle-xm.dts-add-display-information.patch | 189 ------- ...igep0020.dts-add-display-information.patch | 105 ---- ...ap3-n900.dts-add-display-information.patch | 126 ----- ...APDSS-remove-DT-hacks-for-regulators.patch | 68 --- ...AP2-remove-pdata-quirks-for-displays.patch | 276 --------- ...0033-Doc-DT-Add-OMAP-DSS-DT-Bindings.patch | 528 ------------------ ...nding-documentation-for-Analog-TV-Co.patch | 46 -- ...nding-documentation-for-DVI-Connecto.patch | 48 -- ...nding-documentation-for-HDMI-Connect.patch | 45 -- ...nding-documentation-for-MIPI-DPI-Pan.patch | 65 --- ...nding-documentation-for-MIPI-DSI-CM-.patch | 49 -- ...nding-documentation-for-Sony-acx565a.patch | 52 -- ...nding-documentation-for-TFP410-encod.patch | 63 --- ...nding-documentation-for-tpd12s015-en.patch | 67 --- ...MAPDSS-DISPC-decimation-rounding-fix.patch | 88 --- .../0043-OMAPDSS-fix-fck-field-types.patch | 46 -- ...rate-calculation-for-fractional-rate.patch | 102 ---- ...ix-rate-calculation-for-fractional-r.patch | 93 --- ...fix-clkoutx2-with-CLK_SET_RATE_PAREN.patch | 182 ------ ...dts-fix-omap3-dss-clock-handle-names.patch | 88 --- ...ARM-dts-fix-DPLL4-x2-clkouts-on-3630.patch | 65 --- ...ixed-factor-clock-for-dpll4_m4x2_mul.patch | 49 -- ...ti-set-rate-parent-for-dpll4_m4-path.patch | 38 -- ...-rounding-when-calculating-fclk-rate.patch | 42 -- 52 files changed, 5769 deletions(-) delete mode 100644 patches/omap_dt_dss/0001-ARM-OMAP2-add-omapdss_init_of.patch delete mode 100644 patches/omap_dt_dss/0002-ARM-OMAP2-DT-compatible-tweak-for-displays.patch delete mode 100644 patches/omap_dt_dss/0003-OMAPDSS-add-label-support-for-DT.patch delete mode 100644 patches/omap_dt_dss/0004-OMAPDSS-get-dssdev-alias-from-DT-alias.patch delete mode 100644 patches/omap_dt_dss/0005-OMAPFB-clean-up-default-display-search.patch delete mode 100644 patches/omap_dt_dss/0006-OMAPFB-search-for-default-display-with-DT-alias.patch delete mode 100644 patches/omap_dt_dss/0007-OMAPDSS-add-of-helpers.patch delete mode 100644 patches/omap_dt_dss/0008-OMAPDSS-Improve-regulator-names-for-DT.patch delete mode 100644 patches/omap_dt_dss/0009-OMAPDSS-Add-DT-support-to-DSS.patch delete mode 100644 patches/omap_dt_dss/0010-OMAPDSS-Add-DT-support-to-DISPC.patch delete mode 100644 patches/omap_dt_dss/0011-OMAPDSS-Add-DT-support-to-HDMI.patch delete mode 100644 patches/omap_dt_dss/0012-OMAPDSS-Add-DT-support-to-VENC.patch delete mode 100644 patches/omap_dt_dss/0013-OMAPDSS-Add-DT-support-to-DSI.patch delete mode 100644 patches/omap_dt_dss/0014-OMAPDSS-panel-dsi-cm-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0015-OMAPDSS-encoder-tfp410-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0016-OMAPDSS-connector-dvi-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0017-OMAPDSS-encoder-tpd12s015-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0018-OMAPDSS-hdmi-connector-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0019-OMAPDSS-panel-dpi-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0020-OMAPDSS-connector-analog-tv-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0021-OMAPDSS-acx565akm-Add-DT-support.patch delete mode 100644 patches/omap_dt_dss/0022-ARM-omap2.dtsi-add-omapdss-information.patch delete mode 100644 patches/omap_dt_dss/0023-ARM-omap3.dtsi-add-omapdss-information.patch delete mode 100644 patches/omap_dt_dss/0024-ARM-omap4.dtsi-add-omapdss-information.patch delete mode 100644 patches/omap_dt_dss/0025-ARM-omap4-panda.dts-add-display-information.patch delete mode 100644 patches/omap_dt_dss/0026-ARM-omap4-sdp.dts-add-display-information.patch delete mode 100644 patches/omap_dt_dss/0027-ARM-omap3-beagle.dts-add-display-information.patch delete mode 100644 patches/omap_dt_dss/0028-ARM-omap3-beagle-xm.dts-add-display-information.patch delete mode 100644 patches/omap_dt_dss/0029-ARM-omap3-igep0020.dts-add-display-information.patch delete mode 100644 patches/omap_dt_dss/0030-ARM-omap3-n900.dts-add-display-information.patch delete mode 100644 patches/omap_dt_dss/0031-OMAPDSS-remove-DT-hacks-for-regulators.patch delete mode 100644 patches/omap_dt_dss/0032-ARM-OMAP2-remove-pdata-quirks-for-displays.patch delete mode 100644 patches/omap_dt_dss/0033-Doc-DT-Add-OMAP-DSS-DT-Bindings.patch delete mode 100644 patches/omap_dt_dss/0034-Doc-DT-Add-DT-binding-documentation-for-Analog-TV-Co.patch delete mode 100644 patches/omap_dt_dss/0035-Doc-DT-Add-DT-binding-documentation-for-DVI-Connecto.patch delete mode 100644 patches/omap_dt_dss/0036-Doc-DT-Add-DT-binding-documentation-for-HDMI-Connect.patch delete mode 100644 patches/omap_dt_dss/0037-Doc-DT-Add-DT-binding-documentation-for-MIPI-DPI-Pan.patch delete mode 100644 patches/omap_dt_dss/0038-Doc-DT-Add-DT-binding-documentation-for-MIPI-DSI-CM-.patch delete mode 100644 patches/omap_dt_dss/0039-Doc-DT-Add-DT-binding-documentation-for-Sony-acx565a.patch delete mode 100644 patches/omap_dt_dss/0040-Doc-DT-Add-DT-binding-documentation-for-TFP410-encod.patch delete mode 100644 patches/omap_dt_dss/0041-Doc-DT-Add-DT-binding-documentation-for-tpd12s015-en.patch delete mode 100644 patches/omap_dt_dss/0042-OMAPDSS-DISPC-decimation-rounding-fix.patch delete mode 100644 patches/omap_dt_dss/0043-OMAPDSS-fix-fck-field-types.patch delete mode 100644 patches/omap_dt_dss/0044-clk-divider-fix-rate-calculation-for-fractional-rate.patch delete mode 100644 patches/omap_dt_dss/0045-clk-ti-divider-fix-rate-calculation-for-fractional-r.patch delete mode 100644 patches/omap_dt_dss/0046-ARM-OMAP2-clock-fix-clkoutx2-with-CLK_SET_RATE_PAREN.patch delete mode 100644 patches/omap_dt_dss/0047-ARM-dts-fix-omap3-dss-clock-handle-names.patch delete mode 100644 patches/omap_dt_dss/0048-ARM-dts-fix-DPLL4-x2-clkouts-on-3630.patch delete mode 100644 patches/omap_dt_dss/0049-ARM-dts-use-ti-fixed-factor-clock-for-dpll4_m4x2_mul.patch delete mode 100644 patches/omap_dt_dss/0050-ARM-dts-set-ti-set-rate-parent-for-dpll4_m4-path.patch delete mode 100644 patches/omap_dt_dss/0051-OMAPDSS-fix-rounding-when-calculating-fclk-rate.patch diff --git a/patch.sh b/patch.sh index 8623ea956..c6e3bf1f6 100644 --- a/patch.sh +++ b/patch.sh @@ -71,63 +71,6 @@ omap_next () { #git pull --no-edit git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git for_3.13/dts } -omap_dt_dss () { - echo "dir: omap_dt_dss" - #From: https://git.kernel.org/cgit/linux/kernel/git/tomba/linux.git/log/?h=work/dss-dt - - ${git} "${DIR}/patches/omap_dt_dss/0001-ARM-OMAP2-add-omapdss_init_of.patch" - ${git} "${DIR}/patches/omap_dt_dss/0002-ARM-OMAP2-DT-compatible-tweak-for-displays.patch" - ${git} "${DIR}/patches/omap_dt_dss/0003-OMAPDSS-add-label-support-for-DT.patch" - ${git} "${DIR}/patches/omap_dt_dss/0004-OMAPDSS-get-dssdev-alias-from-DT-alias.patch" - ${git} "${DIR}/patches/omap_dt_dss/0005-OMAPFB-clean-up-default-display-search.patch" - ${git} "${DIR}/patches/omap_dt_dss/0006-OMAPFB-search-for-default-display-with-DT-alias.patch" - ${git} "${DIR}/patches/omap_dt_dss/0007-OMAPDSS-add-of-helpers.patch" - ${git} "${DIR}/patches/omap_dt_dss/0008-OMAPDSS-Improve-regulator-names-for-DT.patch" - ${git} "${DIR}/patches/omap_dt_dss/0009-OMAPDSS-Add-DT-support-to-DSS.patch" - ${git} "${DIR}/patches/omap_dt_dss/0010-OMAPDSS-Add-DT-support-to-DISPC.patch" - ${git} "${DIR}/patches/omap_dt_dss/0011-OMAPDSS-Add-DT-support-to-HDMI.patch" - ${git} "${DIR}/patches/omap_dt_dss/0012-OMAPDSS-Add-DT-support-to-VENC.patch" - ${git} "${DIR}/patches/omap_dt_dss/0013-OMAPDSS-Add-DT-support-to-DSI.patch" - ${git} "${DIR}/patches/omap_dt_dss/0014-OMAPDSS-panel-dsi-cm-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0015-OMAPDSS-encoder-tfp410-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0016-OMAPDSS-connector-dvi-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0017-OMAPDSS-encoder-tpd12s015-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0018-OMAPDSS-hdmi-connector-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0019-OMAPDSS-panel-dpi-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0020-OMAPDSS-connector-analog-tv-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0021-OMAPDSS-acx565akm-Add-DT-support.patch" - ${git} "${DIR}/patches/omap_dt_dss/0022-ARM-omap2.dtsi-add-omapdss-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0023-ARM-omap3.dtsi-add-omapdss-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0024-ARM-omap4.dtsi-add-omapdss-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0025-ARM-omap4-panda.dts-add-display-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0026-ARM-omap4-sdp.dts-add-display-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0027-ARM-omap3-beagle.dts-add-display-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0028-ARM-omap3-beagle-xm.dts-add-display-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0029-ARM-omap3-igep0020.dts-add-display-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0030-ARM-omap3-n900.dts-add-display-information.patch" - ${git} "${DIR}/patches/omap_dt_dss/0031-OMAPDSS-remove-DT-hacks-for-regulators.patch" - ${git} "${DIR}/patches/omap_dt_dss/0032-ARM-OMAP2-remove-pdata-quirks-for-displays.patch" - ${git} "${DIR}/patches/omap_dt_dss/0033-Doc-DT-Add-OMAP-DSS-DT-Bindings.patch" - ${git} "${DIR}/patches/omap_dt_dss/0034-Doc-DT-Add-DT-binding-documentation-for-Analog-TV-Co.patch" - ${git} "${DIR}/patches/omap_dt_dss/0035-Doc-DT-Add-DT-binding-documentation-for-DVI-Connecto.patch" - ${git} "${DIR}/patches/omap_dt_dss/0036-Doc-DT-Add-DT-binding-documentation-for-HDMI-Connect.patch" - ${git} "${DIR}/patches/omap_dt_dss/0037-Doc-DT-Add-DT-binding-documentation-for-MIPI-DPI-Pan.patch" - ${git} "${DIR}/patches/omap_dt_dss/0038-Doc-DT-Add-DT-binding-documentation-for-MIPI-DSI-CM-.patch" - ${git} "${DIR}/patches/omap_dt_dss/0039-Doc-DT-Add-DT-binding-documentation-for-Sony-acx565a.patch" - ${git} "${DIR}/patches/omap_dt_dss/0040-Doc-DT-Add-DT-binding-documentation-for-TFP410-encod.patch" - ${git} "${DIR}/patches/omap_dt_dss/0041-Doc-DT-Add-DT-binding-documentation-for-tpd12s015-en.patch" -# ${git} "${DIR}/patches/omap_dt_dss/0042-OMAPDSS-DISPC-decimation-rounding-fix.patch" -# ${git} "${DIR}/patches/omap_dt_dss/0043-OMAPDSS-fix-fck-field-types.patch" - ${git} "${DIR}/patches/omap_dt_dss/0044-clk-divider-fix-rate-calculation-for-fractional-rate.patch" - ${git} "${DIR}/patches/omap_dt_dss/0045-clk-ti-divider-fix-rate-calculation-for-fractional-r.patch" -# ${git} "${DIR}/patches/omap_dt_dss/0046-ARM-OMAP2-clock-fix-clkoutx2-with-CLK_SET_RATE_PAREN.patch" - ${git} "${DIR}/patches/omap_dt_dss/0047-ARM-dts-fix-omap3-dss-clock-handle-names.patch" - ${git} "${DIR}/patches/omap_dt_dss/0048-ARM-dts-fix-DPLL4-x2-clkouts-on-3630.patch" - ${git} "${DIR}/patches/omap_dt_dss/0049-ARM-dts-use-ti-fixed-factor-clock-for-dpll4_m4x2_mul.patch" - ${git} "${DIR}/patches/omap_dt_dss/0050-ARM-dts-set-ti-set-rate-parent-for-dpll4_m4-path.patch" - ${git} "${DIR}/patches/omap_dt_dss/0051-OMAPDSS-fix-rounding-when-calculating-fclk-rate.patch" -} - clock () { echo "dir: clock" # ${git} "${DIR}/patches/clock/0001-clk-ti-am335x-remove-unecessary-cpu0-clk-node.patch" @@ -291,7 +234,6 @@ drivers #imx_next #omap_next -#omap_dt_dss clock #usb diff --git a/patches/omap_dt_dss/0001-ARM-OMAP2-add-omapdss_init_of.patch b/patches/omap_dt_dss/0001-ARM-OMAP2-add-omapdss_init_of.patch deleted file mode 100644 index e76d1e467..000000000 --- a/patches/omap_dt_dss/0001-ARM-OMAP2-add-omapdss_init_of.patch +++ /dev/null @@ -1,138 +0,0 @@ -From e59d324e6bd04be7f405d5f704bb96a1fcc19a10 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 18 Mar 2013 15:50:25 +0200 -Subject: [PATCH 01/51] ARM: OMAP2+: add omapdss_init_of() - -omapdss driver uses a omapdss platform device to pass platform specific -function pointers and DSS hardware version from the arch code to the -driver. This device is needed also when booting with DT. - -This patch adds omapdss_init_of() function, called from board-generic at -init time, which creates the omapdss device. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/mach-omap2/board-generic.c | 2 + - arch/arm/mach-omap2/common.h | 2 + - arch/arm/mach-omap2/display.c | 76 +++++++++++++++++++++++++++++++++++++ - 3 files changed, 80 insertions(+) - -diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c -index 8e3daa1..fcb7f5c 100644 ---- a/arch/arm/mach-omap2/board-generic.c -+++ b/arch/arm/mach-omap2/board-generic.c -@@ -36,6 +36,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = { - static void __init omap_generic_init(void) - { - pdata_quirks_init(omap_dt_match_table); -+ -+ omapdss_init_of(); - } - - #ifdef CONFIG_SOC_OMAP2420 -diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h -index a6aae30..1864282 100644 ---- a/arch/arm/mach-omap2/common.h -+++ b/arch/arm/mach-omap2/common.h -@@ -315,5 +315,7 @@ extern int omap_dss_reset(struct omap_hwmod *); - /* SoC specific clock initializer */ - int omap_clk_init(void); - -+int __init omapdss_init_of(void); -+ - #endif /* __ASSEMBLER__ */ - #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ -diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c -index 4cf1655..77cd927 100644 ---- a/arch/arm/mach-omap2/display.c -+++ b/arch/arm/mach-omap2/display.c -@@ -23,6 +23,8 @@ - #include <linux/clk.h> - #include <linux/err.h> - #include <linux/delay.h> -+#include <linux/of.h> -+#include <linux/of_platform.h> - - #include <video/omapdss.h> - #include "omap_hwmod.h" -@@ -552,3 +554,77 @@ int omap_dss_reset(struct omap_hwmod *oh) - - return r; - } -+ -+int __init omapdss_init_of(void) -+{ -+ int r; -+ enum omapdss_version ver; -+ struct device_node *node; -+ -+ static struct omap_dss_board_info board_data = { -+ .dsi_enable_pads = omap_dsi_enable_pads, -+ .dsi_disable_pads = omap_dsi_disable_pads, -+ .get_context_loss_count = omap_pm_get_dev_context_loss_count, -+ .set_min_bus_tput = omap_dss_set_min_bus_tput, -+ }; -+ -+ /* only create dss helper devices if dss is enabled in the .dts */ -+ -+ node = of_find_compatible_node(NULL, NULL, "ti,omap2-dss"); -+ if (!node) -+ node = of_find_compatible_node(NULL, NULL, "ti,omap3-dss"); -+ if (!node) -+ node = of_find_compatible_node(NULL, NULL, "ti,omap4-dss"); -+ if (!node) -+ return 0; -+ -+ if (!of_device_is_available(node)) -+ return 0; -+ -+ ver = omap_display_get_version(); -+ -+ if (ver == OMAPDSS_VER_UNKNOWN) { -+ pr_err("DSS not supported on this SoC\n"); -+ return -ENODEV; -+ } -+ -+ board_data.version = ver; -+ -+ omap_display_device.dev.platform_data = &board_data; -+ -+ r = platform_device_register(&omap_display_device); -+ if (r < 0) { -+ pr_err("Unable to register omapdss device\n"); -+ return r; -+ } -+ -+ /* create DRM device */ -+ r = omap_init_drm(); -+ if (r < 0) { -+ pr_err("Unable to register omapdrm device\n"); -+ return r; -+ } -+ -+ /* create vrfb device */ -+ r = omap_init_vrfb(); -+ if (r < 0) { -+ pr_err("Unable to register omapvrfb device\n"); -+ return r; -+ } -+ -+ /* create FB device */ -+ r = omap_init_fb(); -+ if (r < 0) { -+ pr_err("Unable to register omapfb device\n"); -+ return r; -+ } -+ -+ /* create V4L2 display device */ -+ r = omap_init_vout(); -+ if (r < 0) { -+ pr_err("Unable to register omap_vout device\n"); -+ return r; -+ } -+ -+ return 0; -+} --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0002-ARM-OMAP2-DT-compatible-tweak-for-displays.patch b/patches/omap_dt_dss/0002-ARM-OMAP2-DT-compatible-tweak-for-displays.patch deleted file mode 100644 index 8b3cbea58..000000000 --- a/patches/omap_dt_dss/0002-ARM-OMAP2-DT-compatible-tweak-for-displays.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 0d7a4c36fb9a9aae40673dcdcda9d9e6a6649d8f Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 19 Dec 2013 12:34:19 +0200 -Subject: [PATCH 02/51] ARM: OMAP2+: DT 'compatible' tweak for displays - -As there is no common panel framework in the kernel, we have OMAP -specific panel drivers. However, the DT data should be generic. This -brings the issue that some other platform could use the same panels, and -would need to create a driver with the same 'compatible' string as the -OMAP driver. - -In the long run, we have to get a common panel framework. For the time -being, this patch solves the issue: - -At early boot time, we go through the DT nodes looking for the panels -the kernel supports for OMAP. For each found node, the 'compatible' -string is prepended with "omapdss,", i.e. "sony,acx565akm" becomes -"omapdss,sony,acx565akm". The OMAP display drivers all have "omapdss," -at the beginning of their compatible field. - -This allows us to have generic DT data, but OMAP specific display -drivers. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/mach-omap2/board-generic.c | 2 ++ - arch/arm/mach-omap2/common.h | 1 + - arch/arm/mach-omap2/display.c | 62 +++++++++++++++++++++++++++++++++++++ - 3 files changed, 65 insertions(+) - -diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c -index fcb7f5c..0db371a 100644 ---- a/arch/arm/mach-omap2/board-generic.c -+++ b/arch/arm/mach-omap2/board-generic.c -@@ -35,6 +35,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = { - - static void __init omap_generic_init(void) - { -+ omapdss_early_init_of(); -+ - pdata_quirks_init(omap_dt_match_table); - - omapdss_init_of(); -diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h -index 1864282..d88aff7 100644 ---- a/arch/arm/mach-omap2/common.h -+++ b/arch/arm/mach-omap2/common.h -@@ -316,6 +316,7 @@ extern int omap_dss_reset(struct omap_hwmod *); - int omap_clk_init(void); - - int __init omapdss_init_of(void); -+void __init omapdss_early_init_of(void); - - #endif /* __ASSEMBLER__ */ - #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ -diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c -index 77cd927..6f4b199 100644 ---- a/arch/arm/mach-omap2/display.c -+++ b/arch/arm/mach-omap2/display.c -@@ -25,6 +25,7 @@ - #include <linux/delay.h> - #include <linux/of.h> - #include <linux/of_platform.h> -+#include <linux/slab.h> - - #include <video/omapdss.h> - #include "omap_hwmod.h" -@@ -555,6 +556,67 @@ int omap_dss_reset(struct omap_hwmod *oh) - return r; - } - -+/* list of 'compatible' nodes to convert to omapdss specific */ -+static const char * const dss_compat_conv_list[] __initconst = { -+ "composite-connector", -+ "dvi-connector", -+ "hdmi-connector", -+ "panel-dpi", -+ "panel-dsi-cm", -+ "sony,acx565akm", -+ "svideo-connector", -+ "ti,tfp410", -+ "ti,tpd12s015", -+}; -+ -+/* prepend compatible string with "omapdss," */ -+static __init void omapdss_omapify_node(struct device_node *node, -+ const char *compat) -+{ -+ char *new_compat; -+ struct property *prop; -+ -+ new_compat = kasprintf(GFP_KERNEL, "omapdss,%s", compat); -+ -+ prop = kzalloc(sizeof(*prop), GFP_KERNEL); -+ -+ if (!prop) { -+ pr_err("omapdss_omapify_node: kzalloc failed\n"); -+ return; -+ } -+ -+ prop->name = "compatible"; -+ prop->value = new_compat; -+ prop->length = strlen(new_compat) + 1; -+ -+ of_update_property(node, prop); -+} -+ -+/* -+ * As omapdss panel drivers are omapdss specific, but we want to define the -+ * DT-data in generic manner, we convert the compatible strings of the panel -+ * nodes from "panel-foo" to "omapdss,panel-foo". This way we can have both -+ * correct DT data and omapdss specific drivers. -+ * -+ * When we get generic panel drivers to the kernel, this will be removed. -+ */ -+void __init omapdss_early_init_of(void) -+{ -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(dss_compat_conv_list); ++i) { -+ const char *compat = dss_compat_conv_list[i]; -+ struct device_node *node = NULL; -+ -+ while ((node = of_find_compatible_node(node, NULL, compat))) { -+ if (!of_device_is_available(node)) -+ continue; -+ -+ omapdss_omapify_node(node, compat); -+ } -+ } -+} -+ - int __init omapdss_init_of(void) - { - int r; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0003-OMAPDSS-add-label-support-for-DT.patch b/patches/omap_dt_dss/0003-OMAPDSS-add-label-support-for-DT.patch deleted file mode 100644 index e99732e2f..000000000 --- a/patches/omap_dt_dss/0003-OMAPDSS-add-label-support-for-DT.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2fdf713a2c98840135188bd13116ed6fb48929a2 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 6 Aug 2013 09:41:32 +0300 -Subject: [PATCH 03/51] OMAPDSS: add 'label' support for DT - -Add support to get the label (i.e. a "nickname") for a display from the -DT data. If there is no label defined, use the display's alias (e.g. -'display0') as a name. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/display.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c -index 669a81f..012ada3 100644 ---- a/drivers/video/omap2/dss/display.c -+++ b/drivers/video/omap2/dss/display.c -@@ -26,6 +26,7 @@ - #include <linux/module.h> - #include <linux/jiffies.h> - #include <linux/platform_device.h> -+#include <linux/of.h> - - #include <video/omapdss.h> - #include "dss.h" -@@ -137,6 +138,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev) - snprintf(dssdev->alias, sizeof(dssdev->alias), - "display%d", disp_num_counter++); - -+ /* Use 'label' property for name, if it exists */ -+ if (dssdev->dev->of_node) -+ of_property_read_string(dssdev->dev->of_node, "label", -+ &dssdev->name); -+ -+ if (dssdev->name == NULL) -+ dssdev->name = dssdev->alias; -+ - if (drv && drv->get_resolution == NULL) - drv->get_resolution = omapdss_default_get_resolution; - if (drv && drv->get_recommended_bpp == NULL) --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0004-OMAPDSS-get-dssdev-alias-from-DT-alias.patch b/patches/omap_dt_dss/0004-OMAPDSS-get-dssdev-alias-from-DT-alias.patch deleted file mode 100644 index 72cdb1b42..000000000 --- a/patches/omap_dt_dss/0004-OMAPDSS-get-dssdev-alias-from-DT-alias.patch +++ /dev/null @@ -1,57 +0,0 @@ -From f14dadb47a7615940df566f6ae0dd49fb1d2532e Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 6 Aug 2013 09:50:22 +0300 -Subject: [PATCH 04/51] OMAPDSS: get dssdev->alias from DT alias - -We currently create a "displayX" style alias name for all displays, -using a number that is incremented for each registered display. With the -new DSS device model there is no clear order in which the displays are -registered, and thus the numbering is somewhat random. - -This patch improves the behavior for DT case so that if the displays -have been assigned DT aliases, those aliases will be used as DSS -aliases. - -This means that "display0" is always the one specified in the DT alias, -and thus display0 can be used as default display in case the user didn't -specify a default display. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/display.c | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c -index 012ada3..21080f9 100644 ---- a/drivers/video/omap2/dss/display.c -+++ b/drivers/video/omap2/dss/display.c -@@ -134,9 +134,24 @@ static int disp_num_counter; - int omapdss_register_display(struct omap_dss_device *dssdev) - { - struct omap_dss_driver *drv = dssdev->driver; -+ int id; - -- snprintf(dssdev->alias, sizeof(dssdev->alias), -- "display%d", disp_num_counter++); -+ /* -+ * Note: this presumes all the displays are either using DT or non-DT, -+ * which normally should be the case. This also presumes that all -+ * displays either have an DT alias, or none has. -+ */ -+ -+ if (dssdev->dev->of_node) { -+ id = of_alias_get_id(dssdev->dev->of_node, "display"); -+ -+ if (id < 0) -+ id = disp_num_counter++; -+ } else { -+ id = disp_num_counter++; -+ } -+ -+ snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id); - - /* Use 'label' property for name, if it exists */ - if (dssdev->dev->of_node) --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0005-OMAPFB-clean-up-default-display-search.patch b/patches/omap_dt_dss/0005-OMAPFB-clean-up-default-display-search.patch deleted file mode 100644 index 5e0b59e00..000000000 --- a/patches/omap_dt_dss/0005-OMAPFB-clean-up-default-display-search.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 6deb1f3f429b03f56dc52f16b52864f09bfa0d68 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 30 Jul 2013 10:59:16 +0300 -Subject: [PATCH 05/51] OMAPFB: clean up default display search - -Separate the code for finding the default display into a function for -clarity and to make it easier to extend it in the future. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/omapfb/omapfb-main.c | 46 ++++++++++++++++++++------------ - 1 file changed, 29 insertions(+), 17 deletions(-) - -diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c -index fcb9e93..b746963 100644 ---- a/drivers/video/omap2/omapfb/omapfb-main.c -+++ b/drivers/video/omap2/omapfb/omapfb-main.c -@@ -2417,6 +2417,34 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev, - return 0; - } - -+static struct omap_dss_device * -+omapfb_find_default_display(struct omapfb2_device *fbdev) -+{ -+ const char *def_name; -+ int i; -+ -+ /* search with the display name from the user or the board file */ -+ -+ def_name = omapdss_get_default_display_name(); -+ -+ if (def_name) { -+ for (i = 0; i < fbdev->num_displays; ++i) { -+ struct omap_dss_device *dssdev; -+ -+ dssdev = fbdev->displays[i].dssdev; -+ -+ if (dssdev->name && strcmp(def_name, dssdev->name) == 0) -+ return dssdev; -+ } -+ -+ /* def_name given but not found */ -+ return NULL; -+ } -+ -+ /* return the first display we have in the list */ -+ return fbdev->displays[0].dssdev; -+} -+ - static int omapfb_probe(struct platform_device *pdev) - { - struct omapfb2_device *fbdev = NULL; -@@ -2494,23 +2522,7 @@ static int omapfb_probe(struct platform_device *pdev) - for (i = 0; i < fbdev->num_managers; i++) - fbdev->managers[i] = omap_dss_get_overlay_manager(i); - -- def_display = NULL; -- -- for (i = 0; i < fbdev->num_displays; ++i) { -- struct omap_dss_device *dssdev; -- const char *def_name; -- -- def_name = omapdss_get_default_display_name(); -- -- dssdev = fbdev->displays[i].dssdev; -- -- if (def_name == NULL || -- (dssdev->name && strcmp(def_name, dssdev->name) == 0)) { -- def_display = dssdev; -- break; -- } -- } -- -+ def_display = omapfb_find_default_display(fbdev); - if (def_display == NULL) { - dev_err(fbdev->dev, "failed to find default display\n"); - r = -EPROBE_DEFER; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0006-OMAPFB-search-for-default-display-with-DT-alias.patch b/patches/omap_dt_dss/0006-OMAPFB-search-for-default-display-with-DT-alias.patch deleted file mode 100644 index 5005506d6..000000000 --- a/patches/omap_dt_dss/0006-OMAPFB-search-for-default-display-with-DT-alias.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 3cef499adb3b37c3fa31463c44a51e481ff6b0a9 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 6 Aug 2013 09:50:52 +0300 -Subject: [PATCH 06/51] OMAPFB: search for default display with DT alias - -Improve the search for the default display in two ways: -* compare the given display name to the display's alias -* if no display name is given, look for "display0" DT alias - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/omapfb/omapfb-main.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c -index b746963..f121e87 100644 ---- a/drivers/video/omap2/omapfb/omapfb-main.c -+++ b/drivers/video/omap2/omapfb/omapfb-main.c -@@ -2423,7 +2423,10 @@ omapfb_find_default_display(struct omapfb2_device *fbdev) - const char *def_name; - int i; - -- /* search with the display name from the user or the board file */ -+ /* -+ * Search with the display name from the user or the board file, -+ * comparing to display names and aliases -+ */ - - def_name = omapdss_get_default_display_name(); - -@@ -2435,12 +2438,30 @@ omapfb_find_default_display(struct omapfb2_device *fbdev) - - if (dssdev->name && strcmp(def_name, dssdev->name) == 0) - return dssdev; -+ -+ if (strcmp(def_name, dssdev->alias) == 0) -+ return dssdev; - } - - /* def_name given but not found */ - return NULL; - } - -+ /* then look for DT alias display0 */ -+ for (i = 0; i < fbdev->num_displays; ++i) { -+ struct omap_dss_device *dssdev; -+ int id; -+ -+ dssdev = fbdev->displays[i].dssdev; -+ -+ if (dssdev->dev->of_node == NULL) -+ continue; -+ -+ id = of_alias_get_id(dssdev->dev->of_node, "display"); -+ if (id == 0) -+ return dssdev; -+ } -+ - /* return the first display we have in the list */ - return fbdev->displays[0].dssdev; - } --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0007-OMAPDSS-add-of-helpers.patch b/patches/omap_dt_dss/0007-OMAPDSS-add-of-helpers.patch deleted file mode 100644 index d3e866e2d..000000000 --- a/patches/omap_dt_dss/0007-OMAPDSS-add-of-helpers.patch +++ /dev/null @@ -1,219 +0,0 @@ -From b439c4e54cd6553c574da95e7585a7213a6019b7 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 3 Dec 2013 16:57:40 +0200 -Subject: [PATCH 07/51] OMAPDSS: add of helpers - -Add helpers to get ports and endpoints from DT data. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/Makefile | 2 +- - drivers/video/omap2/dss/dss-of.c | 159 +++++++++++++++++++++++++++++++++++++++ - include/video/omapdss.h | 14 ++++ - 3 files changed, 174 insertions(+), 1 deletion(-) - create mode 100644 drivers/video/omap2/dss/dss-of.c - -diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile -index d3aa91b..8aec8bd 100644 ---- a/drivers/video/omap2/dss/Makefile -+++ b/drivers/video/omap2/dss/Makefile -@@ -1,7 +1,7 @@ - obj-$(CONFIG_OMAP2_DSS) += omapdss.o - # Core DSS files - omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \ -- output.o -+ output.o dss-of.o - # DSS compat layer files - omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \ - dispc-compat.o display-sysfs.o -diff --git a/drivers/video/omap2/dss/dss-of.c b/drivers/video/omap2/dss/dss-of.c -new file mode 100644 -index 0000000..7beb62f ---- /dev/null -+++ b/drivers/video/omap2/dss/dss-of.c -@@ -0,0 +1,159 @@ -+/* -+ * Copyright (C) 2013 Texas Instruments -+ * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> -+ * -+ * 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 published by -+ * the Free Software Foundation. -+ * -+ * 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. -+ */ -+ -+#include <linux/device.h> -+#include <linux/err.h> -+#include <linux/module.h> -+#include <linux/of.h> -+#include <linux/seq_file.h> -+ -+#include <video/omapdss.h> -+ -+struct device_node * -+omapdss_of_get_next_port(const struct device_node *parent, -+ struct device_node *prev) -+{ -+ struct device_node *port = NULL; -+ -+ if (!parent) -+ return NULL; -+ -+ if (!prev) { -+ struct device_node *ports; -+ /* -+ * It's the first call, we have to find a port subnode -+ * within this node or within an optional 'ports' node. -+ */ -+ ports = of_get_child_by_name(parent, "ports"); -+ if (ports) -+ parent = ports; -+ -+ port = of_get_child_by_name(parent, "port"); -+ -+ /* release the 'ports' node */ -+ of_node_put(ports); -+ } else { -+ struct device_node *ports; -+ -+ ports = of_get_parent(prev); -+ if (!ports) -+ return NULL; -+ -+ do { -+ port = of_get_next_child(ports, prev); -+ if (!port) { -+ of_node_put(ports); -+ return NULL; -+ } -+ prev = port; -+ } while (of_node_cmp(port->name, "port") != 0); -+ } -+ -+ return port; -+} -+EXPORT_SYMBOL_GPL(omapdss_of_get_next_port); -+ -+struct device_node * -+omapdss_of_get_next_endpoint(const struct device_node *parent, -+ struct device_node *prev) -+{ -+ struct device_node *ep = NULL; -+ -+ if (!parent) -+ return NULL; -+ -+ do { -+ ep = of_get_next_child(parent, prev); -+ if (!ep) -+ return NULL; -+ prev = ep; -+ } while (of_node_cmp(ep->name, "endpoint") != 0); -+ -+ return ep; -+} -+EXPORT_SYMBOL_GPL(omapdss_of_get_next_endpoint); -+ -+static struct device_node * -+omapdss_of_get_remote_device_node(const struct device_node *node) -+{ -+ struct device_node *np; -+ int i; -+ -+ np = of_parse_phandle(node, "remote-endpoint", 0); -+ -+ if (!np) -+ return NULL; -+ -+ np = of_get_next_parent(np); -+ -+ for (i = 0; i < 3 && np; ++i) { -+ struct property *prop; -+ -+ prop = of_find_property(np, "compatible", NULL); -+ -+ if (prop) -+ return np; -+ -+ np = of_get_next_parent(np); -+ } -+ -+ return NULL; -+} -+ -+struct device_node * -+omapdss_of_get_first_endpoint(const struct device_node *parent) -+{ -+ struct device_node *port; -+ struct device_node *ep; -+ -+ port = omapdss_of_get_next_port(parent, NULL); -+ if (port) { -+ ep = omapdss_of_get_next_endpoint(port, NULL); -+ of_node_put(port); -+ } else { -+ ep = omapdss_of_get_next_endpoint(parent, NULL); -+ } -+ -+ return ep; -+} -+EXPORT_SYMBOL_GPL(omapdss_of_get_first_endpoint); -+ -+struct omap_dss_device * -+omapdss_of_find_source_for_first_ep(struct device_node *node) -+{ -+ struct device_node *ep; -+ struct device_node *src_node; -+ struct omap_dss_device *src; -+ -+ ep = omapdss_of_get_first_endpoint(node); -+ if (!ep) -+ return ERR_PTR(-EINVAL); -+ -+ src_node = omapdss_of_get_remote_device_node(ep); -+ -+ of_node_put(ep); -+ -+ if (!src_node) -+ return ERR_PTR(-EINVAL); -+ -+ src = omap_dss_find_output_by_node(src_node); -+ -+ of_node_put(src_node); -+ -+ if (!src) -+ return ERR_PTR(-EPROBE_DEFER); -+ -+ return src; -+} -+EXPORT_SYMBOL_GPL(omapdss_of_find_source_for_first_ep); -diff --git a/include/video/omapdss.h b/include/video/omapdss.h -index 3d7c51a..e3cd2a9 100644 ---- a/include/video/omapdss.h -+++ b/include/video/omapdss.h -@@ -1019,4 +1019,18 @@ static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev) - return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; - } - -+struct device_node * -+omapdss_of_get_next_port(const struct device_node *parent, -+ struct device_node *prev); -+ -+struct device_node * -+omapdss_of_get_next_endpoint(const struct device_node *parent, -+ struct device_node *prev); -+ -+struct device_node * -+omapdss_of_get_first_endpoint(const struct device_node *parent); -+ -+struct omap_dss_device * -+omapdss_of_find_source_for_first_ep(struct device_node *node); -+ - #endif --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0008-OMAPDSS-Improve-regulator-names-for-DT.patch b/patches/omap_dt_dss/0008-OMAPDSS-Improve-regulator-names-for-DT.patch deleted file mode 100644 index b20797740..000000000 --- a/patches/omap_dt_dss/0008-OMAPDSS-Improve-regulator-names-for-DT.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 5b989c44f2a29e34f29a49a586b828aa53b2ac17 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 2 Jan 2014 12:54:31 +0200 -Subject: [PATCH 08/51] OMAPDSS: Improve regulator names for DT - -The regulator names used for DSS components are somewhat ugly for DT -use. As we're just adding DT support, it's simple to change the -regulator names. - -This patch makes the DSS driver get the regulators with somewhat cleaner -names when bootin with DT. For example, this allows us to define HDMI's -VDDA regulator in the DT data as: - -vdda-supply = <...>; - -instead of - -vdda_hdmi_dac-supply = <...>; - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/dsi.c | 5 ++++- - drivers/video/omap2/dss/hdmi4.c | 5 ++++- - drivers/video/omap2/dss/venc.c | 5 ++++- - 3 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c -index a820c37..782e898 100644 ---- a/drivers/video/omap2/dss/dsi.c -+++ b/drivers/video/omap2/dss/dsi.c -@@ -1151,7 +1151,10 @@ static int dsi_regulator_init(struct platform_device *dsidev) - if (dsi->vdds_dsi_reg != NULL) - return 0; - -- vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi"); -+ if (dsi->pdev->dev.of_node) -+ vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd"); -+ else -+ vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi"); - - /* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */ - if (IS_ERR(vdds_dsi)) -diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c -index 4a74538..ba6f025 100644 ---- a/drivers/video/omap2/dss/hdmi4.c -+++ b/drivers/video/omap2/dss/hdmi4.c -@@ -88,7 +88,10 @@ static int hdmi_init_regulator(void) - if (hdmi.vdda_hdmi_dac_reg != NULL) - return 0; - -- reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac"); -+ if (hdmi.pdev->dev.of_node) -+ reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); -+ else -+ reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac"); - - /* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */ - if (IS_ERR(reg)) -diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c -index 2cd7f7e..7d40e52 100644 ---- a/drivers/video/omap2/dss/venc.c -+++ b/drivers/video/omap2/dss/venc.c -@@ -636,7 +636,10 @@ static int venc_init_regulator(void) - if (venc.vdda_dac_reg != NULL) - return 0; - -- vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac"); -+ if (venc.pdev->dev.of_node) -+ vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda"); -+ else -+ vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac"); - - if (IS_ERR(vdda_dac)) { - if (PTR_ERR(vdda_dac) != -EPROBE_DEFER) --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0009-OMAPDSS-Add-DT-support-to-DSS.patch b/patches/omap_dt_dss/0009-OMAPDSS-Add-DT-support-to-DSS.patch deleted file mode 100644 index 80d508ea7..000000000 --- a/patches/omap_dt_dss/0009-OMAPDSS-Add-DT-support-to-DSS.patch +++ /dev/null @@ -1,300 +0,0 @@ -From 3a9a0d746665d77ac80ea3c08738bb01cdfbf881 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 16 Dec 2013 15:13:24 +0200 -Subject: [PATCH 09/51] OMAPDSS: Add DT support to DSS - -Add DT support for DSS. Contrary to the non-DT version, the DSS in DT -mode contains DPI and SDI outputs, which better reflects the hardware. -The non-DT code will be removed after all boards have been converted to -DT, so there's no need to change the non-DT code to act the same way. - -The code for DPI and SDI needs to be refined later to make it possible -to add multiple DPI ports. For now, handling just a single DPI port is -enough for all the boards. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/dpi.c | 47 ++++++++++++++++++++++++++++++++ - drivers/video/omap2/dss/dss.c | 63 +++++++++++++++++++++++++++++++++++++++++++ - drivers/video/omap2/dss/dss.h | 6 +++++ - drivers/video/omap2/dss/sdi.c | 45 +++++++++++++++++++++++++++++++ - 4 files changed, 161 insertions(+) - -diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c -index 7411f26..116aa07 100644 ---- a/drivers/video/omap2/dss/dpi.c -+++ b/drivers/video/omap2/dss/dpi.c -@@ -30,6 +30,7 @@ - #include <linux/platform_device.h> - #include <linux/regulator/consumer.h> - #include <linux/string.h> -+#include <linux/of.h> - - #include <video/omapdss.h> - -@@ -49,6 +50,8 @@ static struct { - int data_lines; - - struct omap_dss_device output; -+ -+ bool port_initialized; - } dpi; - - static struct platform_device *dpi_get_dsidev(enum omap_channel channel) -@@ -726,3 +729,47 @@ void __exit dpi_uninit_platform_driver(void) - { - platform_driver_unregister(&omap_dpi_driver); - } -+ -+int __init dpi_init_port(struct platform_device *pdev, struct device_node *port) -+{ -+ struct device_node *ep; -+ u32 datalines; -+ int r; -+ -+ ep = omapdss_of_get_next_endpoint(port, NULL); -+ if (!ep) -+ return 0; -+ -+ r = of_property_read_u32(ep, "data-lines", &datalines); -+ if (r) { -+ DSSERR("failed to parse datalines\n"); -+ goto err_datalines; -+ } -+ -+ dpi.data_lines = datalines; -+ -+ of_node_put(ep); -+ -+ dpi.pdev = pdev; -+ -+ mutex_init(&dpi.lock); -+ -+ dpi_init_output(pdev); -+ -+ dpi.port_initialized = true; -+ -+ return 0; -+ -+err_datalines: -+ of_node_put(ep); -+ -+ return r; -+} -+ -+void __exit dpi_uninit_port(void) -+{ -+ if (!dpi.port_initialized) -+ return; -+ -+ dpi_uninit_output(dpi.pdev); -+} -diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c -index 9a145da..9009f62 100644 ---- a/drivers/video/omap2/dss/dss.c -+++ b/drivers/video/omap2/dss/dss.c -@@ -23,6 +23,7 @@ - #define DSS_SUBSYS_NAME "DSS" - - #include <linux/kernel.h> -+#include <linux/module.h> - #include <linux/io.h> - #include <linux/export.h> - #include <linux/err.h> -@@ -33,6 +34,7 @@ - #include <linux/pm_runtime.h> - #include <linux/gfp.h> - #include <linux/sizes.h> -+#include <linux/of.h> - - #include <video/omapdss.h> - -@@ -788,6 +790,53 @@ static int __init dss_init_features(struct platform_device *pdev) - return 0; - } - -+static int dss_init_ports(struct platform_device *pdev) -+{ -+ struct device_node *parent = pdev->dev.of_node; -+ struct device_node *port; -+ int r; -+ -+ port = omapdss_of_get_next_port(parent, NULL); -+ if (!port) { -+#ifdef CONFIG_OMAP2_DSS_DPI -+ dpi_init_port(pdev, parent); -+#endif -+ return 0; -+ } -+ -+ do { -+ u32 reg; -+ -+ r = of_property_read_u32(port, "reg", ®); -+ if (r) -+ reg = 0; -+ -+#ifdef CONFIG_OMAP2_DSS_DPI -+ if (reg == 0) -+ dpi_init_port(pdev, port); -+#endif -+ -+#ifdef CONFIG_OMAP2_DSS_SDI -+ if (reg == 1) -+ sdi_init_port(pdev, port); -+#endif -+ -+ } while ((port = omapdss_of_get_next_port(parent, port)) != NULL); -+ -+ return 0; -+} -+ -+static void dss_uninit_ports(void) -+{ -+#ifdef CONFIG_OMAP2_DSS_DPI -+ dpi_uninit_port(); -+#endif -+ -+#ifdef CONFIG_OMAP2_DSS_SDI -+ sdi_uninit_port(); -+#endif -+} -+ - /* DSS HW IP initialisation */ - static int __init omap_dsshw_probe(struct platform_device *pdev) - { -@@ -846,6 +895,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev) - dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK; - dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK; - -+ dss_init_ports(pdev); -+ - rev = dss_read_reg(DSS_REVISION); - printk(KERN_INFO "OMAP DSS rev %d.%d\n", - FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0)); -@@ -865,6 +916,8 @@ err_setup_clocks: - - static int __exit omap_dsshw_remove(struct platform_device *pdev) - { -+ dss_uninit_ports(); -+ - pm_runtime_disable(&pdev->dev); - - dss_put_clocks(); -@@ -902,12 +955,22 @@ static const struct dev_pm_ops dss_pm_ops = { - .runtime_resume = dss_runtime_resume, - }; - -+static const struct of_device_id dss_of_match[] = { -+ { .compatible = "ti,omap2-dss", }, -+ { .compatible = "ti,omap3-dss", }, -+ { .compatible = "ti,omap4-dss", }, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, dss_of_match); -+ - static struct platform_driver omap_dsshw_driver = { - .remove = __exit_p(omap_dsshw_remove), - .driver = { - .name = "omapdss_dss", - .owner = THIS_MODULE, - .pm = &dss_pm_ops, -+ .of_match_table = dss_of_match, - }, - }; - -diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h -index 057f24c..8ece4f5 100644 ---- a/drivers/video/omap2/dss/dss.h -+++ b/drivers/video/omap2/dss/dss.h -@@ -252,6 +252,9 @@ bool dss_div_calc(unsigned long pck, unsigned long fck_min, - int sdi_init_platform_driver(void) __init; - void sdi_uninit_platform_driver(void) __exit; - -+int sdi_init_port(struct platform_device *pdev, struct device_node *port) __init; -+void sdi_uninit_port(void) __exit; -+ - /* DSI */ - - typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint, -@@ -363,6 +366,9 @@ static inline bool dsi_pll_calc(struct platform_device *dsidev, - int dpi_init_platform_driver(void) __init; - void dpi_uninit_platform_driver(void) __exit; - -+int dpi_init_port(struct platform_device *pdev, struct device_node *port) __init; -+void dpi_uninit_port(void) __exit; -+ - /* DISPC */ - int dispc_init_platform_driver(void) __init; - void dispc_uninit_platform_driver(void) __exit; -diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c -index efb9ee9..732e53c 100644 ---- a/drivers/video/omap2/dss/sdi.c -+++ b/drivers/video/omap2/dss/sdi.c -@@ -26,6 +26,7 @@ - #include <linux/export.h> - #include <linux/platform_device.h> - #include <linux/string.h> -+#include <linux/of.h> - - #include <video/omapdss.h> - #include "dss.h" -@@ -41,6 +42,8 @@ static struct { - int datapairs; - - struct omap_dss_device output; -+ -+ bool port_initialized; - } sdi; - - struct sdi_clk_calc_ctx { -@@ -387,3 +390,45 @@ void __exit sdi_uninit_platform_driver(void) - { - platform_driver_unregister(&omap_sdi_driver); - } -+ -+int __init sdi_init_port(struct platform_device *pdev, struct device_node *port) -+{ -+ struct device_node *ep; -+ u32 datapairs; -+ int r; -+ -+ ep = omapdss_of_get_next_endpoint(port, NULL); -+ if (!ep) -+ return 0; -+ -+ r = of_property_read_u32(ep, "datapairs", &datapairs); -+ if (r) { -+ DSSERR("failed to parse datapairs\n"); -+ goto err_datapairs; -+ } -+ -+ sdi.datapairs = datapairs; -+ -+ of_node_put(ep); -+ -+ sdi.pdev = pdev; -+ -+ sdi_init_output(pdev); -+ -+ sdi.port_initialized = true; -+ -+ return 0; -+ -+err_datapairs: -+ of_node_put(ep); -+ -+ return r; -+} -+ -+void __exit sdi_uninit_port(void) -+{ -+ if (!sdi.port_initialized) -+ return; -+ -+ sdi_uninit_output(sdi.pdev); -+} --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0010-OMAPDSS-Add-DT-support-to-DISPC.patch b/patches/omap_dt_dss/0010-OMAPDSS-Add-DT-support-to-DISPC.patch deleted file mode 100644 index c7686cffe..000000000 --- a/patches/omap_dt_dss/0010-OMAPDSS-Add-DT-support-to-DISPC.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 5bb69f4ba9e261d11d458f8889e726aaa853721e Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 17 Dec 2013 11:54:02 +0200 -Subject: [PATCH 10/51] OMAPDSS: Add DT support to DISPC - -Add DT support to DISPC. Only thing needed here is the of_match_table. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/dispc.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c -index bbeb8dd..37bd163 100644 ---- a/drivers/video/omap2/dss/dispc.c -+++ b/drivers/video/omap2/dss/dispc.c -@@ -3780,12 +3780,20 @@ static const struct dev_pm_ops dispc_pm_ops = { - .runtime_resume = dispc_runtime_resume, - }; - -+static const struct of_device_id dispc_of_match[] = { -+ { .compatible = "ti,omap2-dispc", }, -+ { .compatible = "ti,omap3-dispc", }, -+ { .compatible = "ti,omap4-dispc", }, -+ {}, -+}; -+ - static struct platform_driver omap_dispchw_driver = { - .remove = __exit_p(omap_dispchw_remove), - .driver = { - .name = "omapdss_dispc", - .owner = THIS_MODULE, - .pm = &dispc_pm_ops, -+ .of_match_table = dispc_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0011-OMAPDSS-Add-DT-support-to-HDMI.patch b/patches/omap_dt_dss/0011-OMAPDSS-Add-DT-support-to-HDMI.patch deleted file mode 100644 index 62644ad2a..000000000 --- a/patches/omap_dt_dss/0011-OMAPDSS-Add-DT-support-to-HDMI.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 71afd8a004f6aede33de5dc59ee3361d998b6453 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 16 Dec 2013 15:14:04 +0200 -Subject: [PATCH 11/51] OMAPDSS: Add DT support to HDMI - -Add DT support to HDMI driver. The only thing needed for DT support here -is the of_match_table. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/hdmi4.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c -index ba6f025..a2a4d95 100644 ---- a/drivers/video/omap2/dss/hdmi4.c -+++ b/drivers/video/omap2/dss/hdmi4.c -@@ -682,6 +682,11 @@ static const struct dev_pm_ops hdmi_pm_ops = { - .runtime_resume = hdmi_runtime_resume, - }; - -+static const struct of_device_id hdmi_of_match[] = { -+ { .compatible = "ti,omap4-hdmi", }, -+ {}, -+}; -+ - static struct platform_driver omapdss_hdmihw_driver = { - .probe = omapdss_hdmihw_probe, - .remove = __exit_p(omapdss_hdmihw_remove), -@@ -689,6 +694,7 @@ static struct platform_driver omapdss_hdmihw_driver = { - .name = "omapdss_hdmi", - .owner = THIS_MODULE, - .pm = &hdmi_pm_ops, -+ .of_match_table = hdmi_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0012-OMAPDSS-Add-DT-support-to-VENC.patch b/patches/omap_dt_dss/0012-OMAPDSS-Add-DT-support-to-VENC.patch deleted file mode 100644 index 63dfe8cad..000000000 --- a/patches/omap_dt_dss/0012-OMAPDSS-Add-DT-support-to-VENC.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 03a68d36d4b09640cf76a7dffcc8e50f245bc091 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 16 Dec 2013 15:14:15 +0200 -Subject: [PATCH 12/51] OMAPDSS: Add DT support to VENC - -Add DT support to VENC. - -In contrast to non-DT version, the DT version gets the invert-polarity -and connector type via venc's endpoint, not from the connector. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/venc.c | 61 ++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 61 insertions(+) - -diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c -index 7d40e52..fc7069a 100644 ---- a/drivers/video/omap2/dss/venc.c -+++ b/drivers/video/omap2/dss/venc.c -@@ -34,6 +34,7 @@ - #include <linux/platform_device.h> - #include <linux/regulator/consumer.h> - #include <linux/pm_runtime.h> -+#include <linux/of.h> - - #include <video/omapdss.h> - -@@ -808,6 +809,48 @@ static void __exit venc_uninit_output(struct platform_device *pdev) - omapdss_unregister_output(out); - } - -+static int venc_probe_of(struct platform_device *pdev) -+{ -+ struct device_node *node = pdev->dev.of_node; -+ struct device_node *ep; -+ u32 channels; -+ int r; -+ -+ ep = omapdss_of_get_first_endpoint(node); -+ if (!ep) -+ return 0; -+ -+ venc.invert_polarity = of_property_read_bool(ep, "ti,invert-polarity"); -+ -+ r = of_property_read_u32(ep, "ti,channels", &channels); -+ if (r) { -+ dev_err(&pdev->dev, -+ "failed to read property 'ti,channels': %d\n", r); -+ goto err; -+ } -+ -+ switch (channels) { -+ case 1: -+ venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE; -+ break; -+ case 2: -+ venc.type = OMAP_DSS_VENC_TYPE_SVIDEO; -+ break; -+ default: -+ dev_err(&pdev->dev, "bad channel propert '%d'\n", channels); -+ r = -EINVAL; -+ goto err; -+ } -+ -+ of_node_put(ep); -+ -+ return 0; -+err: -+ of_node_put(ep); -+ -+ return 0; -+} -+ - /* VENC HW IP initialisation */ - static int omap_venchw_probe(struct platform_device *pdev) - { -@@ -849,12 +892,21 @@ static int omap_venchw_probe(struct platform_device *pdev) - - venc_runtime_put(); - -+ if (pdev->dev.of_node) { -+ r = venc_probe_of(pdev); -+ if (r) { -+ DSSERR("Invalid DT data\n"); -+ goto err_probe_of; -+ } -+ } -+ - dss_debugfs_create_file("venc", venc_dump_regs); - - venc_init_output(pdev); - - return 0; - -+err_probe_of: - err_runtime_get: - pm_runtime_disable(&pdev->dev); - return r; -@@ -898,6 +950,14 @@ static const struct dev_pm_ops venc_pm_ops = { - .runtime_resume = venc_runtime_resume, - }; - -+ -+static const struct of_device_id venc_of_match[] = { -+ { .compatible = "ti,omap2-venc", }, -+ { .compatible = "ti,omap3-venc", }, -+ { .compatible = "ti,omap4-venc", }, -+ {}, -+}; -+ - static struct platform_driver omap_venchw_driver = { - .probe = omap_venchw_probe, - .remove = __exit_p(omap_venchw_remove), -@@ -905,6 +965,7 @@ static struct platform_driver omap_venchw_driver = { - .name = "omapdss_venc", - .owner = THIS_MODULE, - .pm = &venc_pm_ops, -+ .of_match_table = venc_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0013-OMAPDSS-Add-DT-support-to-DSI.patch b/patches/omap_dt_dss/0013-OMAPDSS-Add-DT-support-to-DSI.patch deleted file mode 100644 index aae87ecdd..000000000 --- a/patches/omap_dt_dss/0013-OMAPDSS-Add-DT-support-to-DSI.patch +++ /dev/null @@ -1,252 +0,0 @@ -From c2e0e42968474394882b51b3685709d6817c4049 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Aug 2012 15:35:42 +0300 -Subject: [PATCH 13/51] OMAPDSS: Add DT support to DSI - -Add the code to make the DSI driver work with device tree on OMAP3 and -OMAP4. - -A minor hack is needed at the moment in the DSI driver: the DSS driver -needs to know the ID number of a DSI device, as clocks are routed in -different ways to the DSI devices. At the moment we don't have any -proper way to manage this, so this patchs adds a simple lookup table -that is used to deduce the ID from the DSI device's base address. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/dsi.c | 139 +++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 138 insertions(+), 1 deletion(-) - -diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c -index 782e898..efb24b3 100644 ---- a/drivers/video/omap2/dss/dsi.c -+++ b/drivers/video/omap2/dss/dsi.c -@@ -38,6 +38,8 @@ - #include <linux/slab.h> - #include <linux/debugfs.h> - #include <linux/pm_runtime.h> -+#include <linux/of.h> -+#include <linux/of_platform.h> - - #include <video/omapdss.h> - #include <video/mipi_display.h> -@@ -386,6 +388,13 @@ struct dsi_packet_sent_handler_data { - struct completion *completion; - }; - -+struct dsi_module_id_data { -+ u32 address; -+ int id; -+}; -+ -+static const struct of_device_id dsi_of_match[]; -+ - #ifdef DSI_PERF_MEASURE - static bool dsi_perf; - module_param(dsi_perf, bool, 0644); -@@ -5373,12 +5382,69 @@ static void dsi_uninit_output(struct platform_device *dsidev) - omapdss_unregister_output(out); - } - -+static int dsi_probe_of(struct platform_device *pdev) -+{ -+ struct device_node *node = pdev->dev.of_node; -+ struct dsi_data *dsi = dsi_get_dsidrv_data(pdev); -+ struct property *prop; -+ u32 lane_arr[10]; -+ int len, num_pins; -+ int r, i; -+ struct device_node *ep; -+ struct omap_dsi_pin_config pin_cfg; -+ -+ ep = omapdss_of_get_first_endpoint(node); -+ if (!ep) -+ return 0; -+ -+ prop = of_find_property(ep, "lanes", &len); -+ if (prop == NULL) { -+ dev_err(&pdev->dev, "failed to find lane data\n"); -+ r = -EINVAL; -+ goto err; -+ } -+ -+ num_pins = len / sizeof(u32); -+ -+ if (num_pins < 4 || num_pins % 2 != 0 || -+ num_pins > dsi->num_lanes_supported * 2) { -+ dev_err(&pdev->dev, "bad number of lanes\n"); -+ r = -EINVAL; -+ goto err; -+ } -+ -+ r = of_property_read_u32_array(ep, "lanes", lane_arr, num_pins); -+ if (r) { -+ dev_err(&pdev->dev, "failed to read lane data\n"); -+ goto err; -+ } -+ -+ pin_cfg.num_pins = num_pins; -+ for (i = 0; i < num_pins; ++i) -+ pin_cfg.pins[i] = (int)lane_arr[i]; -+ -+ r = dsi_configure_pins(&dsi->output, &pin_cfg); -+ if (r) { -+ dev_err(&pdev->dev, "failed to configure pins"); -+ goto err; -+ } -+ -+ of_node_put(ep); -+ -+ return 0; -+ -+err: -+ of_node_put(ep); -+ return r; -+} -+ - /* DSI1 HW IP initialisation */ - static int omap_dsihw_probe(struct platform_device *dsidev) - { - u32 rev; - int r, i; - struct dsi_data *dsi; -+ struct resource *dsi_mem; - struct resource *res; - struct resource temp_res; - -@@ -5386,7 +5452,6 @@ static int omap_dsihw_probe(struct platform_device *dsidev) - if (!dsi) - return -ENOMEM; - -- dsi->module_id = dsidev->id; - dsi->pdev = dsidev; - dev_set_drvdata(&dsidev->dev, dsi); - -@@ -5424,6 +5489,8 @@ static int omap_dsihw_probe(struct platform_device *dsidev) - res = &temp_res; - } - -+ dsi_mem = res; -+ - dsi->proto_base = devm_ioremap(&dsidev->dev, res->start, - resource_size(res)); - if (!dsi->proto_base) { -@@ -5484,6 +5551,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev) - return r; - } - -+ if (dsidev->dev.of_node) { -+ const struct of_device_id *match; -+ const struct dsi_module_id_data *d; -+ -+ match = of_match_node(dsi_of_match, dsidev->dev.of_node); -+ if (!match) { -+ DSSERR("unsupported DSI module\n"); -+ return -ENODEV; -+ } -+ -+ d = match->data; -+ -+ while (d->address != 0 && d->address != dsi_mem->start) -+ d++; -+ -+ if (d->address == 0) { -+ DSSERR("unsupported DSI module\n"); -+ return -ENODEV; -+ } -+ -+ dsi->module_id = d->id; -+ } else { -+ dsi->module_id = dsidev->id; -+ } -+ - /* DSI VCs initialization */ - for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) { - dsi->vc[i].source = DSI_VC_SOURCE_L4; -@@ -5519,6 +5611,19 @@ static int omap_dsihw_probe(struct platform_device *dsidev) - - dsi_init_output(dsidev); - -+ if (dsidev->dev.of_node) { -+ r = dsi_probe_of(dsidev); -+ if (r) { -+ DSSERR("Invalid DSI DT data\n"); -+ goto err_probe_of; -+ } -+ -+ r = of_platform_populate(dsidev->dev.of_node, NULL, NULL, -+ &dsidev->dev); -+ if (r) -+ DSSERR("Failed to populate DSI child devices: %d\n", r); -+ } -+ - dsi_runtime_put(dsidev); - - if (dsi->module_id == 0) -@@ -5532,17 +5637,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev) - else if (dsi->module_id == 1) - dss_debugfs_create_file("dsi2_irqs", dsi2_dump_irqs); - #endif -+ - return 0; - -+err_probe_of: -+ dsi_uninit_output(dsidev); -+ dsi_runtime_put(dsidev); -+ - err_runtime_get: - pm_runtime_disable(&dsidev->dev); - return r; - } - -+static int dsi_unregister_child(struct device *dev, void *data) -+{ -+ struct platform_device *pdev = to_platform_device(dev); -+ platform_device_unregister(pdev); -+ return 0; -+} -+ - static int __exit omap_dsihw_remove(struct platform_device *dsidev) - { - struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); - -+ device_for_each_child(&dsidev->dev, NULL, dsi_unregister_child); -+ - WARN_ON(dsi->scp_clk_refcount > 0); - - dsi_uninit_output(dsidev); -@@ -5580,6 +5699,23 @@ static const struct dev_pm_ops dsi_pm_ops = { - .runtime_resume = dsi_runtime_resume, - }; - -+static const struct dsi_module_id_data dsi_of_data_omap3[] = { -+ { .address = 0x4804fc00, .id = 0, }, -+ { }, -+}; -+ -+static const struct dsi_module_id_data dsi_of_data_omap4[] = { -+ { .address = 0x58004000, .id = 0, }, -+ { .address = 0x58005000, .id = 1, }, -+ { }, -+}; -+ -+static const struct of_device_id dsi_of_match[] = { -+ { .compatible = "ti,omap3-dsi", .data = dsi_of_data_omap3, }, -+ { .compatible = "ti,omap4-dsi", .data = dsi_of_data_omap4, }, -+ {}, -+}; -+ - static struct platform_driver omap_dsihw_driver = { - .probe = omap_dsihw_probe, - .remove = __exit_p(omap_dsihw_remove), -@@ -5587,6 +5723,7 @@ static struct platform_driver omap_dsihw_driver = { - .name = "omapdss_dsi", - .owner = THIS_MODULE, - .pm = &dsi_pm_ops, -+ .of_match_table = dsi_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0014-OMAPDSS-panel-dsi-cm-Add-DT-support.patch b/patches/omap_dt_dss/0014-OMAPDSS-panel-dsi-cm-Add-DT-support.patch deleted file mode 100644 index b0933fff2..000000000 --- a/patches/omap_dt_dss/0014-OMAPDSS-panel-dsi-cm-Add-DT-support.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 5641cef8f0c60e4f76a5635a56f45d00f6201b98 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 30 Jul 2013 10:34:16 +0300 -Subject: [PATCH 14/51] OMAPDSS: panel-dsi-cm: Add DT support - -Add DT support for panel-dsi-cm. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/displays-new/panel-dsi-cm.c | 65 +++++++++++++++++++++++-- - 1 file changed, 61 insertions(+), 4 deletions(-) - -diff --git a/drivers/video/omap2/displays-new/panel-dsi-cm.c b/drivers/video/omap2/displays-new/panel-dsi-cm.c -index b7baafe..d302c44 100644 ---- a/drivers/video/omap2/displays-new/panel-dsi-cm.c -+++ b/drivers/video/omap2/displays-new/panel-dsi-cm.c -@@ -22,6 +22,8 @@ - #include <linux/sched.h> - #include <linux/slab.h> - #include <linux/workqueue.h> -+#include <linux/of_device.h> -+#include <linux/of_gpio.h> - - #include <video/omapdss.h> - #include <video/omap-panel-data.h> -@@ -595,10 +597,13 @@ static int dsicm_power_on(struct panel_drv_data *ddata) - .lp_clk_max = 10000000, - }; - -- r = in->ops.dsi->configure_pins(in, &ddata->pin_config); -- if (r) { -- dev_err(&ddata->pdev->dev, "failed to configure DSI pins\n"); -- goto err0; -+ if (ddata->pin_config.num_pins > 0) { -+ r = in->ops.dsi->configure_pins(in, &ddata->pin_config); -+ if (r) { -+ dev_err(&ddata->pdev->dev, -+ "failed to configure DSI pins\n"); -+ goto err0; -+ } - } - - r = in->ops.dsi->set_config(in, &dsi_config); -@@ -1156,6 +1161,46 @@ static int dsicm_probe_pdata(struct platform_device *pdev) - return 0; - } - -+static int dsicm_probe_of(struct platform_device *pdev) -+{ -+ struct device_node *node = pdev->dev.of_node; -+ struct panel_drv_data *ddata = platform_get_drvdata(pdev); -+ struct omap_dss_device *in; -+ int gpio; -+ -+ gpio = of_get_gpio(node, 0); -+ if (!gpio_is_valid(gpio)) { -+ dev_err(&pdev->dev, "failed to parse reset gpio\n"); -+ return gpio; -+ } -+ ddata->reset_gpio = gpio; -+ -+ if (of_gpio_count(node) > 1) { -+ gpio = of_get_gpio(node, 1); -+ -+ if (gpio_is_valid(gpio) || gpio == -ENOENT) { -+ ddata->ext_te_gpio = gpio; -+ } else { -+ dev_err(&pdev->dev, "failed to parse TE gpio\n"); -+ return gpio; -+ } -+ } else { -+ ddata->ext_te_gpio = -1; -+ } -+ -+ in = omapdss_of_find_source_for_first_ep(node); -+ if (IS_ERR(in)) { -+ dev_err(&pdev->dev, "failed to find video source\n"); -+ return PTR_ERR(in); -+ } -+ -+ ddata->in = in; -+ -+ /* TODO: ulps, backlight */ -+ -+ return 0; -+} -+ - static int dsicm_probe(struct platform_device *pdev) - { - struct backlight_properties props; -@@ -1178,6 +1223,10 @@ static int dsicm_probe(struct platform_device *pdev) - r = dsicm_probe_pdata(pdev); - if (r) - return r; -+ } else if (pdev->dev.of_node) { -+ r = dsicm_probe_of(pdev); -+ if (r) -+ return r; - } else { - return -ENODEV; - } -@@ -1320,12 +1369,20 @@ static int __exit dsicm_remove(struct platform_device *pdev) - return 0; - } - -+static const struct of_device_id dsicm_of_match[] = { -+ { .compatible = "omapdss,panel-dsi-cm", }, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, dsicm_of_match); -+ - static struct platform_driver dsicm_driver = { - .probe = dsicm_probe, - .remove = __exit_p(dsicm_remove), - .driver = { - .name = "panel-dsi-cm", - .owner = THIS_MODULE, -+ .of_match_table = dsicm_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0015-OMAPDSS-encoder-tfp410-Add-DT-support.patch b/patches/omap_dt_dss/0015-OMAPDSS-encoder-tfp410-Add-DT-support.patch deleted file mode 100644 index 81f7a55d0..000000000 --- a/patches/omap_dt_dss/0015-OMAPDSS-encoder-tfp410-Add-DT-support.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 6c27eebc7d4a1d452bf7b81943deaa71e506baf7 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 30 Jul 2013 10:35:30 +0300 -Subject: [PATCH 15/51] OMAPDSS: encoder-tfp410: Add DT support - -Add DT support for encoder-tfp410. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/displays-new/encoder-tfp410.c | 43 ++++++++++++++++++++++- - 1 file changed, 42 insertions(+), 1 deletion(-) - -diff --git a/drivers/video/omap2/displays-new/encoder-tfp410.c b/drivers/video/omap2/displays-new/encoder-tfp410.c -index 4a291e7..e1ef972 100644 ---- a/drivers/video/omap2/displays-new/encoder-tfp410.c -+++ b/drivers/video/omap2/displays-new/encoder-tfp410.c -@@ -13,6 +13,7 @@ - #include <linux/module.h> - #include <linux/platform_device.h> - #include <linux/slab.h> -+#include <linux/of_gpio.h> - - #include <video/omapdss.h> - #include <video/omap-panel-data.h> -@@ -82,7 +83,8 @@ static int tfp410_enable(struct omap_dss_device *dssdev) - return 0; - - in->ops.dpi->set_timings(in, &ddata->timings); -- in->ops.dpi->set_data_lines(in, ddata->data_lines); -+ if (ddata->data_lines) -+ in->ops.dpi->set_data_lines(in, ddata->data_lines); - - r = in->ops.dpi->enable(in); - if (r) -@@ -179,6 +181,33 @@ static int tfp410_probe_pdata(struct platform_device *pdev) - return 0; - } - -+static int tfp410_probe_of(struct platform_device *pdev) -+{ -+ struct panel_drv_data *ddata = platform_get_drvdata(pdev); -+ struct device_node *node = pdev->dev.of_node; -+ struct omap_dss_device *in; -+ int gpio; -+ -+ gpio = of_get_gpio(node, 0); -+ -+ if (gpio_is_valid(gpio) || gpio == -ENOENT) { -+ ddata->pd_gpio = gpio; -+ } else { -+ dev_err(&pdev->dev, "failed to parse PD gpio\n"); -+ return gpio; -+ } -+ -+ in = omapdss_of_find_source_for_first_ep(node); -+ if (IS_ERR(in)) { -+ dev_err(&pdev->dev, "failed to find video source\n"); -+ return PTR_ERR(in); -+ } -+ -+ ddata->in = in; -+ -+ return 0; -+} -+ - static int tfp410_probe(struct platform_device *pdev) - { - struct panel_drv_data *ddata; -@@ -195,6 +224,10 @@ static int tfp410_probe(struct platform_device *pdev) - r = tfp410_probe_pdata(pdev); - if (r) - return r; -+ } else if (pdev->dev.of_node) { -+ r = tfp410_probe_of(pdev); -+ if (r) -+ return r; - } else { - return -ENODEV; - } -@@ -251,12 +284,20 @@ static int __exit tfp410_remove(struct platform_device *pdev) - return 0; - } - -+static const struct of_device_id tfp410_of_match[] = { -+ { .compatible = "omapdss,ti,tfp410", }, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, tfp410_of_match); -+ - static struct platform_driver tfp410_driver = { - .probe = tfp410_probe, - .remove = __exit_p(tfp410_remove), - .driver = { - .name = "tfp410", - .owner = THIS_MODULE, -+ .of_match_table = tfp410_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0016-OMAPDSS-connector-dvi-Add-DT-support.patch b/patches/omap_dt_dss/0016-OMAPDSS-connector-dvi-Add-DT-support.patch deleted file mode 100644 index d45ebb49b..000000000 --- a/patches/omap_dt_dss/0016-OMAPDSS-connector-dvi-Add-DT-support.patch +++ /dev/null @@ -1,89 +0,0 @@ -From c775a235731d00f99ca2bba38e236b7834376692 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 30 Jul 2013 10:36:29 +0300 -Subject: [PATCH 16/51] OMAPDSS: connector-dvi: Add DT support - -Add DT support for connector-dvi. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/displays-new/connector-dvi.c | 43 ++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) - -diff --git a/drivers/video/omap2/displays-new/connector-dvi.c b/drivers/video/omap2/displays-new/connector-dvi.c -index b6c5090..4ea26ab 100644 ---- a/drivers/video/omap2/displays-new/connector-dvi.c -+++ b/drivers/video/omap2/displays-new/connector-dvi.c -@@ -277,6 +277,37 @@ static int dvic_probe_pdata(struct platform_device *pdev) - return 0; - } - -+static int dvic_probe_of(struct platform_device *pdev) -+{ -+ struct panel_drv_data *ddata = platform_get_drvdata(pdev); -+ struct device_node *node = pdev->dev.of_node; -+ struct omap_dss_device *in; -+ struct device_node *adapter_node; -+ struct i2c_adapter *adapter; -+ -+ in = omapdss_of_find_source_for_first_ep(node); -+ if (IS_ERR(in)) { -+ dev_err(&pdev->dev, "failed to find video source\n"); -+ return PTR_ERR(in); -+ } -+ -+ ddata->in = in; -+ -+ adapter_node = of_parse_phandle(node, "i2c-bus", 0); -+ if (adapter_node) { -+ adapter = of_find_i2c_adapter_by_node(adapter_node); -+ if (adapter == NULL) { -+ dev_err(&pdev->dev, "failed to parse i2c-bus\n"); -+ omap_dss_put_device(ddata->in); -+ return -EPROBE_DEFER; -+ } -+ -+ ddata->i2c_adapter = adapter; -+ } -+ -+ return 0; -+} -+ - static int dvic_probe(struct platform_device *pdev) - { - struct panel_drv_data *ddata; -@@ -293,6 +324,10 @@ static int dvic_probe(struct platform_device *pdev) - r = dvic_probe_pdata(pdev); - if (r) - return r; -+ } else if (pdev->dev.of_node) { -+ r = dvic_probe_of(pdev); -+ if (r) -+ return r; - } else { - return -ENODEV; - } -@@ -342,12 +377,20 @@ static int __exit dvic_remove(struct platform_device *pdev) - return 0; - } - -+static const struct of_device_id dvic_of_match[] = { -+ { .compatible = "omapdss,dvi-connector", }, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, dvic_of_match); -+ - static struct platform_driver dvi_connector_driver = { - .probe = dvic_probe, - .remove = __exit_p(dvic_remove), - .driver = { - .name = "connector-dvi", - .owner = THIS_MODULE, -+ .of_match_table = dvic_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0017-OMAPDSS-encoder-tpd12s015-Add-DT-support.patch b/patches/omap_dt_dss/0017-OMAPDSS-encoder-tpd12s015-Add-DT-support.patch deleted file mode 100644 index 1c5dc1d52..000000000 --- a/patches/omap_dt_dss/0017-OMAPDSS-encoder-tpd12s015-Add-DT-support.patch +++ /dev/null @@ -1,109 +0,0 @@ -From dd738e5c3c0ca219f146e413d2ac57618178e3da Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 30 Jul 2013 10:37:17 +0300 -Subject: [PATCH 17/51] OMAPDSS: encoder-tpd12s015: Add DT support - -Add DT support for encoder-tpd12s015. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../video/omap2/displays-new/encoder-tpd12s015.c | 56 ++++++++++++++++++++++ - 1 file changed, 56 insertions(+) - -diff --git a/drivers/video/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/omap2/displays-new/encoder-tpd12s015.c -index d5c936c..7e33686 100644 ---- a/drivers/video/omap2/displays-new/encoder-tpd12s015.c -+++ b/drivers/video/omap2/displays-new/encoder-tpd12s015.c -@@ -15,6 +15,7 @@ - #include <linux/slab.h> - #include <linux/gpio.h> - #include <linux/platform_device.h> -+#include <linux/of_gpio.h> - - #include <video/omapdss.h> - #include <video/omap-panel-data.h> -@@ -289,6 +290,49 @@ static int tpd_probe_pdata(struct platform_device *pdev) - return 0; - } - -+static int tpd_probe_of(struct platform_device *pdev) -+{ -+ struct panel_drv_data *ddata = platform_get_drvdata(pdev); -+ struct device_node *node = pdev->dev.of_node; -+ struct omap_dss_device *in; -+ int gpio; -+ -+ /* CT CP HPD GPIO */ -+ gpio = of_get_gpio(node, 0); -+ if (!gpio_is_valid(gpio)) { -+ dev_err(&pdev->dev, "failed to parse CT CP HPD gpio\n"); -+ return gpio; -+ } -+ ddata->ct_cp_hpd_gpio = gpio; -+ -+ /* LS OE GPIO */ -+ gpio = of_get_gpio(node, 1); -+ if (gpio_is_valid(gpio) || gpio == -ENOENT) { -+ ddata->ls_oe_gpio = gpio; -+ } else { -+ dev_err(&pdev->dev, "failed to parse LS OE gpio\n"); -+ return gpio; -+ } -+ -+ /* HPD GPIO */ -+ gpio = of_get_gpio(node, 2); -+ if (!gpio_is_valid(gpio)) { -+ dev_err(&pdev->dev, "failed to parse HPD gpio\n"); -+ return gpio; -+ } -+ ddata->hpd_gpio = gpio; -+ -+ in = omapdss_of_find_source_for_first_ep(node); -+ if (IS_ERR(in)) { -+ dev_err(&pdev->dev, "failed to find video source\n"); -+ return PTR_ERR(in); -+ } -+ -+ ddata->in = in; -+ -+ return 0; -+} -+ - static int tpd_probe(struct platform_device *pdev) - { - struct omap_dss_device *in, *dssdev; -@@ -307,6 +351,10 @@ static int tpd_probe(struct platform_device *pdev) - r = tpd_probe_pdata(pdev); - if (r) - return r; -+ } else if (pdev->dev.of_node) { -+ r = tpd_probe_of(pdev); -+ if (r) -+ return r; - } else { - return -ENODEV; - } -@@ -379,12 +427,20 @@ static int __exit tpd_remove(struct platform_device *pdev) - return 0; - } - -+static const struct of_device_id tpd_of_match[] = { -+ { .compatible = "omapdss,ti,tpd12s015", }, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, tpd_of_match); -+ - static struct platform_driver tpd_driver = { - .probe = tpd_probe, - .remove = __exit_p(tpd_remove), - .driver = { - .name = "tpd12s015", - .owner = THIS_MODULE, -+ .of_match_table = tpd_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0018-OMAPDSS-hdmi-connector-Add-DT-support.patch b/patches/omap_dt_dss/0018-OMAPDSS-hdmi-connector-Add-DT-support.patch deleted file mode 100644 index 85ac22c45..000000000 --- a/patches/omap_dt_dss/0018-OMAPDSS-hdmi-connector-Add-DT-support.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 8d48a1f842d89077f529c31445d079cf3b88002b Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 30 Jul 2013 10:37:34 +0300 -Subject: [PATCH 18/51] OMAPDSS: hdmi-connector: Add DT support - -Add DT support for hdmi-connector. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/displays-new/connector-hdmi.c | 30 +++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - -diff --git a/drivers/video/omap2/displays-new/connector-hdmi.c b/drivers/video/omap2/displays-new/connector-hdmi.c -index 9abe2c0..2e026ea 100644 ---- a/drivers/video/omap2/displays-new/connector-hdmi.c -+++ b/drivers/video/omap2/displays-new/connector-hdmi.c -@@ -12,6 +12,7 @@ - #include <linux/slab.h> - #include <linux/module.h> - #include <linux/platform_device.h> -+#include <linux/of.h> - - #include <drm/drm_edid.h> - -@@ -301,6 +302,23 @@ static int hdmic_probe_pdata(struct platform_device *pdev) - return 0; - } - -+static int hdmic_probe_of(struct platform_device *pdev) -+{ -+ struct panel_drv_data *ddata = platform_get_drvdata(pdev); -+ struct device_node *node = pdev->dev.of_node; -+ struct omap_dss_device *in; -+ -+ in = omapdss_of_find_source_for_first_ep(node); -+ if (IS_ERR(in)) { -+ dev_err(&pdev->dev, "failed to find video source\n"); -+ return PTR_ERR(in); -+ } -+ -+ ddata->in = in; -+ -+ return 0; -+} -+ - static int hdmic_probe(struct platform_device *pdev) - { - struct panel_drv_data *ddata; -@@ -318,6 +336,10 @@ static int hdmic_probe(struct platform_device *pdev) - r = hdmic_probe_pdata(pdev); - if (r) - return r; -+ } else if (pdev->dev.of_node) { -+ r = hdmic_probe_of(pdev); -+ if (r) -+ return r; - } else { - return -ENODEV; - } -@@ -359,12 +381,20 @@ static int __exit hdmic_remove(struct platform_device *pdev) - return 0; - } - -+static const struct of_device_id hdmic_of_match[] = { -+ { .compatible = "omapdss,hdmi-connector", }, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, hdmic_of_match); -+ - static struct platform_driver hdmi_connector_driver = { - .probe = hdmic_probe, - .remove = __exit_p(hdmic_remove), - .driver = { - .name = "connector-hdmi", - .owner = THIS_MODULE, -+ .of_match_table = hdmic_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0019-OMAPDSS-panel-dpi-Add-DT-support.patch b/patches/omap_dt_dss/0019-OMAPDSS-panel-dpi-Add-DT-support.patch deleted file mode 100644 index 2c6ca7c1d..000000000 --- a/patches/omap_dt_dss/0019-OMAPDSS-panel-dpi-Add-DT-support.patch +++ /dev/null @@ -1,127 +0,0 @@ -From bac10868effd2ad0b6dbda44c51252ba05831350 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 16 May 2013 15:14:16 +0300 -Subject: [PATCH 19/51] OMAPDSS: panel-dpi: Add DT support - -Add DT support for panel-dpi. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/displays-new/panel-dpi.c | 64 +++++++++++++++++++++++++++- - 1 file changed, 63 insertions(+), 1 deletion(-) - -diff --git a/drivers/video/omap2/displays-new/panel-dpi.c b/drivers/video/omap2/displays-new/panel-dpi.c -index 5f8f7e7..b032daf 100644 ---- a/drivers/video/omap2/displays-new/panel-dpi.c -+++ b/drivers/video/omap2/displays-new/panel-dpi.c -@@ -13,9 +13,12 @@ - #include <linux/module.h> - #include <linux/platform_device.h> - #include <linux/slab.h> -+#include <linux/of.h> -+#include <linux/of_gpio.h> - - #include <video/omapdss.h> - #include <video/omap-panel-data.h> -+#include <video/of_display_timing.h> - - struct panel_drv_data { - struct omap_dss_device dssdev; -@@ -70,7 +73,8 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev) - if (omapdss_device_is_enabled(dssdev)) - return 0; - -- in->ops.dpi->set_data_lines(in, ddata->data_lines); -+ if (ddata->data_lines) -+ in->ops.dpi->set_data_lines(in, ddata->data_lines); - in->ops.dpi->set_timings(in, &ddata->videomode); - - r = in->ops.dpi->enable(in); -@@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev) - return 0; - } - -+static int panel_dpi_probe_of(struct platform_device *pdev) -+{ -+ struct panel_drv_data *ddata = platform_get_drvdata(pdev); -+ struct device_node *node = pdev->dev.of_node; -+ struct omap_dss_device *in; -+ int r; -+ struct display_timing timing; -+ struct videomode vm; -+ int gpio; -+ -+ gpio = of_get_gpio(node, 0); -+ if (gpio_is_valid(gpio) || gpio == -ENOENT) { -+ ddata->enable_gpio = gpio; -+ } else { -+ dev_err(&pdev->dev, "failed to parse enable gpio\n"); -+ return gpio; -+ } -+ -+ gpio = of_get_gpio(node, 1); -+ if (gpio_is_valid(gpio) || gpio == -ENOENT) { -+ ddata->backlight_gpio = gpio; -+ } else { -+ dev_err(&pdev->dev, "failed to parse backlight gpio\n"); -+ return gpio; -+ } -+ -+ r = of_get_display_timing(node, "panel-timing", &timing); -+ if (r) { -+ dev_err(&pdev->dev, "failed to get video timing\n"); -+ return r; -+ } -+ -+ videomode_from_timing(&timing, &vm); -+ videomode_to_omap_video_timings(&vm, &ddata->videomode); -+ -+ in = omapdss_of_find_source_for_first_ep(node); -+ if (IS_ERR(in)) { -+ dev_err(&pdev->dev, "failed to find video source\n"); -+ return PTR_ERR(in); -+ } -+ -+ ddata->in = in; -+ -+ return 0; -+} -+ - static int panel_dpi_probe(struct platform_device *pdev) - { - struct panel_drv_data *ddata; -@@ -198,6 +248,10 @@ static int panel_dpi_probe(struct platform_device *pdev) - r = panel_dpi_probe_pdata(pdev); - if (r) - return r; -+ } else if (pdev->dev.of_node) { -+ r = panel_dpi_probe_of(pdev); -+ if (r) -+ return r; - } else { - return -ENODEV; - } -@@ -254,12 +308,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev) - return 0; - } - -+static const struct of_device_id panel_dpi_of_match[] = { -+ { .compatible = "omapdss,panel-dpi", }, -+ {}, -+}; -+ -+MODULE_DEVICE_TABLE(of, panel_dpi_of_match); -+ - static struct platform_driver panel_dpi_driver = { - .probe = panel_dpi_probe, - .remove = __exit_p(panel_dpi_remove), - .driver = { - .name = "panel-dpi", - .owner = THIS_MODULE, -+ .of_match_table = panel_dpi_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0020-OMAPDSS-connector-analog-tv-Add-DT-support.patch b/patches/omap_dt_dss/0020-OMAPDSS-connector-analog-tv-Add-DT-support.patch deleted file mode 100644 index 8f6e4a45d..000000000 --- a/patches/omap_dt_dss/0020-OMAPDSS-connector-analog-tv-Add-DT-support.patch +++ /dev/null @@ -1,110 +0,0 @@ -From f096bb362335545df240818439695c0427af3914 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Wed, 29 May 2013 15:34:06 +0300 -Subject: [PATCH 20/51] OMAPDSS: connector-analog-tv: Add DT support - -Add DT support for connector-analog-tv. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../video/omap2/displays-new/connector-analog-tv.c | 43 +++++++++++++++++++++- - 1 file changed, 41 insertions(+), 2 deletions(-) - -diff --git a/drivers/video/omap2/displays-new/connector-analog-tv.c b/drivers/video/omap2/displays-new/connector-analog-tv.c -index ccd9073..5c84032 100644 ---- a/drivers/video/omap2/displays-new/connector-analog-tv.c -+++ b/drivers/video/omap2/displays-new/connector-analog-tv.c -@@ -12,6 +12,7 @@ - #include <linux/slab.h> - #include <linux/module.h> - #include <linux/platform_device.h> -+#include <linux/of.h> - - #include <video/omapdss.h> - #include <video/omap-panel-data.h> -@@ -42,6 +43,12 @@ static const struct omap_video_timings tvc_pal_timings = { - .interlace = true, - }; - -+static const struct of_device_id tvc_of_match[]; -+ -+struct tvc_of_data { -+ enum omap_dss_venc_type connector_type; -+}; -+ - #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) - - static int tvc_connect(struct omap_dss_device *dssdev) -@@ -91,8 +98,12 @@ static int tvc_enable(struct omap_dss_device *dssdev) - - in->ops.atv->set_timings(in, &ddata->timings); - -- in->ops.atv->set_type(in, ddata->connector_type); -- in->ops.atv->invert_vid_out_polarity(in, ddata->invert_polarity); -+ if (!ddata->dev->of_node) { -+ in->ops.atv->set_type(in, ddata->connector_type); -+ -+ in->ops.atv->invert_vid_out_polarity(in, -+ ddata->invert_polarity); -+ } - - r = in->ops.atv->enable(in); - if (r) -@@ -205,6 +216,23 @@ static int tvc_probe_pdata(struct platform_device *pdev) - return 0; - } - -+static int tvc_probe_of(struct platform_device *pdev) -+{ -+ struct panel_drv_data *ddata = platform_get_drvdata(pdev); -+ struct device_node *node = pdev->dev.of_node; -+ struct omap_dss_device *in; -+ -+ in = omapdss_of_find_source_for_first_ep(node); -+ if (IS_ERR(in)) { -+ dev_err(&pdev->dev, "failed to find video source\n"); -+ return PTR_ERR(in); -+ } -+ -+ ddata->in = in; -+ -+ return 0; -+} -+ - static int tvc_probe(struct platform_device *pdev) - { - struct panel_drv_data *ddata; -@@ -222,6 +250,10 @@ static int tvc_probe(struct platform_device *pdev) - r = tvc_probe_pdata(pdev); - if (r) - return r; -+ } else if (pdev->dev.of_node) { -+ r = tvc_probe_of(pdev); -+ if (r) -+ return r; - } else { - return -ENODEV; - } -@@ -263,12 +295,19 @@ static int __exit tvc_remove(struct platform_device *pdev) - return 0; - } - -+static const struct of_device_id tvc_of_match[] = { -+ { .compatible = "omapdss,svideo-connector", }, -+ { .compatible = "omapdss,composite-video-connector", }, -+ {}, -+}; -+ - static struct platform_driver tvc_connector_driver = { - .probe = tvc_probe, - .remove = __exit_p(tvc_remove), - .driver = { - .name = "connector-analog-tv", - .owner = THIS_MODULE, -+ .of_match_table = tvc_of_match, - }, - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0021-OMAPDSS-acx565akm-Add-DT-support.patch b/patches/omap_dt_dss/0021-OMAPDSS-acx565akm-Add-DT-support.patch deleted file mode 100644 index 049a0eb90..000000000 --- a/patches/omap_dt_dss/0021-OMAPDSS-acx565akm-Add-DT-support.patch +++ /dev/null @@ -1,94 +0,0 @@ -From fbfd2f6715b6e72d11e26cf4afb0b41541504f9d Mon Sep 17 00:00:00 2001 -From: Sebastian Reichel <sre@debian.org> -Date: Fri, 13 Dec 2013 19:17:28 +0100 -Subject: [PATCH 21/51] OMAPDSS: acx565akm: Add DT support - -Add DT support for panel-sony-acx565akm - -Signed-off-by: Sebastian Reichel <sre@debian.org> -[tomi.valkeinen@ti.com: some modifications] -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../omap2/displays-new/panel-sony-acx565akm.c | 33 +++++++++++++++++++++- - 1 file changed, 32 insertions(+), 1 deletion(-) - -diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c -index 8e97d06..8d2745c 100644 ---- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c -+++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c -@@ -30,6 +30,8 @@ - #include <linux/backlight.h> - #include <linux/fb.h> - #include <linux/gpio.h> -+#include <linux/of.h> -+#include <linux/of_gpio.h> - - #include <video/omapdss.h> - #include <video/omap-panel-data.h> -@@ -547,7 +549,9 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev) - dev_dbg(&ddata->spi->dev, "%s\n", __func__); - - in->ops.sdi->set_timings(in, &ddata->videomode); -- in->ops.sdi->set_datapairs(in, ddata->datapairs); -+ -+ if (ddata->datapairs > 0) -+ in->ops.sdi->set_datapairs(in, ddata->datapairs); - - r = in->ops.sdi->enable(in); - if (r) { -@@ -726,6 +730,22 @@ static int acx565akm_probe_pdata(struct spi_device *spi) - return 0; - } - -+static int acx565akm_probe_of(struct spi_device *spi) -+{ -+ struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); -+ struct device_node *np = spi->dev.of_node; -+ -+ ddata->reset_gpio = of_get_gpio(np, 0); -+ -+ ddata->in = omapdss_of_find_source_for_first_ep(np); -+ if (IS_ERR(ddata->in)) { -+ dev_err(&spi->dev, "failed to find video source\n"); -+ return PTR_ERR(ddata->in); -+ } -+ -+ return 0; -+} -+ - static int acx565akm_probe(struct spi_device *spi) - { - struct panel_drv_data *ddata; -@@ -753,7 +773,12 @@ static int acx565akm_probe(struct spi_device *spi) - r = acx565akm_probe_pdata(spi); - if (r) - return r; -+ } else if (spi->dev.of_node) { -+ r = acx565akm_probe_of(spi); -+ if (r) -+ return r; - } else { -+ dev_err(&spi->dev, "platform data missing!\n"); - return -ENODEV; - } - -@@ -864,10 +889,16 @@ static int acx565akm_remove(struct spi_device *spi) - return 0; - } - -+static const struct of_device_id acx565akm_of_match[] = { -+ { .compatible = "omapdss,sony,acx565akm", }, -+ {}, -+}; -+ - static struct spi_driver acx565akm_driver = { - .driver = { - .name = "acx565akm", - .owner = THIS_MODULE, -+ .of_match_table = acx565akm_of_match, - }, - .probe = acx565akm_probe, - .remove = acx565akm_remove, --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0022-ARM-omap2.dtsi-add-omapdss-information.patch b/patches/omap_dt_dss/0022-ARM-omap2.dtsi-add-omapdss-information.patch deleted file mode 100644 index 603e0f66a..000000000 --- a/patches/omap_dt_dss/0022-ARM-omap2.dtsi-add-omapdss-information.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ac139049739a072c181a5c78deaa7db942b810e8 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Wed, 18 Dec 2013 10:22:07 +0200 -Subject: [PATCH 22/51] ARM: omap2.dtsi: add omapdss information - -Add DT data for OMAP2 display subsystem, which contains the following -blocks: - -dss - the wrapper/glue for the display modules -dispc - display controller -rfbi - MIPI DBI encoder -venc - analog TV encoder - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap2.dtsi | 31 +++++++++++++++++++++++++++++++ - 1 file changed, 31 insertions(+) - -diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi -index 5377ddf..63713be 100644 ---- a/arch/arm/boot/dts/omap2.dtsi -+++ b/arch/arm/boot/dts/omap2.dtsi -@@ -271,5 +271,36 @@ - ti,hwmods = "timer12"; - ti,timer-pwm; - }; -+ -+ dss: dss@48050000 { -+ compatible = "ti,omap2-dss", "simple-bus"; -+ reg = <0x48050000 0x400>; -+ status = "disabled"; -+ ti,hwmods = "dss_core"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ dispc@48050400 { -+ compatible = "ti,omap2-dispc"; -+ reg = <0x48050400 0x400>; -+ interrupts = <25>; -+ ti,hwmods = "dss_dispc"; -+ }; -+ -+ rfbi: encoder@48050800 { -+ compatible = "ti,omap2-rfbi"; -+ reg = <0x48050800 0x400>; -+ status = "disabled"; -+ ti,hwmods = "dss_rfbi"; -+ }; -+ -+ venc: encoder@48050c00 { -+ compatible = "ti,omap2-venc"; -+ reg = <0x48050c00 0x400>; -+ status = "disabled"; -+ ti,hwmods = "dss_venc"; -+ }; -+ }; - }; - }; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0023-ARM-omap3.dtsi-add-omapdss-information.patch b/patches/omap_dt_dss/0023-ARM-omap3.dtsi-add-omapdss-information.patch deleted file mode 100644 index 828fd737d..000000000 --- a/patches/omap_dt_dss/0023-ARM-omap3.dtsi-add-omapdss-information.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 938305839bc48577c83269b3920a79efbfb38a41 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 19 Mar 2013 11:38:13 +0200 -Subject: [PATCH 23/51] ARM: omap3.dtsi: add omapdss information - -Add DT data for OMAP3 display subsystem, which contains the following -blocks: - -dss - the wrapper/glue for the display modules -dispc - display controller -dsi - MIPI DSI encoder -rfbi - MIPI DBI encoder -venc - analog TV encoder - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap3.dtsi | 52 +++++++++++++++++++++++++++++++++++++++++ - arch/arm/boot/dts/omap36xx.dtsi | 6 +++++ - 2 files changed, 58 insertions(+) - -diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi -index a5fc83b..04cac4d 100644 ---- a/arch/arm/boot/dts/omap3.dtsi -+++ b/arch/arm/boot/dts/omap3.dtsi -@@ -669,6 +669,58 @@ - num-eps = <16>; - ram-bits = <12>; - }; -+ -+ dss: dss@48050000 { -+ compatible = "ti,omap3-dss", "simple-bus"; -+ reg = <0x48050000 0x200>; -+ status = "disabled"; -+ ti,hwmods = "dss_core"; -+ clocks = <&dss1_alwon_fck>; -+ clock-names = "fck"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ dispc@48050400 { -+ compatible = "ti,omap3-dispc"; -+ reg = <0x48050400 0x400>; -+ interrupts = <25>; -+ ti,hwmods = "dss_dispc"; -+ clocks = <&dss1_alwon_fck>; -+ clock-names = "fck"; -+ }; -+ -+ dsi: encoder@4804fc00 { -+ compatible = "ti,omap3-dsi"; -+ reg = <0x4804fc00 0x200>, -+ <0x4804fe00 0x40>, -+ <0x4804ff00 0x20>; -+ reg-names = "proto", "phy", "pll"; -+ interrupts = <25>; -+ status = "disabled"; -+ ti,hwmods = "dss_dsi1"; -+ clocks = <&dss1_alwon_fck>, <&dss2_alwon_fck>; -+ clock-names = "fck", "sys_clk"; -+ }; -+ -+ rfbi: encoder@48050800 { -+ compatible = "ti,omap3-rfbi"; -+ reg = <0x48050800 0x100>; -+ status = "disabled"; -+ ti,hwmods = "dss_rfbi"; -+ clocks = <&dss1_alwon_fck>, <&dss_ick>; -+ clock-names = "fck", "ick"; -+ }; -+ -+ venc: encoder@48050c00 { -+ compatible = "ti,omap3-venc"; -+ reg = <0x48050c00 0x100>; -+ status = "disabled"; -+ ti,hwmods = "dss_venc"; -+ clocks = <&dss_tv_fck>; -+ clock-names = "fck"; -+ }; -+ }; - }; - }; - -diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi -index 7e8dee9..0663f5b 100644 ---- a/arch/arm/boot/dts/omap36xx.dtsi -+++ b/arch/arm/boot/dts/omap36xx.dtsi -@@ -52,6 +52,12 @@ - }; - }; - -+/* OMAP3630 needs dss_96m_fck for VENC */ -+&venc { -+ clocks = <&dss_tv_fck>, <&dss_96m_fck>; -+ clock-names = "fck", "tv_dac_clk"; -+}; -+ - /include/ "omap36xx-clocks.dtsi" - /include/ "omap34xx-omap36xx-clocks.dtsi" - /include/ "omap36xx-omap3430es2plus-clocks.dtsi" --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0024-ARM-omap4.dtsi-add-omapdss-information.patch b/patches/omap_dt_dss/0024-ARM-omap4.dtsi-add-omapdss-information.patch deleted file mode 100644 index 1a674e6d3..000000000 --- a/patches/omap_dt_dss/0024-ARM-omap4.dtsi-add-omapdss-information.patch +++ /dev/null @@ -1,113 +0,0 @@ -From ef5cd58827a6abd8458a59b062f1eac443e9724f Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Aug 2012 15:34:50 +0300 -Subject: [PATCH 24/51] ARM: omap4.dtsi: add omapdss information - -Add DT data for OMAP4 display subsystem, which contains the following -blocks: - -dss - the wrapper/glue for the display modules -dispc - display controller -dsi - MIPI DSI encoder (two independent modules) -rfbi - MIPI DBI encoder -venc - analog TV encoder -hdmi - HDMI encoder - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap4.dtsi | 79 ++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 79 insertions(+) - -diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi -index fe61976..7893348 100644 ---- a/arch/arm/boot/dts/omap4.dtsi -+++ b/arch/arm/boot/dts/omap4.dtsi -@@ -819,6 +819,85 @@ - - status = "disabled"; - }; -+ -+ dss: dss@58000000 { -+ compatible = "ti,omap4-dss", "simple-bus"; -+ reg = <0x58000000 0x80>; -+ status = "disabled"; -+ ti,hwmods = "dss_core"; -+ clocks = <&dss_dss_clk>; -+ clock-names = "fck"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ dispc@58001000 { -+ compatible = "ti,omap4-dispc"; -+ reg = <0x58001000 0x1000>; -+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; -+ ti,hwmods = "dss_dispc"; -+ clocks = <&dss_dss_clk>; -+ clock-names = "fck"; -+ }; -+ -+ rfbi: encoder@58002000 { -+ compatible = "ti,omap4-rfbi"; -+ reg = <0x58002000 0x1000>; -+ status = "disabled"; -+ ti,hwmods = "dss_rfbi"; -+ clocks = <&dss_dss_clk>, <&dss_fck>; -+ clock-names = "fck", "ick"; -+ }; -+ -+ venc: encoder@58003000 { -+ compatible = "ti,omap4-venc"; -+ reg = <0x58003000 0x1000>; -+ status = "disabled"; -+ ti,hwmods = "dss_venc"; -+ clocks = <&dss_tv_clk>; -+ clock-names = "fck"; -+ }; -+ -+ dsi1: encoder@58004000 { -+ compatible = "ti,omap4-dsi"; -+ reg = <0x58004000 0x200>, -+ <0x58004200 0x40>, -+ <0x58004300 0x20>; -+ reg-names = "proto", "phy", "pll"; -+ interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; -+ status = "disabled"; -+ ti,hwmods = "dss_dsi1"; -+ clocks = <&dss_dss_clk>, <&dss_sys_clk>; -+ clock-names = "fck", "sys_clk"; -+ }; -+ -+ dsi2: encoder@58005000 { -+ compatible = "ti,omap4-dsi"; -+ reg = <0x58005000 0x200>, -+ <0x58005200 0x40>, -+ <0x58005300 0x20>; -+ reg-names = "proto", "phy", "pll"; -+ interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; -+ status = "disabled"; -+ ti,hwmods = "dss_dsi2"; -+ clocks = <&dss_dss_clk>, <&dss_sys_clk>; -+ clock-names = "fck", "sys_clk"; -+ }; -+ -+ hdmi: encoder@58006000 { -+ compatible = "ti,omap4-hdmi"; -+ reg = <0x58006000 0x200>, -+ <0x58006200 0x100>, -+ <0x58006300 0x100>, -+ <0x58006400 0x1000>; -+ reg-names = "wp", "pll", "phy", "core"; -+ interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; -+ status = "disabled"; -+ ti,hwmods = "dss_hdmi"; -+ clocks = <&dss_48mhz_clk>, <&dss_sys_clk>; -+ clock-names = "fck", "sys_clk"; -+ }; -+ }; - }; - }; - --- -1.9.1 - diff --git a/patches/omap_dt_dss/0025-ARM-omap4-panda.dts-add-display-information.patch b/patches/omap_dt_dss/0025-ARM-omap4-panda.dts-add-display-information.patch deleted file mode 100644 index ad9287934..000000000 --- a/patches/omap_dt_dss/0025-ARM-omap4-panda.dts-add-display-information.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 271f05655cf058e84036b42887bd99e03fb68c69 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 20 Aug 2012 17:07:23 +0300 -Subject: [PATCH 25/51] ARM: omap4-panda.dts: add display information - -Add DT data for OMAP4 Pandaboard. The board has the following displays: - -dvi: uses TFP410 encoder to convert DPI to DVI -hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap4-panda-common.dtsi | 119 +++++++++++++++++++++++++++++- - 1 file changed, 115 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi -index 88c6a05..20aa18f 100644 ---- a/arch/arm/boot/dts/omap4-panda-common.dtsi -+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi -@@ -16,6 +16,11 @@ - reg = <0x80000000 0x40000000>; /* 1 GB */ - }; - -+ aliases { -+ display0 = &dvi0; -+ display1 = &hdmi0; -+ }; -+ - leds: leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; -@@ -104,6 +109,87 @@ - startup-delay-us = <70000>; - enable-active-high; - }; -+ -+ tfp410: encoder@0 { -+ compatible = "ti,tfp410"; -+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; /* 0, power-down */ -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&tfp410_pins>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tfp410_in: endpoint@0 { -+ remote-endpoint = <&dpi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tfp410_out: endpoint@0 { -+ remote-endpoint = <&dvi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ dvi0: connector@0 { -+ compatible = "dvi-connector"; -+ label = "dvi"; -+ -+ i2c-bus = <&i2c3>; -+ -+ dvi_connector_in: endpoint { -+ remote-endpoint = <&tfp410_out>; -+ }; -+ }; -+ -+ tpd12s015: encoder@1 { -+ compatible = "ti,tpd12s015"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&tpd12s015_pins>; -+ -+ gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>, /* 60, CT CP HPD */ -+ <&gpio2 9 GPIO_ACTIVE_HIGH>, /* 41, LS OE */ -+ <&gpio2 31 GPIO_ACTIVE_HIGH>; /* 63, HPD */ -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tpd12s015_in: endpoint@0 { -+ remote-endpoint = <&hdmi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tpd12s015_out: endpoint@0 { -+ remote-endpoint = <&hdmi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ hdmi0: connector@1 { -+ compatible = "hdmi-connector"; -+ label = "hdmi"; -+ -+ hdmi_connector_in: endpoint { -+ remote-endpoint = <&tpd12s015_out>; -+ }; -+ }; - }; - - &omap4_pmx_core { -@@ -112,10 +198,6 @@ - &twl6040_pins - &mcpdm_pins - &mcbsp1_pins -- &dss_dpi_pins -- &tfp410_pins -- &dss_hdmi_pins -- &tpd12s015_pins - &hsusbb1_pins - >; - -@@ -409,3 +491,32 @@ - &usbhsehci { - phys = <&hsusb1_phy>; - }; -+ -+&dss { -+ status = "ok"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_dpi_pins>; -+ -+ dpi_out: endpoint { -+ remote-endpoint = <&tfp410_in>; -+ data-lines = <24>; -+ }; -+}; -+ -+&dsi2 { -+ status = "ok"; -+ vdd-supply = <&vcxio>; -+}; -+ -+&hdmi { -+ status = "ok"; -+ vdda-supply = <&vdac>; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_hdmi_pins>; -+ -+ hdmi_out: endpoint { -+ remote-endpoint = <&tpd12s015_in>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0026-ARM-omap4-sdp.dts-add-display-information.patch b/patches/omap_dt_dss/0026-ARM-omap4-sdp.dts-add-display-information.patch deleted file mode 100644 index ad151deab..000000000 --- a/patches/omap_dt_dss/0026-ARM-omap4-sdp.dts-add-display-information.patch +++ /dev/null @@ -1,155 +0,0 @@ -From c10989a669d80e965912862fb27b16908cae47d2 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 20 Aug 2012 17:07:31 +0300 -Subject: [PATCH 26/51] ARM: omap4-sdp.dts: add display information - -Add DT data for OMAP4 SDP board. The board has the following displays: - -lcd0: a command mode DSI panel connected to OMAP DSI1 encoder -lcd1: a command mode DSI panel connected to OMAP DSI2 encoder -hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap4-sdp.dts | 107 +++++++++++++++++++++++++++++++++++++++- - 1 file changed, 105 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts -index dbc81fb..cf9f6cb 100644 ---- a/arch/arm/boot/dts/omap4-sdp.dts -+++ b/arch/arm/boot/dts/omap4-sdp.dts -@@ -19,6 +19,12 @@ - reg = <0x80000000 0x40000000>; /* 1 GB */ - }; - -+ aliases { -+ display0 = &lcd0; -+ display1 = &lcd1; -+ display2 = &hdmi0; -+ }; -+ - vdd_eth: fixedregulator-vdd-eth { - compatible = "regulator-fixed"; - regulator-name = "VDD_ETH"; -@@ -153,6 +159,47 @@ - startup-delay-us = <70000>; - enable-active-high; - }; -+ -+ tpd12s015: encoder@0 { -+ compatible = "ti,tpd12s015"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&tpd12s015_pins>; -+ -+ gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>, /* 60, CT CP HPD */ -+ <&gpio2 9 GPIO_ACTIVE_HIGH>, /* 41, LS OE */ -+ <&gpio2 31 GPIO_ACTIVE_HIGH>; /* 63, HPD */ -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tpd12s015_in: endpoint@0 { -+ remote-endpoint = <&hdmi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tpd12s015_out: endpoint@0 { -+ remote-endpoint = <&hdmi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ hdmi0: connector@0 { -+ compatible = "hdmi-connector"; -+ label = "hdmi"; -+ -+ hdmi_connector_in: endpoint { -+ remote-endpoint = <&tpd12s015_out>; -+ }; -+ }; - }; - - &omap4_pmx_core { -@@ -163,8 +210,6 @@ - &dmic_pins - &mcbsp1_pins - &mcbsp2_pins -- &dss_hdmi_pins -- &tpd12s015_pins - >; - - uart2_pins: pinmux_uart2_pins { -@@ -550,3 +595,61 @@ - mode = <3>; - power = <50>; - }; -+ -+&dss { -+ status = "ok"; -+}; -+ -+&dsi1 { -+ status = "ok"; -+ vdd-supply = <&vcxio>; -+ -+ dsi1_out_ep: endpoint { -+ remote-endpoint = <&lcd0_in>; -+ lanes = <0 1 2 3 4 5>; -+ }; -+ -+ lcd0: display { -+ compatible = "tpo,taal", "panel-dsi-cm"; -+ label = "lcd0"; -+ -+ gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* 102, reset */ -+ -+ lcd0_in: endpoint { -+ remote-endpoint = <&dsi1_out_ep>; -+ }; -+ }; -+}; -+ -+&dsi2 { -+ status = "ok"; -+ vdd-supply = <&vcxio>; -+ -+ dsi2_out_ep: endpoint { -+ remote-endpoint = <&lcd1_in>; -+ lanes = <0 1 2 3 4 5>; -+ }; -+ -+ lcd1: display { -+ compatible = "tpo,taal", "panel-dsi-cm"; -+ label = "lcd1"; -+ -+ gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104, reset */ -+ -+ lcd1_in: endpoint { -+ remote-endpoint = <&dsi2_out_ep>; -+ }; -+ }; -+}; -+ -+&hdmi { -+ status = "ok"; -+ vdda-supply = <&vdac>; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_hdmi_pins>; -+ -+ hdmi_out: endpoint { -+ remote-endpoint = <&tpd12s015_in>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0027-ARM-omap3-beagle.dts-add-display-information.patch b/patches/omap_dt_dss/0027-ARM-omap3-beagle.dts-add-display-information.patch deleted file mode 100644 index 6f76298d8..000000000 --- a/patches/omap_dt_dss/0027-ARM-omap3-beagle.dts-add-display-information.patch +++ /dev/null @@ -1,179 +0,0 @@ -From fac4cff1384295955219c13fbe1cd3fdb3e1b0fb Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Fri, 22 Mar 2013 10:48:36 +0200 -Subject: [PATCH 27/51] ARM: omap3-beagle.dts: add display information - -Add DT data for OMAP3 Beagle board. The board has the following displays: - -dvi: uses TFP410 encoder to convert DPI to DVI -tv: analog svideo - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap3-beagle.dts | 125 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 125 insertions(+) - -diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts -index 5053766..ebe407b 100644 ---- a/arch/arm/boot/dts/omap3-beagle.dts -+++ b/arch/arm/boot/dts/omap3-beagle.dts -@@ -24,6 +24,11 @@ - reg = <0x80000000 0x10000000>; /* 256 MB */ - }; - -+ aliases { -+ display0 = &dvi0; -+ display1 = &tv0; -+ }; -+ - leds { - compatible = "gpio-leds"; - pmu_stat { -@@ -80,6 +85,55 @@ - }; - - }; -+ -+ tfp410: encoder@0 { -+ compatible = "ti,tfp410"; -+ gpios = <&gpio6 10 GPIO_ACTIVE_LOW>; /* 170, power-down */ -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&tfp410_pins>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tfp410_in: endpoint@0 { -+ remote-endpoint = <&dpi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tfp410_out: endpoint@0 { -+ remote-endpoint = <&dvi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ dvi0: connector@0 { -+ compatible = "dvi-connector"; -+ label = "dvi"; -+ -+ i2c-bus = <&i2c3>; -+ -+ dvi_connector_in: endpoint { -+ remote-endpoint = <&tfp410_out>; -+ }; -+ }; -+ -+ tv0: connector@1 { -+ compatible = "svideo-connector"; -+ label = "tv"; -+ -+ tv_connector_in: endpoint { -+ remote-endpoint = <&venc_out>; -+ }; -+ }; - }; - - &omap3_pmx_wkup { -@@ -113,6 +167,45 @@ - 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */ - >; - }; -+ -+ tfp410_pins: pinmux_tfp410_pins { -+ pinctrl-single,pins = < -+ 0x194 (PIN_OUTPUT | MUX_MODE4) /* hdq_sio.gpio_170 */ -+ >; -+ }; -+ -+ dss_dpi_pins: pinmux_dss_dpi_pins { -+ pinctrl-single,pins = < -+ 0x0a4 (PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */ -+ 0x0a6 (PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */ -+ 0x0a8 (PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */ -+ 0x0aa (PIN_OUTPUT | MUX_MODE0) /* dss_acbias.dss_acbias */ -+ 0x0ac (PIN_OUTPUT | MUX_MODE0) /* dss_data0.dss_data0 */ -+ 0x0ae (PIN_OUTPUT | MUX_MODE0) /* dss_data1.dss_data1 */ -+ 0x0b0 (PIN_OUTPUT | MUX_MODE0) /* dss_data2.dss_data2 */ -+ 0x0b2 (PIN_OUTPUT | MUX_MODE0) /* dss_data3.dss_data3 */ -+ 0x0b4 (PIN_OUTPUT | MUX_MODE0) /* dss_data4.dss_data4 */ -+ 0x0b6 (PIN_OUTPUT | MUX_MODE0) /* dss_data5.dss_data5 */ -+ 0x0b8 (PIN_OUTPUT | MUX_MODE0) /* dss_data6.dss_data6 */ -+ 0x0ba (PIN_OUTPUT | MUX_MODE0) /* dss_data7.dss_data7 */ -+ 0x0bc (PIN_OUTPUT | MUX_MODE0) /* dss_data8.dss_data8 */ -+ 0x0be (PIN_OUTPUT | MUX_MODE0) /* dss_data9.dss_data9 */ -+ 0x0c0 (PIN_OUTPUT | MUX_MODE0) /* dss_data10.dss_data10 */ -+ 0x0c2 (PIN_OUTPUT | MUX_MODE0) /* dss_data11.dss_data11 */ -+ 0x0c4 (PIN_OUTPUT | MUX_MODE0) /* dss_data12.dss_data12 */ -+ 0x0c6 (PIN_OUTPUT | MUX_MODE0) /* dss_data13.dss_data13 */ -+ 0x0c8 (PIN_OUTPUT | MUX_MODE0) /* dss_data14.dss_data14 */ -+ 0x0ca (PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */ -+ 0x0cc (PIN_OUTPUT | MUX_MODE0) /* dss_data16.dss_data16 */ -+ 0x0ce (PIN_OUTPUT | MUX_MODE0) /* dss_data17.dss_data17 */ -+ 0x0d0 (PIN_OUTPUT | MUX_MODE0) /* dss_data18.dss_data18 */ -+ 0x0d2 (PIN_OUTPUT | MUX_MODE0) /* dss_data19.dss_data19 */ -+ 0x0d4 (PIN_OUTPUT | MUX_MODE0) /* dss_data20.dss_data20 */ -+ 0x0d6 (PIN_OUTPUT | MUX_MODE0) /* dss_data21.dss_data21 */ -+ 0x0d8 (PIN_OUTPUT | MUX_MODE0) /* dss_data22.dss_data22 */ -+ 0x0da (PIN_OUTPUT | MUX_MODE0) /* dss_data23.dss_data23 */ -+ >; -+ }; - }; - - &omap3_pmx_core2 { -@@ -152,6 +245,10 @@ - #include "twl4030.dtsi" - #include "twl4030_omap3.dtsi" - -+&i2c3 { -+ clock-frequency = <100000>; -+}; -+ - &mmc1 { - vmmc-supply = <&vmmc1>; - vmmc_aux-supply = <&vsim>; -@@ -211,3 +308,31 @@ - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; -+ -+/* Needed to power the DPI pins */ -+&vpll2 { -+ regulator-always-on; -+}; -+ -+&dss { -+ status = "ok"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_dpi_pins>; -+ -+ dpi_out: endpoint { -+ remote-endpoint = <&tfp410_in>; -+ data-lines = <24>; -+ }; -+}; -+ -+&venc { -+ status = "ok"; -+ -+ vdda-supply = <&vdac>; -+ -+ venc_out: endpoint { -+ remote-endpoint = <&tv_connector_in>; -+ ti,channels = <2>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0028-ARM-omap3-beagle-xm.dts-add-display-information.patch b/patches/omap_dt_dss/0028-ARM-omap3-beagle-xm.dts-add-display-information.patch deleted file mode 100644 index 0648df64c..000000000 --- a/patches/omap_dt_dss/0028-ARM-omap3-beagle-xm.dts-add-display-information.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 381214f86e314da30518dad45288bd5bae0263c9 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Fri, 20 Sep 2013 10:43:51 +0300 -Subject: [PATCH 28/51] ARM: omap3-beagle-xm.dts: add display information - -Add DT data for OMAP3 Beagle-xM board. The board has the following displays: - -dvi: uses TFP410 encoder to convert DPI to DVI -tv: analog svideo - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap3-beagle-xm.dts | 128 +++++++++++++++++++++++++++++++--- - 1 file changed, 119 insertions(+), 9 deletions(-) - -diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts -index 447e714..9c0983a 100644 ---- a/arch/arm/boot/dts/omap3-beagle-xm.dts -+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts -@@ -24,6 +24,11 @@ - reg = <0x80000000 0x20000000>; /* 512 MB */ - }; - -+ aliases { -+ display0 = &dvi0; -+ display1 = &tv0; -+ }; -+ - leds { - compatible = "gpio-leds"; - -@@ -86,6 +91,54 @@ - reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ - vcc-supply = <&hsusb2_power>; - }; -+ -+ tfp410: encoder@0 { -+ compatible = "ti,tfp410"; -+ gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>; -+ -+ /* XXX pinctrl from twl */ -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tfp410_in: endpoint@0 { -+ remote-endpoint = <&dpi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tfp410_out: endpoint@0 { -+ remote-endpoint = <&dvi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ dvi0: connector@0 { -+ compatible = "dvi-connector"; -+ label = "dvi"; -+ -+ i2c-bus = <&i2c3>; -+ -+ dvi_connector_in: endpoint { -+ remote-endpoint = <&tfp410_out>; -+ }; -+ }; -+ -+ tv0: connector@1 { -+ compatible = "svideo-connector"; -+ label = "tv"; -+ -+ tv_connector_in: endpoint { -+ remote-endpoint = <&venc_out>; -+ }; -+ }; - }; - - &omap3_pmx_wkup { -@@ -94,6 +147,17 @@ - 0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */ - >; - }; -+ -+ dss_dpi_pins2: pinmux_dss_dpi_pins1 { -+ pinctrl-single,pins = < -+ 0x0a (PIN_OUTPUT | MUX_MODE3) /* sys_boot0.dss_data18 */ -+ 0x0c (PIN_OUTPUT | MUX_MODE3) /* sys_boot1.dss_data19 */ -+ 0x10 (PIN_OUTPUT | MUX_MODE3) /* sys_boot3.dss_data20 */ -+ 0x12 (PIN_OUTPUT | MUX_MODE3) /* sys_boot4.dss_data21 */ -+ 0x14 (PIN_OUTPUT | MUX_MODE3) /* sys_boot5.dss_data22 */ -+ 0x16 (PIN_OUTPUT | MUX_MODE3) /* sys_boot6.dss_data23 */ -+ >; -+ }; - }; - - &omap3_pmx_core { -@@ -119,6 +183,35 @@ - OMAP3_CORE1_IOPAD(0x21de, PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_cs1.hsusb2_data3 */ - >; - }; -+ -+ dss_dpi_pins1: pinmux_dss_dpi_pins2 { -+ pinctrl-single,pins = < -+ OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */ -+ OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */ -+ OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */ -+ OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0) /* dss_acbias.dss_acbias */ -+ -+ OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0) /* dss_data6.dss_data6 */ -+ OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0) /* dss_data7.dss_data7 */ -+ OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0) /* dss_data8.dss_data8 */ -+ OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0) /* dss_data9.dss_data9 */ -+ OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0) /* dss_data10.dss_data10 */ -+ OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0) /* dss_data11.dss_data11 */ -+ OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0) /* dss_data12.dss_data12 */ -+ OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0) /* dss_data13.dss_data13 */ -+ OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0) /* dss_data14.dss_data14 */ -+ OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */ -+ OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0) /* dss_data16.dss_data16 */ -+ OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0) /* dss_data17.dss_data17 */ -+ -+ OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3) /* dss_data18.dss_data0 */ -+ OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3) /* dss_data19.dss_data1 */ -+ OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3) /* dss_data20.dss_data2 */ -+ OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3) /* dss_data21.dss_data3 */ -+ OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE3) /* dss_data22.dss_data4 */ -+ OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE3) /* dss_data23.dss_data5 */ -+ >; -+ }; - }; - - &omap3_pmx_core2 { -@@ -164,15 +257,6 @@ - - &i2c3 { - clock-frequency = <100000>; -- -- /* -- * Display monitor features are burnt in the EEPROM -- * as EDID data. -- */ -- eeprom@50 { -- compatible = "ti,eeprom"; -- reg = <0x50>; -- }; - }; - - &mmc1 { -@@ -234,3 +318,29 @@ - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; -+ -+&dss { -+ status = "ok"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = < -+ &dss_dpi_pins1 -+ &dss_dpi_pins2 -+ >; -+ -+ dpi_out: endpoint { -+ remote-endpoint = <&tfp410_in>; -+ data-lines = <24>; -+ }; -+}; -+ -+&venc { -+ status = "ok"; -+ -+ vdda-supply = <&vdac>; -+ -+ venc_out: endpoint { -+ remote-endpoint = <&tv_connector_in>; -+ ti,channels = <2>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0029-ARM-omap3-igep0020.dts-add-display-information.patch b/patches/omap_dt_dss/0029-ARM-omap3-igep0020.dts-add-display-information.patch deleted file mode 100644 index 536120700..000000000 --- a/patches/omap_dt_dss/0029-ARM-omap3-igep0020.dts-add-display-information.patch +++ /dev/null @@ -1,105 +0,0 @@ -From bb230a0d64a4a78e12828462e64a7176cc876474 Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas <javier.martinez@collabora.co.uk> -Date: Fri, 6 Dec 2013 02:53:38 +0100 -Subject: [PATCH 29/51] ARM: omap3-igep0020.dts: add display information - -Add DT data for OMAP3 IGEPv2 board. The board has the following displays: - -dvi: uses TFP410 encoder to convert DPI to DVI - -Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap3-igep0020.dts | 59 +++++++++++++++++++++++++++++++----- - 1 file changed, 52 insertions(+), 7 deletions(-) - -diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts -index 25a2b5f..1d241d8 100644 ---- a/arch/arm/boot/dts/omap3-igep0020.dts -+++ b/arch/arm/boot/dts/omap3-igep0020.dts -@@ -61,22 +61,60 @@ - reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */ - vcc-supply = <&hsusb1_power>; - }; -+ -+ tfp410: encoder@0 { -+ compatible = "ti,tfp410"; -+ gpios = <&gpio6 10 GPIO_ACTIVE_LOW>; /* 170, power-down */ -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&tfp410_pins>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tfp410_in: endpoint@0 { -+ remote-endpoint = <&dpi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tfp410_out: endpoint@0 { -+ remote-endpoint = <&dvi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ dvi0: connector@0 { -+ compatible = "dvi-connector"; -+ label = "dvi"; -+ -+ i2c-bus = <&i2c3>; -+ -+ dvi_connector_in: endpoint { -+ remote-endpoint = <&tfp410_out>; -+ }; -+ }; - }; - - &omap3_pmx_core { - pinctrl-names = "default"; - pinctrl-0 = < -- &tfp410_pins -- &dss_pins - >; - -- tfp410_pins: tfp410_dvi_pins { -+ tfp410_pins: pinmux_tfp410_pins { - pinctrl-single,pins = < - 0x196 (PIN_OUTPUT | MUX_MODE4) /* hdq_sio.gpio_170 */ - >; - }; - -- dss_pins: pinmux_dss_dvi_pins { -+ dss_dpi_pins: pinmux_dss_dpi_pins { - pinctrl-single,pins = < - 0x0a4 (PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */ - 0x0a6 (PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */ -@@ -222,7 +260,14 @@ - phys = <&hsusb1_phy>; - }; - --&vpll2 { -- /* Needed for DSS */ -- regulator-name = "vdds_dsi"; -+&dss { -+ status = "ok"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_dpi_pins>; -+ -+ dpi_out: endpoint { -+ remote-endpoint = <&tfp410_in>; -+ data-lines = <24>; -+ }; - }; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0030-ARM-omap3-n900.dts-add-display-information.patch b/patches/omap_dt_dss/0030-ARM-omap3-n900.dts-add-display-information.patch deleted file mode 100644 index e637c42bc..000000000 --- a/patches/omap_dt_dss/0030-ARM-omap3-n900.dts-add-display-information.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 9839ad40a1a5eadfc0de5b316706abe159b89141 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 17 Dec 2013 09:33:33 +0200 -Subject: [PATCH 30/51] ARM: omap3-n900.dts: add display information - -Add DT data for OMAP3 N900 board. The board has the following displays: - -lcd: LCD panel connected to OMAP's SDI output -tv: analog svideo - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> -Tested-by: Sebastian Reichel <sre@debian.org> ---- - arch/arm/boot/dts/omap3-n900.dts | 70 +++++++++++++++++++++++++++++++++++++--- - 1 file changed, 66 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts -index 6fc85f9..c1bb04d 100644 ---- a/arch/arm/boot/dts/omap3-n900.dts -+++ b/arch/arm/boot/dts/omap3-n900.dts -@@ -74,6 +74,14 @@ - }; - }; - -+ tv: connector { -+ compatible = "composite-connector"; -+ label = "tv"; -+ -+ tv_connector_in: endpoint { -+ remote-endpoint = <&venc_out>; -+ }; -+ }; - }; - - &omap3_pmx_core { -@@ -140,11 +148,23 @@ - >; - }; - -- display_pins: pinmux_display_pins { -+ acx565akm_pins: pinmux_acx565akm_pins { - pinctrl-single,pins = < - 0x0d4 (PIN_OUTPUT | MUX_MODE4) /* RX51_LCD_RESET_GPIO */ - >; - }; -+ -+ dss_sdi_pins: pinmux_dss_sdi_pins { -+ pinctrl-single,pins = < -+ 0x0c0 (PIN_OUTPUT | MUX_MODE1) /* dss_data10.sdi_dat1n */ -+ 0x0c2 (PIN_OUTPUT | MUX_MODE1) /* dss_data11.sdi_dat1p */ -+ 0x0c4 (PIN_OUTPUT | MUX_MODE1) /* dss_data12.sdi_dat2n */ -+ 0x0c6 (PIN_OUTPUT | MUX_MODE1) /* dss_data13.sdi_dat2p */ -+ -+ 0x0d8 (PIN_OUTPUT | MUX_MODE1) /* dss_data22.sdi_clkp */ -+ 0x0da (PIN_OUTPUT | MUX_MODE1) /* dss_data23.sdi_clkn */ -+ >; -+ }; - }; - - &i2c1 { -@@ -471,13 +491,21 @@ - spi-max-frequency = <6000000>; - reg = <0>; - }; -- mipid@2 { -- compatible = "acx565akm"; -+ -+ acx565akm@2 { -+ compatible = "sony,acx565akm"; - spi-max-frequency = <6000000>; - reg = <2>; - - pinctrl-names = "default"; -- pinctrl-0 = <&display_pins>; -+ pinctrl-0 = <&acx565akm_pins>; -+ -+ label = "lcd"; -+ gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */ -+ -+ lcd_in: endpoint { -+ remote-endpoint = <&sdi_out>; -+ }; - }; - }; - -@@ -503,3 +531,37 @@ - pinctrl-names = "default"; - pinctrl-0 = <&uart3_pins>; - }; -+ -+&dss { -+ status = "ok"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_sdi_pins>; -+ -+ vdds_sdi-supply = <&vaux1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@1 { -+ reg = <1>; -+ -+ sdi_out: endpoint { -+ remote-endpoint = <&lcd_in>; -+ datapairs = <2>; -+ }; -+ }; -+ }; -+}; -+ -+&venc { -+ status = "ok"; -+ -+ vdda-supply = <&vdac>; -+ -+ venc_out: endpoint { -+ remote-endpoint = <&tv_connector_in>; -+ ti,channels = <1>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0031-OMAPDSS-remove-DT-hacks-for-regulators.patch b/patches/omap_dt_dss/0031-OMAPDSS-remove-DT-hacks-for-regulators.patch deleted file mode 100644 index 7e3a126ec..000000000 --- a/patches/omap_dt_dss/0031-OMAPDSS-remove-DT-hacks-for-regulators.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 83395d159e7eb5d8dc2d0d6b152deb08904056d2 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 10 Jun 2013 14:05:10 +0300 -Subject: [PATCH 31/51] OMAPDSS: remove DT hacks for regulators - -For booting Panda and 4430SDP with DT, while DSS did not support DT, we -had to had small hacks in the omapdss driver to get the regulators. With -DT now supported in DSS, we can remove those hacks. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/dsi.c | 11 ++--------- - drivers/video/omap2/dss/hdmi4.c | 11 ++--------- - 2 files changed, 4 insertions(+), 18 deletions(-) - -diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c -index efb24b3..8c9ea5d 100644 ---- a/drivers/video/omap2/dss/dsi.c -+++ b/drivers/video/omap2/dss/dsi.c -@@ -1160,18 +1160,11 @@ static int dsi_regulator_init(struct platform_device *dsidev) - if (dsi->vdds_dsi_reg != NULL) - return 0; - -- if (dsi->pdev->dev.of_node) -- vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd"); -- else -- vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi"); -- -- /* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */ -- if (IS_ERR(vdds_dsi)) -- vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "VCXIO"); -+ vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd"); - - if (IS_ERR(vdds_dsi)) { - if (PTR_ERR(vdds_dsi) != -EPROBE_DEFER) -- DSSERR("can't get VDDS_DSI regulator\n"); -+ DSSERR("can't get DSI VDD regulator\n"); - return PTR_ERR(vdds_dsi); - } - -diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c -index a2a4d95..17b24b2 100644 ---- a/drivers/video/omap2/dss/hdmi4.c -+++ b/drivers/video/omap2/dss/hdmi4.c -@@ -88,18 +88,11 @@ static int hdmi_init_regulator(void) - if (hdmi.vdda_hdmi_dac_reg != NULL) - return 0; - -- if (hdmi.pdev->dev.of_node) -- reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); -- else -- reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac"); -- -- /* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */ -- if (IS_ERR(reg)) -- reg = devm_regulator_get(&hdmi.pdev->dev, "VDAC"); -+ reg = devm_regulator_get(&hdmi.pdev->dev, "vdda"); - - if (IS_ERR(reg)) { - if (PTR_ERR(reg) != -EPROBE_DEFER) -- DSSERR("can't get VDDA_HDMI_DAC regulator\n"); -+ DSSERR("can't get VDDA regulator\n"); - return PTR_ERR(reg); - } - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0032-ARM-OMAP2-remove-pdata-quirks-for-displays.patch b/patches/omap_dt_dss/0032-ARM-OMAP2-remove-pdata-quirks-for-displays.patch deleted file mode 100644 index 1a357bbb9..000000000 --- a/patches/omap_dt_dss/0032-ARM-OMAP2-remove-pdata-quirks-for-displays.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 416b907c2d3208d00a4da520bc11e4965bfe91f2 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Wed, 18 Dec 2013 10:34:32 +0200 -Subject: [PATCH 32/51] ARM: OMAP2+: remove pdata quirks for displays - -Remove pdata quirks for the displays on boards that are now supported -properly with DT. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/mach-omap2/dss-common.c | 224 ------------------------------------- - arch/arm/mach-omap2/pdata-quirks.c | 3 - - 2 files changed, 227 deletions(-) - -diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c -index dadccc9..010bb72 100644 ---- a/arch/arm/mach-omap2/dss-common.c -+++ b/arch/arm/mach-omap2/dss-common.c -@@ -33,227 +33,3 @@ - #include "soc.h" - #include "dss-common.h" - #include "mux.h" -- --#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ --#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ --#define HDMI_GPIO_HPD 63 /* Hotplug detect */ -- --#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 -- --/* DVI Connector */ --static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = { -- .name = "dvi", -- .source = "tfp410.0", -- .i2c_bus_num = 2, --}; -- --static struct platform_device omap4_panda_dvi_connector_device = { -- .name = "connector-dvi", -- .id = 0, -- .dev.platform_data = &omap4_panda_dvi_connector_pdata, --}; -- --/* TFP410 DPI-to-DVI chip */ --static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = { -- .name = "tfp410.0", -- .source = "dpi.0", -- .data_lines = 24, -- .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, --}; -- --static struct platform_device omap4_panda_tfp410_device = { -- .name = "tfp410", -- .id = 0, -- .dev.platform_data = &omap4_panda_tfp410_pdata, --}; -- --/* HDMI Connector */ --static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = { -- .name = "hdmi", -- .source = "tpd12s015.0", --}; -- --static struct platform_device omap4_panda_hdmi_connector_device = { -- .name = "connector-hdmi", -- .id = 0, -- .dev.platform_data = &omap4_panda_hdmi_connector_pdata, --}; -- --/* TPD12S015 HDMI ESD protection & level shifter chip */ --static struct encoder_tpd12s015_platform_data omap4_panda_tpd_pdata = { -- .name = "tpd12s015.0", -- .source = "hdmi.0", -- -- .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, -- .ls_oe_gpio = HDMI_GPIO_LS_OE, -- .hpd_gpio = HDMI_GPIO_HPD, --}; -- --static struct platform_device omap4_panda_tpd_device = { -- .name = "tpd12s015", -- .id = 0, -- .dev.platform_data = &omap4_panda_tpd_pdata, --}; -- --static struct omap_dss_board_info omap4_panda_dss_data = { -- .default_display_name = "dvi", --}; -- --void __init omap4_panda_display_init_of(void) --{ -- omap_display_init(&omap4_panda_dss_data); -- -- platform_device_register(&omap4_panda_tfp410_device); -- platform_device_register(&omap4_panda_dvi_connector_device); -- -- platform_device_register(&omap4_panda_tpd_device); -- platform_device_register(&omap4_panda_hdmi_connector_device); --} -- -- --/* OMAP4 Blaze display data */ -- --#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ --#define DLP_POWER_ON_GPIO 40 -- --static struct panel_dsicm_platform_data dsi1_panel = { -- .name = "lcd", -- .source = "dsi.0", -- .reset_gpio = 102, -- .use_ext_te = false, -- .ext_te_gpio = 101, -- .pin_config = { -- .num_pins = 6, -- .pins = { 0, 1, 2, 3, 4, 5 }, -- }, --}; -- --static struct platform_device sdp4430_lcd_device = { -- .name = "panel-dsi-cm", -- .id = 0, -- .dev.platform_data = &dsi1_panel, --}; -- --static struct panel_dsicm_platform_data dsi2_panel = { -- .name = "lcd2", -- .source = "dsi.1", -- .reset_gpio = 104, -- .use_ext_te = false, -- .ext_te_gpio = 103, -- .pin_config = { -- .num_pins = 6, -- .pins = { 0, 1, 2, 3, 4, 5 }, -- }, --}; -- --static struct platform_device sdp4430_lcd2_device = { -- .name = "panel-dsi-cm", -- .id = 1, -- .dev.platform_data = &dsi2_panel, --}; -- --/* HDMI Connector */ --static struct connector_hdmi_platform_data sdp4430_hdmi_connector_pdata = { -- .name = "hdmi", -- .source = "tpd12s015.0", --}; -- --static struct platform_device sdp4430_hdmi_connector_device = { -- .name = "connector-hdmi", -- .id = 0, -- .dev.platform_data = &sdp4430_hdmi_connector_pdata, --}; -- --/* TPD12S015 HDMI ESD protection & level shifter chip */ --static struct encoder_tpd12s015_platform_data sdp4430_tpd_pdata = { -- .name = "tpd12s015.0", -- .source = "hdmi.0", -- -- .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, -- .ls_oe_gpio = HDMI_GPIO_LS_OE, -- .hpd_gpio = HDMI_GPIO_HPD, --}; -- --static struct platform_device sdp4430_tpd_device = { -- .name = "tpd12s015", -- .id = 0, -- .dev.platform_data = &sdp4430_tpd_pdata, --}; -- -- --static struct omap_dss_board_info sdp4430_dss_data = { -- .default_display_name = "lcd", --}; -- --/* -- * we select LCD2 by default (instead of Pico DLP) by setting DISPLAY_SEL_GPIO. -- * Setting DLP_POWER_ON gpio enables the VDLP_2V5 VDLP_1V8 and VDLP_1V0 rails -- * used by picodlp on the 4430sdp platform. Keep this gpio disabled as LCD2 is -- * selected by default -- */ --void __init omap_4430sdp_display_init_of(void) --{ -- int r; -- -- r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH, -- "display_sel"); -- if (r) -- pr_err("%s: Could not get display_sel GPIO\n", __func__); -- -- r = gpio_request_one(DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW, -- "DLP POWER ON"); -- if (r) -- pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__); -- -- omap_display_init(&sdp4430_dss_data); -- -- platform_device_register(&sdp4430_lcd_device); -- platform_device_register(&sdp4430_lcd2_device); -- -- platform_device_register(&sdp4430_tpd_device); -- platform_device_register(&sdp4430_hdmi_connector_device); --} -- -- --/* OMAP3 IGEPv2 data */ -- --#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO 170 -- --/* DVI Connector */ --static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = { -- .name = "dvi", -- .source = "tfp410.0", -- .i2c_bus_num = 2, --}; -- --static struct platform_device omap3_igep2_dvi_connector_device = { -- .name = "connector-dvi", -- .id = 0, -- .dev.platform_data = &omap3_igep2_dvi_connector_pdata, --}; -- --/* TFP410 DPI-to-DVI chip */ --static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = { -- .name = "tfp410.0", -- .source = "dpi.0", -- .data_lines = 24, -- .power_down_gpio = IGEP2_DVI_TFP410_POWER_DOWN_GPIO, --}; -- --static struct platform_device omap3_igep2_tfp410_device = { -- .name = "tfp410", -- .id = 0, -- .dev.platform_data = &omap3_igep2_tfp410_pdata, --}; -- --static struct omap_dss_board_info igep2_dss_data = { -- .default_display_name = "dvi", --}; -- --void __init omap3_igep2_display_init_of(void) --{ -- omap_display_init(&igep2_dss_data); -- -- platform_device_register(&omap3_igep2_tfp410_device); -- platform_device_register(&omap3_igep2_dvi_connector_device); --} -diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c -index 3d5b24d..1df2575 100644 ---- a/arch/arm/mach-omap2/pdata-quirks.c -+++ b/arch/arm/mach-omap2/pdata-quirks.c -@@ -121,7 +121,6 @@ static void __init omap3_sbc_t3730_legacy_init(void) - - static void __init omap3_igep0020_legacy_init(void) - { -- omap3_igep2_display_init_of(); - } - - static void __init omap3_evm_legacy_init(void) -@@ -174,14 +173,12 @@ static void __init am3517_evm_legacy_init(void) - #ifdef CONFIG_ARCH_OMAP4 - static void __init omap4_sdp_legacy_init(void) - { -- omap_4430sdp_display_init_of(); - legacy_init_wl12xx(WL12XX_REFCLOCK_26, - WL12XX_TCXOCLOCK_26, 53); - } - - static void __init omap4_panda_legacy_init(void) - { -- omap4_panda_display_init_of(); - legacy_init_ehci_clk("auxclk3_ck"); - legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53); - } --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0033-Doc-DT-Add-OMAP-DSS-DT-Bindings.patch b/patches/omap_dt_dss/0033-Doc-DT-Add-OMAP-DSS-DT-Bindings.patch deleted file mode 100644 index 255b6d81f..000000000 --- a/patches/omap_dt_dss/0033-Doc-DT-Add-OMAP-DSS-DT-Bindings.patch +++ /dev/null @@ -1,528 +0,0 @@ -From dbbcee7e60acdc77ce3745e0ae0028853ad03286 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:12:12 +0200 -Subject: [PATCH 33/51] Doc/DT: Add OMAP DSS DT Bindings - -Add device tree bindings for OMAP Display Subsystem for the following -SoCs: OMAP2, OMAP3, OMAP4. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../devicetree/bindings/video/ti,omap-dss.txt | 203 +++++++++++++++++++++ - .../devicetree/bindings/video/ti,omap2-dss.txt | 54 ++++++ - .../devicetree/bindings/video/ti,omap3-dss.txt | 83 +++++++++ - .../devicetree/bindings/video/ti,omap4-dss.txt | 111 +++++++++++ - .../devicetree/bindings/video/video-ports.txt | 22 +++ - 5 files changed, 473 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt - create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt - create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt - create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt - create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt - -diff --git a/Documentation/devicetree/bindings/video/ti,omap-dss.txt b/Documentation/devicetree/bindings/video/ti,omap-dss.txt -new file mode 100644 -index 0000000..928d3dc ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/ti,omap-dss.txt -@@ -0,0 +1,203 @@ -+Texas Instruments OMAP Display Subsystem -+======================================== -+ -+Generic Description -+------------------- -+ -+This document is a generic description of the OMAP Display Subsystem bindings. -+Binding details for each OMAP SoC version are described in respective binding -+documentation. -+ -+The OMAP Display Subsystem (DSS) hardware consists of DSS Core, DISPC module and -+a number of encoder modules. All DSS versions contain DSS Core and DISPC, but -+the encoder modules vary. -+ -+The DSS Core is the parent of the other DSS modules, and manages clock routing, -+integration to the SoC, etc. -+ -+DISPC is the display controller, which reads pixels from the memory and outputs -+a RGB pixel stream to encoders. -+ -+The encoder modules encode the received RGB pixel stream to a video output like -+HDMI, MIPI DPI, etc. -+ -+Video Ports -+----------- -+ -+The DSS Core and the encoders have video port outputs. The structure of the -+video ports is described in Documentation/devicetree/bindings/video/video- -+ports.txt, and the properties for the ports and endpoints for each encoder are -+described in the SoC's DSS binding documentation. -+ -+The video ports are used to describe the connections to external hardware, like -+panels or external encoders. -+ -+Aliases -+------- -+ -+The board dts file may define aliases for displays to assign "displayX" style -+name for each display. If no aliases are defined, a semi-random number is used -+for the display. -+ -+Example -+------- -+ -+A shortened example of the DSS description for OMAP4, with non-relevant parts -+removed, defined in omap4.dtsi: -+ -+dss: dss@58000000 { -+ compatible = "ti,omap4-dss", "simple-bus"; -+ reg = <0x58000000 0x80>; -+ status = "disabled"; -+ ti,hwmods = "dss_core"; -+ clocks = <&dss_dss_clk>; -+ clock-names = "fck"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ dispc@58001000 { -+ compatible = "ti,omap4-dispc"; -+ reg = <0x58001000 0x1000>; -+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; -+ ti,hwmods = "dss_dispc"; -+ clocks = <&dss_dss_clk>; -+ clock-names = "fck"; -+ }; -+ -+ hdmi: encoder@58006000 { -+ compatible = "ti,omap4-hdmi"; -+ reg = <0x58006000 0x200>, -+ <0x58006200 0x100>, -+ <0x58006300 0x100>, -+ <0x58006400 0x1000>; -+ reg-names = "wp", "pll", "phy", "core"; -+ interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; -+ status = "disabled"; -+ ti,hwmods = "dss_hdmi"; -+ clocks = <&dss_48mhz_clk>, <&dss_sys_clk>; -+ clock-names = "fck", "sys_clk"; -+ }; -+}; -+ -+A shortened example of the board description for OMAP4 Panda board, defined in -+omap4-panda.dts. -+ -+The Panda board has a DVI and a HDMI connector, and the board contains a TFP410 -+chip (MIPI DPI to DVI encoder) and a TPD12S015 chip (HDMI ESD protection & level -+shifter). The video pipelines for the connectors are formed as follows: -+ -+DSS Core --(MIPI DPI)--> TFP410 --(DVI)--> DVI Connector -+OMAP HDMI --(HDMI)--> TPD12S015 --(HDMI)--> HDMI COnnector -+ -+/ { -+ aliases { -+ display0 = &dvi0; -+ display1 = &hdmi0; -+ }; -+ -+ tfp410: encoder@0 { -+ compatible = "ti,tfp410"; -+ gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; /* 0, power-down */ -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&tfp410_pins>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tfp410_in: endpoint@0 { -+ remote-endpoint = <&dpi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tfp410_out: endpoint@0 { -+ remote-endpoint = <&dvi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ dvi0: connector@0 { -+ compatible = "dvi-connector"; -+ label = "dvi"; -+ -+ i2c-bus = <&i2c3>; -+ -+ dvi_connector_in: endpoint { -+ remote-endpoint = <&tfp410_out>; -+ }; -+ }; -+ -+ tpd12s015: encoder@1 { -+ compatible = "ti,tpd12s015"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&tpd12s015_pins>; -+ -+ gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>, /* 60, CT CP HPD */ -+ <&gpio2 9 GPIO_ACTIVE_HIGH>, /* 41, LS OE */ -+ <&gpio2 31 GPIO_ACTIVE_HIGH>; /* 63, HPD */ -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tpd12s015_in: endpoint@0 { -+ remote-endpoint = <&hdmi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tpd12s015_out: endpoint@0 { -+ remote-endpoint = <&hdmi_connector_in>; -+ }; -+ }; -+ }; -+ }; -+ -+ hdmi0: connector@1 { -+ compatible = "hdmi-connector"; -+ label = "hdmi"; -+ -+ hdmi_connector_in: endpoint { -+ remote-endpoint = <&tpd12s015_out>; -+ }; -+ }; -+}; -+ -+&dss { -+ status = "ok"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_dpi_pins>; -+ -+ dpi_out: endpoint { -+ remote-endpoint = <&tfp410_in>; -+ data-lines = <24>; -+ }; -+}; -+ -+&hdmi { -+ status = "ok"; -+ vdda-supply = <&vdac>; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&dss_hdmi_pins>; -+ -+ hdmi_out: endpoint { -+ remote-endpoint = <&tpd12s015_in>; -+ }; -+}; -diff --git a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt -new file mode 100644 -index 0000000..fa8bb2e ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt -@@ -0,0 +1,54 @@ -+Texas Instruments OMAP2 Display Subsystem -+========================================= -+ -+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic -+description about OMAP Display Subsystem bindings. -+ -+DSS Core -+-------- -+ -+Required properties: -+- compatible: "ti,omap2-dss" -+- reg: address and length of the register space -+- ti,hwmods: "dss_core" -+ -+Optional nodes: -+- Video port for DPI output -+ -+DPI Endpoint required properties: -+- data-lines: number of lines used -+ -+ -+DISPC -+----- -+ -+Required properties: -+- compatible: "ti,omap2-dispc" -+- reg: address and length of the register space -+- ti,hwmods: "dss_dispc" -+- interrupts: the DISPC interrupt -+ -+ -+RFBI -+---- -+ -+Required properties: -+- compatible: "ti,omap2-rfbi" -+- reg: address and length of the register space -+- ti,hwmods: "dss_rfbi" -+ -+ -+VENC -+---- -+ -+Required properties: -+- compatible: "ti,omap2-venc" -+- reg: address and length of the register space -+- ti,hwmods: "dss_venc" -+- vdda-supply: power supply for DAC -+ -+VENC Endpoint required properties: -+ -+Required properties: -+- ti,invert-polarity: invert the polarity of the video signal -+- ti,channels: 1 for composite, 2 for s-video -diff --git a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt -new file mode 100644 -index 0000000..0023fa4 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt -@@ -0,0 +1,83 @@ -+Texas Instruments OMAP3 Display Subsystem -+========================================= -+ -+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic -+description about OMAP Display Subsystem bindings. -+ -+DSS Core -+-------- -+ -+Required properties: -+- compatible: "ti,omap3-dss" -+- reg: address and length of the register space -+- ti,hwmods: "dss_core" -+- clocks: handle to fclk -+- clock-names: "fck" -+ -+Optional nodes: -+- Video ports: -+ - Port 0: DPI output -+ - Port 1: SDI output -+ -+DPI Endpoint required properties: -+- data-lines: number of lines used -+ -+SDI Endpoint required properties: -+- datapairs: number of datapairs used -+ -+ -+DISPC -+----- -+ -+Required properties: -+- compatible: "ti,omap3-dispc" -+- reg: address and length of the register space -+- ti,hwmods: "dss_dispc" -+- interrupts: the DISPC interrupt -+- clocks: handle to fclk -+- clock-names: "fck" -+ -+ -+RFBI -+---- -+ -+Required properties: -+- compatible: "ti,omap3-rfbi" -+- reg: address and length of the register space -+- ti,hwmods: "dss_rfbi" -+- clocks: handles to fclk and iclk -+- clock-names: "fck", "ick" -+ -+ -+VENC -+---- -+ -+Required properties: -+- compatible: "ti,omap3-venc" -+- reg: address and length of the register space -+- ti,hwmods: "dss_venc" -+- vdda-supply: power supply for DAC -+- clocks: handle to fclk -+- clock-names: "fck" -+ -+VENC Endpoint required properties: -+- ti,invert-polarity: invert the polarity of the video signal -+- ti,channels: 1 for composite, 2 for s-video -+ -+ -+DSI -+--- -+ -+Required properties: -+- compatible: "ti,omap3-dsi" -+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll' -+- reg-names: "proto", "phy", "pll" -+- interrupts: the DSI interrupt line -+- ti,hwmods: "dss_dsi1" -+- vdd-supply: power supply for DSI -+- clocks: handles to fclk and pll clock -+- clock-names: "fck", "sys_clk" -+ -+DSI Endpoint required properties: -+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-, -+ DATA1+, DATA1-, ... -diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt -new file mode 100644 -index 0000000..f85d6fc ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt -@@ -0,0 +1,111 @@ -+Texas Instruments OMAP4 Display Subsystem -+========================================= -+ -+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic -+description about OMAP Display Subsystem bindings. -+ -+DSS Core -+-------- -+ -+Required properties: -+- compatible: "ti,omap4-dss" -+- reg: address and length of the register space -+- ti,hwmods: "dss_core" -+- clocks: handle to fclk -+- clock-names: "fck" -+ -+Required nodes: -+- DISPC -+ -+Optional nodes: -+- DSS Submodules: RFBI, VENC, DSI, HDMI -+- Video port for DPI output -+ -+DPI Endpoint required properties: -+- data-lines: number of lines used -+ -+ -+DISPC -+----- -+ -+Required properties: -+- compatible: "ti,omap4-dispc" -+- reg: address and length of the register space -+- ti,hwmods: "dss_dispc" -+- interrupts: the DISPC interrupt -+- clocks: handle to fclk -+- clock-names: "fck" -+ -+ -+RFBI -+---- -+ -+Required properties: -+- compatible: "ti,omap4-rfbi" -+- reg: address and length of the register space -+- ti,hwmods: "dss_rfbi" -+- clocks: handles to fclk and iclk -+- clock-names: "fck", "ick" -+ -+Optional nodes: -+- Video port for RFBI output -+- RFBI controlled peripherals -+ -+ -+VENC -+---- -+ -+Required properties: -+- compatible: "ti,omap4-venc" -+- reg: address and length of the register space -+- ti,hwmods: "dss_venc" -+- vdda-supply: power supply for DAC -+- clocks: handle to fclk -+- clock-names: "fck" -+ -+Optional nodes: -+- Video port for VENC output -+ -+VENC Endpoint required properties: -+- ti,invert-polarity: invert the polarity of the video signal -+- ti,channels: 1 for composite, 2 for s-video -+ -+ -+DSI -+--- -+ -+Required properties: -+- compatible: "ti,omap4-dsi" -+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll' -+- reg-names: "proto", "phy", "pll" -+- interrupts: the DSI interrupt line -+- ti,hwmods: "dss_dsi1" or "dss_dsi2" -+- vdd-supply: power supply for DSI -+- clocks: handles to fclk and pll clock -+- clock-names: "fck", "sys_clk" -+ -+Optional nodes: -+- Video port for DSI output -+- DSI controlled peripherals -+ -+DSI Endpoint required properties: -+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-, -+ DATA1+, DATA1-, ... -+ -+ -+HDMI -+---- -+ -+Required properties: -+- compatible: "ti,omap4-hdmi" -+- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy', -+ 'core' -+- reg-names: "wp", "pll", "phy", "core" -+- interrupts: the HDMI interrupt line -+- ti,hwmods: "dss_hdmi" -+- vdda-supply: vdda power supply -+- clocks: handles to fclk and pll clock -+- clock-names: "fck", "sys_clk" -+ -+Optional nodes: -+- Video port for HDMI output -diff --git a/Documentation/devicetree/bindings/video/video-ports.txt b/Documentation/devicetree/bindings/video/video-ports.txt -new file mode 100644 -index 0000000..dad4c43 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/video-ports.txt -@@ -0,0 +1,22 @@ -+Video Ports -+=========== -+ -+The video port bindings used for display devices is a superset of the v4l2 video -+ports described here: -+ -+Documentation/devicetree/bindings/media/video-interfaces.txt -+ -+The only difference is a more compact way to describe devices with only one -+endpoint. In cases like that, the 'ports' and 'port' nodes are not needed. For -+example, a DPI panel with a single input endpoint: -+ -+lcd0: display@0 { -+ compatible = "samsung,lte430wq-f0c", "panel-dpi"; -+ -+ lcd_in: endpoint { -+ remote-endpoint = <&dpi_out>; -+ }; -+}; -+ -+The rest of the bindings are the same as in v4l2 video port bindings and not -+described here. --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0034-Doc-DT-Add-DT-binding-documentation-for-Analog-TV-Co.patch b/patches/omap_dt_dss/0034-Doc-DT-Add-DT-binding-documentation-for-Analog-TV-Co.patch deleted file mode 100644 index 9ff82e168..000000000 --- a/patches/omap_dt_dss/0034-Doc-DT-Add-DT-binding-documentation-for-Analog-TV-Co.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 2df64ce3c19d7f12aa2f12d2d762000e7883e23b Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:08 +0200 -Subject: [PATCH 34/51] Doc/DT: Add DT binding documentation for Analog TV - Connector - -Add DT binding documentation for Analog TV Connector. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../bindings/video/analog-tv-connector.txt | 23 ++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt - -diff --git a/Documentation/devicetree/bindings/video/analog-tv-connector.txt b/Documentation/devicetree/bindings/video/analog-tv-connector.txt -new file mode 100644 -index 0000000..d6be373 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/analog-tv-connector.txt -@@ -0,0 +1,23 @@ -+Analog TV Connector -+=================== -+ -+Required properties: -+- compatible: "composite-connector" or "svideo-connector" -+ -+Optional properties: -+- label: a symbolic name for the connector -+ -+Required nodes: -+- Video port for TV input -+ -+Example -+------- -+ -+tv: connector { -+ compatible = "composite-connector"; -+ label = "tv"; -+ -+ tv_connector_in: endpoint { -+ remote-endpoint = <&venc_out>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0035-Doc-DT-Add-DT-binding-documentation-for-DVI-Connecto.patch b/patches/omap_dt_dss/0035-Doc-DT-Add-DT-binding-documentation-for-DVI-Connecto.patch deleted file mode 100644 index b6ea927af..000000000 --- a/patches/omap_dt_dss/0035-Doc-DT-Add-DT-binding-documentation-for-DVI-Connecto.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 808740137ef09369b368c22d180c5f6fa7eef8e7 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:08 +0200 -Subject: [PATCH 35/51] Doc/DT: Add DT binding documentation for DVI Connector - -Add DT binding documentation for DVI Connector. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../devicetree/bindings/video/dvi-connector.txt | 26 ++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt - -diff --git a/Documentation/devicetree/bindings/video/dvi-connector.txt b/Documentation/devicetree/bindings/video/dvi-connector.txt -new file mode 100644 -index 0000000..6a0aff8 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/dvi-connector.txt -@@ -0,0 +1,26 @@ -+DVI Connector -+============== -+ -+Required properties: -+- compatible: "dvi-connector" -+ -+Optional properties: -+- label: a symbolic name for the connector -+- i2c-bus: phandle to the i2c bus that is connected to DVI DDC -+ -+Required nodes: -+- Video port for DVI input -+ -+Example -+------- -+ -+dvi0: connector@0 { -+ compatible = "dvi-connector"; -+ label = "dvi"; -+ -+ i2c-bus = <&i2c3>; -+ -+ dvi_connector_in: endpoint { -+ remote-endpoint = <&tfp410_out>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0036-Doc-DT-Add-DT-binding-documentation-for-HDMI-Connect.patch b/patches/omap_dt_dss/0036-Doc-DT-Add-DT-binding-documentation-for-HDMI-Connect.patch deleted file mode 100644 index 791ea516d..000000000 --- a/patches/omap_dt_dss/0036-Doc-DT-Add-DT-binding-documentation-for-HDMI-Connect.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 47f4ce64c2417d4cf21e6d41d18eaadf81ef4645 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:08 +0200 -Subject: [PATCH 36/51] Doc/DT: Add DT binding documentation for HDMI Connector - -Add DT binding documentation for HDMI Connector. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../devicetree/bindings/video/hdmi-connector.txt | 23 ++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt - -diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt -new file mode 100644 -index 0000000..5d25f6a ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt -@@ -0,0 +1,23 @@ -+HDMI Connector -+============== -+ -+Required properties: -+- compatible: "hdmi-connector" -+ -+Optional properties: -+- label: a symbolic name for the connector -+ -+Required nodes: -+- Video port for HDMI input -+ -+Example -+------- -+ -+hdmi0: connector@1 { -+ compatible = "hdmi-connector"; -+ label = "hdmi"; -+ -+ hdmi_connector_in: endpoint { -+ remote-endpoint = <&tpd12s015_out>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0037-Doc-DT-Add-DT-binding-documentation-for-MIPI-DPI-Pan.patch b/patches/omap_dt_dss/0037-Doc-DT-Add-DT-binding-documentation-for-MIPI-DPI-Pan.patch deleted file mode 100644 index 4ebc3b5ed..000000000 --- a/patches/omap_dt_dss/0037-Doc-DT-Add-DT-binding-documentation-for-MIPI-DPI-Pan.patch +++ /dev/null @@ -1,65 +0,0 @@ -From d19fb1ad28ac2129caa71c484c895a0a8b4bdde7 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:08 +0200 -Subject: [PATCH 37/51] Doc/DT: Add DT binding documentation for MIPI DPI Panel - -Add DT binding documentation for MIPI DPI Panel. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../devicetree/bindings/video/panel-dpi.txt | 43 ++++++++++++++++++++++ - 1 file changed, 43 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt - -diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/video/panel-dpi.txt -new file mode 100644 -index 0000000..72636c6 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/panel-dpi.txt -@@ -0,0 +1,43 @@ -+Generic MIPI DPI Panel -+====================== -+ -+Required properties: -+- compatible: "panel-dpi" -+ -+Optional properties: -+- label: a symbolic name for the panel -+- gpios: panel enable gpio and backlight enable gpio -+ -+Required nodes: -+- "panel-timing" containing video timings -+ (Documentation/devicetree/bindings/video/display-timing.txt) -+- Video port for DPI input -+ -+Example -+------- -+ -+lcd0: display@0 { -+ compatible = "samsung,lte430wq-f0c", "panel-dpi"; -+ label = "lcd"; -+ -+ lcd_in: endpoint { -+ remote-endpoint = <&dpi_out>; -+ }; -+ -+ panel-timing { -+ clock-frequency = <9200000>; -+ hactive = <480>; -+ vactive = <272>; -+ hfront-porch = <8>; -+ hback-porch = <4>; -+ hsync-len = <41>; -+ vback-porch = <2>; -+ vfront-porch = <4>; -+ vsync-len = <10>; -+ -+ hsync-active = <0>; -+ vsync-active = <0>; -+ de-active = <1>; -+ pixelclk-active = <1>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0038-Doc-DT-Add-DT-binding-documentation-for-MIPI-DSI-CM-.patch b/patches/omap_dt_dss/0038-Doc-DT-Add-DT-binding-documentation-for-MIPI-DSI-CM-.patch deleted file mode 100644 index b650369c5..000000000 --- a/patches/omap_dt_dss/0038-Doc-DT-Add-DT-binding-documentation-for-MIPI-DSI-CM-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c77d811c27d3d4c514bf93e97ae41a77b0465c71 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:08 +0200 -Subject: [PATCH 38/51] Doc/DT: Add DT binding documentation for MIPI DSI CM - Panel - -Add DT binding documentation for MIPI DSI Command Mode Panel. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../devicetree/bindings/video/panel-dsi-cm.txt | 26 ++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt - -diff --git a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt -new file mode 100644 -index 0000000..73f4225 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt -@@ -0,0 +1,26 @@ -+Generic MIPI DSI Command Mode Panel -+=================================== -+ -+Required properties: -+- compatible: "panel-dsi-cm" -+ -+Optional properties: -+- label: a symbolic name for the panel -+- gpios: panel reset gpio and TE gpio -+ -+Required nodes: -+- Video port for DSI input -+ -+Example -+------- -+ -+lcd0: display { -+ compatible = "tpo,taal", "panel-dsi-cm"; -+ label = "lcd0"; -+ -+ gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* 102, reset */ -+ -+ lcd0_in: endpoint { -+ remote-endpoint = <&dsi1_out_ep>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0039-Doc-DT-Add-DT-binding-documentation-for-Sony-acx565a.patch b/patches/omap_dt_dss/0039-Doc-DT-Add-DT-binding-documentation-for-Sony-acx565a.patch deleted file mode 100644 index 7da096019..000000000 --- a/patches/omap_dt_dss/0039-Doc-DT-Add-DT-binding-documentation-for-Sony-acx565a.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 667e69630116403a4abaf32aa6f97860a93551a9 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:09 +0200 -Subject: [PATCH 39/51] Doc/DT: Add DT binding documentation for Sony acx565akm - panel - -Add DT binding documentation for Sony acx565akm panel - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> -Reviewed-by: Sebastian Reichel <sre@debian.org> ---- - .../devicetree/bindings/video/sony,acx565akm.txt | 28 ++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt - -diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/video/sony,acx565akm.txt -new file mode 100644 -index 0000000..cd9cfdf ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/sony,acx565akm.txt -@@ -0,0 +1,28 @@ -+Sony ACX565AKM SDI Panel -+======================== -+ -+Required properties: -+- compatible: "sony,acx565akm" -+ -+Optional properties: -+- label: a symbolic name for the panel -+- gpios: panel reset gpio -+ -+Required nodes: -+- Video port for SDI input -+ -+Example -+------- -+ -+acx565akm@2 { -+ compatible = "sony,acx565akm"; -+ spi-max-frequency = <6000000>; -+ reg = <2>; -+ -+ label = "lcd"; -+ gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */ -+ -+ lcd_in: endpoint { -+ remote-endpoint = <&sdi_out>; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0040-Doc-DT-Add-DT-binding-documentation-for-TFP410-encod.patch b/patches/omap_dt_dss/0040-Doc-DT-Add-DT-binding-documentation-for-TFP410-encod.patch deleted file mode 100644 index 5f77dac7c..000000000 --- a/patches/omap_dt_dss/0040-Doc-DT-Add-DT-binding-documentation-for-TFP410-encod.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 64fa965c3d7358f2eea4b28c4224efb6d7a6e00c Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:09 +0200 -Subject: [PATCH 40/51] Doc/DT: Add DT binding documentation for TFP410 encoder - -Add DT binding documentation for TFP410 encoder - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../devicetree/bindings/video/ti,tfp410.txt | 41 ++++++++++++++++++++++ - 1 file changed, 41 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt - -diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/video/ti,tfp410.txt -new file mode 100644 -index 0000000..6a5a046 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/ti,tfp410.txt -@@ -0,0 +1,41 @@ -+TFP410 DPI to DVI encoder -+========================= -+ -+Required properties: -+- compatible: "ti,tfp410" -+ -+Optional properties: -+- gpios: power-down gpio -+ -+Required nodes: -+- Video port 0 for DPI input -+- Video port 1 for DVI output -+ -+Example -+------- -+ -+tfp410: encoder@0 { -+ compatible = "ti,tfp410"; -+ gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tfp410_in: endpoint@0 { -+ remote-endpoint = <&dpi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tfp410_out: endpoint@0 { -+ remote-endpoint = <&dvi_connector_in>; -+ }; -+ }; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0041-Doc-DT-Add-DT-binding-documentation-for-tpd12s015-en.patch b/patches/omap_dt_dss/0041-Doc-DT-Add-DT-binding-documentation-for-tpd12s015-en.patch deleted file mode 100644 index e4091302c..000000000 --- a/patches/omap_dt_dss/0041-Doc-DT-Add-DT-binding-documentation-for-tpd12s015-en.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 44b898eb08a525d9e805dbfe436839f6be3795b5 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 21 Jan 2014 11:17:09 +0200 -Subject: [PATCH 41/51] Doc/DT: Add DT binding documentation for tpd12s015 - encoder - -Add DT binding documentation for tpd12s015 encoder - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - .../devicetree/bindings/video/ti,tpd12s015.txt | 44 ++++++++++++++++++++++ - 1 file changed, 44 insertions(+) - create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt - -diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt -new file mode 100644 -index 0000000..26e6d32 ---- /dev/null -+++ b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt -@@ -0,0 +1,44 @@ -+TPD12S015 HDMI level shifter and ESD protection chip -+==================================================== -+ -+Required properties: -+- compatible: "ti,tpd12s015" -+ -+Optional properties: -+- gpios: CT CP HPD, LS OE and HPD gpios -+ -+Required nodes: -+- Video port 0 for HDMI input -+- Video port 1 for HDMI output -+ -+Example -+------- -+ -+tpd12s015: encoder@1 { -+ compatible = "ti,tpd12s015"; -+ -+ gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>, /* 60, CT CP HPD */ -+ <&gpio2 9 GPIO_ACTIVE_HIGH>, /* 41, LS OE */ -+ <&gpio2 31 GPIO_ACTIVE_HIGH>; /* 63, HPD */ -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ -+ tpd12s015_in: endpoint@0 { -+ remote-endpoint = <&hdmi_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ -+ tpd12s015_out: endpoint@0 { -+ remote-endpoint = <&hdmi_connector_in>; -+ }; -+ }; -+ }; -+}; --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0042-OMAPDSS-DISPC-decimation-rounding-fix.patch b/patches/omap_dt_dss/0042-OMAPDSS-DISPC-decimation-rounding-fix.patch deleted file mode 100644 index 19e435772..000000000 --- a/patches/omap_dt_dss/0042-OMAPDSS-DISPC-decimation-rounding-fix.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 5e3043b3dc9a33e54e7e3832581716728683a7fe Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Mon, 27 Jan 2014 11:29:53 +0200 -Subject: [PATCH 42/51] OMAPDSS: DISPC: decimation rounding fix - -The driver uses DIV_ROUND_UP when calculating decimated width & height. -For example, when decimating with 3, the width is calculated as: - - width = DIV_ROUND_UP(width, decim_x); - -This yields bad results for some values. For example, 800/3=266.666..., -which is rounded to 267. When the input width is set to 267, and pixel -increment is set to 3, this causes the dispc to read a line of 801 -pixels, i.e. it reads a wrong pixel at the end of the line. - -Even more pressing, the above rounding causes a BUG() in pixinc(), as -the value of 801 is used to calculate row increment, leading to a bad -value being passed to pixinc(). - -This patch fixes the decimation by removing the DIV_ROUND_UP()s when -calculating width and height for decimation. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> - -Conflicts: - drivers/video/omap2/dss/dispc.c ---- - drivers/video/omap2/dss/dispc.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c -index 37bd163..7c3e4ec 100644 ---- a/drivers/video/omap2/dss/dispc.c -+++ b/drivers/video/omap2/dss/dispc.c -@@ -2160,8 +2160,8 @@ static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk, - *five_taps = false; - - do { -- in_height = DIV_ROUND_UP(height, *decim_y); -- in_width = DIV_ROUND_UP(width, *decim_x); -+ in_height = height / *decim_y; -+ in_width = width / *decim_x; - *core_clk = dispc.feat->calc_core_clk(pclk, in_width, - in_height, out_width, out_height, mem_to_mem); - error = (in_width > maxsinglelinewidth || !*core_clk || -@@ -2199,8 +2199,8 @@ static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk, - dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH); - - do { -- in_height = DIV_ROUND_UP(height, *decim_y); -- in_width = DIV_ROUND_UP(width, *decim_x); -+ in_height = height / *decim_y; -+ in_width = width / *decim_x; - *five_taps = in_height > out_height; - - if (in_width > maxsinglelinewidth) -@@ -2268,7 +2268,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, - { - u16 in_width, in_width_max; - int decim_x_min = *decim_x; -- u16 in_height = DIV_ROUND_UP(height, *decim_y); -+ u16 in_height = height / *decim_y; - const int maxsinglelinewidth = - dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH); - const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE); -@@ -2287,7 +2287,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, - return -EINVAL; - - do { -- in_width = DIV_ROUND_UP(width, *decim_x); -+ in_width = width / *decim_x; - } while (*decim_x <= *x_predecim && - in_width > maxsinglelinewidth && ++*decim_x); - -@@ -2466,8 +2466,8 @@ static int dispc_ovl_setup_common(enum omap_plane plane, - if (r) - return r; - -- in_width = DIV_ROUND_UP(in_width, x_predecim); -- in_height = DIV_ROUND_UP(in_height, y_predecim); -+ in_width = in_width / x_predecim; -+ in_height = in_height / y_predecim; - - if (color_mode == OMAP_DSS_COLOR_YUV2 || - color_mode == OMAP_DSS_COLOR_UYVY || --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0043-OMAPDSS-fix-fck-field-types.patch b/patches/omap_dt_dss/0043-OMAPDSS-fix-fck-field-types.patch deleted file mode 100644 index f6181164d..000000000 --- a/patches/omap_dt_dss/0043-OMAPDSS-fix-fck-field-types.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1fa4ce6e89725eaa3cf5b2a02a028ea9493d5b48 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Tue, 28 Jan 2014 08:50:47 +0200 -Subject: [PATCH 43/51] OMAPDSS: fix fck field types - -'fck' field in dpi and sdi clock calculation struct is 'unsigned long -long', even though it should be 'unsigned long'. This hasn't caused any -issues so far. - -Fix the field's type. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/dpi.c | 2 +- - drivers/video/omap2/dss/sdi.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c -index 116aa07..f02520f 100644 ---- a/drivers/video/omap2/dss/dpi.c -+++ b/drivers/video/omap2/dss/dpi.c -@@ -120,7 +120,7 @@ struct dpi_clk_calc_ctx { - /* outputs */ - - struct dsi_clock_info dsi_cinfo; -- unsigned long long fck; -+ unsigned long fck; - struct dispc_clock_info dispc_cinfo; - }; - -diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c -index 732e53c..d16277c 100644 ---- a/drivers/video/omap2/dss/sdi.c -+++ b/drivers/video/omap2/dss/sdi.c -@@ -49,7 +49,7 @@ static struct { - struct sdi_clk_calc_ctx { - unsigned long pck_min, pck_max; - -- unsigned long long fck; -+ unsigned long fck; - struct dispc_clock_info dispc_cinfo; - }; - --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0044-clk-divider-fix-rate-calculation-for-fractional-rate.patch b/patches/omap_dt_dss/0044-clk-divider-fix-rate-calculation-for-fractional-rate.patch deleted file mode 100644 index 8a9447ddb..000000000 --- a/patches/omap_dt_dss/0044-clk-divider-fix-rate-calculation-for-fractional-rate.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 5461a1ce66a92324a40f9e851ee524ee9c6a1f81 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Wed, 6 Nov 2013 12:42:54 +0200 -Subject: [PATCH 44/51] clk: divider: fix rate calculation for fractional rates - -clk-divider.c does not calculate the rates consistently at the moment. - -As an example, on OMAP3 we have a clock divider with a source clock of -864000000 Hz. With dividers 6, 7 and 8 the theoretical rates are: - -6: 144000000 -7: 123428571.428571... -8: 108000000 - -Calling clk_round_rate() with the rate in the first column will give the -rate in the second column: - -144000000 -> 144000000 -143999999 -> 123428571 -123428572 -> 123428571 -123428571 -> 108000000 - -Note how clk_round_rate() returns 123428571 for rates from 123428572 to -143999999, which is mathematically correct, but when clk_round_rate() is -called with 123428571, the returned value is surprisingly 108000000. - -This means that the following code works a bit oddly: - -rate = clk_round_rate(clk, 123428572); -clk_set_rate(clk, rate); - -As clk_set_rate() also does clock rate rounding, the result is that the -clock is set to the rate of 108000000, not 123428571 returned by the -clk_round_rate. - -This patch changes the clk-divider.c to use DIV_ROUND_UP when -calculating the rate. This gives the following behavior which fixes the -inconsistency: - -144000000 -> 144000000 -143999999 -> 123428572 -123428572 -> 123428572 -123428571 -> 108000000 - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> -Cc: Mike Turquette <mturquette@linaro.org> ---- - drivers/clk/clk-divider.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c -index 5543b7d..ec22112 100644 ---- a/drivers/clk/clk-divider.c -+++ b/drivers/clk/clk-divider.c -@@ -24,7 +24,7 @@ - * Traits of this clock: - * prepare - clk_prepare only ensures that parents are prepared - * enable - clk_enable only ensures that parents are enabled -- * rate - rate is adjustable. clk->rate = parent->rate / divisor -+ * rate - rate is adjustable. clk->rate = DIV_ROUND_UP(parent->rate / divisor) - * parent - fixed parent. No clk_set_parent support - */ - -@@ -115,7 +115,7 @@ static unsigned long clk_divider_recalc_rate(struct clk_hw *hw, - return parent_rate; - } - -- return parent_rate / div; -+ return DIV_ROUND_UP(parent_rate, div); - } - - /* -@@ -185,7 +185,7 @@ static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate, - } - parent_rate = __clk_round_rate(__clk_get_parent(hw->clk), - MULT_ROUND_UP(rate, i)); -- now = parent_rate / i; -+ now = DIV_ROUND_UP(parent_rate, i); - if (now <= rate && now > best) { - bestdiv = i; - best = now; -@@ -207,7 +207,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, unsigned long rate, - int div; - div = clk_divider_bestdiv(hw, rate, prate); - -- return *prate / div; -+ return DIV_ROUND_UP(*prate, div); - } - - static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate, -@@ -218,7 +218,7 @@ static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate, - unsigned long flags = 0; - u32 val; - -- div = parent_rate / rate; -+ div = DIV_ROUND_UP(parent_rate, rate); - value = _get_val(divider, div); - - if (value > div_mask(divider)) --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0045-clk-ti-divider-fix-rate-calculation-for-fractional-r.patch b/patches/omap_dt_dss/0045-clk-ti-divider-fix-rate-calculation-for-fractional-r.patch deleted file mode 100644 index 76392b88f..000000000 --- a/patches/omap_dt_dss/0045-clk-ti-divider-fix-rate-calculation-for-fractional-r.patch +++ /dev/null @@ -1,93 +0,0 @@ -From c9623e87f587fbf3680ce879968a41d372780739 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 13 Feb 2014 10:26:04 +0200 -Subject: [PATCH 45/51] clk: ti/divider: fix rate calculation for fractional - rates - -ti/clk-divider.c does not calculate the rates consistently at the moment. - -As an example, on OMAP3 we have a clock divider with a source clock of -864000000 Hz. With dividers 6, 7 and 8 the theoretical rates are: - -6: 144000000 -7: 123428571.428571... -8: 108000000 - -Calling clk_round_rate() with the rate in the first column will give the -rate in the second column: - -144000000 -> 144000000 -143999999 -> 123428571 -123428572 -> 123428571 -123428571 -> 108000000 - -Note how clk_round_rate() returns 123428571 for rates from 123428572 to -143999999, which is mathematically correct, but when clk_round_rate() is -called with 123428571, the returned value is surprisingly 108000000. - -This means that the following code works a bit oddly: - -rate = clk_round_rate(clk, 123428572); -clk_set_rate(clk, rate); - -As clk_set_rate() also does clock rate rounding, the result is that the -clock is set to the rate of 108000000, not 123428571 returned by the -clk_round_rate. - -This patch changes the ti/clk-divider.c to use DIV_ROUND_UP when -calculating the rate. This gives the following behavior which fixes the -inconsistency: - -144000000 -> 144000000 -143999999 -> 123428572 -123428572 -> 123428572 -123428571 -> 108000000 - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/clk/ti/divider.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/clk/ti/divider.c b/drivers/clk/ti/divider.c -index a15e445..e6aa10d 100644 ---- a/drivers/clk/ti/divider.c -+++ b/drivers/clk/ti/divider.c -@@ -112,7 +112,7 @@ static unsigned long ti_clk_divider_recalc_rate(struct clk_hw *hw, - return parent_rate; - } - -- return parent_rate / div; -+ return DIV_ROUND_UP(parent_rate, div); - } - - /* -@@ -182,7 +182,7 @@ static int ti_clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate, - } - parent_rate = __clk_round_rate(__clk_get_parent(hw->clk), - MULT_ROUND_UP(rate, i)); -- now = parent_rate / i; -+ now = DIV_ROUND_UP(parent_rate, i); - if (now <= rate && now > best) { - bestdiv = i; - best = now; -@@ -205,7 +205,7 @@ static long ti_clk_divider_round_rate(struct clk_hw *hw, unsigned long rate, - int div; - div = ti_clk_divider_bestdiv(hw, rate, prate); - -- return *prate / div; -+ return DIV_ROUND_UP(*prate, div); - } - - static int ti_clk_divider_set_rate(struct clk_hw *hw, unsigned long rate, -@@ -216,7 +216,7 @@ static int ti_clk_divider_set_rate(struct clk_hw *hw, unsigned long rate, - unsigned long flags = 0; - u32 val; - -- div = parent_rate / rate; -+ div = DIV_ROUND_UP(parent_rate, rate); - value = _get_val(divider, div); - - if (value > div_mask(divider)) --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0046-ARM-OMAP2-clock-fix-clkoutx2-with-CLK_SET_RATE_PAREN.patch b/patches/omap_dt_dss/0046-ARM-OMAP2-clock-fix-clkoutx2-with-CLK_SET_RATE_PAREN.patch deleted file mode 100644 index 4290a7040..000000000 --- a/patches/omap_dt_dss/0046-ARM-OMAP2-clock-fix-clkoutx2-with-CLK_SET_RATE_PAREN.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 9fd9e683c4e967289e6e17de40c2372d3fbccce4 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 30 Jan 2014 13:17:20 +0200 -Subject: [PATCH 46/51] ARM: OMAP2+: clock: fix clkoutx2 with - CLK_SET_RATE_PARENT - -If CLK_SET_RATE_PARENT is set for a clkoutx2 clock, calling -clk_set_rate() on the clock "skips" the x2 multiplier as there are no -set_rate and round_rate functions defined for the clkoutx2. - -This results in getting double the requested clock rates, breaking the -display on omap3430 based devices. This got broken when -d0f58bd3bba3877fb1af4664c4e33273d36f00e4 and related patches were merged -for v3.14, as omapdss driver now relies more on the clk-framework and -CLK_SET_RATE_PARENT. - -This patch implements set_rate and round_rate for clkoutx2. - -Tested on OMAP3430, OMAP3630, OMAP4460. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/mach-omap2/cclock3xxx_data.c | 2 + - arch/arm/mach-omap2/dpll3xxx.c | 92 +++++++++++++++++++++++++++++------ - include/linux/clk/ti.h | 4 ++ - 3 files changed, 83 insertions(+), 15 deletions(-) - -diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c -index 3b05aea..11ed915 100644 ---- a/arch/arm/mach-omap2/cclock3xxx_data.c -+++ b/arch/arm/mach-omap2/cclock3xxx_data.c -@@ -433,7 +433,9 @@ static const struct clk_ops dpll4_m5x2_ck_ops = { - .enable = &omap2_dflt_clk_enable, - .disable = &omap2_dflt_clk_disable, - .is_enabled = &omap2_dflt_clk_is_enabled, -+ .set_rate = &omap3_clkoutx2_set_rate, - .recalc_rate = &omap3_clkoutx2_recalc, -+ .round_rate = &omap3_clkoutx2_round_rate, - }; - - static const struct clk_ops dpll4_m5x2_ck_3630_ops = { -diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c -index 3185ced..3c418ea 100644 ---- a/arch/arm/mach-omap2/dpll3xxx.c -+++ b/arch/arm/mach-omap2/dpll3xxx.c -@@ -623,6 +623,32 @@ void omap3_dpll_deny_idle(struct clk_hw_omap *clk) - - /* Clock control for DPLL outputs */ - -+/* Find the parent DPLL for the given clkoutx2 clock */ -+static struct clk_hw_omap *omap3_find_clkoutx2_dpll(struct clk_hw *hw) -+{ -+ struct clk_hw_omap *pclk = NULL; -+ struct clk *parent; -+ -+ /* Walk up the parents of clk, looking for a DPLL */ -+ do { -+ do { -+ parent = __clk_get_parent(hw->clk); -+ hw = __clk_get_hw(parent); -+ } while (hw && (__clk_get_flags(hw->clk) & CLK_IS_BASIC)); -+ if (!hw) -+ break; -+ pclk = to_clk_hw_omap(hw); -+ } while (pclk && !pclk->dpll_data); -+ -+ /* clk does not have a DPLL as a parent? error in the clock data */ -+ if (!pclk) { -+ WARN_ON(1); -+ return NULL; -+ } -+ -+ return pclk; -+} -+ - /** - * omap3_clkoutx2_recalc - recalculate DPLL X2 output virtual clock rate - * @clk: DPLL output struct clk -@@ -637,27 +663,14 @@ unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw, - unsigned long rate; - u32 v; - struct clk_hw_omap *pclk = NULL; -- struct clk *parent; - - if (!parent_rate) - return 0; - -- /* Walk up the parents of clk, looking for a DPLL */ -- do { -- do { -- parent = __clk_get_parent(hw->clk); -- hw = __clk_get_hw(parent); -- } while (hw && (__clk_get_flags(hw->clk) & CLK_IS_BASIC)); -- if (!hw) -- break; -- pclk = to_clk_hw_omap(hw); -- } while (pclk && !pclk->dpll_data); -+ pclk = omap3_find_clkoutx2_dpll(hw); - -- /* clk does not have a DPLL as a parent? error in the clock data */ -- if (!pclk) { -- WARN_ON(1); -+ if (!pclk) - return 0; -- } - - dd = pclk->dpll_data; - -@@ -672,6 +685,55 @@ unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw, - return rate; - } - -+int omap3_clkoutx2_set_rate(struct clk_hw *hw, unsigned long rate, -+ unsigned long parent_rate) -+{ -+ return 0; -+} -+ -+long omap3_clkoutx2_round_rate(struct clk_hw *hw, unsigned long rate, -+ unsigned long *prate) -+{ -+ const struct dpll_data *dd; -+ u32 v; -+ struct clk_hw_omap *pclk = NULL; -+ -+ if (!*prate) -+ return 0; -+ -+ pclk = omap3_find_clkoutx2_dpll(hw); -+ -+ if (!pclk) -+ return 0; -+ -+ dd = pclk->dpll_data; -+ -+ /* TYPE J does not have a clkoutx2 */ -+ if (dd->flags & DPLL_J_TYPE) { -+ *prate = __clk_round_rate(__clk_get_parent(pclk->hw.clk), rate); -+ return *prate; -+ } -+ -+ WARN_ON(!dd->enable_mask); -+ -+ v = omap2_clk_readl(pclk, dd->control_reg) & dd->enable_mask; -+ v >>= __ffs(dd->enable_mask); -+ -+ /* If in bypass, the rate is fixed to the bypass rate*/ -+ if (v != OMAP3XXX_EN_DPLL_LOCKED) -+ return *prate; -+ -+ if (__clk_get_flags(hw->clk) & CLK_SET_RATE_PARENT) { -+ unsigned long best_parent; -+ -+ best_parent = (rate / 2); -+ *prate = __clk_round_rate(__clk_get_parent(hw->clk), -+ best_parent); -+ } -+ -+ return *prate * 2; -+} -+ - /* OMAP3/4 non-CORE DPLL clkops */ - const struct clk_hw_omap_ops clkhwops_omap3_dpll = { - .allow_idle = omap3_dpll_allow_idle, -diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h -index 092b641..4a21a87 100644 ---- a/include/linux/clk/ti.h -+++ b/include/linux/clk/ti.h -@@ -245,6 +245,10 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate, - void omap2_init_clk_clkdm(struct clk_hw *clk); - unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw, - unsigned long parent_rate); -+int omap3_clkoutx2_set_rate(struct clk_hw *hw, unsigned long rate, -+ unsigned long parent_rate); -+long omap3_clkoutx2_round_rate(struct clk_hw *hw, unsigned long rate, -+ unsigned long *prate); - int omap2_clkops_enable_clkdm(struct clk_hw *hw); - void omap2_clkops_disable_clkdm(struct clk_hw *hw); - int omap2_clk_disable_autoidle_all(void); --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0047-ARM-dts-fix-omap3-dss-clock-handle-names.patch b/patches/omap_dt_dss/0047-ARM-dts-fix-omap3-dss-clock-handle-names.patch deleted file mode 100644 index da6571304..000000000 --- a/patches/omap_dt_dss/0047-ARM-dts-fix-omap3-dss-clock-handle-names.patch +++ /dev/null @@ -1,88 +0,0 @@ -From f5ec0ed237c8758088ff3829d86afc73c9764d3c Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Wed, 12 Feb 2014 15:45:57 +0200 -Subject: [PATCH 47/51] ARM: dts: fix omap3 dss clock handle names - -The DSS fclk and iclk handles are named differently on OMAP3430 ES1 than -on later OMAP revisions. The ES1 has handles 'dss1_alwon_fck_3430es1' -and 'dss_ick_3430es1', whereas later revisions have similar names but -ending with 'es2'. - -This means we don't have one clock handle to which we could refer to -when defining the DSS clocks. - -However, as the namespaces are separate for ES1 and ES2+ OMAPs, we can -just rename the handles to 'dss1_alwon_fck' and 'dss_ick' for both ES1 -and ES2+, removing the issue. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap3430es1-clocks.dtsi | 6 +++--- - arch/arm/boot/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/arch/arm/boot/dts/omap3430es1-clocks.dtsi b/arch/arm/boot/dts/omap3430es1-clocks.dtsi -index 02f6c7f..f920265 100644 ---- a/arch/arm/boot/dts/omap3430es1-clocks.dtsi -+++ b/arch/arm/boot/dts/omap3430es1-clocks.dtsi -@@ -152,7 +152,7 @@ - clocks = <&usb_l4_gate_ick>, <&usb_l4_div_ick>; - }; - -- dss1_alwon_fck_3430es1: dss1_alwon_fck_3430es1 { -+ dss1_alwon_fck: dss1_alwon_fck_3430es1 { - #clock-cells = <0>; - compatible = "ti,gate-clock"; - clocks = <&dpll4_m4x2_ck>; -@@ -161,7 +161,7 @@ - ti,set-rate-parent; - }; - -- dss_ick_3430es1: dss_ick_3430es1 { -+ dss_ick: dss_ick_3430es1 { - #clock-cells = <0>; - compatible = "ti,omap3-no-wait-interface-clock"; - clocks = <&l4_ick>; -@@ -184,7 +184,7 @@ - dss_clkdm: dss_clkdm { - compatible = "ti,clockdomain"; - clocks = <&dss_tv_fck>, <&dss_96m_fck>, <&dss2_alwon_fck>, -- <&dss1_alwon_fck_3430es1>, <&dss_ick_3430es1>; -+ <&dss1_alwon_fck>, <&dss_ick>; - }; - - d2d_clkdm: d2d_clkdm { -diff --git a/arch/arm/boot/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi b/arch/arm/boot/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi -index af9ae534..080fb3f 100644 ---- a/arch/arm/boot/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi -+++ b/arch/arm/boot/dts/omap36xx-am35xx-omap3430es2plus-clocks.dtsi -@@ -160,7 +160,7 @@ - ti,bit-shift = <30>; - }; - -- dss1_alwon_fck_3430es2: dss1_alwon_fck_3430es2 { -+ dss1_alwon_fck: dss1_alwon_fck_3430es2 { - #clock-cells = <0>; - compatible = "ti,dss-gate-clock"; - clocks = <&dpll4_m4x2_ck>; -@@ -169,7 +169,7 @@ - ti,set-rate-parent; - }; - -- dss_ick_3430es2: dss_ick_3430es2 { -+ dss_ick: dss_ick_3430es2 { - #clock-cells = <0>; - compatible = "ti,omap3-dss-interface-clock"; - clocks = <&l4_ick>; -@@ -216,7 +216,7 @@ - dss_clkdm: dss_clkdm { - compatible = "ti,clockdomain"; - clocks = <&dss_tv_fck>, <&dss_96m_fck>, <&dss2_alwon_fck>, -- <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>; -+ <&dss1_alwon_fck>, <&dss_ick>; - }; - - core_l4_clkdm: core_l4_clkdm { --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0048-ARM-dts-fix-DPLL4-x2-clkouts-on-3630.patch b/patches/omap_dt_dss/0048-ARM-dts-fix-DPLL4-x2-clkouts-on-3630.patch deleted file mode 100644 index d6259795e..000000000 --- a/patches/omap_dt_dss/0048-ARM-dts-fix-DPLL4-x2-clkouts-on-3630.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 374901cd3ba4cd7b961a286ff535c6fecc0b2b24 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 13 Feb 2014 10:58:32 +0200 -Subject: [PATCH 48/51] ARM: dts: fix DPLL4 x2 clkouts on 3630 - -OMAP3630 DPLL4 is different than on OMAP3430, in that it doesn't have -the x2 multiplier for its outputs. This is not currently reflected in -the clock DT data. - -Fix the issue by setting the clock multiplier to 1 (instead of 2) for the -DPLL4 output clocks. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap36xx-clocks.dtsi | 20 ++++++++++++++++++++ - arch/arm/boot/dts/omap36xx.dtsi | 2 +- - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/omap36xx-clocks.dtsi b/arch/arm/boot/dts/omap36xx-clocks.dtsi -index 2fcf253..0b2df76 100644 ---- a/arch/arm/boot/dts/omap36xx-clocks.dtsi -+++ b/arch/arm/boot/dts/omap36xx-clocks.dtsi -@@ -70,6 +70,26 @@ - }; - }; - -+&dpll4_m2x2_mul_ck { -+ clock-mult = <1>; -+}; -+ -+&dpll4_m3x2_mul_ck { -+ clock-mult = <1>; -+}; -+ -+&dpll4_m4x2_mul_ck { -+ clock-mult = <1>; -+}; -+ -+&dpll4_m5x2_mul_ck { -+ clock-mult = <1>; -+}; -+ -+&dpll4_m6x2_mul_ck { -+ clock-mult = <1>; -+}; -+ - &cm_clockdomains { - dpll4_clkdm: dpll4_clkdm { - compatible = "ti,clockdomain"; -diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi -index 0663f5b..94e1cdc 100644 ---- a/arch/arm/boot/dts/omap36xx.dtsi -+++ b/arch/arm/boot/dts/omap36xx.dtsi -@@ -58,7 +58,7 @@ - clock-names = "fck", "tv_dac_clk"; - }; - --/include/ "omap36xx-clocks.dtsi" - /include/ "omap34xx-omap36xx-clocks.dtsi" - /include/ "omap36xx-omap3430es2plus-clocks.dtsi" - /include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi" -+/include/ "omap36xx-clocks.dtsi" --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0049-ARM-dts-use-ti-fixed-factor-clock-for-dpll4_m4x2_mul.patch b/patches/omap_dt_dss/0049-ARM-dts-use-ti-fixed-factor-clock-for-dpll4_m4x2_mul.patch deleted file mode 100644 index b9e706885..000000000 --- a/patches/omap_dt_dss/0049-ARM-dts-use-ti-fixed-factor-clock-for-dpll4_m4x2_mul.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 12924e495b043859eb696658993eec7b60c40b47 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 13 Feb 2014 11:14:58 +0200 -Subject: [PATCH 49/51] ARM: dts: use ti,fixed-factor-clock for - dpll4_m4x2_mul_ck - -We need to use set-rate-parent for dpll4_m4 clock path, so use the -ti,fixed-factor-clock version which supports set-rate-parent property. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap36xx-clocks.dtsi | 2 +- - arch/arm/boot/dts/omap3xxx-clocks.dtsi | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/omap36xx-clocks.dtsi b/arch/arm/boot/dts/omap36xx-clocks.dtsi -index 0b2df76..6b5280d 100644 ---- a/arch/arm/boot/dts/omap36xx-clocks.dtsi -+++ b/arch/arm/boot/dts/omap36xx-clocks.dtsi -@@ -79,7 +79,7 @@ - }; - - &dpll4_m4x2_mul_ck { -- clock-mult = <1>; -+ ti,clock-mult = <1>; - }; - - &dpll4_m5x2_mul_ck { -diff --git a/arch/arm/boot/dts/omap3xxx-clocks.dtsi b/arch/arm/boot/dts/omap3xxx-clocks.dtsi -index cb04d4b..df3c699 100644 ---- a/arch/arm/boot/dts/omap3xxx-clocks.dtsi -+++ b/arch/arm/boot/dts/omap3xxx-clocks.dtsi -@@ -425,10 +425,10 @@ - - dpll4_m4x2_mul_ck: dpll4_m4x2_mul_ck { - #clock-cells = <0>; -- compatible = "fixed-factor-clock"; -+ compatible = "ti,fixed-factor-clock"; - clocks = <&dpll4_m4_ck>; -- clock-mult = <2>; -- clock-div = <1>; -+ ti,clock-mult = <2>; -+ ti,clock-div = <1>; - }; - - dpll4_m4x2_ck: dpll4_m4x2_ck { --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0050-ARM-dts-set-ti-set-rate-parent-for-dpll4_m4-path.patch b/patches/omap_dt_dss/0050-ARM-dts-set-ti-set-rate-parent-for-dpll4_m4-path.patch deleted file mode 100644 index c89d062bc..000000000 --- a/patches/omap_dt_dss/0050-ARM-dts-set-ti-set-rate-parent-for-dpll4_m4-path.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2640adcdaf642644623f9c16fd977597791f131e Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 13 Feb 2014 11:15:06 +0200 -Subject: [PATCH 50/51] ARM: dts: set 'ti,set-rate-parent' for dpll4_m4 path - -Set 'ti,set-rate-parent' property for clocks in the dpll4_m4 clock -path, which is used for DSS functional clock. This fixes DSS driver's -clock rate configuration, which needs the rate to be propagated properly -to the divider node (dpll4_m4_ck). - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - arch/arm/boot/dts/omap3xxx-clocks.dtsi | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/boot/dts/omap3xxx-clocks.dtsi b/arch/arm/boot/dts/omap3xxx-clocks.dtsi -index df3c699..12be2b3 100644 ---- a/arch/arm/boot/dts/omap3xxx-clocks.dtsi -+++ b/arch/arm/boot/dts/omap3xxx-clocks.dtsi -@@ -429,6 +429,7 @@ - clocks = <&dpll4_m4_ck>; - ti,clock-mult = <2>; - ti,clock-div = <1>; -+ ti,set-rate-parent; - }; - - dpll4_m4x2_ck: dpll4_m4x2_ck { -@@ -438,6 +439,7 @@ - ti,bit-shift = <0x1d>; - reg = <0x0d00>; - ti,set-bit-to-disable; -+ ti,set-rate-parent; - }; - - dpll4_m5_ck: dpll4_m5_ck { --- -1.8.5.3 - diff --git a/patches/omap_dt_dss/0051-OMAPDSS-fix-rounding-when-calculating-fclk-rate.patch b/patches/omap_dt_dss/0051-OMAPDSS-fix-rounding-when-calculating-fclk-rate.patch deleted file mode 100644 index c50391a9e..000000000 --- a/patches/omap_dt_dss/0051-OMAPDSS-fix-rounding-when-calculating-fclk-rate.patch +++ /dev/null @@ -1,42 +0,0 @@ -From a99b0721f9326aae761cb6890cfaafa4e4a39d41 Mon Sep 17 00:00:00 2001 -From: Tomi Valkeinen <tomi.valkeinen@ti.com> -Date: Thu, 13 Feb 2014 11:36:22 +0200 -Subject: [PATCH 51/51] OMAPDSS: fix rounding when calculating fclk rate - -"clk: divider: fix rate calculation for fractional rates" patch (and -similar for TI specific divider) fixes the clk-divider's rounding. This -patch updates the DSS driver to round the rates accordingly. - -This fixes the DSS's warnings about clock rate mismatch, and also fixes -the wrong fclk rate being set. - -Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> ---- - drivers/video/omap2/dss/dss.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c -index 9009f62..714530c 100644 ---- a/drivers/video/omap2/dss/dss.c -+++ b/drivers/video/omap2/dss/dss.c -@@ -473,7 +473,7 @@ bool dss_div_calc(unsigned long pck, unsigned long fck_min, - fckd_stop = max(DIV_ROUND_UP(prate * m, fck_hw_max), 1ul); - - for (fckd = fckd_start; fckd >= fckd_stop; --fckd) { -- fck = prate / fckd * m; -+ fck = DIV_ROUND_UP(prate, fckd) * m; - - if (func(fck, data)) - return true; -@@ -522,7 +522,7 @@ static int dss_setup_default_clock(void) - - fck_div = DIV_ROUND_UP(prate * dss.feat->dss_fck_multiplier, - max_dss_fck); -- fck = prate / fck_div * dss.feat->dss_fck_multiplier; -+ fck = DIV_ROUND_UP(prate, fck_div) * dss.feat->dss_fck_multiplier; - } - - r = dss_set_fck_rate(fck); --- -1.8.5.3 - -- GitLab