Re: [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add I2C support

2018-03-01 Thread Simon Horman
On Wed, Feb 28, 2018 at 11:56:27AM +0100, Geert Uytterhoeven wrote: > On Mon, Feb 26, 2018 at 9:54 PM, Sergei Shtylyov > wrote: > > Define the generic R8A77970 parts of the I2C[0-4] device node. > > > > Based on the original (and large) patch by Daisuke

Re: [PATCH v2 00/10] R-Car M3-N: Enable EtherAVB device node

2018-03-01 Thread Simon Horman
On Tue, Feb 27, 2018 at 11:22:44AM +0100, Jacopo Mondi wrote: > Hi Simon, Geert, >in this second iteration I have dropped iommu dependencies for EtherAVB > and have changed "phy-mode" for all mainlines Gen-3 boards, this time > including > ULCB, Draak, Eagle and V3MSK. > > The series add

Re: [PATCH v5 00/26] Fix watchdog on Renesas R-Car Gen2 and RZ/G1

2018-03-01 Thread Geert Uytterhoeven
Hi Simon, On Fri, Feb 23, 2018 at 9:14 AM, Simon Horman wrote: > On Thu, Feb 22, 2018 at 09:38:39AM +0100, Geert Uytterhoeven wrote: >> On Wed, Feb 21, 2018 at 7:32 PM, Simon Horman wrote: >> > On Wed, Feb 21, 2018 at 05:30:12PM +0100, Geert Uytterhoeven

Re: [PATCH v2 0/5] Add R8A77970/V3MSK LVDS/HDMI support

2018-03-01 Thread Simon Horman
On Wed, Feb 28, 2018 at 08:57:18PM +0300, Sergei Shtylyov wrote: > On 02/28/2018 04:27 PM, Simon Horman wrote: > > >>> Here's the set of 5 patches against Simon Horman's 'renesas.git' repo's > >>> 'renesas-devel-20180227-v4.16-rc3' tag. We're adding the R8A77970 > >>> FCPVD/VSPD/ > >>> DU/LVDS

Re: [PATCH 0/2] arm: Support for Renesas RZ/N1D (R9A06G032)

2018-03-01 Thread Simon Horman
On Tue, Feb 27, 2018 at 01:10:36PM +, Phil Edworthy wrote: > Hi Simon, > > On 26 February 2018, Michel Pollet wrote: > > > > This series adds the plain basic support for booting a bare > > kernel on the RZ/N1D-DB Board. It's been trimmed to the strict > > minimum as a 'base', further patches

Re: [PATCH v6 01/26] ARM: shmobile: Add watchdog support

2018-03-01 Thread Simon Horman
On Wed, Feb 28, 2018 at 05:40:22PM +, Fabrizio Castro wrote: > On R-Car Gen2 and RZ/G1 platforms, we use the SBAR registers to make non > boot CPUs run a routine designed to bring up SMP and deal with hot plug. > The value contained in the SBAR registers is not initialized by a WDT > triggered

Re: [PATCH] media: renesas-ceu: mark PM functions as __maybe_unused

2018-03-01 Thread Simon Horman
On Thu, Mar 01, 2018 at 12:19:37AM +0100, Arnd Bergmann wrote: > The PM runtime operations are unused when CONFIG_PM is disabled, > leading to a harmless warning: > > drivers/media/platform/renesas-ceu.c:1003:12: error: 'ceu_runtime_suspend' > defined but not used [-Werror=unused-function] >

Re: [PATCH v2 0/5] Add R8A77970/V3MSK LVDS/HDMI support

2018-03-01 Thread Sergei Shtylyov
Hello! On 03/01/2018 12:54 PM, Simon Horman wrote: > Here's the set of 5 patches against Simon Horman's 'renesas.git' repo's > 'renesas-devel-20180227-v4.16-rc3' tag. We're adding the R8A77970 > FCPVD/VSPD/ > DU/LVDS device nodes and then describing the HDMI encoder connected to

RE: [PATCH v5 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support

2018-03-01 Thread Fabrizio Castro
Hi Geert, thank you for your feedback! > Subject: Re: [PATCH v5 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support > > Hi Fabrizio, > > On Mon, Feb 12, 2018 at 6:44 PM, Fabrizio Castro > wrote: > > Due to commits: > > * "ARM: shmobile: Add watchdog support", >

Re: [PATCH] pinctrl: sh-pfc: r8a7795: remove duplicate of CLKOUT pin in pinmux_pins[]

2018-03-01 Thread Linus Walleij
On Thu, Feb 22, 2018 at 10:10 AM, Geert Uytterhoeven wrote: >> Signed-off-by: Niklas Söderlund > > Reviewed-and-tested-by: Geert Uytterhoeven > > Linus: As the offending patch is only in v4.16-rc1 and later,

Re: [PATCH v3 3/3] gpio: rcar: Use wakeup_path i.s.o. explicit clock handling

2018-03-01 Thread Linus Walleij
On Mon, Feb 12, 2018 at 2:55 PM, Geert Uytterhoeven wrote: > Since commit ab82fa7da4dce5c7 ("gpio: rcar: Prevent module clock disable > when wake-up is enabled"), when a GPIO is used for wakeup, the GPIO > block's module clock (if exists) is manually kept running during

Re: [PATCH v3 0/3] renesas: irqchip: Use wakeup_path i.s.o. explicit clock handling

2018-03-01 Thread Marc Zyngier
On 12/02/18 13:55, Geert Uytterhoeven wrote: > Hi all, > > If an interrupt controller in a Renesas ARM SoC is part of a Clock > Domain, and it is part of the wakeup path, it must be kept active during > system suspend. > > Currently this is handled in all interrupt controller drivers by >

[PATCH v6 1/3] watchdog: renesas_wdt: Add suspend/resume support

2018-03-01 Thread Fabrizio Castro
On R-Car Gen2 and RZ/G1 the watchdog IP clock needs to be always ON, on R-Car Gen3 we power the IP down during suspend. This commit adds suspend/resume support, so that the watchdog counting "pauses" during suspend on all of the SoCs compatible with this driver and on those we are now adding

[PATCH v6 2/3] watchdog: renesas_wdt: Add R-Car Gen2 support

2018-03-01 Thread Fabrizio Castro
Due to commits: * "ARM: shmobile: Add watchdog support", * "ARM: shmobile: rcar-gen2: Add watchdog support", and * "soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2", we now have everything we needed for the watchdog to work on Gen2 and RZ/G1. This commit adds

[PATCH v6 3/3] watchdog: renesas_wdt: Add restart handler

2018-03-01 Thread Fabrizio Castro
On iWave's boards iwg20d and iwg22d the only way to reboot the system is by means of the watchdog. This patch adds a restart handler to rwdt_ops, and also makes sure we keep its priority to a medium level, in order to not override other more effective handlers. Signed-off-by: Fabrizio Castro

[PATCH v6 0/3] Add Gen2 support to rwdt driver

2018-03-01 Thread Fabrizio Castro
Dear All, the changes from this series originally come from another series: "Fix watchdog on Renesas R-Car Gen2 and RZ/G1" However, the watchdog driver related changes are the only changes still under open discussion, that's why I am moving on with a smaller series now. Geert highlighted

Re: [PATCH v2 0/5] Add R8A77970/V3MSK LVDS/HDMI support

2018-03-01 Thread Sergei Shtylyov
On 03/01/2018 12:54 PM, Simon Horman wrote: > Here's the set of 5 patches against Simon Horman's 'renesas.git' repo's > 'renesas-devel-20180227-v4.16-rc3' tag. We're adding the R8A77970 > FCPVD/VSPD/ > DU/LVDS device nodes and then describing the HDMI encoder connected to >

Re: [PATCH v2 1/3] media: i2c: adv748x: Simplify regmap configuration

2018-03-01 Thread Niklas Söderlund
Hi Kieran, Thanks for your patch, On 2018-02-27 15:05:48 +, Kieran Bingham wrote: > From: Kieran Bingham > > The ADV748x has identical map configurations for each register map. The > duplication of each map can be simplified using a helper macro such that >

Re: [PATCH v2 3/3] media: i2c: adv748x: Add support for i2c_new_secondary_device

2018-03-01 Thread Niklas Söderlund
Hi Kieran, I like this change :-) On 2018-02-27 15:05:50 +, Kieran Bingham wrote: > From: Kieran Bingham > > The ADV748x has twelve 256-byte maps that can be accessed via the main > I2C ports. Each map has it own I2C address and acts as a standard slave >

Re: [PATCH v2 17/19] dt-bindings: net: ravb: Add support for r8a77965 SoC

2018-03-01 Thread Rob Herring
On Tue, Feb 20, 2018 at 04:12:19PM +0100, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to renesas ravb device > tree bindings documentation. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven >

Re: [PATCH v2 15/19] dt-bindings: gpio: Add support for r8a77965

2018-03-01 Thread Rob Herring
On Tue, Feb 20, 2018 at 04:12:17PM +0100, Jacopo Mondi wrote: > Add compatible string for R-Car M3-N (r8a77965) in gpio-rcar. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven > > --- > v1 -> v2: > - Drop SoC-specific

Re: [PATCH v2 10/19] dt-bindings: dmaengine: rcar-dmac: document R8A77965 support

2018-03-01 Thread Rob Herring
On Tue, Feb 20, 2018 at 04:12:12PM +0100, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to rcar-dmac device > tree bindings documentation. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven >

Re: [PATCH v2 12/19] dt-bindings: serial: sh-sci: Add support for r8a77965 (H)SCIF

2018-03-01 Thread Rob Herring
On Tue, Feb 20, 2018 at 04:12:14PM +0100, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to Renesas sci-serial > device tree bindings documentation. > > Signed-off-by: Jacopo Mondi > --- >

[PATCH v7 3/4 - variant 2] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes

2018-03-01 Thread Laurent Pinchart
The internal LVDS encoders now have their own DT bindings. Before switching the driver infrastructure to those new bindings, implement backward-compatibility through live DT patching. Patching is disabled and will be enabled along with support for the new DT bindings in the DU driver.

[PATCH v7 4/4] drm: rcar-du: Convert LVDS encoder code to bridge driver

2018-03-01 Thread Laurent Pinchart
The LVDS encoders used to be described in DT as part of the DU. They now have their own DT node, linked to the DU using the OF graph bindings. This allows moving internal LVDS encoder support to a separate driver modelled as a DRM bridge. Backward compatibility is retained as legacy DT is patched

[PATCH v7 2/4] dt-bindings: display: renesas: Deprecate LVDS support in the DU bindings

2018-03-01 Thread Laurent Pinchart
The internal LVDS encoders now have their own DT bindings, representing them as part of the DU is deprecated. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Reviewed-by: Niklas Söderlund

[PATCH v7 3/4 - variant 1] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes

2018-03-01 Thread Laurent Pinchart
The internal LVDS encoders now have their own DT bindings. Before switching the driver infrastructure to those new bindings, implement backward-compatibility through live DT patching. Patching is disabled and will be enabled along with support for the new DT bindings in the DU driver.

[PATCH v7 0/4] R-Car DU: Convert LVDS code to bridge driver

2018-03-01 Thread Laurent Pinchart
Hello, This patch series addresses a design mistake that dates back from the initial DU support. Support for the LVDS encoders, which are IP cores separate from the DU, was bundled in the DU driver. Worse, both the DU and LVDS were described through a single DT node. To fix the, patches 1/4 and

[PATCH v7 1/4] dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings

2018-03-01 Thread Laurent Pinchart
The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add corresponding device tree bindings. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Reviewed-by: Niklas Söderlund

[PATCH v2 1/2] DT: display: renesas,lvds: document R8A77970 bindings

2018-03-01 Thread Sergei Shtylyov
Document the R-Car V3M (R8A77970) SoC in the R-Car LVDS bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart --- Changes in version 2: - added Rob's and Laurent's

Re: [PATCH v6 1/3] watchdog: renesas_wdt: Add suspend/resume support

2018-03-01 Thread Wolfram Sang
> + unsigned int timeleft; What about using u16 time_left; ... > +static void rwdt_set_timeleft(struct rwdt_priv *priv, unsigned int timeleft) > +{ > + rwdt_write(priv, 65536 - MUL_BY_CLKS_PER_SEC(priv, timeleft), RWTCNT); > +} > + ... skipping this ... > static int

[PATCH v2 2/2] drm: rcar-du: lvds: add R8A77970 support

2018-03-01 Thread Sergei Shtylyov
Add support for the R-Car V3M (R8A77970) SoC to the LVDS encoder driver. Note that there are some differences with the other R-Car gen3 SoCs, e.g. LVDPLLCR has the same layout as in the R-Car gen2 SoCs... Signed-off-by: Sergei Shtylyov --- Changes in version

Re: [PATCH v7 1/3] watchdog: renesas_wdt: Add suspend/resume support

2018-03-01 Thread Guenter Roeck
On Thu, Mar 01, 2018 at 06:17:21PM +, Fabrizio Castro wrote: > On R-Car Gen2 and RZ/G1 the watchdog IP clock needs to be always ON, > on R-Car Gen3 we power the IP down during suspend. > > This commit adds suspend/resume support, so that the watchdog counting > "pauses" during suspend on all

Re: [PATCH v7 2/3] watchdog: renesas_wdt: Add R-Car Gen2 support

2018-03-01 Thread Guenter Roeck
On Thu, Mar 01, 2018 at 06:17:22PM +, Fabrizio Castro wrote: > Due to commits: > * "ARM: shmobile: Add watchdog support", > * "ARM: shmobile: rcar-gen2: Add watchdog support", and > * "soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2", > we now have everything we needed for

Re: [PATCH v7 3/3] watchdog: renesas_wdt: Add restart handler

2018-03-01 Thread Geert Uytterhoeven
On Thu, Mar 1, 2018 at 7:17 PM, Fabrizio Castro wrote: > On iWave's boards iwg20d and iwg22d the only way to reboot the system is > by means of the watchdog. > This patch adds a restart handler to rwdt_ops, and also makes sure we > keep its priority to the lowest

[PATCH v7 3/3] watchdog: renesas_wdt: Add restart handler

2018-03-01 Thread Fabrizio Castro
On iWave's boards iwg20d and iwg22d the only way to reboot the system is by means of the watchdog. This patch adds a restart handler to rwdt_ops, and also makes sure we keep its priority to the lowest level, in order to not override other more effective handlers. Signed-off-by: Fabrizio Castro

[PATCH v7 1/3] watchdog: renesas_wdt: Add suspend/resume support

2018-03-01 Thread Fabrizio Castro
On R-Car Gen2 and RZ/G1 the watchdog IP clock needs to be always ON, on R-Car Gen3 we power the IP down during suspend. This commit adds suspend/resume support, so that the watchdog counting "pauses" during suspend on all of the SoCs compatible with this driver and on those we are now adding

[PATCH v7 0/3] Add Gen2 support to rwdt driver

2018-03-01 Thread Fabrizio Castro
Dear All, this is to merge Wolfram's comments he made on the previous version. Thanks, Fabrizio Castro (3): watchdog: renesas_wdt: Add suspend/resume support watchdog: renesas_wdt: Add R-Car Gen2 support watchdog: renesas_wdt: Add restart handler drivers/watchdog/renesas_wdt.c | 44

[PATCH v7 2/3] watchdog: renesas_wdt: Add R-Car Gen2 support

2018-03-01 Thread Fabrizio Castro
Due to commits: * "ARM: shmobile: Add watchdog support", * "ARM: shmobile: rcar-gen2: Add watchdog support", and * "soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2", we now have everything we needed for the watchdog to work on Gen2 and RZ/G1. This commit adds

Re: [PATCH v7 2/3] watchdog: renesas_wdt: Add R-Car Gen2 support

2018-03-01 Thread Geert Uytterhoeven
Hi Fabrizio, On Thu, Mar 1, 2018 at 7:17 PM, Fabrizio Castro wrote: > Due to commits: > * "ARM: shmobile: Add watchdog support", > * "ARM: shmobile: rcar-gen2: Add watchdog support", and > * "soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2", > we

[PATCH v2 0/3] Add R-Car V3M (R8A77970) support to the R-Car LVDS driver

2018-03-01 Thread Sergei Shtylyov
Hello! Here's the set of 2 patches against the 'drm-next' branch of David Airlie's 'linux.git' repo plus Laurent Picnahrt's patches creating the R-Car LVDS bridge driver posted recently. The purpose of these patches is to add the R-Car V3M (R8A77970) support to the R-Car LVDS driver. [1/2] DT:

RE: [PATCH v6 1/3] watchdog: renesas_wdt: Add suspend/resume support

2018-03-01 Thread Fabrizio Castro
Hi Wolfram, thank you for your feedback! > Subject: Re: [PATCH v6 1/3] watchdog: renesas_wdt: Add suspend/resume support > > > > +unsigned int timeleft; > > What about using > u16 time_left; > > ... > > > +static void rwdt_set_timeleft(struct rwdt_priv *priv, unsigned int > > timeleft) > > +{ >

Re: [PATCH v7 1/3] watchdog: renesas_wdt: Add suspend/resume support

2018-03-01 Thread Wolfram Sang
On Thu, Mar 01, 2018 at 06:17:21PM +, Fabrizio Castro wrote: > On R-Car Gen2 and RZ/G1 the watchdog IP clock needs to be always ON, > on R-Car Gen3 we power the IP down during suspend. > > This commit adds suspend/resume support, so that the watchdog counting > "pauses" during suspend on all

[PATCH v11 04/32] rcar-vin: rename poorly named initialize and cleanup functions

2018-03-01 Thread Niklas Söderlund
The functions to register and unregister the hardware and video device where poorly named from the start. Rename them to better describe their intended function. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham

[PATCH v11 12/32] rcar-vin: fix handling of single field frames (top, bottom and alternate fields)

2018-03-01 Thread Niklas Söderlund
There was never proper support in the VIN driver to deliver ALTERNATING field format to user-space, remove this field option. The problem is that ALTERNATING filed order requires the sequence numbers of buffers returned to userspace to reflect if fields where dropped or not, something which is not

[PATCH v11 08/32] rcar-vin: move max width and height information to chip information

2018-03-01 Thread Niklas Söderlund
On Gen3 the max supported width and height will be different from Gen2. Move the limits to the struct rvin_info to prepare for Gen3 support. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Reviewed-by:

[PATCH v11 03/32] rcar-vin: add Gen3 devicetree bindings documentation

2018-03-01 Thread Niklas Söderlund
Document the devicetree bindings for the CSI-2 inputs available on Gen3. There is a need to add a custom property 'renesas,id' and to define which CSI-2 input is described in which endpoint under the port@1 node. This information is needed since there are a set of predefined routes between each

[PATCH v11 15/32] rcar-vin: break out format alignment and checking

2018-03-01 Thread Niklas Söderlund
Part of the format alignment and checking can be shared with the Gen3 format handling. Break that part out to a separate function. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 96 - 1 file

[PATCH v11 18/32] rcar-vin: enable Gen3 hardware configuration

2018-03-01 Thread Niklas Söderlund
Add the register needed to work with Gen3 hardware. This patch adds the logic for how to work with the Gen3 hardware. More work is required to enable the subdevice structure needed to configure capturing. Signed-off-by: Niklas Söderlund Reviewed-by: Hans

[PATCH v11 13/32] rcar-vin: update bytesperline and sizeimage calculation

2018-03-01 Thread Niklas Söderlund
Remove over complicated logic to calculate the value for bytesperline and sizeimage that was carried over from the soc_camera port. There is no need to find the max value of bytesperline and sizeimage from user-space as they are set to 0 before the max_t() operation. Signed-off-by: Niklas

[PATCH v11 07/32] rcar-vin: move model information to own struct

2018-03-01 Thread Niklas Söderlund
When Gen3 support is added to the driver more than model ID will be different for the different SoCs. To avoid a lot of if statements in the code create a struct rvin_info to store this information. While we are at it rename the poorly chosen enum which contains the different model IDs from

[PATCH v11 10/32] rcar-vin: all Gen2 boards can scale simplify logic

2018-03-01 Thread Niklas Söderlund
The logic to preserve the requested format width and height are too complex and come from a premature optimization for Gen3. All Gen2 SoC can scale and the Gen3 implementation will not use these functions at all so simply preserve the width and height when interacting with the subdevice much like

[PATCH v11 09/32] rcar-vin: move functions regarding scaling

2018-03-01 Thread Niklas Söderlund
In preparation of refactoring the scaling code move the code regarding scaling to to the top of the file to avoid the need to add forward declarations. No code is changed in this commit only whole functions moved inside the same file. Signed-off-by: Niklas Söderlund

[PATCH v11 00/32] rcar-vin: Add Gen3 with media controller

2018-03-01 Thread Niklas Söderlund
Hi, This series adds Gen3 VIN support to rcar-vin driver for Renesas r8a7795, r8a7796 and r8a77970. It is based on the media-tree and depends on Fabrizio Castro patches as they touches the order of the compatible strings in the documentation to reduce merge conflicts. The dependencies are

[PATCH v11 02/32] dt-bindings: media: rcar_vin: add device tree support for r8a774[35]

2018-03-01 Thread Niklas Söderlund
From: Fabrizio Castro Add compatible strings for r8a7743 and r8a7745. No driver change is needed as "renesas,rcar-gen2-vin" will activate the right code. However, it is good practice to document compatible strings for the specific SoC as this allows SoC specific

[PATCH v11 01/32] dt-bindings: media: rcar_vin: Reverse SoC part number list

2018-03-01 Thread Niklas Söderlund
From: Fabrizio Castro Change the sorting of the part numbers from descending to ascending to match with other documentation. Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Reviewed-by: Simon Horman

[PATCH v11 31/32] rcar-vin: enable support for r8a7796

2018-03-01 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7796. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- drivers/media/platform/rcar-vin/rcar-core.c | 44 + 1 file changed, 44

[PATCH v11 27/32] rcar-vin: parse Gen3 OF and setup media graph

2018-03-01 Thread Niklas Söderlund
The parsing and registering CSI-2 subdevices with the v4l2 async framework is a collaborative effort shared between the VIN instances which are part of the group. When the last VIN in the group is probed it asks all other VINs to parse its share of OF and record the async subdevices it finds in

[PATCH v11 32/32] rcar-vin: enable support for r8a77970

2018-03-01 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a77970. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- drivers/media/platform/rcar-vin/rcar-core.c | 23 +++ 1 file changed, 23

[PATCH v11 29/32] rcar-vin: extend {start,stop}_streaming to work with media controller

2018-03-01 Thread Niklas Söderlund
The procedure to start or stop streaming using the non-MC single subdevice and the MC graph and multiple subdevices are quite different. Create a new function to abstract which method is used based on which mode the driver is running in and add logic to start the MC graph. Signed-off-by: Niklas

[PATCH v11 20/32] rcar-vin: add flag to switch to media controller mode

2018-03-01 Thread Niklas Söderlund
On Gen3 a media controller API needs to be used to allow userspace to configure the subdevices in the pipeline instead of directly controlling a single source subdevice, which is and will continue to be the mode of operation on Gen2. Prepare for these two modes of operation by adding a flag to

[PATCH v11 28/32] rcar-vin: add link notify for Gen3

2018-03-01 Thread Niklas Söderlund
Add the ability to process media device link change request. Link enabling is a bit complicated on Gen3, whether or not it's possible to enable a link depends on what other links already are enabled. On Gen3 the 8 VINs are split into two subgroup's (VIN0-3 and VIN4-7) and from a routing

[PATCH v11 30/32] rcar-vin: enable support for r8a7795

2018-03-01 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7795 ES1.x and ES2.0. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- drivers/media/platform/rcar-vin/Kconfig | 2 +-

[PATCH v11 16/32] rcar-vin: read subdevice format for crop only when needed

2018-03-01 Thread Niklas Söderlund
Instead of caching the subdevice format each time the video device format is set read it directly when it's needed. As it turns out the format is only needed when figuring out the max rectangle for cropping. This simplifies the code and makes it clearer what the source format is used for.

[PATCH v11 22/32] rcar-vin: force default colorspace for media centric mode

2018-03-01 Thread Niklas Söderlund
When the VIN driver is running in media centric mode (on Gen3) the colorspace is not retrieved from the video source instead the user is expected to set it as part of the format. There is no way for the VIN driver to validated the colorspace requested by user-space, this creates a problem where

[PATCH v11 14/32] rcar-vin: align pixelformat check

2018-03-01 Thread Niklas Söderlund
If the pixelformat is not supported it should not fail but be set to something that works. While we are at it move the two different checks of the pixelformat to the same statement. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart

[PATCH v11 17/32] rcar-vin: move media bus configuration to struct rvin_info

2018-03-01 Thread Niklas Söderlund
Bus configuration will once the driver is extended to support Gen3 contain information not specific to only the directly connected parallel subdevice. Move it to struct rvin_dev to show it's not always coupled to the parallel subdevice. Signed-off-by: Niklas Söderlund

[PATCH v11 21/32] rcar-vin: use different v4l2 operations in media controller mode

2018-03-01 Thread Niklas Söderlund
When the driver runs in media controller mode it should not directly control the subdevice instead userspace will be responsible for configuring the pipeline. To be able to run in this mode a different set of v4l2 operations needs to be used. Add a new set of v4l2 operations to support operation

[PATCH v11 26/32] rcar-vin: add chsel information to rvin_info

2018-03-01 Thread Niklas Söderlund
Each Gen3 SoC has a limited set of predefined routing possibilities for which CSI-2 device and channel can be routed to which VIN instance. Prepare to store this information in the struct rvin_info. Signed-off-by: Niklas Söderlund ---

Re: [PATCH v7 3/4 - variant 2] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes

2018-03-01 Thread Frank Rowand
On 03/01/18 14:05, Laurent Pinchart wrote: > The internal LVDS encoders now have their own DT bindings. Before > switching the driver infrastructure to those new bindings, implement > backward-compatibility through live DT patching. > > Patching is disabled and will be enabled along with support

Re: [PATCH v7 3/4 - variant 1] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes

2018-03-01 Thread Niklas Söderlund
Hi Laurent, Thanks for your patch, All comments in this mail also applies to variant 2 of this patch as the difference between them are so small. First I got a question about your usage of __init thru out this driver. What would happen if a system is booted without a DU node and then a

Re: [PATCH v7 3/4 - variant 1] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes

2018-03-01 Thread Frank Rowand
On 03/01/18 14:05, Laurent Pinchart wrote: > The internal LVDS encoders now have their own DT bindings. Before > switching the driver infrastructure to those new bindings, implement > backward-compatibility through live DT patching. > > Patching is disabled and will be enabled along with support

[PATCH v11 06/32] rcar-vin: move subdevice handling to async callbacks

2018-03-01 Thread Niklas Söderlund
In preparation for Gen3 support move the subdevice initialization and clean up from rvin_v4l2_{register,unregister}() directly to the async callbacks. This simplifies the addition of Gen3 support as the rvin_v4l2_register() can be shared for both Gen2 and Gen3 while direct subdevice control are

[PATCH v11 05/32] rcar-vin: unregister video device on driver removal

2018-03-01 Thread Niklas Söderlund
If the video device was registered by the complete() callback it should be unregistered when a device is unbound from the driver. Protect from printing an uninitialized video device node name by adding a check in rvin_v4l2_unregister() to identify that the video device is registered.

[PATCH v11 11/32] rcar-vin: set a default field to fallback on

2018-03-01 Thread Niklas Söderlund
If the field is not supported by the driver it should not try to keep the current field. Instead it should set it to a default fallback. Since trying a format should always result in the same state regardless of the current state of the device. Signed-off-by: Niklas Söderlund

[PATCH v11 19/32] rcar-vin: add function to manipulate Gen3 chsel value

2018-03-01 Thread Niklas Söderlund
On Gen3 the CSI-2 routing is controlled by the VnCSI_IFMD register. One feature of this register is that it's only present in the VIN0 and VIN4 instances. The register in VIN0 controls the routing for VIN0-3 and the register in VIN4 controls routing for VIN4-7. To be able to control routing from

[PATCH v11 24/32] rcar-vin: add group allocator functions

2018-03-01 Thread Niklas Söderlund
In media controller mode all VIN instances needs to be part of the same media graph. There is also a need for each VIN instance to know about and in some cases be able to communicate with other VIN instances. Add an allocator framework where the first VIN instance to be probed creates a shared

[PATCH v11 25/32] rcar-vin: change name of video device

2018-03-01 Thread Niklas Söderlund
The rcar-vin driver needs to be part of a media controller to support Gen3. Give each VIN instance a unique name so it can be referenced from userspace. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart ---

[PATCH v11 23/32] rcar-vin: prepare for media controller mode initialization

2018-03-01 Thread Niklas Söderlund
Prepare for media controller by calling a different initialization then when running in device centric mode. Add trivial configuration of the mbus and creation of the media pad for the video device entity. While we are at it clearly mark the digital device centric notifier functions with a

Re: [PATCH v6 2/3] watchdog: renesas_wdt: Add R-Car Gen2 support

2018-03-01 Thread Wolfram Sang
On Thu, Mar 01, 2018 at 03:44:07PM +, Fabrizio Castro wrote: > Due to commits: > * "ARM: shmobile: Add watchdog support", > * "ARM: shmobile: rcar-gen2: Add watchdog support", and > * "soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2", > we now have everything we needed for

Re: [PATCH v6 3/3] watchdog: renesas_wdt: Add restart handler

2018-03-01 Thread Wolfram Sang
On Thu, Mar 01, 2018 at 03:44:08PM +, Fabrizio Castro wrote: > On iWave's boards iwg20d and iwg22d the only way to reboot the system is > by means of the watchdog. > This patch adds a restart handler to rwdt_ops, and also makes sure we > keep its priority to a medium level, in order to not