From 3f75dc949b330f9ba73313cf058902bde86fd80d Mon Sep 17 00:00:00 2001 From: Songjun Wu Date: Wed, 17 Aug 2016 03:05:28 -0300 Subject: [media] atmel-isc: DT binding for Image Sensor Controller driver DT binding documentation for ISC driver. Acked-by: Rob Herring Signed-off-by: Songjun Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/media/atmel-isc.txt | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/atmel-isc.txt (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/atmel-isc.txt b/Documentation/devicetree/bindings/media/atmel-isc.txt new file mode 100644 index 000000000000..bbe0e87c6188 --- /dev/null +++ b/Documentation/devicetree/bindings/media/atmel-isc.txt @@ -0,0 +1,65 @@ +Atmel Image Sensor Controller (ISC) +---------------------------------------------- + +Required properties for ISC: +- compatible + Must be "atmel,sama5d2-isc". +- reg + Physical base address and length of the registers set for the device. +- interrupts + Should contain IRQ line for the ISC. +- clocks + List of clock specifiers, corresponding to entries in + the clock-names property; + Please refer to clock-bindings.txt. +- clock-names + Required elements: "hclock", "iscck", "gck". +- #clock-cells + Should be 0. +- clock-output-names + Should be "isc-mck". +- pinctrl-names, pinctrl-0 + Please refer to pinctrl-bindings.txt. + +ISC supports a single port node with parallel bus. It should contain one +'port' child node with child 'endpoint' node. Please refer to the bindings +defined in Documentation/devicetree/bindings/media/video-interfaces.txt. + +Example: +isc: isc@f0008000 { + compatible = "atmel,sama5d2-isc"; + reg = <0xf0008000 0x4000>; + interrupts = <46 IRQ_TYPE_LEVEL_HIGH 5>; + clocks = <&isc_clk>, <&iscck>, <&isc_gclk>; + clock-names = "hclock", "iscck", "gck"; + #clock-cells = <0>; + clock-output-names = "isc-mck"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>; + + port { + isc_0: endpoint { + remote-endpoint = <&ov7740_0>; + hsync-active = <1>; + vsync-active = <0>; + pclk-sample = <1>; + }; + }; +}; + +i2c1: i2c@fc028000 { + ov7740: camera@21 { + compatible = "ovti,ov7740"; + reg = <0x21>; + clocks = <&isc>; + clock-names = "xvclk"; + assigned-clocks = <&isc>; + assigned-clock-rates = <24000000>; + + port { + ov7740_0: endpoint { + remote-endpoint = <&isc_0>; + }; + }; + }; +}; -- cgit v1.2.3 From 9887c8642d40f517cbf78e324b252305f1ba4b05 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Tue, 7 Jun 2016 04:10:04 -0300 Subject: [media] dt/bindings: device tree description for AD5820 camera auto-focus coil Add documentation for ad5820 device tree binding. Signed-off-by: Pavel Machek Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/media/i2c/ad5820.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ad5820.txt (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/i2c/ad5820.txt b/Documentation/devicetree/bindings/media/i2c/ad5820.txt new file mode 100644 index 000000000000..5940ca11c021 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ad5820.txt @@ -0,0 +1,19 @@ +* Analog Devices AD5820 autofocus coil + +Required Properties: + + - compatible: Must contain "adi,ad5820" + + - reg: I2C slave address + + - VANA-supply: supply of voltage for VANA pin + +Example: + + ad5820: coil@c { + compatible = "adi,ad5820"; + reg = <0x0c>; + + VANA-supply = <&vaux4>; + }; + -- cgit v1.2.3 From 65d9e14a659520c554feea8ef17ee3109bd67ebd Mon Sep 17 00:00:00 2001 From: Steve Longerbeam Date: Tue, 19 Jul 2016 21:03:32 -0300 Subject: [media] media: adv7180: add power pin control Some targets control the ADV7180 power pin via a gpio, so add optional support for "powerdown" pin control. Signed-off-by: Steve Longerbeam Tested-by: Tim Harvey Acked-by: Lars-Peter Clausen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/media/i2c/adv7180.txt | 5 ++++ drivers/media/i2c/Kconfig | 2 +- drivers/media/i2c/adv7180.c | 27 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/i2c/adv7180.txt b/Documentation/devicetree/bindings/media/i2c/adv7180.txt index 0d501154dfb2..4da486f96ff6 100644 --- a/Documentation/devicetree/bindings/media/i2c/adv7180.txt +++ b/Documentation/devicetree/bindings/media/i2c/adv7180.txt @@ -15,6 +15,11 @@ Required Properties : "adi,adv7282" "adi,adv7282-m" +Optional Properties : +- powerdown-gpios: reference to the GPIO connected to the powerdown pin, + if any. + + Example: i2c0@1c22000 { diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index c4df15a43d61..92cc54401339 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -187,7 +187,7 @@ comment "Video decoders" config VIDEO_ADV7180 tristate "Analog Devices ADV7180 decoder" - depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API + depends on GPIOLIB && VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API ---help--- Support for the Analog Devices ADV7180 video decoder. diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index cb83ebbe5131..c367ad6f6327 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -213,6 +214,7 @@ struct adv7180_state { struct media_pad pad; struct mutex mutex; /* mutual excl. when accessing chip */ int irq; + struct gpio_desc *pwdn_gpio; v4l2_std_id curr_norm; bool powered; bool streaming; @@ -463,6 +465,19 @@ static int adv7180_g_std(struct v4l2_subdev *sd, v4l2_std_id *norm) return 0; } +static void adv7180_set_power_pin(struct adv7180_state *state, bool on) +{ + if (!state->pwdn_gpio) + return; + + if (on) { + gpiod_set_value_cansleep(state->pwdn_gpio, 0); + usleep_range(5000, 10000); + } else { + gpiod_set_value_cansleep(state->pwdn_gpio, 1); + } +} + static int adv7180_set_power(struct adv7180_state *state, bool on) { u8 val; @@ -1210,6 +1225,8 @@ static int init_device(struct adv7180_state *state) mutex_lock(&state->mutex); + adv7180_set_power_pin(state, true); + adv7180_write(state, ADV7180_REG_PWR_MAN, ADV7180_PWR_MAN_RES); usleep_range(5000, 10000); @@ -1279,6 +1296,14 @@ static int adv7180_probe(struct i2c_client *client, state->field = V4L2_FIELD_INTERLACED; state->chip_info = (struct adv7180_chip_info *)id->driver_data; + state->pwdn_gpio = devm_gpiod_get_optional(&client->dev, "powerdown", + GPIOD_OUT_HIGH); + if (IS_ERR(state->pwdn_gpio)) { + ret = PTR_ERR(state->pwdn_gpio); + v4l_err(client, "request for power pin failed: %d\n", ret); + return ret; + } + if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) { state->csi_client = i2c_new_dummy(client->adapter, ADV7180_DEFAULT_CSI_I2C_ADDR); @@ -1370,6 +1395,8 @@ static int adv7180_remove(struct i2c_client *client) if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) i2c_unregister_device(state->csi_client); + adv7180_set_power_pin(state, false); + mutex_destroy(&state->mutex); return 0; -- cgit v1.2.3 From c92bab5e1ef4e709001cec678fc7c8f9817a4b2e Mon Sep 17 00:00:00 2001 From: Jean-Christophe Trotin Date: Mon, 5 Sep 2016 11:06:28 -0300 Subject: [media] Documentation: DT: add bindings for ST HVA This patch adds DT binding documentation for STMicroelectronics hva driver. Signed-off-by: Yannick Fertre Signed-off-by: Jean-Christophe Trotin Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/media/st,st-hva.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/st,st-hva.txt (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/st,st-hva.txt b/Documentation/devicetree/bindings/media/st,st-hva.txt new file mode 100644 index 000000000000..0d76174a1f7e --- /dev/null +++ b/Documentation/devicetree/bindings/media/st,st-hva.txt @@ -0,0 +1,24 @@ +st-hva: multi-format video encoder for STMicroelectronics SoC. + +Required properties: +- compatible: should be "st,st-hva". +- reg: HVA physical address location and length, esram address location and + length. +- reg-names: names of the registers listed in registers property in the same + order. +- interrupts: HVA interrupt number. +- clocks: from common clock binding: handle hardware IP needed clocks, the + number of clocks may depend on the SoC type. + See ../clock/clock-bindings.txt for details. +- clock-names: names of the clocks listed in clocks property in the same order. + +Example: + hva@8c85000{ + compatible = "st,st-hva"; + reg = <0x8c85000 0x400>, <0x6000000 0x40000>; + reg-names = "hva_registers", "hva_esram"; + interrupts = , + ; + clock-names = "clk_hva"; + clocks = <&clk_s_c0_flexgen CLK_HVA>; + }; -- cgit v1.2.3 From 306dbe5548b4b3cba8fe3c3fa6e08051f85007ab Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Thu, 30 Jun 2016 13:50:28 -0300 Subject: [media] dt-bindings: Update Renesas R-Car FCP DT bindings for FCPF The FCP driver can also support the FCPF variant for FDP1 compatible processing. Signed-off-by: Kieran Bingham Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Documentation/devicetree/bindings/media/renesas,fcp.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt b/Documentation/devicetree/bindings/media/renesas,fcp.txt index 6a12960609d8..271dcfdb5a76 100644 --- a/Documentation/devicetree/bindings/media/renesas,fcp.txt +++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt @@ -7,12 +7,14 @@ conversion of AXI transactions in order to reduce the memory bandwidth. There are three types of FCP: FCP for Codec (FCPC), FCP for VSP (FCPV) and FCP for FDP (FCPF). Their configuration and behaviour depend on the module they -are paired with. These DT bindings currently support the FCPV only. +are paired with. These DT bindings currently support the FCPV and FCPF. - compatible: Must be one or more of the following - "renesas,r8a7795-fcpv" for R8A7795 (R-Car H3) compatible 'FCP for VSP' + - "renesas,r8a7795-fcpf" for R8A7795 (R-Car H3) compatible 'FCP for FDP' - "renesas,fcpv" for generic compatible 'FCP for VSP' + - "renesas,fcpf" for generic compatible 'FCP for FDP' When compatible with the generic version, nodes must list the SoC-specific version corresponding to the platform first, followed by the -- cgit v1.2.3 From 147fcfca196d0c16ebe40bcdca18e8f3272a6fda Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Thu, 30 Jun 2016 13:50:29 -0300 Subject: [media] dt-bindings: Document Renesas R-Car FCP power-domains usage The power domain must be specified to bring the device out of module standby. Document this in the bindings provided, so that new additions are not missed. Signed-off-by: Kieran Bingham Acked-by: Rob Herring Acked-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Documentation/devicetree/bindings/media/renesas,fcp.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt b/Documentation/devicetree/bindings/media/renesas,fcp.txt index 271dcfdb5a76..27f9b8e459ac 100644 --- a/Documentation/devicetree/bindings/media/renesas,fcp.txt +++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt @@ -23,6 +23,10 @@ are paired with. These DT bindings currently support the FCPV and FCPF. - reg: the register base and size for the device registers - clocks: Reference to the functional clock +Optional properties: + - power-domains : power-domain property defined with a power domain specifier + to respective power domain. + Device node example ------------------- @@ -31,4 +35,5 @@ Device node example compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; reg = <0 0xfea2f000 0 0x200>; clocks = <&cpg CPG_MOD 602>; + power-domains = <&sysc R8A7795_PD_A3VP>; }; -- cgit v1.2.3 From c1a2f9898ace7f53cd5219480587b07c04e69c9b Mon Sep 17 00:00:00 2001 From: Benjamin Gaignard Date: Thu, 15 Sep 2016 04:37:43 -0300 Subject: [media] bindings for stih-cec driver Add bindings documentation for stih-cec driver. Signed-off-by: Benjamin Gaignard Acked-by: Peter Griffin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- .../devicetree/bindings/media/stih-cec.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/stih-cec.txt (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/stih-cec.txt b/Documentation/devicetree/bindings/media/stih-cec.txt new file mode 100644 index 000000000000..71c4b2f4bcef --- /dev/null +++ b/Documentation/devicetree/bindings/media/stih-cec.txt @@ -0,0 +1,25 @@ +STMicroelectronics STIH4xx HDMI CEC driver + +Required properties: + - compatible : value should be "st,stih-cec" + - reg : Physical base address of the IP registers and length of memory + mapped region. + - clocks : from common clock binding: handle to HDMI CEC clock + - interrupts : HDMI CEC interrupt number to the CPU. + - pinctrl-names: Contains only one value - "default" + - pinctrl-0: Specifies the pin control groups used for CEC hardware. + - resets: Reference to a reset controller + +Example for STIH407: + +sti-cec@094a087c { + compatible = "st,stih-cec"; + reg = <0x94a087c 0x64>; + clocks = <&clk_sysin>; + clock-names = "cec-clk"; + interrupts = ; + interrupt-names = "cec-irq"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_cec0_default>; + resets = <&softreset STIH407_LPM_SOFTRESET>; +}; -- cgit v1.2.3 From 438236e7c151ec797d433fd4c3e770f55cdc5d04 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Wed, 31 Aug 2016 10:25:16 -0300 Subject: [media] exynos4-is: Add support for all required clocks This patch adds 3 more clocks to Exynos4 ISP driver. Enabling them is needed to make the hardware operational. Till now it worked only because those clocks were registered with IGNORE_UNUSED flag and were enabled by default after SoC reset. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab --- Documentation/devicetree/bindings/media/exynos4-fimc-is.txt | 7 ++++--- drivers/media/platform/exynos4-is/fimc-is.c | 3 +++ drivers/media/platform/exynos4-is/fimc-is.h | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt index 55c9ad6f9599..32ced99d4244 100644 --- a/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt +++ b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt @@ -16,9 +16,10 @@ Required properties: - clocks : list of clock specifiers, corresponding to entries in clock-names property; - clock-names : must contain "ppmuispx", "ppmuispx", "lite0", "lite1" - "mpll", "sysreg", "isp", "drc", "fd", "mcuisp", "uart", - "ispdiv0", "ispdiv1", "mcuispdiv0", "mcuispdiv1", "aclk200", - "div_aclk200", "aclk400mcuisp", "div_aclk400mcuisp" entries, + "mpll", "sysreg", "isp", "drc", "fd", "mcuisp", "gicisp", + "pwm_isp", "mcuctl_isp", "uart", "ispdiv0", "ispdiv1", + "mcuispdiv0", "mcuispdiv1", "aclk200", "div_aclk200", + "aclk400mcuisp", "div_aclk400mcuisp" entries, matching entries in the clocks property. pmu subnode ----------- diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 13c779de79fd..313ab10dbb94 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -52,6 +52,9 @@ static char *fimc_is_clocks[ISS_CLKS_MAX] = { [ISS_CLK_DRC] = "drc", [ISS_CLK_FD] = "fd", [ISS_CLK_MCUISP] = "mcuisp", + [ISS_CLK_GICISP] = "gicisp", + [ISS_CLK_PWM_ISP] = "pwm_isp", + [ISS_CLK_MCUCTL_ISP] = "mcuctl_isp", [ISS_CLK_UART] = "uart", [ISS_CLK_ISP_DIV0] = "ispdiv0", [ISS_CLK_ISP_DIV1] = "ispdiv1", diff --git a/drivers/media/platform/exynos4-is/fimc-is.h b/drivers/media/platform/exynos4-is/fimc-is.h index 3a82c6a214c7..ee05da034aa1 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.h +++ b/drivers/media/platform/exynos4-is/fimc-is.h @@ -77,6 +77,9 @@ enum { ISS_CLK_DRC, ISS_CLK_FD, ISS_CLK_MCUISP, + ISS_CLK_GICISP, + ISS_CLK_PWM_ISP, + ISS_CLK_MCUCTL_ISP, ISS_CLK_UART, ISS_GATE_CLKS_MAX, ISS_CLK_ISP_DIV0 = ISS_GATE_CLKS_MAX, -- cgit v1.2.3