[PATCH v3 2/3] Documentation: DT: Add documentation for ti,opa362 bindings
Signed-off-by: Marek Belisko ma...@goldelico.com --- .../devicetree/bindings/video/ti,opa362.txt| 38 ++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/ti,opa362.txt diff --git a/Documentation/devicetree/bindings/video/ti,opa362.txt b/Documentation/devicetree/bindings/video/ti,opa362.txt new file mode 100644 index 000..4747ef9 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,opa362.txt @@ -0,0 +1,38 @@ +OPA362 analog video amplifier + +Required properties: +- compatible: ti,opa362 +- gpio: enable/disable output gpio + +Required node: +- Video port 0 for opa362 input +- Video port 1 for opa362 output + +Example: + +tv_amp: opa362 { + compatible = ti,opa362; + gpios = gpio1 23 0; /* GPIO to enable video out amplifier */ + + ports { + #address-cells = 1; + #size-cells = 0; + + port@0 { + reg = 0; + opa_in: endpoint@0 { + remote-endpoint = venc_out; + }; + }; + + port@1 { + reg = 1; + opa_out: endpoint@0 { + remote-endpoint = tv_connector_in; + }; + }; + }; +}; + + + -- 1.9.1 -- 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 v3 3/3] arm: dts: omap3-gta04: Add handling for tv output
Add handling for gta04 tv out chain: venc - opa362 - svideo Use invert-polarity in venc node because opa362 is doing polarity inversion also. Signed-off-by: Marek Belisko ma...@goldelico.com --- arch/arm/boot/dts/omap3-gta04.dtsi | 49 ++ 1 file changed, 49 insertions(+) diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi index fd34f91..e9f221d 100644 --- a/arch/arm/boot/dts/omap3-gta04.dtsi +++ b/arch/arm/boot/dts/omap3-gta04.dtsi @@ -83,6 +83,41 @@ compatible = usb-nop-xceiv; reset-gpios = gpio6 14 GPIO_ACTIVE_LOW; }; + + tv0: connector@1 { + compatible = svideo-connector; + label = tv; + + port { + tv_connector_in: endpoint { + remote-endpoint = opa_out; + }; + }; + }; + + tv_amp: opa362 { + compatible = ti,opa362; + gpios = gpio1 23 0; + + ports { + #address-cells = 1; + #size-cells = 0; + + port@0 { + reg = 0; + opa_in: endpoint@0 { + remote-endpoint = venc_out; + }; + }; + + port@1 { + reg = 1; + opa_out: endpoint@0 { + remote-endpoint = tv_connector_in; + }; + }; + }; + }; }; omap3_pmx_core { @@ -396,6 +431,20 @@ }; }; +venc { + status = okay; + + vdda-supply = vdac; + + port { + venc_out: endpoint { + remote-endpoint = opa_in; + ti,channels = 2; + ti,invert-polarity; + }; + }; +}; + gpmc { ranges = 0 0 0x3000 0x04; /* CS0: NAND */ -- 1.9.1 -- 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 v3 1/3] video: omapdss: Add opa362 driver
opa362 is amplifier for video and can be connected to the tvout pads of the OMAP3. It has one gpio control for enable/disable of the output (high impedance). Signed-off-by: H. Nikolaus Schaller h...@goldelico.com Signed-off-by: Marek Belisko ma...@goldelico.com --- drivers/video/fbdev/omap2/displays-new/Kconfig | 6 + drivers/video/fbdev/omap2/displays-new/Makefile| 1 + .../fbdev/omap2/displays-new/encoder-opa362.c | 283 + 3 files changed, 290 insertions(+) create mode 100644 drivers/video/fbdev/omap2/displays-new/encoder-opa362.c diff --git a/drivers/video/fbdev/omap2/displays-new/Kconfig b/drivers/video/fbdev/omap2/displays-new/Kconfig index e6cfc38..5747101 100644 --- a/drivers/video/fbdev/omap2/displays-new/Kconfig +++ b/drivers/video/fbdev/omap2/displays-new/Kconfig @@ -1,6 +1,12 @@ menu OMAP Display Device Drivers (new device model) depends on OMAP2_DSS +config DISPLAY_ENCODER_OPA362 + tristate OPA362 external analog amplifier + help + Driver for OPA362 external analog TV amplifier controlled + through a GPIO. + config DISPLAY_ENCODER_TFP410 tristate TFP410 DPI to DVI Encoder help diff --git a/drivers/video/fbdev/omap2/displays-new/Makefile b/drivers/video/fbdev/omap2/displays-new/Makefile index 0323a8a..9aa176b 100644 --- a/drivers/video/fbdev/omap2/displays-new/Makefile +++ b/drivers/video/fbdev/omap2/displays-new/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_DISPLAY_ENCODER_OPA362) += encoder-opa362.o obj-$(CONFIG_DISPLAY_ENCODER_TFP410) += encoder-tfp410.o obj-$(CONFIG_DISPLAY_ENCODER_TPD12S015) += encoder-tpd12s015.o obj-$(CONFIG_DISPLAY_CONNECTOR_DVI) += connector-dvi.o diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c new file mode 100644 index 000..d2cc649 --- /dev/null +++ b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c @@ -0,0 +1,283 @@ +/* + * OPA362 analog video amplifier with output/power control + * + * Copyright (C) 2014 Golden Delicious Computers + * Author: H. Nikolaus Schaller h...@goldelico.com + * + * based on encoder-tfp410 + * + * 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. + */ + +#include linux/gpio.h +#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 + +struct panel_drv_data { + struct omap_dss_device dssdev; + struct omap_dss_device *in; + + struct gpio_desc *enable_gpio; + + struct omap_video_timings timings; +}; + +#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) + +static int opa362_connect(struct omap_dss_device *dssdev, + struct omap_dss_device *dst) +{ + struct panel_drv_data *ddata = to_panel_data(dssdev); + struct omap_dss_device *in = ddata-in; + int r; + + dev_dbg(dssdev-dev, connect\n); + + if (omapdss_device_is_connected(dssdev)) + return -EBUSY; + + r = in-ops.atv-connect(in, dssdev); + if (r) + return r; + + dst-src = dssdev; + dssdev-dst = dst; + + return 0; +} + +static void opa362_disconnect(struct omap_dss_device *dssdev, + struct omap_dss_device *dst) +{ + struct panel_drv_data *ddata = to_panel_data(dssdev); + struct omap_dss_device *in = ddata-in; + + dev_dbg(dssdev-dev, disconnect\n); + + WARN_ON(!omapdss_device_is_connected(dssdev)); + if (!omapdss_device_is_connected(dssdev)) + return; + + WARN_ON(dst != dssdev-dst); + if (dst != dssdev-dst) + return; + + dst-src = NULL; + dssdev-dst = NULL; + + in-ops.atv-disconnect(in, ddata-dssdev); +} + +static int opa362_enable(struct omap_dss_device *dssdev) +{ + struct panel_drv_data *ddata = to_panel_data(dssdev); + struct omap_dss_device *in = ddata-in; + int r; + + dev_dbg(dssdev-dev, enable\n); + + if (!omapdss_device_is_connected(dssdev)) + return -ENODEV; + + if (omapdss_device_is_enabled(dssdev)) + return 0; + + in-ops.atv-set_timings(in, ddata-timings); + + r = in-ops.atv-enable(in); + if (r) + return r; + + if (ddata-enable_gpio) + gpiod_set_value_cansleep(ddata-enable_gpio, 1); + + dssdev-state = OMAP_DSS_DISPLAY_ACTIVE; + + return 0; +} + +static void opa362_disable(struct omap_dss_device *dssdev) +{ + struct panel_drv_data *ddata = to_panel_data(dssdev); + struct omap_dss_device *in = ddata-in; + + dev_dbg(dssdev-dev, disable\n); + + if
[PATCH v3 0/3] omapdss: Add video output support for gta04
changes from v2: - rename amplifier-opa362.c to encoder-opa362 - drop inversion handlign from driver - add ti,invert-polarity to venc node I also drop devconf1 handling patches because discussion how to properly implement is not yet finished and this part is independent from video driver. changes from v1: - fix opa362 compilation error - fix opa362 DT documentation - move devconf1 definition to omap3.dtsi Marek Belisko (3): video: omapdss: Add opa362 driver Documentation: DT: Add documentation for ti,opa362 bindings arm: dts: omap3-gta04: Add handling for tv output .../devicetree/bindings/video/ti,opa362.txt| 38 +++ arch/arm/boot/dts/omap3-gta04.dtsi | 49 drivers/video/fbdev/omap2/displays-new/Kconfig | 6 + drivers/video/fbdev/omap2/displays-new/Makefile| 1 + .../fbdev/omap2/displays-new/encoder-opa362.c | 283 + 5 files changed, 377 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/ti,opa362.txt create mode 100644 drivers/video/fbdev/omap2/displays-new/encoder-opa362.c -- 1.9.1 -- 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 v7.1 09/19] ASoC: omap-hdmi-audio: Add platform device for OMAP HDMI audio support
On 11/29/2014 01:32 PM, Mark Brown wrote: On Wed, Nov 12, 2014 at 04:41:00PM +0200, Jyri Sarha wrote: The platform device should only be registered from OMAPDSS HDMI driver. The platform driver registers and unregisters all ASoC components needed for OMAP HDMI audio. So, this basically seems fine but I'm looking at this code and I'm not really seeing a huge amount of OMAP specificness here. Why is this an OMAP driver and not something more generic - can't we have other HDMI controllers offering the same interface? There's a few serial numbers that would need filing off but since the ASoC driver is basically just interface matching and not talking to the hardware it looks like it ought to be usable by more than just OMAP. The only reason is that I have not encountered any other audio capable HDMI device falling in this category (cpu-dai integrated within HDMI device block). Without at least two devices utilizing this code it remains questionable whether the code is really generic. At least the dss_version should be replaced with some explicit data to fill struct snd_soc_dai_driver. Also struct omap_dss_audio is coming directly from omap dss code, its contents is generic but I am not sure if the information within struct snd_aes_iec958 and struct snd_cea_861_aud_if is enough to configure the HDMI IP in all possible cases. I can work on making this API look more generic, but before there is another candidate to use this API it is questionable if the code will ever be used by any other device. Best regards, Jyri -- 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: USB OTG doesn't work in HOST mode on OMAP3 processor on 3.18-rc5
On Sat, Nov 29, 2014 at 4:35 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Fri, Nov 28, 2014 at 11:35:53AM +0100, Yegor Yefremov wrote: On Wed, Nov 19, 2014 at 6:53 PM, Tony Lindgren t...@atomide.com wrote: * Enric Balletbo Serra eballe...@gmail.com [141119 03:14]: 2014-11-18 16:42 GMT+01:00 Tony Lindgren t...@atomide.com: Checked again, and no luck. It's very weird because from the OTG point of view, OTG is exactly the same between Beagleboard-XM and IGEPv2. Can you confirm that you're using kernel 3.18-rc5 without other patches applied ? At this moment, I don't have a Beagleboard-XM to test, I'll try to get one because at this moment I'm a bit stuck with this problem. Yes it was with v3.18-rc5 and the defconfig patch I posted except I had to disable all the other MUSB platforms. Also tested it with built in modules. Maybe you need to check the .dts pinctrl entries for hsusb0_* lines? Just my 2 cents, My am335x based board shows similar symptoms (CONFIG_USB_MUSB_DUAL_ROLE enabled). Only if I specify dr_mode = host; in my DTS I get device enumerated. 3.15, that I had before made no problems as OTG. Are you sure your ID pin is properly routed ? If you set dr_mode to otg, then you *must* have a properly routed ID pin and use a proper micro-/mini-ab receptacle. That's not true for e.g. beagle bone black. One USB port is using a Standard-A while the other uses mini-B. You can't do any role swapping with those. Yes, I'm sure, that ID pin is routed properly. It is also not BBB, but real device Baltos iR 5221 (http://visionsystems.de/produkte/baltos-ir-5221.html). With 3.15 I'm able to use OTG port both as device and host. I boot the device, insert FTDI based hardware into OTG port and my ttyUSBx devices, then disconnect and connect to PC and I get usb0 network interface and can communicate with PC. Yegor -- 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