[PATCH v4 2/2] usb: dwc3: adapt dwc3 core to use Generic PHY Framework
Adapted dwc3 core to use the Generic PHY Framework. So for init, exit, power_on and power_off the following APIs are used phy_init(), phy_exit(), phy_power_on() and phy_power_off(). However using the old USB phy library wont be removed till the PHYs of all other SoC's using dwc3 core is adapted to the Generic PHY Framework. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- Changes from v3: * avoided using quirks Documentation/devicetree/bindings/usb/dwc3.txt |6 ++- drivers/usb/dwc3/core.c| 60 drivers/usb/dwc3/core.h|7 +++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index e807635..471366d 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -6,11 +6,13 @@ Required properties: - compatible: must be snps,dwc3 - reg : Address and length of the register set for the device - interrupts: Interrupts used by the dwc3 controller. + +Optional properties: - usb-phy : array of phandle for the PHY device. The first element in the array is expected to be a handle to the USB2/HS PHY and the second element is expected to be a handle to the USB3/SS PHY - -Optional properties: + - phys: from the *Generic PHY* bindings + - phy-names: from the *Generic PHY* bindings - tx-fifo-resize: determines if the FIFO *has* to be reallocated. This is usually a subnode to DWC3 glue to which it is connected. diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e009d4e..036d589 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -82,6 +82,11 @@ static void dwc3_core_soft_reset(struct dwc3 *dwc) usb_phy_init(dwc-usb2_phy); usb_phy_init(dwc-usb3_phy); + if (dwc-usb2_generic_phy) + phy_init(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_init(dwc-usb3_generic_phy); + mdelay(100); /* Clear USB3 PHY reset */ @@ -343,6 +348,11 @@ static void dwc3_core_exit(struct dwc3 *dwc) { usb_phy_shutdown(dwc-usb2_phy); usb_phy_shutdown(dwc-usb3_phy); + if (dwc-usb2_generic_phy) + phy_exit(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_exit(dwc-usb3_generic_phy); + } #define DWC3_ALIGN_MASK(16 - 1) @@ -433,6 +443,32 @@ static int dwc3_probe(struct platform_device *pdev) } } + dwc-usb2_generic_phy = devm_phy_get(dev, usb2-phy); + if (IS_ERR(dwc-usb2_generic_phy)) { + ret = PTR_ERR(dwc-usb2_generic_phy); + if (ret == -ENOSYS || ret == -ENODEV) { + dwc-usb2_generic_phy = NULL; + } else if (ret == -EPROBE_DEFER) { + return ret; + } else { + dev_err(dev, no usb2 phy configured\n); + return ret; + } + } + + dwc-usb3_generic_phy = devm_phy_get(dev, usb3-phy); + if (IS_ERR(dwc-usb3_generic_phy)) { + ret = PTR_ERR(dwc-usb3_generic_phy); + if (ret == -ENOSYS || ret == -ENODEV) { + dwc-usb3_generic_phy = NULL; + } else if (ret == -EPROBE_DEFER) { + return ret; + } else { + dev_err(dev, no usb3 phy configured\n); + return ret; + } + } + dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; @@ -482,6 +518,11 @@ static int dwc3_probe(struct platform_device *pdev) usb_phy_set_suspend(dwc-usb2_phy, 0); usb_phy_set_suspend(dwc-usb3_phy, 0); + if (dwc-usb2_generic_phy) + phy_power_on(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_power_on(dwc-usb3_generic_phy); + ret = dwc3_event_buffers_setup(dwc); if (ret) { dev_err(dwc-dev, failed to setup event buffers\n); @@ -565,6 +606,10 @@ err2: err1: usb_phy_set_suspend(dwc-usb2_phy, 1); usb_phy_set_suspend(dwc-usb3_phy, 1); + if (dwc-usb2_generic_phy) + phy_power_off(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_power_off(dwc-usb3_generic_phy); dwc3_core_exit(dwc); err0: @@ -580,6 +625,11 @@ static int dwc3_remove(struct platform_device *pdev) usb_phy_set_suspend(dwc-usb2_phy, 1); usb_phy_set_suspend(dwc-usb3_phy, 1); + if (dwc-usb2_generic_phy) + phy_power_off(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_power_off(dwc-usb3_generic_phy); + pm_runtime_put_sync(pdev-dev);
[PATCH 1/2] usb: dwc3: core: continue probing if usb phy library returns -ENODEV/-ENXIO
Since PHYs for dwc3 is optional (not all SoCs that have DWC3 use PHYs), do not return from probe if the USB PHY library returns -ENODEV as that indicates the platform does not have PHY. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/core.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index a49217a..e009d4e 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -411,32 +411,26 @@ static int dwc3_probe(struct platform_device *pdev) if (IS_ERR(dwc-usb2_phy)) { ret = PTR_ERR(dwc-usb2_phy); - - /* -* if -ENXIO is returned, it means PHY layer wasn't -* enabled, so it makes no sense to return -EPROBE_DEFER -* in that case, since no PHY driver will ever probe. -*/ - if (ret == -ENXIO) + if (ret == -ENXIO || ret == -ENODEV) { + dwc-usb2_phy = NULL; + } else if (ret == -EPROBE_DEFER) { return ret; - - dev_err(dev, no usb2 phy configured\n); - return -EPROBE_DEFER; + } else { + dev_err(dev, no usb2 phy configured\n); + return ret; + } } if (IS_ERR(dwc-usb3_phy)) { ret = PTR_ERR(dwc-usb3_phy); - - /* -* if -ENXIO is returned, it means PHY layer wasn't -* enabled, so it makes no sense to return -EPROBE_DEFER -* in that case, since no PHY driver will ever probe. -*/ - if (ret == -ENXIO) + if (ret == -ENXIO || ret == -ENODEV) { + dwc-usb3_phy = NULL; + } else if (ret == -EPROBE_DEFER) { return ret; - - dev_err(dev, no usb3 phy configured\n); - return -EPROBE_DEFER; + } else { + dev_err(dev, no usb3 phy configured\n); + return ret; + } } dwc-xhci_resources[0].start = res-start; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 01/41] 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.valkei...@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 8d972ff18c56..842e4f21ab09 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 e30ef6797c63..04a4d360dd20 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -307,5 +307,7 @@ extern int omap_dss_reset(struct omap_hwmod *); /* SoC specific clock initializer */ extern 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 4cf165502b35..77cd927e5acb 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 02/41] 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.valkei...@ti.com --- arch/arm/mach-omap2/board-generic.c | 2 ++ arch/arm/mach-omap2/common.h| 1 + arch/arm/mach-omap2/display.c | 56 + 3 files changed, 59 insertions(+) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 842e4f21ab09..08921d0d63d4 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 04a4d360dd20..e21702e2e82e 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -308,6 +308,7 @@ extern int omap_dss_reset(struct omap_hwmod *); extern 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 77cd927e5acb..9a729bd3d28b 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,61 @@ 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); + 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 04/41] 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.valkei...@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 012ada38a29d..21080f9dae87 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 00/41] OMAPDSS: DT support v3
Hi, Here's version 3 of the DSS DT series. The previous version can be found from: v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249 v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866 The main changes to v2 are: - DT Binding documentation - OMAP2 DSS support - Split DSI register space - DSS nodes disabled by default - Hack to have generic DT bindings but OMAP specific drivers (for now) This series can also be found from: git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3 Tomi Javier Martinez Canillas (1): ARM: omap3-igep0020.dts: add display information Sebastian Reichel (1): OMAPDSS: acx565akm: Add DT support Tomi Valkeinen (39): ARM: OMAP2+: add omapdss_init_of() ARM: OMAP2+: DT 'compatible' tweak for displays OMAPDSS: add 'label' support for DT OMAPDSS: get dssdev-alias from DT alias OMAPFB: clean up default display search OMAPFB: search for default display with DT alias OMAPDSS: add of helpers OMAPDSS: Improve regulator names for DT OMAPDSS: Add DT support to DSS OMAPDSS: Add DT support to DISPC OMAPDSS: Add DT support to HDMI OMAPDSS: Add DT support to VENC OMAPDSS: Add DT support to DSI OMAPDSS: panel-dsi-cm: Add DT support OMAPDSS: encoder-tfp410: Add DT support OMAPDSS: connector-dvi: Add DT support OMAPDSS: encoder-tpd12s015: Add DT support OMAPDSS: hdmi-connector: Add DT support OMAPDSS: panel-dpi: Add DT support OMAPDSS: connector-analog-tv: Add DT support ARM: omap2.dtsi: add omapdss information ARM: omap3.dtsi: add omapdss information ARM: omap4.dtsi: add omapdss information ARM: omap4-panda.dts: add display information ARM: omap4-sdp.dts: add display information ARM: omap3-beagle.dts: add display information ARM: omap3-beagle-xm.dts: add display information ARM: omap3-n900.dts: add display information OMAPDSS: remove DT hacks for regulators ARM: OMAP2+: remove pdata quirks for displays Doc/DT: Add OMAP DSS DT Bindings Doc/DT: Add DT binding documentation for Analog TV Connector Doc/DT: Add DT binding documentation for DVI Connector Doc/DT: Add DT binding documentation for HDMI Connector Doc/DT: Add DT binding documentation for MIPI DPI Panel Doc/DT: Add DT binding documentation for MIPI DSI CM Panel Doc/DT: Add DT binding documentation for Sony acx565akm panel Doc/DT: Add DT binding documentation for TFP410 encoder Doc/DT: Add DT binding documentation for tpd12s015 encoder .../bindings/video/analog-tv-connector.txt | 23 +++ .../devicetree/bindings/video/dvi-connector.txt| 26 +++ .../devicetree/bindings/video/hdmi-connector.txt | 23 +++ .../devicetree/bindings/video/panel-dpi.txt| 43 .../devicetree/bindings/video/panel-dsi-cm.txt | 26 +++ .../devicetree/bindings/video/sony,acx565akm.txt | 28 +++ .../devicetree/bindings/video/ti,omap-dss.txt | 197 ++ .../devicetree/bindings/video/ti,omap2-dss.txt | 54 + .../devicetree/bindings/video/ti,omap3-dss.txt | 73 +++ .../devicetree/bindings/video/ti,omap4-dss.txt | 99 + .../devicetree/bindings/video/ti,tfp410.txt| 41 .../devicetree/bindings/video/ti,tpd12s015.txt | 44 .../devicetree/bindings/video/video-ports.txt | 22 ++ arch/arm/boot/dts/omap2.dtsi | 31 +++ arch/arm/boot/dts/omap3-beagle-xm.dts | 119 +++ arch/arm/boot/dts/omap3-beagle.dts | 116 +++ arch/arm/boot/dts/omap3-igep0020.dts | 59 +- arch/arm/boot/dts/omap3-n900.dts | 70 ++- arch/arm/boot/dts/omap3.dtsi | 42 arch/arm/boot/dts/omap4-panda-common.dtsi | 119 ++- arch/arm/boot/dts/omap4-sdp.dts| 107 +- arch/arm/boot/dts/omap4.dtsi | 65 ++ arch/arm/mach-omap2/board-generic.c| 4 + arch/arm/mach-omap2/common.h | 3 + arch/arm/mach-omap2/display.c | 132 arch/arm/mach-omap2/dss-common.c | 224 - arch/arm/mach-omap2/pdata-quirks.c | 3 - .../video/omap2/displays-new/connector-analog-tv.c | 43 +++- drivers/video/omap2/displays-new/connector-dvi.c | 43 drivers/video/omap2/displays-new/connector-hdmi.c | 30 +++ drivers/video/omap2/displays-new/encoder-tfp410.c | 43 +++- .../video/omap2/displays-new/encoder-tpd12s015.c | 56 ++ drivers/video/omap2/displays-new/panel-dpi.c | 64 +- drivers/video/omap2/displays-new/panel-dsi-cm.c| 65 +- .../omap2/displays-new/panel-sony-acx565akm.c | 33 ++- drivers/video/omap2/dss/Makefile | 2 +- drivers/video/omap2/dss/dispc.c| 8 + drivers/video/omap2/dss/display.c | 28 ++- drivers/video/omap2/dss/dpi.c |
[PATCHv3 03/41] 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.valkei...@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 669a81fdf58e..012ada38a29d 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 07/41] OMAPDSS: add of helpers
Add helpers to get ports and endpoints from DT data. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 d3aa91bdd6a8..8aec8bda27cc 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 ..7beb62fb367c --- /dev/null +++ b/drivers/video/omap2/dss/dss-of.c @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2013 Texas Instruments + * Author: Tomi Valkeinen tomi.valkei...@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 =
[PATCHv3 09/41] 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.valkei...@ti.com --- drivers/video/omap2/dss/dpi.c | 47 +++ drivers/video/omap2/dss/dss.c | 64 +++ drivers/video/omap2/dss/dss.h | 6 drivers/video/omap2/dss/sdi.c | 45 ++ 4 files changed, 162 insertions(+) diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index fcba3c129efb..8b8f670a0d7d 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) @@ -727,3 +730,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 bd01608e67e2..8316a0b56154 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 @@ -841,6 +843,54 @@ 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, 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) { @@ -899,6 +949,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)); @@ -918,6 +970,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(); @@ -955,12 +1009,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, }, + {},
[PATCHv3 11/41] 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.valkei...@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 11e7500197c1..064bec4e08d4 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 08/41] 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. For example, this allows us to define HDMI's VDDA regulator in the DT data as: vdda-supply = ...; instead of vdda_hdmi_dac-supply = ...; The code also still tries to get the regulators with the old names, if the regulator_get with the new names fail. This keep backward compatibility, and can be removed after we have moved to DT. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 a820c37e323e..b7c92705fb54 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); + vdds_dsi = devm_regulator_get(dsi-pdev-dev, vdd); + + if (IS_ERR(vdds_dsi)) + 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 4a74538f9ea5..11e7500197c1 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); + reg = devm_regulator_get(hdmi.pdev-dev, vdda); + + if (IS_ERR(reg) + 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 2cd7f7e42105..c0e4def29795 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); + vdda_dac = devm_regulator_get(venc.pdev-dev, vdda); + + if (IS_ERR(vdda_dac)) + vdda_dac = devm_regulator_get(venc.pdev-dev, vdda_dac); if (IS_ERR(vdda_dac)) { if (PTR_ERR(vdda_dac) != -EPROBE_DEFER) -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 06/41] 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.valkei...@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 b7469636f15c..f121e87b30be 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 05/41] 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.valkei...@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 fcb9e932d00c..b7469636f15c 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 15/41] OMAPDSS: encoder-tfp410: Add DT support
Add DT support for encoder-tfp410. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 4a291e756be9..e1ef972e33cd 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 10/41] 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.valkei...@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 f51646f15cf2..3ac51e125846 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -3781,12 +3781,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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 14/41] OMAPDSS: panel-dsi-cm: Add DT support
Add DT support for panel-dsi-cm. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 b7baafe83aa3..d302c4428ab7 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 = 1000, }; - 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 13/41] 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.valkei...@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 b7c92705fb54..98bb2d68a462 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) { +
[PATCHv3 16/41] OMAPDSS: connector-dvi: Add DT support
Add DT support for connector-dvi. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 b6c50904038e..4ea26abdcb64 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 12/41] 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.valkei...@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 c0e4def29795..b962a01961f5 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 24/41] 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.valkei...@ti.com --- arch/arm/boot/dts/omap4.dtsi | 65 1 file changed, 65 insertions(+) diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index a1e05853afcd..19498b2fa316 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -705,5 +705,70 @@ dmas = sdma 117, sdma 116; dma-names = tx, rx; }; + + dss: dss@5800 { + compatible = ti,omap4-dss, simple-bus; + reg = 0x5800 0x80; + status = disabled; + ti,hwmods = dss_core; + #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; + }; + + rfbi: encoder@58002000 { + compatible = ti,omap4-rfbi; + reg = 0x58002000 0x1000; + status = disabled; + ti,hwmods = dss_rfbi; + }; + + venc: encoder@58003000 { + compatible = ti,omap4-venc; + reg = 0x58003000 0x1000; + status = disabled; + ti,hwmods = dss_venc; + }; + + 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; + }; + + 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; + }; + + 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; + }; + }; }; }; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 21/41] OMAPDSS: acx565akm: Add DT support
From: Sebastian Reichel s...@debian.org Add DT support for panel-sony-acx565akm Signed-off-by: Sebastian Reichel s...@debian.org [tomi.valkei...@ti.com: some modifications] Signed-off-by: Tomi Valkeinen tomi.valkei...@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 8e97d06921ff..8d2745ce55e3 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 20/41] OMAPDSS: connector-analog-tv: Add DT support
Add DT support for connector-analog-tv. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 ccd9073f706f..5c840325def4 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 18/41] OMAPDSS: hdmi-connector: Add DT support
Add DT support for hdmi-connector. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 9abe2c039ae9..2e026eab2dd0 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 17/41] OMAPDSS: encoder-tpd12s015: Add DT support
Add DT support for encoder-tpd12s015. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 d5c936cb217f..7e33686171e3 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
Add DT support for panel-dpi. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 5f8f7e7c81ef..b032daf0f407 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 22/41] 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.valkei...@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 d0c5b37e248c..af3531cc4576 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@4805 { + compatible = ti,omap2-dss, simple-bus; + reg = 0x4805 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 23/41] 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.valkei...@ti.com --- arch/arm/boot/dts/omap3.dtsi | 42 ++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index daabf99d402a..d942f9a4723f 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -630,5 +630,47 @@ num-eps = 16; ram-bits = 12; }; + + dss: dss@4805 { + compatible = ti,omap3-dss, simple-bus; + reg = 0x4805 0x200; + status = disabled; + ti,hwmods = dss_core; + #address-cells = 1; + #size-cells = 1; + ranges; + + dispc@48050400 { + compatible = ti,omap3-dispc; + reg = 0x48050400 0x400; + interrupts = 25; + ti,hwmods = dss_dispc; + }; + + 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; + }; + + rfbi: encoder@48050800 { + compatible = ti,omap3-rfbi; + reg = 0x48050800 0x100; + status = disabled; + ti,hwmods = dss_rfbi; + }; + + venc: encoder@48050c00 { + compatible = ti,omap3-venc; + reg = 0x48050c00 0x100; + status = disabled; + ti,hwmods = dss_venc; + }; + }; }; }; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 32/41] 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.valkei...@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 dadccc91488c..010bb72d2b75 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
[PATCHv3 33/41] 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.valkei...@ti.com --- .../devicetree/bindings/video/ti,omap-dss.txt | 197 + .../devicetree/bindings/video/ti,omap2-dss.txt | 54 ++ .../devicetree/bindings/video/ti,omap3-dss.txt | 73 .../devicetree/bindings/video/ti,omap4-dss.txt | 99 +++ .../devicetree/bindings/video/video-ports.txt | 22 +++ 5 files changed, 445 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 ..3b3a7c09106c --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,omap-dss.txt @@ -0,0 +1,197 @@ +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@5800 { + compatible = ti,omap4-dss, simple-bus; + reg = 0x5800 0x80; + status = disabled; + ti,hwmods = dss_core; + #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; + }; + + 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; + }; +}; + +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 { +
[PATCHv3 26/41] 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.valkei...@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 dbc81fb6ef03..cf9f6cbbd349 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts @@ -19,6 +19,12 @@ reg = 0x8000 0x4000; /* 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 = 7; 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 38/41] 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.valkei...@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 ..73f422556d4f --- /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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 27/41] 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.valkei...@ti.com --- arch/arm/boot/dts/omap3-beagle.dts | 116 + 1 file changed, 116 insertions(+) diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index 3ba4a625ea5b..2b8efe355734 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts @@ -24,6 +24,11 @@ reg = 0x8000 0x1000; /* 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 { @@ -119,6 +173,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 */ +
[PATCHv3 29/41] ARM: omap3-igep0020.dts: add display information
From: Javier Martinez Canillas javier.marti...@collabora.co.uk 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.marti...@collabora.co.uk Signed-off-by: Tomi Valkeinen tomi.valkei...@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 1c7e74d2d2bc..bd8dcc9f7ab4 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts @@ -61,14 +61,52 @@ 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 = hsusbb1_pins - tfp410_pins - dss_pins ; hsusbb1_pins: pinmux_hsusbb1_pins { @@ -88,13 +126,13 @@ ; }; - 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 */ @@ -216,7 +254,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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 37/41] Doc/DT: Add DT binding documentation for MIPI DPI Panel
Add DT binding documentation for MIPI DPI Panel. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 ..72636c6f1c67 --- /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 = 920; +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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 34/41] Doc/DT: Add DT binding documentation for Analog TV Connector
Add DT binding documentation for Analog TV Connector. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 ..d6be373d8705 --- /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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 31/41] 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.valkei...@ti.com --- drivers/video/omap2/dss/dsi.c | 9 + drivers/video/omap2/dss/hdmi4.c | 9 + 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 98bb2d68a462..f461fe015554 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -1162,16 +1162,9 @@ static int dsi_regulator_init(struct platform_device *dsidev) vdds_dsi = devm_regulator_get(dsi-pdev-dev, vdd); - if (IS_ERR(vdds_dsi)) - 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); - 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 064bec4e08d4..17b24b26f6cd 100644 --- a/drivers/video/omap2/dss/hdmi4.c +++ b/drivers/video/omap2/dss/hdmi4.c @@ -90,16 +90,9 @@ static int hdmi_init_regulator(void) reg = devm_regulator_get(hdmi.pdev-dev, vdda); - if (IS_ERR(reg) - 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); - 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 28/41] 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.valkei...@ti.com --- arch/arm/boot/dts/omap3-beagle-xm.dts | 119 ++ 1 file changed, 119 insertions(+) diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index df33a50bc070..f6cec7e6ac11 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts @@ -24,6 +24,11 @@ reg = 0x8000 0x2000; /* 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_pins { + 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 { @@ -125,6 +189,35 @@ 0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcspi2_cs1.hsusb2_data3 */ ; }; + + dss_dpi_pins1: 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 */ + + 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_MODE3) /* dss_data18.dss_data0 */ + 0x0d2 (PIN_OUTPUT | MUX_MODE3) /* dss_data19.dss_data1 */ + 0x0d4 (PIN_OUTPUT | MUX_MODE3) /* dss_data20.dss_data2 */ + 0x0d6 (PIN_OUTPUT | MUX_MODE3) /*
[PATCHv3 35/41] Doc/DT: Add DT binding documentation for DVI Connector
Add DT binding documentation for DVI Connector. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 ..6a0aff866c78 --- /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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 25/41] 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.valkei...@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 88c6a05cab41..20aa18ff4823 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi @@ -16,6 +16,11 @@ reg = 0x8000 0x4000; /* 1 GB */ }; + aliases { + display0 = dvi0; + display1 = hdmi0; + }; + leds: leds { compatible = gpio-leds; pinctrl-names = default; @@ -104,6 +109,87 @@ startup-delay-us = 7; 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 30/41] 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.valkei...@ti.com --- 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 6fc85f963530..c1bb04d55d4b 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 = 600; reg = 0; }; - mipid@2 { - compatible = acx565akm; + + acx565akm@2 { + compatible = sony,acx565akm; spi-max-frequency = 600; 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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 36/41] Doc/DT: Add DT binding documentation for HDMI Connector
Add DT binding documentation for HDMI Connector. Signed-off-by: Tomi Valkeinen tomi.valkei...@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 ..5d25f6a432bb --- /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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
Add DT binding documentation for Sony acx565akm panel Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com --- .../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 ..cd9cfdf7e3fe --- /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 = 600; + reg = 2; + + label = lcd; + gpios = gpio3 26 GPIO_ACTIVE_HIGH; /* 90 */ + + lcd_in: endpoint { + remote-endpoint = sdi_out; + }; +}; -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 41/41] Doc/DT: Add DT binding documentation for tpd12s015 encoder
Add DT binding documentation for tpd12s015 encoder Signed-off-by: Tomi Valkeinen tomi.valkei...@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 ..26e6d32e3f20 --- /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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 40/41] Doc/DT: Add DT binding documentation for TFP410 encoder
Add DT binding documentation for TFP410 encoder Signed-off-by: Tomi Valkeinen tomi.valkei...@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 ..6a5a04627584 --- /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.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/6] N900 DTS additions for 3.14
Hi Sebastian, On 20/01/2014 16:59, Sebastian Reichel wrote: On Sat, Jan 11, 2014 at 10:16:57PM +0100, Sebastian Reichel wrote: Here are a couple of additions for the Nokia N900 Device Tree Source file. All related drivers changes are queued for 3.14 (except for the tpa6130a2, which got merged into 3.13). I may have some more additions if the driver changes for the accelerometer, the touchscreen or the wireless lan chip will be queued up. ping? Also it seems, that for_3.14/dts branch on bcousson/linux-omap-dt.git merged some branches, which Tony no longer intends to be merged for 3.14. Yeah, I will have to sync with Tony to understand what will be in 3.14-rc1. Do you have strong dep with the series Tony has done? Regards, Benoit -- Benoît Cousson BayLibre Embedded Linux Technology Lab www.baylibre.com -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/6] N900 DTS additions for 3.14
On Tue, Jan 21, 2014 at 12:59:42PM +0100, Benoit Cousson wrote: On 20/01/2014 16:59, Sebastian Reichel wrote: On Sat, Jan 11, 2014 at 10:16:57PM +0100, Sebastian Reichel wrote: Here are a couple of additions for the Nokia N900 Device Tree Source file. All related drivers changes are queued for 3.14 (except for the tpa6130a2, which got merged into 3.13). I may have some more additions if the driver changes for the accelerometer, the touchscreen or the wireless lan chip will be queued up. ping? Also it seems, that for_3.14/dts branch on bcousson/linux-omap-dt.git merged some branches, which Tony no longer intends to be merged for 3.14. Yeah, I will have to sync with Tony to understand what will be in 3.14-rc1. Do you have strong dep with the series Tony has done? No. There is no dependency at all as far as i know. I just noticed it when I checked if you already merged this patchset. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 1/2] usb: dwc3: core: continue probing if usb phy library returns -ENODEV/-ENXIO
On 01/21/2014 12:11 PM, Kishon Vijay Abraham I wrote: Since PHYs for dwc3 is optional (not all SoCs that have DWC3 use PHYs), do not return from probe if the USB PHY library returns -ENODEV as that indicates the platform does not have PHY. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Roger Quadros rog...@ti.com cheers, -roger --- drivers/usb/dwc3/core.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index a49217a..e009d4e 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -411,32 +411,26 @@ static int dwc3_probe(struct platform_device *pdev) if (IS_ERR(dwc-usb2_phy)) { ret = PTR_ERR(dwc-usb2_phy); - - /* - * if -ENXIO is returned, it means PHY layer wasn't - * enabled, so it makes no sense to return -EPROBE_DEFER - * in that case, since no PHY driver will ever probe. - */ - if (ret == -ENXIO) + if (ret == -ENXIO || ret == -ENODEV) { + dwc-usb2_phy = NULL; + } else if (ret == -EPROBE_DEFER) { return ret; - - dev_err(dev, no usb2 phy configured\n); - return -EPROBE_DEFER; + } else { + dev_err(dev, no usb2 phy configured\n); + return ret; + } } if (IS_ERR(dwc-usb3_phy)) { ret = PTR_ERR(dwc-usb3_phy); - - /* - * if -ENXIO is returned, it means PHY layer wasn't - * enabled, so it makes no sense to return -EPROBE_DEFER - * in that case, since no PHY driver will ever probe. - */ - if (ret == -ENXIO) + if (ret == -ENXIO || ret == -ENODEV) { + dwc-usb3_phy = NULL; + } else if (ret == -EPROBE_DEFER) { return ret; - - dev_err(dev, no usb3 phy configured\n); - return -EPROBE_DEFER; + } else { + dev_err(dev, no usb3 phy configured\n); + return ret; + } } dwc-xhci_resources[0].start = res-start; -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/2] usb: dwc3: adapt dwc3 core to use Generic PHY Framework
Hi Kishon, On 01/21/2014 12:11 PM, Kishon Vijay Abraham I wrote: Adapted dwc3 core to use the Generic PHY Framework. So for init, exit, power_on and power_off the following APIs are used phy_init(), phy_exit(), phy_power_on() and phy_power_off(). However using the old USB phy library wont be removed till the PHYs of all other SoC's using dwc3 core is adapted to the Generic PHY Framework. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- Changes from v3: * avoided using quirks Documentation/devicetree/bindings/usb/dwc3.txt |6 ++- drivers/usb/dwc3/core.c| 60 drivers/usb/dwc3/core.h|7 +++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index e807635..471366d 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -6,11 +6,13 @@ Required properties: - compatible: must be snps,dwc3 - reg : Address and length of the register set for the device - interrupts: Interrupts used by the dwc3 controller. + +Optional properties: - usb-phy : array of phandle for the PHY device. The first element in the array is expected to be a handle to the USB2/HS PHY and the second element is expected to be a handle to the USB3/SS PHY - -Optional properties: + - phys: from the *Generic PHY* bindings + - phy-names: from the *Generic PHY* bindings - tx-fifo-resize: determines if the FIFO *has* to be reallocated. This is usually a subnode to DWC3 glue to which it is connected. diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e009d4e..036d589 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -82,6 +82,11 @@ static void dwc3_core_soft_reset(struct dwc3 *dwc) usb_phy_init(dwc-usb2_phy); usb_phy_init(dwc-usb3_phy); + if (dwc-usb2_generic_phy) + phy_init(dwc-usb2_generic_phy); What if phy_init() fails? You need to report and fail. Same applies for all PHY apis in this patch. + if (dwc-usb3_generic_phy) + phy_init(dwc-usb3_generic_phy); + mdelay(100); /* Clear USB3 PHY reset */ @@ -343,6 +348,11 @@ static void dwc3_core_exit(struct dwc3 *dwc) { usb_phy_shutdown(dwc-usb2_phy); usb_phy_shutdown(dwc-usb3_phy); + if (dwc-usb2_generic_phy) + phy_exit(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_exit(dwc-usb3_generic_phy); + } #define DWC3_ALIGN_MASK (16 - 1) @@ -433,6 +443,32 @@ static int dwc3_probe(struct platform_device *pdev) } } + dwc-usb2_generic_phy = devm_phy_get(dev, usb2-phy); + if (IS_ERR(dwc-usb2_generic_phy)) { + ret = PTR_ERR(dwc-usb2_generic_phy); + if (ret == -ENOSYS || ret == -ENODEV) { + dwc-usb2_generic_phy = NULL; + } else if (ret == -EPROBE_DEFER) { + return ret; + } else { + dev_err(dev, no usb2 phy configured\n); + return ret; + } + } + + dwc-usb3_generic_phy = devm_phy_get(dev, usb3-phy); + if (IS_ERR(dwc-usb3_generic_phy)) { + ret = PTR_ERR(dwc-usb3_generic_phy); + if (ret == -ENOSYS || ret == -ENODEV) { + dwc-usb3_generic_phy = NULL; + } else if (ret == -EPROBE_DEFER) { + return ret; + } else { + dev_err(dev, no usb3 phy configured\n); + return ret; + } + } + dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; @@ -482,6 +518,11 @@ static int dwc3_probe(struct platform_device *pdev) usb_phy_set_suspend(dwc-usb2_phy, 0); usb_phy_set_suspend(dwc-usb3_phy, 0); + if (dwc-usb2_generic_phy) + phy_power_on(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_power_on(dwc-usb3_generic_phy); + Is it OK to power on the phy before phy_init()? I suggest to move phy_init() from core_soft_reset() to here, just before phy_power_on(). ret = dwc3_event_buffers_setup(dwc); if (ret) { dev_err(dwc-dev, failed to setup event buffers\n); @@ -565,6 +606,10 @@ err2: err1: usb_phy_set_suspend(dwc-usb2_phy, 1); usb_phy_set_suspend(dwc-usb3_phy, 1); + if (dwc-usb2_generic_phy) + phy_power_off(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_power_off(dwc-usb3_generic_phy); dwc3_core_exit(dwc); err0: @@ -580,6 +625,11 @@ static int dwc3_remove(struct platform_device *pdev)
[PATCH 4/5] mmc: omap_hsmmc: add cmd23 support
Add set block count command support for close ended multiblock read/write. Signed-off-by: Balaji T K balaj...@ti.com --- drivers/mmc/host/omap_hsmmc.c | 21 + 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index b02fd30..bad246e 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -193,6 +193,8 @@ struct omap_hsmmc_host { struct omap_mmc_platform_data *pdata; }; +static void omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host); + static int omap_hsmmc_card_detect(struct device *dev, int slot) { struct omap_hsmmc_host *host = dev_get_drvdata(dev); @@ -865,11 +867,10 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data) else data-bytes_xfered = 0; - if (!data-stop) { + if (data-stop (data-error || !host-mrq-sbc)) + omap_hsmmc_start_command(host, data-stop, NULL); + else omap_hsmmc_request_done(host, data-mrq); - return; - } - omap_hsmmc_start_command(host, data-stop, NULL); } /* @@ -880,6 +881,14 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) { host-cmd = NULL; + if (host-mrq-sbc (host-cmd == host-mrq-sbc) + !host-mrq-sbc-error) { + omap_hsmmc_start_dma_transfer(host); + omap_hsmmc_start_command(host, host-mrq-cmd, + host-mrq-data); + return; + } + if (cmd-flags MMC_RSP_PRESENT) { if (cmd-flags MMC_RSP_136) { /* response type 2 */ @@ -1482,6 +1491,10 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) mmc_request_done(mmc, req); return; } + if (req-sbc) { + omap_hsmmc_start_command(host, req-sbc, NULL); + return; + } omap_hsmmc_start_dma_transfer(host); omap_hsmmc_start_command(host, req-cmd, req-data); -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/5] mmc: omap_hsmmc: add autocmd23 support
Add support for autocmd23 support Signed-off-by: Balaji T K balaj...@ti.com --- drivers/mmc/host/omap_hsmmc.c | 39 --- 1 files changed, 36 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index bad246e..fba67ab 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -45,6 +45,7 @@ /* OMAP HSMMC Host Controller Registers */ #define OMAP_HSMMC_SYSSTATUS 0x0014 #define OMAP_HSMMC_CON 0x002C +#define OMAP_HSMMC_SDMASA 0x0100 #define OMAP_HSMMC_BLK 0x0104 #define OMAP_HSMMC_ARG 0x0108 #define OMAP_HSMMC_CMD 0x010C @@ -58,6 +59,7 @@ #define OMAP_HSMMC_STAT0x0130 #define OMAP_HSMMC_IE 0x0134 #define OMAP_HSMMC_ISE 0x0138 +#define OMAP_HSMMC_AC120x013C #define OMAP_HSMMC_CAPA0x0140 #define VS18 (1 26) @@ -81,6 +83,7 @@ #define DTO_MASK 0x000F #define DTO_SHIFT 16 #define INIT_STREAM(1 1) +#define ACEN_ACMD23(2 2) #define DP_SELECT (1 21) #define DDIR (1 4) #define DMAE 0x1 @@ -112,13 +115,21 @@ #define DTO_EN (1 20) #define DCRC_EN(1 21) #define DEB_EN (1 22) +#define ACE_EN (1 24) #define CERR_EN(1 28) #define BADA_EN(1 29) -#define INT_EN_MASK(BADA_EN | CERR_EN | DEB_EN | DCRC_EN |\ +#define INT_EN_MASK (BADA_EN | CERR_EN | ACE_EN | DEB_EN | DCRC_EN |\ DTO_EN | CIE_EN | CEB_EN | CCRC_EN | CTO_EN | \ BRR_EN | BWR_EN | TC_EN | CC_EN) +#define CNI(1 7) +#define ACIE (1 4) +#define ACEB (1 3) +#define ACCE (1 2) +#define ACTO (1 1) +#define ACNE (1 0) + #define MMC_AUTOSUSPEND_DELAY 100 #define MMC_TIMEOUT_MS 20 /* 20 mSec */ #define MMC_TIMEOUT_US 2 /* 2 micro Sec */ @@ -126,6 +137,7 @@ #define OMAP_MMC_MAX_CLOCK 5200 #define DRIVER_NAMEomap_hsmmc +#define AUTO_CMD23 (1 1)/* Auto CMD23 support */ /* * One controller can have multiple slots, like on some omap boards using * omap.c controller driver. Luckily this is not currently done on any known @@ -189,6 +201,7 @@ struct omap_hsmmc_host { int use_reg; int req_in_progress; unsigned long clk_rate; + unsigned intflags; struct omap_hsmmc_next next_data; struct omap_mmc_platform_data *pdata; }; @@ -790,6 +803,11 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, cmdreg = (cmd-opcode 24) | (resptype 16) | (cmdtype 22); + if ((host-flags AUTO_CMD23) mmc_op_multi(cmd-opcode) + host-mrq-sbc) { + cmdreg |= ACEN_ACMD23; + OMAP_HSMMC_WRITE(host-base, SDMASA, host-mrq-sbc-arg); + } if (data) { cmdreg |= DP_SELECT | MSBS | BCE; if (data-flags MMC_DATA_READ) @@ -882,7 +900,7 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) host-cmd = NULL; if (host-mrq-sbc (host-cmd == host-mrq-sbc) - !host-mrq-sbc-error) { + !host-mrq-sbc-error !(host-flags AUTO_CMD23)) { omap_hsmmc_start_dma_transfer(host); omap_hsmmc_start_command(host, host-mrq-cmd, host-mrq-data); @@ -1025,6 +1043,7 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) { struct mmc_data *data; int end_cmd = 0, end_trans = 0; + int error = 0; data = host-data; dev_vdbg(mmc_dev(host-mmc), IRQ Status is %x\n, status); @@ -1039,6 +1058,20 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) else if (status (CCRC_EN | DCRC_EN)) hsmmc_command_incomplete(host, -EILSEQ, end_cmd); + if (status ACE_EN) { + u32 ac12; + ac12 = OMAP_HSMMC_READ(host-base, AC12); + if (!(ac12 ACNE) host-mrq-sbc) { + end_cmd = 1; + if (ac12 ACTO) + error = -ETIMEDOUT; + else if (ac12 (ACCE | ACEB | ACIE)) + error = -EILSEQ; + host-mrq-sbc-error = error; + hsmmc_command_incomplete(host, error, end_cmd); + } + dev_dbg(mmc_dev(host-mmc), AC12 err: 0x%x\n, ac12); + } if (host-data ||
[PATCH 0/5] mmc: omap_hsmmc: add support for set block count
Balaji T K (5): mmc: omap_hsmmc: save clock rate to use in interrupt context mmc: omap_hsmmc: fix request done for sbc error case mmc: omap_hsmmc: split dma setup mmc: omap_hsmmc: add cmd23 support mmc: omap_hsmmc: add autocmd23 support drivers/mmc/host/omap_hsmmc.c | 88 ++--- 1 files changed, 73 insertions(+), 15 deletions(-) -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/5] mmc: omap_hsmmc: fix request done for sbc error case
mrq is not populated for set block count(cmd23) command. Use block read/write mmc_commond pointer for request done and avoid NULL pointer access in error case for sbc (cmd23). Signed-off-by: Balaji T K balaj...@ti.com --- drivers/mmc/host/omap_hsmmc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 8d0048d..d3774b8 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -893,7 +893,7 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) } } if ((host-data == NULL !host-response_busy) || cmd-error) - omap_hsmmc_request_done(host, cmd-mrq); + omap_hsmmc_request_done(host, host-mrq); } /* -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/5] mmc: omap_hsmmc: save clock rate to use in interrupt context
clk_get_rate throws DEBUG_LOCKS_WARN_ON(in_interrupt()) warning if called from interrupt context. use cached clock rate in set_data_timeout, so that set_data_timeout can be called from interrupt context. Signed-off-by: Balaji T K balaj...@ti.com --- drivers/mmc/host/omap_hsmmc.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index dbd32ad..8d0048d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -188,6 +188,7 @@ struct omap_hsmmc_host { int reqs_blocked; int use_reg; int req_in_progress; + unsigned long clk_rate; struct omap_hsmmc_next next_data; struct omap_mmc_platform_data *pdata; }; @@ -1338,7 +1339,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host, if (clkd == 0) clkd = 1; - cycle_ns = 10 / (clk_get_rate(host-fclk) / clkd); + cycle_ns = 10 / (host-clk_rate / clkd); timeout = timeout_ns / cycle_ns; timeout += timeout_clks; if (timeout) { @@ -1462,6 +1463,7 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) host-reqs_blocked = 0; WARN_ON(host-mrq != NULL); host-mrq = req; + host-clk_rate = clk_get_rate(host-fclk); err = omap_hsmmc_prepare_data(host, req); if (err) { req-cmd-error = err; -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/5] mmc: omap_hsmmc: split dma setup
split start dma function into setup and start dma to keep track of host_cookie when cmd23 support is enabled along with async request. Signed-off-by: Balaji T K balaj...@ti.com --- drivers/mmc/host/omap_hsmmc.c | 26 ++ 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index d3774b8..b02fd30 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1263,7 +1263,7 @@ static int omap_hsmmc_pre_dma_transfer(struct omap_hsmmc_host *host, /* * Routine to configure and start DMA for the MMC card */ -static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, +static int omap_hsmmc_setup_dma_transfer(struct omap_hsmmc_host *host, struct mmc_request *req) { struct dma_slave_config cfg; @@ -1322,8 +1322,6 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, host-dma_ch = 1; - dma_async_issue_pending(chan); - return 0; } @@ -1364,6 +1362,21 @@ static void set_data_timeout(struct omap_hsmmc_host *host, OMAP_HSMMC_WRITE(host-base, SYSCTL, reg); } +static void omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host) +{ + struct mmc_request *req = host-mrq; + struct dma_chan *chan; + + if (!req-data) + return; + OMAP_HSMMC_WRITE(host-base, BLK, (req-data-blksz) + | (req-data-blocks 16)); + set_data_timeout(host, req-data-timeout_ns, + req-data-timeout_clks); + chan = omap_hsmmc_get_dma_chan(host, req-data); + dma_async_issue_pending(chan); +} + /* * Configure block length for MMC/SD cards and initiate the transfer. */ @@ -1384,12 +1397,8 @@ omap_hsmmc_prepare_data(struct omap_hsmmc_host *host, struct mmc_request *req) return 0; } - OMAP_HSMMC_WRITE(host-base, BLK, (req-data-blksz) - | (req-data-blocks 16)); - set_data_timeout(host, req-data-timeout_ns, req-data-timeout_clks); - if (host-use_dma) { - ret = omap_hsmmc_start_dma_transfer(host, req); + ret = omap_hsmmc_setup_dma_transfer(host, req); if (ret != 0) { dev_err(mmc_dev(host-mmc), MMC start dma failure\n); return ret; @@ -1474,6 +1483,7 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) return; } + omap_hsmmc_start_dma_transfer(host); omap_hsmmc_start_command(host, req-cmd, req-data); } -- 1.7.5.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ARM: dts: omap3 clocks: simplify ssi aliases
update aliases for the ssi clocks ssi_ssr_fck, ssi_sst_fck and ssi_ick to make them consistent for omap34xx and omap36xx. This makes it possible to reference the clocks from generic omap3 dts files. Signed-off-by: Sebastian Reichel s...@debian.org --- arch/arm/boot/dts/omap3430es1-clocks.dtsi | 10 +- arch/arm/boot/dts/omap36xx-omap3430es2plus-clocks.dtsi | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/omap3430es1-clocks.dtsi b/arch/arm/boot/dts/omap3430es1-clocks.dtsi index 02f6c7f..6f31954 100644 --- a/arch/arm/boot/dts/omap3430es1-clocks.dtsi +++ b/arch/arm/boot/dts/omap3430es1-clocks.dtsi @@ -82,16 +82,16 @@ ti,dividers = 0, 1, 2, 3, 4, 0, 6, 0, 8; }; - ssi_ssr_fck_3430es1: ssi_ssr_fck_3430es1 { + ssi_ssr_fck: ssi_ssr_fck_3430es1 { #clock-cells = 0; compatible = ti,composite-clock; clocks = ssi_ssr_gate_fck_3430es1, ssi_ssr_div_fck_3430es1; }; - ssi_sst_fck_3430es1: ssi_sst_fck_3430es1 { + ssi_sst_fck: ssi_sst_fck_3430es1 { #clock-cells = 0; compatible = fixed-factor-clock; - clocks = ssi_ssr_fck_3430es1; + clocks = ssi_ssr_fck; clock-mult = 1; clock-div = 2; }; @@ -120,7 +120,7 @@ clock-div = 1; }; - ssi_ick_3430es1: ssi_ick_3430es1 { + ssi_ick: ssi_ick_3430es1 { #clock-cells = 0; compatible = ti,omap3-no-wait-interface-clock; clocks = ssi_l4_ick; @@ -203,6 +203,6 @@ i2c1_ick, uart2_ick, uart1_ick, gpt11_ick, gpt10_ick, mcbsp5_ick, mcbsp1_ick, omapctrl_ick, aes2_ick, sha12_ick, -fshostusb_fck, fac_ick, ssi_ick_3430es1; +fshostusb_fck, fac_ick, ssi_ick; }; }; diff --git a/arch/arm/boot/dts/omap36xx-omap3430es2plus-clocks.dtsi b/arch/arm/boot/dts/omap36xx-omap3430es2plus-clocks.dtsi index 8ed475d..877318c 100644 --- a/arch/arm/boot/dts/omap36xx-omap3430es2plus-clocks.dtsi +++ b/arch/arm/boot/dts/omap36xx-omap3430es2plus-clocks.dtsi @@ -25,16 +25,16 @@ ti,dividers = 0, 1, 2, 3, 4, 0, 6, 0, 8; }; - ssi_ssr_fck_3430es2: ssi_ssr_fck_3430es2 { + ssi_ssr_fck: ssi_ssr_fck_3430es2 { #clock-cells = 0; compatible = ti,composite-clock; clocks = ssi_ssr_gate_fck_3430es2, ssi_ssr_div_fck_3430es2; }; - ssi_sst_fck_3430es2: ssi_sst_fck_3430es2 { + ssi_sst_fck: ssi_sst_fck_3430es2 { #clock-cells = 0; compatible = fixed-factor-clock; - clocks = ssi_ssr_fck_3430es2; + clocks = ssi_ssr_fck; clock-mult = 1; clock-div = 2; }; @@ -55,7 +55,7 @@ clock-div = 1; }; - ssi_ick_3430es2: ssi_ick_3430es2 { + ssi_ick: ssi_ick_3430es2 { #clock-cells = 0; compatible = ti,omap3-ssi-interface-clock; clocks = ssi_l4_ick; @@ -193,6 +193,6 @@ i2c1_ick, uart2_ick, uart1_ick, gpt11_ick, gpt10_ick, mcbsp5_ick, mcbsp1_ick, omapctrl_ick, aes2_ick, sha12_ick, -ssi_ick_3430es2; +ssi_ick; }; }; -- 1.8.5.2 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] usb: dwc3: core: continue probing if usb phy library returns -ENODEV/-ENXIO
On Tue, Jan 21, 2014 at 03:41:38PM +0530, Kishon Vijay Abraham I wrote: Since PHYs for dwc3 is optional (not all SoCs that have DWC3 use PHYs), do not return from probe if the USB PHY library returns -ENODEV as that this isn't correct, they all have PHYs, some of them might not be controllable. indicates the platform does not have PHY. not really, that indicates the current platform tried to grab a PHY and the PHY doesn't exist. If there's anybody with a non-controllable PHY and someone gives me a really good reason for not using the generic no-op PHY, then we should add a flag and we could: if (!likely(dwc-flags DWC3_USB2PHY_DRIVER_NOT_NEEDED)) dwc3_grab_phys(dwc); But I really want to see the argument against using no-op. As far as I could see, everybody needs a PHY driver one way or another, some platforms just haven't sent any PHY driver upstream and have their own hacked up solution to avoid using the PHY layer. Your commit log really needs quite some extra work. What are you trying to achieve ? Is this related to AM437x which doesn't have a USB3 PHY due to the way the HW was wired up ? If so, please mention it. Explain how AM437x HW was wired up, why it lacks a USB3 PHY and why we should support it the way you want. That sort of detail needs to be clear in the commit log, specially considering the peculiar nature of AM43xx which uses a USB3 IP in USB2-only mode, that needs to be documented in the commit log :-) cheers -- balbi signature.asc Description: Digital signature
Re: [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
On Tue, Jan 21, 2014 at 12:57:02PM +0200, Tomi Valkeinen wrote: 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.valkei...@ti.com Your dss-dt-review-3 branch boots on my N900 with working display. Tested-by: Sebastian Reichel s...@debian.org -- Sebastian signature.asc Description: Digital signature
Re: [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
On Tue, Jan 21, 2014 at 12:57:11PM +0200, Tomi Valkeinen wrote: Add DT binding documentation for Sony acx565akm panel Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com Reviewed-by: Sebastian Reichel s...@debian.org -- Sebastian signature.asc Description: Digital signature
Re: [PATCH v6 00/10] USB Host support for OMAP5 uEVM (for 3.14)
This patchset brings up USB Host ports and Ethernet port on the OMAP5 uEVM board. I'd keep hold of this and send it out again when the merge-window is closed. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: omap_hsmmc: Add support for Erratum 2.1.1.128 in device tree boot
On 01/20/2014 05:39 PM, Felipe Balbi wrote: On Mon, Jan 20, 2014 at 05:29:02PM -0600, Nishanth Menon wrote: When device is booted using devicetree, platforms impacted by Erratum 2.1.1.128 is not detected easily in the mmc driver. This erratum indicates that the module cannot do multi-block transfers. Handle this by providing a boolean flag to indicate to driver that it is working on a hardware with mentioned limitation. sure there's no way of reading the revision register to figure this one out without having to add a new DT attribute ? I did a quick patch to read the Module revision register: http://slexy.org/view/s21TKvlWlR sdp2430: Revision: 1.2, Spec: 0.0, normal interrupt OMAP3430-ldp: (ES2.1): Revision: 2.6, Spec: 0.0, normal interrupt SDP3430:(ES3.0) Revision: 2.6, Spec: 0.0, normal interrupt AM3517-evm: (ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM3517-crane:(ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM37x-evm: (ES1.2) Revision: 2.6, Spec: 0.0, normal interrupt OMAP3630-beag-xm (ES1.2): Revision: 2.6, Spec: 0.0, normal interrupt am335x-evm:(ES1.0): Revision: 3.1, Spec: 0.1, normal interrupt am335x-sk: (ES2.1): Revision: 3.1, Spec: 0.1, normal interrupt am335x-beaglebone-black:(ES2.0): Revision: 3.1, Spec: 0.1, normal interrupt sdp4430.txt: (ES2.2): Revision: 3.1, Spec: 0.1, normal interrupt OMAP4460-panda-es (ES1.1): Revision: 3.1, Spec: 0.1, normal interrupt OMAP5uevm:(ES2.0): Revision: 3.3, Spec: 0.2, normal interrupt dra7-evm (es1.1): Revision: 3.3, Spec: 0.2, normal interrupt OMAP3430-ldp seems to be the only one impacted with module revision 2.6 - so using revision information is not really helpful here. Hence the usage of a flag in dt attribute to indicate hardware impacted by erratum. -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: omap_hsmmc: Add support for Erratum 2.1.1.128 in device tree boot
Hi, On Tue, Jan 21, 2014 at 11:38:00AM -0600, Nishanth Menon wrote: On 01/20/2014 05:39 PM, Felipe Balbi wrote: On Mon, Jan 20, 2014 at 05:29:02PM -0600, Nishanth Menon wrote: When device is booted using devicetree, platforms impacted by Erratum 2.1.1.128 is not detected easily in the mmc driver. This erratum indicates that the module cannot do multi-block transfers. Handle this by providing a boolean flag to indicate to driver that it is working on a hardware with mentioned limitation. sure there's no way of reading the revision register to figure this one out without having to add a new DT attribute ? I did a quick patch to read the Module revision register: http://slexy.org/view/s21TKvlWlR sdp2430: Revision: 1.2, Spec: 0.0, normal interrupt OMAP3430-ldp: (ES2.1): Revision: 2.6, Spec: 0.0, normal interrupt SDP3430:(ES3.0) Revision: 2.6, Spec: 0.0, normal interrupt AM3517-evm: (ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM3517-crane:(ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM37x-evm: (ES1.2) Revision: 2.6, Spec: 0.0, normal interrupt OMAP3630-beag-xm (ES1.2): Revision: 2.6, Spec: 0.0, normal interrupt am335x-evm:(ES1.0): Revision: 3.1, Spec: 0.1, normal interrupt am335x-sk: (ES2.1): Revision: 3.1, Spec: 0.1, normal interrupt am335x-beaglebone-black:(ES2.0): Revision: 3.1, Spec: 0.1, normal interrupt sdp4430.txt: (ES2.2): Revision: 3.1, Spec: 0.1, normal interrupt OMAP4460-panda-es (ES1.1): Revision: 3.1, Spec: 0.1, normal interrupt OMAP5uevm:(ES2.0): Revision: 3.3, Spec: 0.2, normal interrupt dra7-evm (es1.1): Revision: 3.3, Spec: 0.2, normal interrupt OMAP3430-ldp seems to be the only one impacted with module revision 2.6 - so using revision information is not really helpful here. Hence the usage of a flag in dt attribute to indicate hardware impacted by erratum. alright, that's too bad. Seems like revision in this module isn't very useful :-( -- balbi signature.asc Description: Digital signature
Re: [PATCH RFC v2 REPOST 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
On Wed, Jan 15, 2014 at 01:27:21PM +0200, Jyri Sarha wrote: On 12/31/2013 03:25 PM, Mark Brown wrote: support. The only supported sample format is SNDRV_PCM_FORMAT_S32_LE. The 8 least significant bits are ignored. Where does this constraint come from? From driver/gpu/drm/i2c/tda998x_drv.c. The driver configures CTS_N register statically to a value that works only with 4 byte samples. According to my tests it is possible to support 3 and 2 byte samples too by changing the CTS_N register value, but I am not sure if the configuration can be changed on the fly. My data sheet of the nxp chip is very vague about the register definitions, but I suppose the register configures some clock divider on the chip. HDMI supports only upto 24bit audio and the data sheet states that any extraneous least significant bits are ignored. Hrm. This sounds like it ought to be presenting as an ASoC CODEC driver. + snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, +2, 2); Why not just set all this statically when registering the DAI? Because there is no relevant DAI to where to put these limitations. I did not want to add yet another dummy codec driver, but decided to use the already existing ASoC HDMI codec. By default the driver support all audio params supported by HDMI. The limitations are coming from NXP chip, the NXP driver, and because the chip is used in i2s mode. In other words the limitation is coming from machine setup, not from the DAIs. OK, but it sounds like it's got register configuration as well? That really does sound like a device that ought to have a driver... No excuse for i initialization, I'll fix that. The casting is just to survive with just one kmalloc call instead of separate memory blobs for struct snd_pcm_hw_constraint_list and referred list of supported sample rates. I'll allocate a second blob, if that is easier to read. Yes, please. Unless it's something where memory is getting tight (eg, due to be allocated a lot) it's more important that we can read the code than that we save a few bytes. signature.asc Description: Digital signature
Re: [PATCH] mmc: omap_hsmmc: Add support for Erratum 2.1.1.128 in device tree boot
On Tue, Jan 21, 2014 at 12:05 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Tue, Jan 21, 2014 at 11:38:00AM -0600, Nishanth Menon wrote: On 01/20/2014 05:39 PM, Felipe Balbi wrote: On Mon, Jan 20, 2014 at 05:29:02PM -0600, Nishanth Menon wrote: When device is booted using devicetree, platforms impacted by Erratum 2.1.1.128 is not detected easily in the mmc driver. This erratum indicates that the module cannot do multi-block transfers. Handle this by providing a boolean flag to indicate to driver that it is working on a hardware with mentioned limitation. sure there's no way of reading the revision register to figure this one out without having to add a new DT attribute ? I did a quick patch to read the Module revision register: http://slexy.org/view/s21TKvlWlR sdp2430: Revision: 1.2, Spec: 0.0, normal interrupt OMAP3430-ldp: (ES2.1): Revision: 2.6, Spec: 0.0, normal interrupt SDP3430:(ES3.0) Revision: 2.6, Spec: 0.0, normal interrupt AM3517-evm: (ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM3517-crane:(ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM37x-evm: (ES1.2) Revision: 2.6, Spec: 0.0, normal interrupt OMAP3630-beag-xm (ES1.2): Revision: 2.6, Spec: 0.0, normal interrupt am335x-evm:(ES1.0): Revision: 3.1, Spec: 0.1, normal interrupt am335x-sk: (ES2.1): Revision: 3.1, Spec: 0.1, normal interrupt am335x-beaglebone-black:(ES2.0): Revision: 3.1, Spec: 0.1, normal interrupt sdp4430.txt: (ES2.2): Revision: 3.1, Spec: 0.1, normal interrupt OMAP4460-panda-es (ES1.1): Revision: 3.1, Spec: 0.1, normal interrupt OMAP5uevm:(ES2.0): Revision: 3.3, Spec: 0.2, normal interrupt dra7-evm (es1.1): Revision: 3.3, Spec: 0.2, normal interrupt OMAP3430-ldp seems to be the only one impacted with module revision 2.6 - so using revision information is not really helpful here. Hence the usage of a flag in dt attribute to indicate hardware impacted by erratum. alright, that's too bad. Seems like revision in this module isn't very useful :-( Can I take that as an acked-by? Regards, Nishanth Menon -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mmc: omap_hsmmc: Add support for Erratum 2.1.1.128 in device tree boot
On Tue, Jan 21, 2014 at 01:39:20PM -0600, Nishanth Menon wrote: On Tue, Jan 21, 2014 at 12:05 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Tue, Jan 21, 2014 at 11:38:00AM -0600, Nishanth Menon wrote: On 01/20/2014 05:39 PM, Felipe Balbi wrote: On Mon, Jan 20, 2014 at 05:29:02PM -0600, Nishanth Menon wrote: When device is booted using devicetree, platforms impacted by Erratum 2.1.1.128 is not detected easily in the mmc driver. This erratum indicates that the module cannot do multi-block transfers. Handle this by providing a boolean flag to indicate to driver that it is working on a hardware with mentioned limitation. sure there's no way of reading the revision register to figure this one out without having to add a new DT attribute ? I did a quick patch to read the Module revision register: http://slexy.org/view/s21TKvlWlR sdp2430: Revision: 1.2, Spec: 0.0, normal interrupt OMAP3430-ldp: (ES2.1): Revision: 2.6, Spec: 0.0, normal interrupt SDP3430:(ES3.0) Revision: 2.6, Spec: 0.0, normal interrupt AM3517-evm: (ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM3517-crane:(ES1.1): Revision: 2.6, Spec: 0.0, normal interrupt AM37x-evm: (ES1.2) Revision: 2.6, Spec: 0.0, normal interrupt OMAP3630-beag-xm (ES1.2): Revision: 2.6, Spec: 0.0, normal interrupt am335x-evm:(ES1.0): Revision: 3.1, Spec: 0.1, normal interrupt am335x-sk: (ES2.1): Revision: 3.1, Spec: 0.1, normal interrupt am335x-beaglebone-black:(ES2.0): Revision: 3.1, Spec: 0.1, normal interrupt sdp4430.txt: (ES2.2): Revision: 3.1, Spec: 0.1, normal interrupt OMAP4460-panda-es (ES1.1): Revision: 3.1, Spec: 0.1, normal interrupt OMAP5uevm:(ES2.0): Revision: 3.3, Spec: 0.2, normal interrupt dra7-evm (es1.1): Revision: 3.3, Spec: 0.2, normal interrupt OMAP3430-ldp seems to be the only one impacted with module revision 2.6 - so using revision information is not really helpful here. Hence the usage of a flag in dt attribute to indicate hardware impacted by erratum. alright, that's too bad. Seems like revision in this module isn't very useful :-( Can I take that as an acked-by? sure Acked-by: Felipe Balbi ba...@ti.com -- balbi signature.asc Description: Digital signature
[PATCH 1/6] ARM: dts: Add CPU OPP table for omap37xx100
This patch adds file omap37xx100.dtsi which includs a SoC specific table for CPU OPP. Please keep in mind that am/dm37xx100 variants differ from am/dm37xx SoCs without nomenclature marker prefix 100. This marker indicates the maximum cpu frequency. 100 stands for 1 GHz-Cortex-A8, blank means maximum 800 MHz. For more info, see Datasheet http://www.ti.com/lit/ds/sprs685d/sprs685d.pdf section 7.2.1 Device and Development-Support Tool Nomenclature. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/boot/dts/omap37xx100.dtsi | 44 1 file changed, 44 insertions(+) create mode 100644 arch/arm/boot/dts/omap37xx100.dtsi diff --git a/arch/arm/boot/dts/omap37xx100.dtsi b/arch/arm/boot/dts/omap37xx100.dtsi new file mode 100644 index 000..064661e --- /dev/null +++ b/arch/arm/boot/dts/omap37xx100.dtsi @@ -0,0 +1,44 @@ +/* + * Device Tree Source for OMAP37x SoC + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed as is without any warranty of any + * kind, whether express or implied. + */ + +#include omap3.dtsi + +/ { + aliases { + serial3 = uart4; + }; + + cpus { + /* AM/DM37xx */ + cpu@0 { + operating-points = + /* kHzuV */ +125000 975000 +25 1075000 +50 110 +60 114 +80 127 + 100 138 + ; + clock-latency = 30; /* From legacy driver */ + }; + }; + + ocp { + /* uart4 is only available on CBP and CBC packages */ + uart4: serial@49042000 { + compatible = ti,omap3-uart; + reg = 0x49042000 0x400; + interrupts = 80; + dmas = sdma 81 sdma 82; + dma-names = tx, rx; + ti,hwmods = uart4; + clock-frequency = 4800; + }; + }; +}; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/6] ARM: OMAP2+: Add pdata quirk for sys_clkout2 for omap3 DBB056
Full device tree support for clock control is not yet accomplished. Until then, configure the 24Mhz of sys_clkout2 to feed an USB-Hub here. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/mach-omap2/pdata-quirks.c | 37 1 file changed, 37 insertions(+) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index bce8020..07d05f6 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -95,6 +95,43 @@ static void __init omap3_zoom_legacy_init(void) static void __init omap3_dbb056_legacy_init(void) { + struct clk *clkout2; + struct clk *cm96fck; + + /* Reparent clkout2 to 96M_FCK */ + pr_info(a83x-quirk: Late Reparent clkout2 to 96M_FCK\n); + clkout2 = clk_get(NULL, clkout2_src_ck); + if(clkout2 0) { + pr_err(a83x-quirk: couldn't get clkout2_src_ck\n); + return; + } + cm96fck = clk_get(NULL, cm_96m_fck); + if(cm96fck 0) { + pr_err(a83x-quirk: couldn't get cm_96m_fck\n); + return; + } + if(clk_set_parent(clkout2, cm96fck) 0) { + pr_err(a83x-quirk: couldn't reparent clkout2_src_ck\n); + return; + } + + /* Set clkout2 to 24MHz for internal usb hub*/ + pr_info(a83x-quirk: Set clkout2 to 24MHz for internal usb hub\n); + clkout2 = clk_get(NULL, sys_clkout2); + if(clkout2 0) { + pr_err(a83x-quirk: couldn't get sys_clkout2\n); + return; + } + if(clk_set_rate(clkout2, 2400) 0) { + printk(KERN_ERR board-omap3evm: couldn't set sys_clkout2 rate\n); + return; + } + if(clk_prepare_enable(clkout2) 0) { + pr_err(a83x-quirk: couldn't enable sys_clkout2\n); + return; + } + + /* Initialize display */ omap3_dbb056_display_init_of(); } #endif /* CONFIG_ARCH_OMAP3 */ -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/6] ARM: dts: omap3: Add support for INCOstartec a83x module
INCOstartec LILLY-A83X module is a TI DM3730xx100 (OMAP3) SoC computer-on-module. This patch adds device-tree support for most of its features. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 441 +++ 1 file changed, 441 insertions(+) create mode 100644 arch/arm/boot/dts/omap3-lilly-a83x.dtsi diff --git a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi new file mode 100644 index 000..ae3c00f --- /dev/null +++ b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi @@ -0,0 +1,441 @@ +/* + * Copyright (C) 2014 Christoph Fritz chf.fri...@googlemail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include omap37xx100.dtsi + +/ { + model = INCOstartec LILLY-A83X module (DM3730); + compatible = incostartec,omap3-lilly-a83x, ti,omap3; + + chosen { + bootargs = console=ttyO0,115200n8 vt.global_cursor_default=0 consoleblank=0; + }; + + memory { + device_type = memory; + reg = 0x8000 0x800; /* 128 MB */ + }; + + leds { + compatible = gpio-leds; + + heartbeat1 { + label = lilly-a83x::led1; + gpios = gpio1 29 GPIO_ACTIVE_LOW; + linux,default-trigger = default-on; + }; + + }; + + sound { + compatible = ti,omap-twl4030; + ti,model = lilly-a83x; + + ti,mcbsp = mcbsp2; + ti,codec = twl_audio; + }; + + regulators { + compatible = simple-bus; + reg_vcc3: vcc3 { +compatible = regulator-fixed; +regulator-name = VCC3; +regulator-min-microvolt = 330; +regulator-max-microvolt = 330; +regulator-always-on; + }; + }; + + hsusb1_phy: hsusb1_phy { + compatible = usb-nop-xceiv; + vcc-supply = reg_vcc3; + }; +}; + +omap3_pmx_wkup { + pinctrl-names = default; + + lan9221_pins: pinmux_lan9221_pins { + pinctrl-single,pins = + 0x5A (PIN_INPUT | MUX_MODE4) /* gpio_129 */ + ; + }; + + tsc2048_pins: pinmux_tsc2048_pins { + pinctrl-single,pins = + 0x16 (PIN_INPUT_PULLUP | MUX_MODE4) /* gpio_8 */ + ; + }; + + mmc1cd_pins: pinmux_mmc1cd_pins { + pinctrl-single,pins = + 0x56 (PIN_INPUT | MUX_MODE4) /* gpio_126 */ + ; + }; +}; + +omap3_pmx_core { + pinctrl-names = default; + + gpio1_pins: pinmux_gpio1_pins { + pinctrl-single,pins = + 0x5ca (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio_29 */ + ; + }; + + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = + 0x14c (PIN_OUTPUT | MUX_MODE0) /* uart1_tx.uart1_tx */ + 0x14e (PIN_OUTPUT | MUX_MODE0) /* uart1_rts.uart1_rts */ + 0x150 (PIN_INPUT | MUX_MODE0)/* uart1_cts.uart1_cts */ + 0x152 (PIN_INPUT | MUX_MODE0)/* uart1_rx.uart1_rx */ + ; + }; + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = + 0x140 (PIN_OUTPUT | MUX_MODE1) /* mcbsp3_clkx.uart2_tx */ + 0x142 (PIN_INPUT | MUX_MODE1)/* mcbsp3_fsx.uart2_rx */ + ; + }; + + uart3_pins: pinmux_uart3_pins { + pinctrl-single,pins = + 0x16e (PIN_INPUT | MUX_MODE0)/* uart3_rx_irrx.uart3_rx_irrx */ + 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */ + ; + }; + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = + 0x18a (PIN_INPUT_PULLUP | MUX_MODE0)/* i2c1_scl */ + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* i2c1_sda */ + ; + }; + + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = + 0x18e (PIN_INPUT | MUX_MODE0) /* i2c2_scl.i2c2_scl */ + 0x190 (PIN_INPUT | MUX_MODE0) /* i2c2_sda.i2c2_sda */ + ; + }; + + i2c3_pins: pinmux_i2c3_pins { + pinctrl-single,pins = + 0x192 (PIN_INPUT | MUX_MODE0) /* i2c3_scl.i2c3_scl */ + 0x194 (PIN_INPUT | MUX_MODE0) /* i2c3_sda.i2c3_sda */ +
[PATCH 4/6] ARM: OMAP2+: add legacy display for omap3 DBB056
Full device tree support for omapdss is not yet accomplished. Until then, init display by legacy platform code. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/mach-omap2/dss-common.c | 49 arch/arm/mach-omap2/dss-common.h |1 + arch/arm/mach-omap2/pdata-quirks.c |8 +- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index dadccc9..b8b4e39 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c @@ -257,3 +257,52 @@ void __init omap3_igep2_display_init_of(void) platform_device_register(omap3_igep2_tfp410_device); platform_device_register(omap3_igep2_dvi_connector_device); } + +/* OMAP3 dbb056 data */ + +#define DBB056_DISPLAY_ENABLE_GPIO 156 + +static const struct display_timing dbb056_lcd_videomode = { + .pixelclock = { 0, 1920, 0 }, + + .hactive = { 0, 640, 0 }, + .hfront_porch = { 0, 104, 0 }, + .hback_porch = { 0, 8, 0 }, + .hsync_len = { 0, 8, 0 }, + + .vactive = { 0, 480, 0 }, + .vfront_porch = { 0, 104, 0 }, + .vback_porch = { 0, 8, 0 }, + .vsync_len = { 0, 8, 0 }, + + .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | + DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE, +}; + +static struct panel_dpi_platform_data dbb056_lcd_pdata = { + .name = lcd, + .source = dpi.0, + + .data_lines = 18, + + .display_timing = dbb056_lcd_videomode, + + .enable_gpio= DBB056_DISPLAY_ENABLE_GPIO, + .backlight_gpio = -1, +}; + +static struct platform_device dbb056_lcd_device = { + .name = panel-dpi, + .id = 0, + .dev.platform_data = dbb056_lcd_pdata, +}; + +static struct omap_dss_board_info omap_dbb056_dss_data = { + .default_display_name = lcd, +}; + +void __init omap3_dbb056_display_init_of(void) +{ + platform_device_register(dbb056_lcd_device); + omap_display_init(omap_dbb056_dss_data); +} diff --git a/arch/arm/mach-omap2/dss-common.h b/arch/arm/mach-omap2/dss-common.h index a9becf0..a125b55 100644 --- a/arch/arm/mach-omap2/dss-common.h +++ b/arch/arm/mach-omap2/dss-common.h @@ -9,5 +9,6 @@ void __init omap4_panda_display_init_of(void); void __init omap_4430sdp_display_init_of(void); void __init omap3_igep2_display_init_of(void); +void __init omap3_dbb056_display_init_of(void); #endif diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 39f020c..bce8020 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -92,6 +92,11 @@ static void __init omap3_zoom_legacy_init(void) { legacy_init_wl12xx(WL12XX_REFCLOCK_26, 0, 162); } + +static void __init omap3_dbb056_legacy_init(void) +{ + omap3_dbb056_display_init_of(); +} #endif /* CONFIG_ARCH_OMAP3 */ #ifdef CONFIG_ARCH_OMAP4 @@ -139,10 +144,11 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { static struct pdata_init pdata_quirks[] __initdata = { #ifdef CONFIG_ARCH_OMAP3 + { incostartec,omap3-lilly-dbb056, omap3_dbb056_legacy_init, }, + { isee,omap3-igep0020, omap3_igep0020_legacy_init, }, { nokia,omap3-n900, hsmmc2_internal_input_clk, }, { nokia,omap3-n9, hsmmc2_internal_input_clk, }, { nokia,omap3-n950, hsmmc2_internal_input_clk, }, - { isee,omap3-igep0020, omap3_igep0020_legacy_init, }, { ti,omap3-evm-37xx, omap3_evm_legacy_init, }, { ti,omap3-zoom3, omap3_zoom_legacy_init, }, #endif -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] ARM: dts: omap3: Add support for INCOstartec DBB056 baseboard
INCOstartec LILLY-DBB056 is a carrier board (baseboard) for computer-on-module LILLY-A83X. This patch adds device-tree support for most of its features. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/boot/dts/Makefile |1 + arch/arm/boot/dts/omap3-lilly-dbb056.dts | 160 ++ 2 files changed, 161 insertions(+) create mode 100644 arch/arm/boot/dts/omap3-lilly-dbb056.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index d57c1a6..e0adfa9 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -186,6 +186,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ omap3-gta04.dtb \ omap3-igep0020.dtb \ omap3-igep0030.dtb \ + omap3-lilly-dbb056.dtb \ omap3-zoom3.dtb \ omap4-panda.dtb \ omap4-panda-a4.dtb \ diff --git a/arch/arm/boot/dts/omap3-lilly-dbb056.dts b/arch/arm/boot/dts/omap3-lilly-dbb056.dts new file mode 100644 index 000..b063b72 --- /dev/null +++ b/arch/arm/boot/dts/omap3-lilly-dbb056.dts @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2014 Christoph Fritz chf.fri...@googlemail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ +/dts-v1/; + +#include omap3-lilly-a83x.dtsi + +/ { + model = INCOstartec LILLY-DBB056 (DM3730); + compatible = incostartec,omap3-lilly-dbb056, incostartec,omap3-lilly-a83x, ti,omap3; +}; + +twl { + vaux2: regulator-vaux2 { + compatible = ti,twl4030-vaux2; + regulator-min-microvolt = 280; + regulator-max-microvolt = 280; + regulator-always-on; + }; +}; + +omap3_pmx_core { + pinctrl-names = default; + pinctrl-0 = lcd_pins; + + lan9117_pins: pinmux_lan9117_pins { + pinctrl-single,pins = + 0xe4 (PIN_INPUT | MUX_MODE4) /* gpio_98 */ + ; + }; + + gpio4_pins: pinmux_gpio4_pins { + pinctrl-single,pins = + 0xfe (PIN_INPUT | MUX_MODE4) /* gpio_111 - sja1000 IRQ */ + ; + }; + + lcd_pins: pinmux_lcd_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 */ + 0x15c (PIN_OUTPUT | MUX_MODE4) /* gpio_156 - enable DSS */ + ; + }; + + mmc2_pins: pinmux_mmc2_pins { + pinctrl-single,pins = + 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */ + 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */ + 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */ + 0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */ + 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */ + 0x132 (PIN_INPUT_PULLUP | MUX_MODE0)
[PATCH 0/6] ARM: add omap3 INCOstartec board support
This set of patches adds board support for an omap3 system from INCOstartec. It's based on next-20140115. Christoph Fritz (6): ARM: dts: Add CPU OPP table for omap37xx100 ARM: dts: omap3: Add support for INCOstartec a83x module ARM: dts: omap3: Add support for INCOstartec DBB056 baseboard ARM: OMAP2+: add legacy display for omap3 DBB056 ARM: OMAP2+: Add pdata quirk for sys_clkout2 for omap3 DBB056 [RFC] omapdss: remove FEAT_DPI_USES_VDDS_DSI from omap3 arch/arm/boot/dts/Makefile |1 + arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 441 ++ arch/arm/boot/dts/omap3-lilly-dbb056.dts | 160 +++ arch/arm/boot/dts/omap37xx100.dtsi | 44 +++ arch/arm/mach-omap2/dss-common.c | 49 arch/arm/mach-omap2/dss-common.h |1 + arch/arm/mach-omap2/pdata-quirks.c | 45 ++- drivers/video/omap2/dss/dss_features.c |1 - 8 files changed, 740 insertions(+), 2 deletions(-) create mode 100644 arch/arm/boot/dts/omap3-lilly-a83x.dtsi create mode 100644 arch/arm/boot/dts/omap3-lilly-dbb056.dts create mode 100644 arch/arm/boot/dts/omap37xx100.dtsi -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/6] [RFC] omapdss: remove FEAT_DPI_USES_VDDS_DSI from omap3
DBB056 doesn't use DSI for its display, but omap3 forces this erroneously: | OMAP DSS rev 2.0 | omapdss DPI error: can't get VDDS_DSI regulator | omapfb omapfb: failed to connect default display | omapfb omapfb: failed to init overlay connections | omapfb omapfb: failed to setup omapfb | platform omapfb: Driver omapfb requests probe deferral So this patch just disables it for omap3. Consider this as a hack! Is there a proper fix for this issue? --- drivers/video/omap2/dss/dss_features.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index f8fd6db..0ae8a84 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c @@ -536,7 +536,6 @@ static const enum dss_feat_id omap3630_dss_feat_list[] = { FEAT_ALPHA_FIXED_ZORDER, FEAT_FIFO_MERGE, FEAT_OMAP3_DSI_FIFO_BUG, - FEAT_DPI_USES_VDDS_DSI, }; static const enum dss_feat_id omap4430_es1_0_dss_feat_list[] = { -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/6] ARM: dts: Add CPU OPP table for omap37xx100
On 01/21/2014 01:47 PM, Christoph Fritz wrote: This patch adds file omap37xx100.dtsi which includs a SoC specific table for CPU OPP. Please keep in mind that am/dm37xx100 variants differ from am/dm37xx SoCs without nomenclature marker prefix 100. This marker indicates the maximum cpu frequency. 100 stands for 1 GHz-Cortex-A8, blank means maximum 800 MHz. For more info, see Datasheet http://www.ti.com/lit/ds/sprs685d/sprs685d.pdf section 7.2.1 Device and Development-Support Tool Nomenclature. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/boot/dts/omap37xx100.dtsi | 44 1 file changed, 44 insertions(+) create mode 100644 arch/arm/boot/dts/omap37xx100.dtsi diff --git a/arch/arm/boot/dts/omap37xx100.dtsi b/arch/arm/boot/dts/omap37xx100.dtsi new file mode 100644 index 000..064661e --- /dev/null +++ b/arch/arm/boot/dts/omap37xx100.dtsi @@ -0,0 +1,44 @@ +/* + * Device Tree Source for OMAP37x SoC + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed as is without any warranty of any + * kind, whether express or implied. + */ + +#include omap3.dtsi + +/ { + aliases { + serial3 = uart4; + }; + + cpus { + /* AM/DM37xx */ + cpu@0 { + operating-points = + /* kHzuV */ + 125000 975000 + 25 1075000 + 50 110 + 60 114 + 80 127 + 100 138 This is valid even for 3630/DM3730 as well - unfortunately - you cannot enable 1GHz without enabling ABB and AVS 1.5. There is a bunch of internal discussion with respect to lack of this information available.. but as it stands right now, I dont think this is valid. + ; + clock-latency = 30; /* From legacy driver */ + }; + }; + + ocp { + /* uart4 is only available on CBP and CBC packages */ + uart4: serial@49042000 { + compatible = ti,omap3-uart; + reg = 0x49042000 0x400; + interrupts = 80; + dmas = sdma 81 sdma 82; + dma-names = tx, rx; + ti,hwmods = uart4; + clock-frequency = 4800; + }; + }; +}; Further, we should be able to reuse 3630.dtsi for this. -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/6] ARM: OMAP2+: Add pdata quirk for sys_clkout2 for omap3 DBB056
On 01/21/2014 01:47 PM, Christoph Fritz wrote: Full device tree support for clock control is not yet accomplished. Until then, configure the 24Mhz of sys_clkout2 to feed an USB-Hub here. you may want to look at next-20140120 or later next tag for your development. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/mach-omap2/pdata-quirks.c | 37 1 file changed, 37 insertions(+) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index bce8020..07d05f6 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -95,6 +95,43 @@ static void __init omap3_zoom_legacy_init(void) static void __init omap3_dbb056_legacy_init(void) { + struct clk *clkout2; + struct clk *cm96fck; + + /* Reparent clkout2 to 96M_FCK */ + pr_info(a83x-quirk: Late Reparent clkout2 to 96M_FCK\n); + clkout2 = clk_get(NULL, clkout2_src_ck); + if(clkout2 0) { + pr_err(a83x-quirk: couldn't get clkout2_src_ck\n); + return; + } + cm96fck = clk_get(NULL, cm_96m_fck); + if(cm96fck 0) { + pr_err(a83x-quirk: couldn't get cm_96m_fck\n); + return; + } + if(clk_set_parent(clkout2, cm96fck) 0) { + pr_err(a83x-quirk: couldn't reparent clkout2_src_ck\n); + return; + } + + /* Set clkout2 to 24MHz for internal usb hub*/ + pr_info(a83x-quirk: Set clkout2 to 24MHz for internal usb hub\n); + clkout2 = clk_get(NULL, sys_clkout2); + if(clkout2 0) { + pr_err(a83x-quirk: couldn't get sys_clkout2\n); + return; + } + if(clk_set_rate(clkout2, 2400) 0) { + printk(KERN_ERR board-omap3evm: couldn't set sys_clkout2 rate\n); + return; + } + if(clk_prepare_enable(clkout2) 0) { + pr_err(a83x-quirk: couldn't enable sys_clkout2\n); + return; + } + + /* Initialize display */ omap3_dbb056_display_init_of(); } #endif /* CONFIG_ARCH_OMAP3 */ -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv3 00/41] OMAPDSS: DT support v3
Tomi, On 01/21/2014 04:56 AM, Tomi Valkeinen wrote: Hi, Here's version 3 of the DSS DT series. The previous version can be found from: v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249 v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866 The main changes to v2 are: - DT Binding documentation - OMAP2 DSS support - Split DSI register space - DSS nodes disabled by default - Hack to have generic DT bindings but OMAP specific drivers (for now) This series can also be found from: git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3 http://slexy.org/view/s20JhteOFR is my quick build test report - few checkpatch and build bisect issues would probably need fixing. -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6] ARM: OMAP2+: add legacy display for omap3 DBB056
Hello Christoph, On Tue, Jan 21, 2014 at 4:47 PM, Christoph Fritz chf.fr...@googlemail.com wrote: Full device tree support for omapdss is not yet accomplished. Until then, init display by legacy platform code. Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/mach-omap2/dss-common.c | 49 arch/arm/mach-omap2/dss-common.h |1 + arch/arm/mach-omap2/pdata-quirks.c |8 +- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index dadccc9..b8b4e39 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c @@ -257,3 +257,52 @@ void __init omap3_igep2_display_init_of(void) platform_device_register(omap3_igep2_tfp410_device); platform_device_register(omap3_igep2_dvi_connector_device); } + +/* OMAP3 dbb056 data */ + +#define DBB056_DISPLAY_ENABLE_GPIO 156 + +static const struct display_timing dbb056_lcd_videomode = { + .pixelclock = { 0, 1920, 0 }, + + .hactive = { 0, 640, 0 }, + .hfront_porch = { 0, 104, 0 }, + .hback_porch = { 0, 8, 0 }, + .hsync_len = { 0, 8, 0 }, + + .vactive = { 0, 480, 0 }, + .vfront_porch = { 0, 104, 0 }, + .vback_porch = { 0, 8, 0 }, + .vsync_len = { 0, 8, 0 }, + + .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | + DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE, +}; + +static struct panel_dpi_platform_data dbb056_lcd_pdata = { + .name = lcd, + .source = dpi.0, + + .data_lines = 18, + + .display_timing = dbb056_lcd_videomode, + + .enable_gpio= DBB056_DISPLAY_ENABLE_GPIO, + .backlight_gpio = -1, +}; + +static struct platform_device dbb056_lcd_device = { + .name = panel-dpi, + .id = 0, + .dev.platform_data = dbb056_lcd_pdata, +}; + +static struct omap_dss_board_info omap_dbb056_dss_data = { + .default_display_name = lcd, +}; + +void __init omap3_dbb056_display_init_of(void) +{ + platform_device_register(dbb056_lcd_device); + omap_display_init(omap_dbb056_dss_data); +} diff --git a/arch/arm/mach-omap2/dss-common.h b/arch/arm/mach-omap2/dss-common.h index a9becf0..a125b55 100644 --- a/arch/arm/mach-omap2/dss-common.h +++ b/arch/arm/mach-omap2/dss-common.h @@ -9,5 +9,6 @@ void __init omap4_panda_display_init_of(void); void __init omap_4430sdp_display_init_of(void); void __init omap3_igep2_display_init_of(void); +void __init omap3_dbb056_display_init_of(void); #endif diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 39f020c..bce8020 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -92,6 +92,11 @@ static void __init omap3_zoom_legacy_init(void) { legacy_init_wl12xx(WL12XX_REFCLOCK_26, 0, 162); } + +static void __init omap3_dbb056_legacy_init(void) +{ + omap3_dbb056_display_init_of(); +} #endif /* CONFIG_ARCH_OMAP3 */ #ifdef CONFIG_ARCH_OMAP4 @@ -139,10 +144,11 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { static struct pdata_init pdata_quirks[] __initdata = { #ifdef CONFIG_ARCH_OMAP3 + { incostartec,omap3-lilly-dbb056, omap3_dbb056_legacy_init, }, + { isee,omap3-igep0020, omap3_igep0020_legacy_init, }, { nokia,omap3-n900, hsmmc2_internal_input_clk, }, { nokia,omap3-n9, hsmmc2_internal_input_clk, }, { nokia,omap3-n950, hsmmc2_internal_input_clk, }, - { isee,omap3-igep0020, omap3_igep0020_legacy_init, }, { ti,omap3-evm-37xx, omap3_evm_legacy_init, }, { ti,omap3-zoom3, omap3_zoom_legacy_init, }, #endif -- 1.7.10.4 I don't think that makes sense to add more legacy display support right now since Tomi has sent a v3 of his OMAPDSS DT support which hopefully will be merged in v3.14. Thanks a lot and best regards, Javier -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/6] ARM: OMAP2+: add legacy display for omap3 DBB056
Hi, On Tue, Jan 21, 2014 at 09:10:52PM -0300, Javier Martinez Canillas wrote: On Tue, Jan 21, 2014 at 4:47 PM, Christoph Fritz wrote: [PATCH] I don't think that makes sense to add more legacy display support right now since Tomi has sent a v3 of his OMAPDSS DT support, which hopefully will be merged in v3.14. Tomi wrote, that the series will miss 3.14 merge window: http://www.spinics.net/lists/linux-omap/msg102149.html -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 4/6] ARM: OMAP2+: add legacy display for omap3 DBB056
Hi Sebastian, On Tue, Jan 21, 2014 at 9:24 PM, Sebastian Reichel s...@ring0.de wrote: Hi, On Tue, Jan 21, 2014 at 09:10:52PM -0300, Javier Martinez Canillas wrote: On Tue, Jan 21, 2014 at 4:47 PM, Christoph Fritz wrote: [PATCH] I don't think that makes sense to add more legacy display support right now since Tomi has sent a v3 of his OMAPDSS DT support, which hopefully will be merged in v3.14. Tomi wrote, that the series will miss 3.14 merge window: http://www.spinics.net/lists/linux-omap/msg102149.html -- Sebastian I see, missed that email from Tomi. Thanks for the clarification and sorry for the noise then. Best regards, Javier -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [net-next PATCH 1/1] drivers: net: cpsw: enable promiscuous mode support
From: Mugunthan V N mugunthan...@ti.com Date: Mon, 20 Jan 2014 17:38:38 +0530 + if (!enable ((priv-slaves[0].ndev-flags IFF_PROMISC) || + (priv-slaves[1].ndev-flags IFF_PROMISC))) { This assumption that there are exactly 2 slaves is not valid. Use the appropriate for_each_slave() et al. abstractions to access the slaves. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/2] usb: dwc3: adapt dwc3 core to use Generic PHY Framework
Hi, On Tue, Jan 21, 2014 at 7:30 PM, Roger Quadros rog...@ti.com wrote: Hi Kishon, On 01/21/2014 12:11 PM, Kishon Vijay Abraham I wrote: Adapted dwc3 core to use the Generic PHY Framework. So for init, exit, power_on and power_off the following APIs are used phy_init(), phy_exit(), phy_power_on() and phy_power_off(). However using the old USB phy library wont be removed till the PHYs of all other SoC's using dwc3 core is adapted to the Generic PHY Framework. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- Changes from v3: * avoided using quirks Documentation/devicetree/bindings/usb/dwc3.txt |6 ++- drivers/usb/dwc3/core.c| 60 drivers/usb/dwc3/core.h|7 +++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index e807635..471366d 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -6,11 +6,13 @@ Required properties: - compatible: must be snps,dwc3 - reg : Address and length of the register set for the device - interrupts: Interrupts used by the dwc3 controller. + +Optional properties: - usb-phy : array of phandle for the PHY device. The first element in the array is expected to be a handle to the USB2/HS PHY and the second element is expected to be a handle to the USB3/SS PHY - -Optional properties: + - phys: from the *Generic PHY* bindings + - phy-names: from the *Generic PHY* bindings - tx-fifo-resize: determines if the FIFO *has* to be reallocated. This is usually a subnode to DWC3 glue to which it is connected. diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e009d4e..036d589 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -82,6 +82,11 @@ static void dwc3_core_soft_reset(struct dwc3 *dwc) usb_phy_init(dwc-usb2_phy); usb_phy_init(dwc-usb3_phy); + if (dwc-usb2_generic_phy) + phy_init(dwc-usb2_generic_phy); What if phy_init() fails? You need to report and fail. Same applies for all PHY apis in this patch. + if (dwc-usb3_generic_phy) + phy_init(dwc-usb3_generic_phy); + mdelay(100); /* Clear USB3 PHY reset */ @@ -343,6 +348,11 @@ static void dwc3_core_exit(struct dwc3 *dwc) { usb_phy_shutdown(dwc-usb2_phy); usb_phy_shutdown(dwc-usb3_phy); + if (dwc-usb2_generic_phy) + phy_exit(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_exit(dwc-usb3_generic_phy); + } #define DWC3_ALIGN_MASK (16 - 1) @@ -433,6 +443,32 @@ static int dwc3_probe(struct platform_device *pdev) } } + dwc-usb2_generic_phy = devm_phy_get(dev, usb2-phy); + if (IS_ERR(dwc-usb2_generic_phy)) { + ret = PTR_ERR(dwc-usb2_generic_phy); + if (ret == -ENOSYS || ret == -ENODEV) { + dwc-usb2_generic_phy = NULL; + } else if (ret == -EPROBE_DEFER) { + return ret; + } else { + dev_err(dev, no usb2 phy configured\n); + return ret; + } + } + + dwc-usb3_generic_phy = devm_phy_get(dev, usb3-phy); + if (IS_ERR(dwc-usb3_generic_phy)) { + ret = PTR_ERR(dwc-usb3_generic_phy); + if (ret == -ENOSYS || ret == -ENODEV) { + dwc-usb3_generic_phy = NULL; + } else if (ret == -EPROBE_DEFER) { + return ret; + } else { + dev_err(dev, no usb3 phy configured\n); + return ret; + } + } + dwc-xhci_resources[0].start = res-start; dwc-xhci_resources[0].end = dwc-xhci_resources[0].start + DWC3_XHCI_REGS_END; @@ -482,6 +518,11 @@ static int dwc3_probe(struct platform_device *pdev) usb_phy_set_suspend(dwc-usb2_phy, 0); usb_phy_set_suspend(dwc-usb3_phy, 0); + if (dwc-usb2_generic_phy) + phy_power_on(dwc-usb2_generic_phy); + if (dwc-usb3_generic_phy) + phy_power_on(dwc-usb3_generic_phy); + Is it OK to power on the phy before phy_init()? Isn't phy_init() being done before phy_power_on() in the core_soft_reset() in this patch ? Isn't that what you want here ? I suggest to move phy_init() from core_soft_reset() to here, just before phy_power_on(). core_soft_reset() is called before phy_power_on() itself from dwc3_core_init(), right ? will moving the phy_inti() here make nay difference ? ret = dwc3_event_buffers_setup(dwc); if (ret) { dev_err(dwc-dev, failed to setup event buffers\n); [...] snip -- Best Regards Vivek Gautam Samsung RD Institute, Bangalore India -- To unsubscribe