Re: [PATCH 08/14] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-11-05 Thread Helen Koike



On 11/4/20 3:45 PM, Maxime Ripard wrote:
> On Wed, Nov 04, 2020 at 01:38:08PM -0300, Helen Koike wrote:
>>
>>
>> On 11/4/20 8:17 AM, Paul Kocialkowski wrote:
>>> Hi,
>>>
>>> On Mon 02 Nov 20, 10:21, Maxime Ripard wrote:
>>>> On Fri, Oct 30, 2020 at 07:45:18PM -0300, Helen Koike wrote:
>>>>> On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
>>>>>> The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 controller
>>>>>> found on Allwinner SoCs such as the A31 and V3/V3s.
>>>>>>
>>>>>> It is a standalone block, connected to the CSI controller on one side
>>>>>> and to the MIPI D-PHY block on the other. It has a dedicated address
>>>>>> space, interrupt line and clock.
>>>>>>
>>>>>> Currently, the MIPI CSI-2 controller is hard-tied to a specific CSI
>>>>>> controller (CSI0) but newer SoCs (such as the V5) may allow switching
>>>>>> MIPI CSI-2 controllers between CSI controllers.
>>>>>>
>>>>>> It is represented as a V4L2 subdev to the CSI controller and takes a
>>>>>> MIPI CSI-2 sensor as its own subdev, all using the fwnode graph and
>>>>>> media controller API.
>>>>>
>>>>> Maybe this is a bad idea, but I was thinking:
>>>>> This driver basically just turn on/off and catch some interrupts for 
>>>>> errors,
>>>>> and all the rest of v4l2 config you just forward to the next subdevice
>>>>> on the pipeline.
>>>>>
>>>>> So instead of exposing it as a subdevice, I was wondering if modeling
>>>>> this driver also through the phy subsystem wouldn't be cleaner, so
>>>>> you won't need all the v4l2 subdevice/topology boilerplate code that
>>>>> it seems you are not using (unless you have plans to add controls or
>>>>> some specific configuration on this node later).
>>>>>
>>>>> But this would require changes on the sun6i-csi driver.
>>>>>
>>>>> What do you think?
>>>>
>>>> Eventually we'll need to filter the virtual channels / datatypes I
>>>> guess, so it's definitely valuable to have it in v4l2
>>
>> Which kind of datatypes? 
> 
> MIPI-CSI datatypes. Each packet on the MIPI-CSI bus is assigned a
> virtual channel and data type so that you can multiplex multiple streams
> (like a 3d camera would send for example, through the virtual channels)
> and data types (like frames and metadata) and MIPI-CSI controllers
> usually allow to filter them based on what you want.
> 
>> I ask to know if this shouldn't be configured through the video node
>> instead of subdevice.
> 
> Not really, some setups have a mux that can split the multiple virtual
> channels to multiple video nodes for example.
> 
>> Regarding channels, we had a discussion to implement it through the video
>> node (and not subdevice) [1]. But we discussed about blitters and 
>> multi-scalers,
>> so now I'm wondering if we could use the same API for mipi-csi virtual 
>> channels
>> in the video entity device, or if it doesn't apply and we need another API
>> for that in a subdevice instead.
>>
>> [1] 
>> https://patchwork.linuxtv.org/project/linux-media/cover/20200717115435.2632623-1-helen.ko...@collabora.com/
> 
> There's already an API to deal with MIPI-CSI virtual channels:
> https://patchwork.kernel.org/project/linux-renesas-soc/cover/20190328200608.9463-1-jacopo+rene...@jmondi.org/
> 
> Maxime
> 

Thanks for the explanation :)

Helen
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 08/14] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-11-04 Thread Helen Koike



On 11/4/20 8:17 AM, Paul Kocialkowski wrote:
> Hi,
> 
> On Mon 02 Nov 20, 10:21, Maxime Ripard wrote:
>> On Fri, Oct 30, 2020 at 07:45:18PM -0300, Helen Koike wrote:
>>> On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
>>>> The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 controller
>>>> found on Allwinner SoCs such as the A31 and V3/V3s.
>>>>
>>>> It is a standalone block, connected to the CSI controller on one side
>>>> and to the MIPI D-PHY block on the other. It has a dedicated address
>>>> space, interrupt line and clock.
>>>>
>>>> Currently, the MIPI CSI-2 controller is hard-tied to a specific CSI
>>>> controller (CSI0) but newer SoCs (such as the V5) may allow switching
>>>> MIPI CSI-2 controllers between CSI controllers.
>>>>
>>>> It is represented as a V4L2 subdev to the CSI controller and takes a
>>>> MIPI CSI-2 sensor as its own subdev, all using the fwnode graph and
>>>> media controller API.
>>>
>>> Maybe this is a bad idea, but I was thinking:
>>> This driver basically just turn on/off and catch some interrupts for errors,
>>> and all the rest of v4l2 config you just forward to the next subdevice
>>> on the pipeline.
>>>
>>> So instead of exposing it as a subdevice, I was wondering if modeling
>>> this driver also through the phy subsystem wouldn't be cleaner, so
>>> you won't need all the v4l2 subdevice/topology boilerplate code that
>>> it seems you are not using (unless you have plans to add controls or
>>> some specific configuration on this node later).
>>>
>>> But this would require changes on the sun6i-csi driver.
>>>
>>> What do you think?
>>
>> Eventually we'll need to filter the virtual channels / datatypes I
>> guess, so it's definitely valuable to have it in v4l2

Which kind of datatypes? I ask to know if this shouldn't be configured
through the video node instead of subdevice.

Regarding channels, we had a discussion to implement it through the video
node (and not subdevice) [1]. But we discussed about blitters and multi-scalers,
so now I'm wondering if we could use the same API for mipi-csi virtual channels
in the video entity device, or if it doesn't apply and we need another API
for that in a subdevice instead.

[1] 
https://patchwork.linuxtv.org/project/linux-media/cover/20200717115435.2632623-1-helen.ko...@collabora.com/

> 
> Agreed and like I mentionned in the discussion on 00/14 I don't think it
> would be a cleaner way to expose things.
> 
> There's also the fact that newer SoCs like the V5 seem to allow connecting
> any MIPI CSI-2 controller to any CSI controller, so the graph representation
> is definitely welcome here.

I'm not sure this is an advantage in userspace pov, because it means we'll
have different topologies for basically the same end result to userspace.

But as I mentioned, I don't mind keeping it in the media topology.
Helen

> 
> Paul
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 00/14] Allwinner MIPI CSI-2 support for A31/V3s/A83T

2020-11-04 Thread Helen Koike
Hi Paul,

On 11/4/20 8:11 AM, Paul Kocialkowski wrote:
> Hi Helen,
> 
> On Fri 30 Oct 20, 19:44, Helen Koike wrote:
>> Hi Paul,
>>
>> I have some comments through the series, I hope this helps.
> 
> Thanks for your comments :)
> 
>> On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
>>> This series introduces support for MIPI CSI-2, with the A31 controller that 
>>> is
>>> found on most SoCs (A31, V3s and probably V5) as well as the A83T-specific
>>> controller. While the former uses the same MIPI D-PHY that is already 
>>> supported
>>> for DSI, the latter embeds its own D-PHY.
>>>
>>> In order to distinguish the use of the D-PHY between Rx mode (for MIPI 
>>> CSI-2)
>>> and Tx mode (for MIPI DSI), a submode is introduced for D-PHY in the PHY 
>>> API.
>>> This allows adding Rx support in the A31 D-PHY driver.
>>>
>>> A few changes and fixes are applied to the A31 CSI controller driver, in 
>>> order
>>> to support the MIPI CSI-2 use-case.
>>>
>>> Follows is the V4L2 device topology representing the interactions between
>>> the MIPI CSI-2 sensor, the MIPI CSI-2 controller (which controls the D-PHY)
>>> and the CSI controller:
>>> - entity 1: sun6i-csi (1 pad, 1 link)
>>> type Node subtype V4L flags 0
>>> device node name /dev/video0
>>> pad0: Sink
>>> <- "sun6i-mipi-csi2":1 [ENABLED,IMMUTABLE]
>>>
>>> - entity 5: sun6i-mipi-csi2 (2 pads, 2 links)
>>> type V4L2 subdev subtype Unknown flags 0
>>> pad0: Sink
>>> <- "ov5648 0-0036":0 [ENABLED,IMMUTABLE]
>>> pad1: Source
>>> -> "sun6i-csi":0 [ENABLED,IMMUTABLE]
>>>
>>> - entity 8: ov5648 0-0036 (1 pad, 1 link)
>>> type V4L2 subdev subtype Sensor flags 0
>>> device node name /dev/v4l-subdev0
>>
>> Question: I noticed is that sun6i-mipi-csi2 doesn't expose a node under 
>> /dev/, but the sensor
>> exposes it. Probably because it uses V4L2_SUBDEV_FL_HAS_DEVNODE and 
>> sun6i-csi() calls
>> v4l2_device_register_subdev_nodes().
>>
>> I find this weird from a userspace pov, since usually we don't mix manual 
>> and auto propagation
>> of the configs, so I started wondering if sun6i-csi driver should be calling
>> v4l2_device_register_subdev_nodes() in the first place.
> 
> I must admit that I didn't really pay attention to that, but since
> sun6i-mipi-csi2 is basically a bridge driver, it doesn't make sense to apply
> manual configuration to it. It is actually designed to forward most subdev ops
> to its own subdev so configuring it manually would actually result in
> configuring the sensor.

Ack, then maybe sun6i-csi needs a patch removing the call to 
v4l2_device_register_subdev_nodes()

> 
> XXX
> 
>> Also, sun6i-csi doesn't seem to be used by any board dts (it's declared on 
>> the dtsi, but I
>> didn't find any dts enabling it), so I wonder if it would be a bad thing if 
>> we update it.
>>
>>> pad0: Source
>>> [fmt:SBGGR8_1X8/640x480@1/30 field:none colorspace:raw 
>>> xfer:none ycbcr:601 quantization:full-range]
>>> -> "sun6i-mipi-csi2":0 [ENABLED,IMMUTABLE]
>>
>> If I understand correctly, this is very similar to ipu3:
>> sensor->bus->dma_engine
>>
>> in the case of ipu3-cio2:
>> sensor->ipu3-csi2->ipu3-cio2
>>
>> in this case:
>> ov5648->sun6i-mipi-csi2->sun6i-csi
> 
> Yes this is the correct picture.
> 
>> On thing that is confusing me is the name csi2 with csi (that makes me think 
>> of csi
>> version one, which is not the case), I would rename it to sun6i-video (or 
>> maybe
>> it is just me who gets confused).
> 
> So the CSI name comes from the Allwinner litterature and implementation for 
> that
> controller. Since it supports parallel input on its own, it does in fact 
> support
> parallel CSI. The DMA engine part alone from that controller is also used for
> MIPI CSI-2, so in this case the name looses its relevance.
> 
>> I know this driver is already upstream and not part of this series, but on 
>> the other hand it
>> doesn't seem to be used.
> 
> Personally I don't find a rename to be necessary and while I agree that
> nothing would apparently prevent us from renaming it, I would prefer to keep
> the naming in line with Allwinner's litterature.

Ok, I didn't know it was from A

Re: [PATCH 04/14] media: sun6i-csi: Fix the image storage bpp for 10/12-bit Bayer formats

2020-10-30 Thread Helen Koike
Hi Paul,

On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
> Both 10 and 12-bit Bayer formats are stored aligned as 16-bit values
> in memory, not unaligned 10 or 12 bits.
> 
> Since the current code for retreiving the bpp is used only to
> calculate the memory storage size of the picture (which is what
> pixel formats describe, unlike media bus formats), fix it there.
> 
> Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
> Co-developed-by: Kévin L'hôpital 
> Signed-off-by: Kévin L'hôpital 
> Signed-off-by: Paul Kocialkowski 
> ---
>  .../platform/sunxi/sun6i-csi/sun6i_csi.h  | 20 +--
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h 
> b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
> index c626821aaedb..7f2be70ae641 100644
> --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
> +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
> @@ -86,7 +86,7 @@ void sun6i_csi_update_buf_addr(struct sun6i_csi *csi, 
> dma_addr_t addr);
>   */
>  void sun6i_csi_set_stream(struct sun6i_csi *csi, bool enable);
>  
> -/* get bpp form v4l2 pixformat */
> +/* get memory storage bpp from v4l2 pixformat */
>  static inline int sun6i_csi_get_bpp(unsigned int pixformat)
>  {
>   switch (pixformat) {
> @@ -96,15 +96,6 @@ static inline int sun6i_csi_get_bpp(unsigned int pixformat)
>   case V4L2_PIX_FMT_SRGGB8:
>   case V4L2_PIX_FMT_JPEG:
>   return 8;
> - case V4L2_PIX_FMT_SBGGR10:
> - case V4L2_PIX_FMT_SGBRG10:
> - case V4L2_PIX_FMT_SGRBG10:
> - case V4L2_PIX_FMT_SRGGB10:
> - return 10;
> - case V4L2_PIX_FMT_SBGGR12:
> - case V4L2_PIX_FMT_SGBRG12:
> - case V4L2_PIX_FMT_SGRBG12:
> - case V4L2_PIX_FMT_SRGGB12:
>   case V4L2_PIX_FMT_HM12:
>   case V4L2_PIX_FMT_NV12:
>   case V4L2_PIX_FMT_NV21:
> @@ -121,6 +112,15 @@ static inline int sun6i_csi_get_bpp(unsigned int 
> pixformat)
>   case V4L2_PIX_FMT_RGB565:
>   case V4L2_PIX_FMT_RGB565X:
>   return 16;
> + case V4L2_PIX_FMT_SBGGR10:
> + case V4L2_PIX_FMT_SGBRG10:
> + case V4L2_PIX_FMT_SGRBG10:
> + case V4L2_PIX_FMT_SRGGB10:
> + case V4L2_PIX_FMT_SBGGR12:
> + case V4L2_PIX_FMT_SGBRG12:
> + case V4L2_PIX_FMT_SGRBG12:
> + case V4L2_PIX_FMT_SRGGB12:
> + return 16;
>   case V4L2_PIX_FMT_RGB24:
>   case V4L2_PIX_FMT_BGR24:
>   return 24;
> 

Instead of updating this table, how about using v4l2_format_info() instead?

Regards,
Helen
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 08/14] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-10-30 Thread Helen Koike
Hi Paul,

On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
> The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 controller
> found on Allwinner SoCs such as the A31 and V3/V3s.
> 
> It is a standalone block, connected to the CSI controller on one side
> and to the MIPI D-PHY block on the other. It has a dedicated address
> space, interrupt line and clock.
> 
> Currently, the MIPI CSI-2 controller is hard-tied to a specific CSI
> controller (CSI0) but newer SoCs (such as the V5) may allow switching
> MIPI CSI-2 controllers between CSI controllers.
> 
> It is represented as a V4L2 subdev to the CSI controller and takes a
> MIPI CSI-2 sensor as its own subdev, all using the fwnode graph and
> media controller API.

Maybe this is a bad idea, but I was thinking:
This driver basically just turn on/off and catch some interrupts for errors,
and all the rest of v4l2 config you just forward to the next subdevice
on the pipeline.

So instead of exposing it as a subdevice, I was wondering if modeling
this driver also through the phy subsystem wouldn't be cleaner, so
you won't need all the v4l2 subdevice/topology boilerplate code that
it seems you are not using (unless you have plans to add controls or
some specific configuration on this node later).

But this would require changes on the sun6i-csi driver.

What do you think?

Same comment for patch 12/14 (A83T MIPI CSI-2 controller).

> 
> Signed-off-by: Paul Kocialkowski 
> ---
>  drivers/media/platform/sunxi/Kconfig  |   1 +
>  drivers/media/platform/sunxi/Makefile |   1 +
>  .../platform/sunxi/sun6i-mipi-csi2/Kconfig|  11 +
>  .../platform/sunxi/sun6i-mipi-csi2/Makefile   |   4 +
>  .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c   | 635 ++
>  .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.h   | 116 
>  6 files changed, 768 insertions(+)
>  create mode 100644 drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig
>  create mode 100644 drivers/media/platform/sunxi/sun6i-mipi-csi2/Makefile
>  create mode 100644 
> drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
>  create mode 100644 
> drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.h
> 
> diff --git a/drivers/media/platform/sunxi/Kconfig 
> b/drivers/media/platform/sunxi/Kconfig
> index 7151cc249afa..9684e07454ad 100644
> --- a/drivers/media/platform/sunxi/Kconfig
> +++ b/drivers/media/platform/sunxi/Kconfig
> @@ -2,3 +2,4 @@
>  
>  source "drivers/media/platform/sunxi/sun4i-csi/Kconfig"
>  source "drivers/media/platform/sunxi/sun6i-csi/Kconfig"
> +source "drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig"
> diff --git a/drivers/media/platform/sunxi/Makefile 
> b/drivers/media/platform/sunxi/Makefile
> index fc537c9f5ca9..887a7cae8fca 100644
> --- a/drivers/media/platform/sunxi/Makefile
> +++ b/drivers/media/platform/sunxi/Makefile
> @@ -2,5 +2,6 @@
>  
>  obj-y+= sun4i-csi/
>  obj-y+= sun6i-csi/
> +obj-y+= sun6i-mipi-csi2/
>  obj-y+= sun8i-di/
>  obj-y+= sun8i-rotate/
> diff --git a/drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig 
> b/drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig
> new file mode 100644
> index ..7033bda483b4
> --- /dev/null
> +++ b/drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig
> @@ -0,0 +1,11 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +config VIDEO_SUN6I_MIPI_CSI2
> + tristate "Allwinner A31 MIPI CSI-2 Controller Driver"
> + depends on VIDEO_V4L2 && COMMON_CLK
> + depends on ARCH_SUNXI || COMPILE_TEST
> + select MEDIA_CONTROLLER
> + select VIDEO_V4L2_SUBDEV_API
> + select REGMAP_MMIO
> + select V4L2_FWNODE
> + help
> +Support for the Allwinner A31 MIPI CSI-2 Controller.
> diff --git a/drivers/media/platform/sunxi/sun6i-mipi-csi2/Makefile 
> b/drivers/media/platform/sunxi/sun6i-mipi-csi2/Makefile
> new file mode 100644
> index ..14e4e03818b5
> --- /dev/null
> +++ b/drivers/media/platform/sunxi/sun6i-mipi-csi2/Makefile
> @@ -0,0 +1,4 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +sun6i-mipi-csi2-y += sun6i_mipi_csi2.o
> +
> +obj-$(CONFIG_VIDEO_SUN6I_MIPI_CSI2) += sun6i-mipi-csi2.o
> diff --git a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c 
> b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
> new file mode 100644
> index ..ce89c35f5b86
> --- /dev/null
> +++ b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
> @@ -0,0 +1,635 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2020 Bootlin
> + * Author: Paul Kocialkowski 
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "sun6i_mipi_csi2.h"
> +
> +#define MODULE_NAME  "sun6i-mipi-csi2"
> +
> +/* Core */
> +
> +static irqreturn_t sun6i_mipi_csi2_isr(int irq, void *dev_id)
> +{
> + struct sun6i_mipi_csi2_dev *cdev = 

Re: [PATCH 02/14] phy: allwinner: phy-sun6i-mipi-dphy: Support D-PHY Rx mode for MIPI CSI-2

2020-10-30 Thread Helen Koike
Hello,

On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
> The Allwinner A31 D-PHY supports both Rx and Tx modes. While the latter
> is already supported and used for MIPI DSI this adds support for the
> former, to be used with MIPI CSI-2.
> 
> This implementation is inspired by the Allwinner BSP implementation.
> 
> Signed-off-by: Paul Kocialkowski 
> ---
>  drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 164 +++-
>  1 file changed, 160 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c 
> b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c
> index 1fa761ba6cbb..8bcd4bb79f60 100644
> --- a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c
> +++ b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c
> @@ -24,6 +24,14 @@
>  #define SUN6I_DPHY_TX_CTL_REG0x04
>  #define SUN6I_DPHY_TX_CTL_HS_TX_CLK_CONT BIT(28)
>  
> +#define SUN6I_DPHY_RX_CTL_REG0x08
> +#define SUN6I_DPHY_RX_CTL_EN_DBC BIT(31)
> +#define SUN6I_DPHY_RX_CTL_RX_CLK_FORCE   BIT(24)
> +#define SUN6I_DPHY_RX_CTL_RX_D3_FORCEBIT(23)
> +#define SUN6I_DPHY_RX_CTL_RX_D2_FORCEBIT(22)
> +#define SUN6I_DPHY_RX_CTL_RX_D1_FORCEBIT(21)
> +#define SUN6I_DPHY_RX_CTL_RX_D0_FORCEBIT(20)
> +
>  #define SUN6I_DPHY_TX_TIME0_REG  0x10
>  #define SUN6I_DPHY_TX_TIME0_HS_TRAIL(n)  (((n) & 0xff) << 24)
>  #define SUN6I_DPHY_TX_TIME0_HS_PREPARE(n)(((n) & 0xff) << 16)
> @@ -44,12 +52,29 @@
>  #define SUN6I_DPHY_TX_TIME4_HS_TX_ANA1(n)(((n) & 0xff) << 8)
>  #define SUN6I_DPHY_TX_TIME4_HS_TX_ANA0(n)((n) & 0xff)
>  
> +#define SUN6I_DPHY_RX_TIME0_REG  0x30
> +#define SUN6I_DPHY_RX_TIME0_HS_RX_SYNC(n)(((n) & 0xff) << 24)
> +#define SUN6I_DPHY_RX_TIME0_HS_RX_CLK_MISS(n)(((n) & 0xff) << 16)
> +#define SUN6I_DPHY_RX_TIME0_LP_RX(n) (((n) & 0xff) << 8)
> +
> +#define SUN6I_DPHY_RX_TIME1_REG  0x34
> +#define SUN6I_DPHY_RX_TIME1_RX_DLY(n)(((n) & 0xfff) << 20)
> +#define SUN6I_DPHY_RX_TIME1_LP_RX_ULPS_WP(n) ((n) & 0xf)
> +
> +#define SUN6I_DPHY_RX_TIME2_REG  0x38
> +#define SUN6I_DPHY_RX_TIME2_HS_RX_ANA1(n)(((n) & 0xff) << 8)
> +#define SUN6I_DPHY_RX_TIME2_HS_RX_ANA0(n)((n) & 0xff)
> +
> +#define SUN6I_DPHY_RX_TIME3_REG  0x40
> +#define SUN6I_DPHY_RX_TIME3_LPRST_DLY(n) (((n) & 0x) << 16)
> +
>  #define SUN6I_DPHY_ANA0_REG  0x4c
>  #define SUN6I_DPHY_ANA0_REG_PWS  BIT(31)
>  #define SUN6I_DPHY_ANA0_REG_DMPC BIT(28)
>  #define SUN6I_DPHY_ANA0_REG_DMPD(n)  (((n) & 0xf) << 24)
>  #define SUN6I_DPHY_ANA0_REG_SLV(n)   (((n) & 7) << 12)
>  #define SUN6I_DPHY_ANA0_REG_DEN(n)   (((n) & 0xf) << 8)
> +#define SUN6I_DPHY_ANA0_REG_SFB(n)   (((n) & 3) << 2)
>  
>  #define SUN6I_DPHY_ANA1_REG  0x50
>  #define SUN6I_DPHY_ANA1_REG_VTTMODE  BIT(31)
> @@ -92,6 +117,8 @@ struct sun6i_dphy {
>  
>   struct phy  *phy;
>   struct phy_configure_opts_mipi_dphy config;
> +
> + int submode;
>  };
>  
>  static int sun6i_dphy_init(struct phy *phy)
> @@ -105,6 +132,18 @@ static int sun6i_dphy_init(struct phy *phy)
>   return 0;
>  }
>  
> +static int sun6i_dphy_set_mode(struct phy *phy, enum phy_mode mode, int 
> submode)
> +{
> + struct sun6i_dphy *dphy = phy_get_drvdata(phy);
> +
> + if (mode != PHY_MODE_MIPI_DPHY)
> + return -EINVAL;
> +
> + dphy->submode = submode;

Shouldn't you check if the submode is valid here?

> +
> + return 0;
> +}
> +
>  static int sun6i_dphy_configure(struct phy *phy, union phy_configure_opts 
> *opts)
>  {
>   struct sun6i_dphy *dphy = phy_get_drvdata(phy);
> @@ -119,9 +158,8 @@ static int sun6i_dphy_configure(struct phy *phy, union 
> phy_configure_opts *opts)
>   return 0;
>  }
>  
> -static int sun6i_dphy_power_on(struct phy *phy)
> +static int sun6i_dphy_tx_power_on(struct sun6i_dphy *dphy)
>  {
> - struct sun6i_dphy *dphy = phy_get_drvdata(phy);
>   u8 lanes_mask = GENMASK(dphy->config.lanes - 1, 0);
>  
>   regmap_write(dphy->regs, SUN6I_DPHY_TX_CTL_REG,
> @@ -211,12 +249,129 @@ static int sun6i_dphy_power_on(struct phy *phy)
>   return 0;
>  }
>  
> +static int sun6i_dphy_rx_power_on(struct sun6i_dphy *dphy)
> +{
> + /* Physical clock rate is actually half of symbol rate with DDR. */
> + unsigned long mipi_symbol_rate = dphy->config.hs_clk_rate;
> + unsigned long dphy_clk_rate;
> + unsigned int rx_dly;
> + unsigned int lprst_dly;
> + u32 value;
> +
> + dphy_clk_rate = clk_get_rate(dphy->mod_clk);
> + if (!dphy_clk_rate)
> + return -1;
> +
> + /* Hardcoded timing parameters from the Allwinner BSP. */
> + regmap_write(dphy->regs, SUN6I_DPHY_RX_TIME0_REG,
> +  SUN6I_DPHY_RX_TIME0_HS_RX_SYNC(255) |
> +  

Re: [PATCH 00/14] Allwinner MIPI CSI-2 support for A31/V3s/A83T

2020-10-30 Thread Helen Koike
Hi Paul,

I have some comments through the series, I hope this helps.

On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
> This series introduces support for MIPI CSI-2, with the A31 controller that is
> found on most SoCs (A31, V3s and probably V5) as well as the A83T-specific
> controller. While the former uses the same MIPI D-PHY that is already 
> supported
> for DSI, the latter embeds its own D-PHY.
> 
> In order to distinguish the use of the D-PHY between Rx mode (for MIPI CSI-2)
> and Tx mode (for MIPI DSI), a submode is introduced for D-PHY in the PHY API.
> This allows adding Rx support in the A31 D-PHY driver.
> 
> A few changes and fixes are applied to the A31 CSI controller driver, in order
> to support the MIPI CSI-2 use-case.
> 
> Follows is the V4L2 device topology representing the interactions between
> the MIPI CSI-2 sensor, the MIPI CSI-2 controller (which controls the D-PHY)
> and the CSI controller:
> - entity 1: sun6i-csi (1 pad, 1 link)
> type Node subtype V4L flags 0
> device node name /dev/video0
>   pad0: Sink
>   <- "sun6i-mipi-csi2":1 [ENABLED,IMMUTABLE]
> 
> - entity 5: sun6i-mipi-csi2 (2 pads, 2 links)
> type V4L2 subdev subtype Unknown flags 0
>   pad0: Sink
>   <- "ov5648 0-0036":0 [ENABLED,IMMUTABLE]
>   pad1: Source
>   -> "sun6i-csi":0 [ENABLED,IMMUTABLE]
> 
> - entity 8: ov5648 0-0036 (1 pad, 1 link)
> type V4L2 subdev subtype Sensor flags 0
> device node name /dev/v4l-subdev0

Question: I noticed is that sun6i-mipi-csi2 doesn't expose a node under /dev/, 
but the sensor
exposes it. Probably because it uses V4L2_SUBDEV_FL_HAS_DEVNODE and sun6i-csi() 
calls
v4l2_device_register_subdev_nodes().

I find this weird from a userspace pov, since usually we don't mix manual and 
auto propagation
of the configs, so I started wondering if sun6i-csi driver should be calling
v4l2_device_register_subdev_nodes() in the first place.

Also, sun6i-csi doesn't seem to be used by any board dts (it's declared on the 
dtsi, but I
didn't find any dts enabling it), so I wonder if it would be a bad thing if we 
update it.

>   pad0: Source
>   [fmt:SBGGR8_1X8/640x480@1/30 field:none colorspace:raw 
> xfer:none ycbcr:601 quantization:full-range]
>   -> "sun6i-mipi-csi2":0 [ENABLED,IMMUTABLE]

If I understand correctly, this is very similar to ipu3:
sensor->bus->dma_engine

in the case of ipu3-cio2:
sensor->ipu3-csi2->ipu3-cio2

in this case:
ov5648->sun6i-mipi-csi2->sun6i-csi

On thing that is confusing me is the name csi2 with csi (that makes me think of 
csi
vesun6i-csirsion one, which is not the case), I would rename it to sun6i-video 
(or maybe
it is just me who gets confused).
I know this driver is already upstream and not part of this series, but on the 
other hand it
doesn't seem to be used.

On another note, I always wonder if we should expose the bus in the topology, 
I'm not
sure if it provides any useful API or information for userspace, and you could 
have
a cleaner code (maybe code could be under phy subsystem). But at the same time, 
it
seems this is a pattern on v4l2.

I'd like to hear what others think on the above.

Regards,
Helen

> 
> Happy reviewing!
> 
> Paul Kocialkowski (14):
>   phy: Distinguish between Rx and Tx for MIPI D-PHY with submodes
>   phy: allwinner: phy-sun6i-mipi-dphy: Support D-PHY Rx mode for MIPI
> CSI-2
>   media: sun6i-csi: Support an optional dedicated memory pool
>   media: sun6i-csi: Fix the image storage bpp for 10/12-bit Bayer
> formats
>   media: sun6i-csi: Only configure the interface data width for parallel
>   media: sun6i-csi: Support feeding from the MIPI CSI-2 controller
>   dt-bindings: media: i2c: Add A31 MIPI CSI-2 bindings documentation
>   media: sunxi: Add support for the A31 MIPI CSI-2 controller
>   ARM: dts: sun8i: v3s: Add CSI0 camera interface node
>   ARM: dts: sun8i: v3s: Add MIPI D-PHY and MIPI CSI-2 interface nodes
>   dt-bindings: media: i2c: Add A83T MIPI CSI-2 bindings documentation
>   media: sunxi: Add support for the A83T MIPI CSI-2 controller
>   ARM: dts: sun8i: a83t: Add MIPI CSI-2 controller node
>   media: sunxi: sun8i-a83t-mipi-csi2: Avoid using the (unsolicited)
> interrupt
> 
>  .../media/allwinner,sun6i-a31-mipi-csi2.yaml  | 168 +
>  .../media/allwinner,sun8i-a83t-mipi-csi2.yaml | 158 +
>  arch/arm/boot/dts/sun8i-a83t.dtsi |  26 +
>  arch/arm/boot/dts/sun8i-v3s.dtsi  |  62 ++
>  drivers/media/platform/sunxi/Kconfig  |   2 +
>  drivers/media/platform/sunxi/Makefile |   2 +
>  .../platform/sunxi/sun6i-csi/sun6i_csi.c  |  54 +-
>  .../platform/sunxi/sun6i-csi/sun6i_csi.h  |  20 +-
>  .../platform/sunxi/sun6i-mipi-csi2/Kconfig|  11 +
>  .../platform/sunxi/sun6i-mipi-csi2/Makefile   |   4 +
>  .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c   | 635 +
>  

Re: [PATCH 01/14] phy: Distinguish between Rx and Tx for MIPI D-PHY with submodes

2020-10-30 Thread Helen Koike
Hi Paul,

On 10/23/20 2:45 PM, Paul Kocialkowski wrote:
> As some D-PHY controllers support both Rx and Tx mode, we need a way for
> users to explicitly request one or the other. For instance, Rx mode can
> be used along with MIPI CSI-2 while Tx mode can be used with MIPI DSI.
> 
> Introduce new MIPI D-PHY PHY submodes to use with PHY_MODE_MIPI_DPHY.
> The default (zero value) is kept to Tx so only the rkisp1 driver, which
> uses D-PHY in Rx mode, needs to be adapted.
> 
> Signed-off-by: Paul Kocialkowski 
> ---
>  drivers/staging/media/rkisp1/rkisp1-isp.c |  3 ++-
>  include/linux/phy/phy-mipi-dphy.h | 13 +
>  2 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/rkisp1/rkisp1-isp.c 
> b/drivers/staging/media/rkisp1/rkisp1-isp.c
> index 6ec1e9816e9f..0afbce00121e 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-isp.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-isp.c
> @@ -902,7 +902,8 @@ static int rkisp1_mipi_csi2_start(struct rkisp1_isp *isp,
>  
>   phy_mipi_dphy_get_default_config(pixel_clock, isp->sink_fmt->bus_width,
>sensor->lanes, cfg);
> - phy_set_mode(sensor->dphy, PHY_MODE_MIPI_DPHY);
> + phy_set_mode_ext(cdev->dphy, PHY_MODE_MIPI_DPHY,
> +      PHY_MIPI_DPHY_SUBMODE_RX);

>From rkisp1 pov, looks good to me

Acked-by: Helen Koike 

Regards,
Helen

>   phy_configure(sensor->dphy, );
>   phy_power_on(sensor->dphy);
>  
> diff --git a/include/linux/phy/phy-mipi-dphy.h 
> b/include/linux/phy/phy-mipi-dphy.h
> index a877ffee845d..0f57ef46a8b5 100644
> --- a/include/linux/phy/phy-mipi-dphy.h
> +++ b/include/linux/phy/phy-mipi-dphy.h
> @@ -6,6 +6,19 @@
>  #ifndef __PHY_MIPI_DPHY_H_
>  #define __PHY_MIPI_DPHY_H_
>  
> +/**
> + * enum phy_mipi_dphy_submode - MIPI D-PHY sub-mode
> + *
> + * A MIPI D-PHY can be used to transmit or receive data.
> + * Since some controllers can support both, the direction to enable is 
> specified
> + * with the PHY sub-mode. Transmit is assumed by default with phy_set_mode.
> + */
> +
> +enum phy_mipi_dphy_submode {
> + PHY_MIPI_DPHY_SUBMODE_TX = 0,
> + PHY_MIPI_DPHY_SUBMODE_RX,
> +};
> +
>  /**
>   * struct phy_configure_opts_mipi_dphy - MIPI D-PHY configuration set
>   *
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 5/9] media: staging: rkisp1: remove unecessary clocks

2020-10-21 Thread Helen Koike
Hi Rob,

On 10/20/20 12:14 PM, Rob Herring wrote:
> On Wed, Oct 14, 2020 at 11:46 AM Helen Koike  
> wrote:
>>
>> Hi Rob,
>>
>> Thnaks for your reply.
>>
>> On 9/22/20 11:24 AM, Rob Herring wrote:
>>> On Wed, Jul 22, 2020 at 9:56 AM Helen Koike  
>>> wrote:
>>>>
>>>> aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
>>>> hclk_isp, thus we can remove parents from the list.
>>>>
>>>> Also, for the isp0, we only need the ISP clock, ACLK and HCLK.
>>>> In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG
>>>> clock for RK3288.
>>>>
>>>> So with the goal to cleanup the dt-bindings and remove it from staging,
>>>> simplify clock names to isp, aclk and hclk.
>>>>
>>>> Assigned clocks are meant to refer to the full path in the clock tree,
>>>> i.e. the leaf in the tree.
>>>> For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK)
>>>> is aclk_isp0_wrapper.
>>>>
>>>> For reference, this is the isp clock topology on RK3399:
>>>>
>>>>  xin24m
>>>> pll_npll
>>>>npll
>>>>   clk_isp1
>>>>   clk_isp0
>>>> pll_cpll
>>>>cpll
>>>>   aclk_isp1
>>>>  aclk_isp1_noc
>>>>  hclk_isp1
>>>> aclk_isp1_wrapper
>>>> hclk_isp1_noc
>>>>   aclk_isp0
>>>>  hclk_isp1_wrapper
>>>>  aclk_isp0_wrapper
>>>>  aclk_isp0_noc
>>>>  hclk_isp0
>>>> hclk_isp0_wrapper
>>>> hclk_isp0_noc
>>>>  pclkin_isp1_wrapper
>>>>
>>>> Signed-off-by: Helen Koike 
>>>>
>>>> ---
>>>> Changes in V5:
>>>> - Use if/then schema as suggested by Rob Herring on
>>>> https://patchwork.linuxtv.org/project/linux-media/patch/20200702191322.2639681-6-helen.ko...@collabora.com/#119729
>>>>
>>>> Changes in V4:
>>>> - update binding according to suggestion by Robin Murphy
>>>> on https://patchwork.kernel.org/patch/11475007/
>>>>
>>>> Changes in V3:
>>>> - this is a new patch in the series
>>>> ---
>>>>  .../bindings/media/rockchip-isp1.yaml | 50 ---
>>>>  drivers/staging/media/rkisp1/rkisp1-dev.c |  8 ++-
>>>>  2 files changed, 36 insertions(+), 22 deletions(-)
>>>>
>>>> diff --git 
>>>> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>>>  
>>>> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>>> index 62a6b9c959498..23c677d15037a 100644
>>>> --- 
>>>> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>>> +++ 
>>>> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>>> @@ -24,20 +24,10 @@ properties:
>>>>  maxItems: 1
>>>>
>>>>clocks:
>>>> -items:
>>>> -  - description: ISP clock
>>>> -  - description: ISP AXI clock clock
>>>> -  - description: ISP AXI clock  wrapper clock
>>>> -  - description: ISP AHB clock clock
>>>> -  - description: ISP AHB wrapper clock
>>>> +minItems: 3
>>>
>>> You need maxItems here too or it will always be 3.
>>>
>>>>
>>>>clock-names:
>>>> -items:
>>>> -  - const: clk_isp
>>>> -  - const: aclk_isp
>>>> -  - const: aclk_isp_wrap
>>>> -  - const: hclk_isp
>>>> -  - const: hclk_isp_wrap
>>>> +minItems: 3
>>>>
>>>>iommus:
>>>>  maxItems: 1
>>>> @@ -116,6 +106,34 @@ required:
>>>>- power-domains
>>>>- ports
>>>>
>>>> +if:
>>>> +  properties:
>>>> +compatible:
>>>> +  contains:
>>>> +const: rockchip,rk3399-cif-isp
>>>> +then:
>>>> +  properties:
>>>> +clocks:
>>>> +  maxItems: 4
>>>> +  minItems: 3
>>>
>&

[PATCH v6 7/9] media: MAINTAINERS: rkisp1: add path to dt-bindings

2020-10-20 Thread Helen Koike
The Rockchip ISP bindings was moved out of staging.
Update MAINTAINERS file with the new path.

Fields sorted according to output of
./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS
--order

Signed-off-by: Helen Koike 
Reviewed-by: Tomasz Figa 
---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 7a12633747c80..df679b3626b9a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14889,8 +14889,10 @@ ROCKCHIP ISP V1 DRIVER
 M: Helen Koike 
 M: Dafna Hirschfeld 
 L: linux-me...@vger.kernel.org
+L: linux-rockc...@lists.infradead.org
 S: Maintained
 F: Documentation/admin-guide/media/rkisp1.rst
+F: Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 F: Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst
 F: drivers/staging/media/rkisp1/
 
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 6/9] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-10-20 Thread Helen Koike
Move rkisp1 bindings to Documentation/devicetree/bindings/media

Verified with:
make ARCH=arm64 dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
Reviewed-by: Tomasz Figa 
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 b/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
similarity index 100%
rename from 
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
rename to Documentation/devicetree/bindings/media/rockchip-isp1.yaml
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 3/9] media: staging: dt-bindings: rkisp1: re-order properties

2020-10-20 Thread Helen Koike
Organize properties order in dt-bindings to move it out of staging.

On top: compatible, reg and interrupts.
Then alphabetical order, then properties starting with '#'.

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
Reviewed-by: Tomasz Figa 
---
 .../bindings/media/rockchip-isp1.yaml | 32 +--
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 4c31cfaee2709..79ebacab83cf3 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -23,19 +23,6 @@ properties:
   interrupts:
 maxItems: 1
 
-  iommus:
-maxItems: 1
-
-  power-domains:
-maxItems: 1
-
-  phys:
-maxItems: 1
-description: phandle for the PHY port
-
-  phy-names:
-const: dphy
-
   clocks:
 items:
   - description: ISP clock
@@ -52,6 +39,19 @@ properties:
   - const: hclk_isp
   - const: hclk_isp_wrap
 
+  iommus:
+maxItems: 1
+
+  phys:
+maxItems: 1
+description: phandle for the PHY port
+
+  phy-names:
+const: dphy
+
+  power-domains:
+maxItems: 1
+
   # See ./video-interfaces.txt for details
   ports:
 type: object
@@ -110,10 +110,10 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - power-domains
   - iommus
   - phys
   - phy-names
+  - power-domains
   - ports
 
 additionalProperties: false
@@ -139,19 +139,19 @@ examples:
 clock-names = "clk_isp",
   "aclk_isp", "aclk_isp_wrap",
   "hclk_isp", "hclk_isp_wrap";
-power-domains = < RK3399_PD_ISP0>;
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
+power-domains = < RK3399_PD_ISP0>;
 
 ports {
 #address-cells = <1>;
 #size-cells = <0>;
 
 port@0 {
+reg = <0>;
 #address-cells = <1>;
 #size-cells = <0>;
-reg = <0>;
 
 mipi_in_wcam: endpoint@0 {
 reg = <0>;
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 5/9] media: staging: rkisp1: remove unecessary clocks

2020-10-20 Thread Helen Koike
aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
hclk_isp, thus we can remove parents from the list.

Also, for the isp0, we only need the ISP clock, ACLK and HCLK.
In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG
clock for RK3288.

So with the goal to cleanup the dt-bindings and remove it from staging,
simplify clock names to isp, aclk and hclk.

Assigned clocks are meant to refer to the full path in the clock tree,
i.e. the leaf in the tree.
For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK)
is aclk_isp0_wrapper.

For reference, this is the isp clock topology on RK3399:

 xin24m
pll_npll
   npll
  clk_isp1
  clk_isp0
pll_cpll
   cpll
  aclk_isp1
 aclk_isp1_noc
 hclk_isp1
aclk_isp1_wrapper
hclk_isp1_noc
  aclk_isp0
 hclk_isp1_wrapper
 aclk_isp0_wrapper
 aclk_isp0_noc
 hclk_isp0
hclk_isp0_wrapper
hclk_isp0_noc
 pclkin_isp1_wrapper

Signed-off-by: Helen Koike 
Reviewed-by: Tomasz Figa 

---

Changes in V6:
- Define clocks in the top level, and use if/else schema to define how
  many for each compatible as sugested by Rob Herring on
  
https://patchwork.linuxtv.org/project/linux-media/patch/20200722155533.252844-6-helen.ko...@collabora.com/#122626
---
 .../bindings/media/rockchip-isp1.yaml | 44 +--
 drivers/staging/media/rkisp1/rkisp1-dev.c |  8 ++--
 2 files changed, 33 insertions(+), 19 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 62a6b9c959498..2004c054ed1a0 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -24,20 +24,24 @@ properties:
 maxItems: 1
 
   clocks:
+minItems: 3
 items:
+  # isp0 and isp1
   - description: ISP clock
-  - description: ISP AXI clock clock
-  - description: ISP AXI clock  wrapper clock
-  - description: ISP AHB clock clock
-  - description: ISP AHB wrapper clock
+  - description: ISP AXI clock
+  - description: ISP AHB clock
+  # only for isp1
+  - description: ISP Pixel clock
 
   clock-names:
+minItems: 3
 items:
-  - const: clk_isp
-  - const: aclk_isp
-  - const: aclk_isp_wrap
-  - const: hclk_isp
-  - const: hclk_isp_wrap
+  # isp0 and isp1
+  - const: isp
+  - const: aclk
+  - const: hclk
+  # only for isp1
+  - const: pclk_isp
 
   iommus:
 maxItems: 1
@@ -116,6 +120,20 @@ required:
   - power-domains
   - ports
 
+if:
+  properties:
+compatible:
+  contains:
+const: rockchip,rk3399-cif-isp
+then:
+  properties:
+clocks:
+  minItems: 3
+  maxItems: 4
+clock-names:
+  minItems: 3
+  maxItems: 4
+
 additionalProperties: false
 
 examples:
@@ -134,11 +152,9 @@ examples:
 reg = <0x0 0xff91 0x0 0x4000>;
 interrupts = ;
 clocks = < SCLK_ISP0>,
- < ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
- < HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
-clock-names = "clk_isp",
-  "aclk_isp", "aclk_isp_wrap",
-  "hclk_isp", "hclk_isp_wrap";
+ < ACLK_ISP0_WRAPPER>,
+ < HCLK_ISP0_WRAPPER>;
+clock-names = "isp", "aclk", "hclk";
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c 
b/drivers/staging/media/rkisp1/rkisp1-dev.c
index 91584695804bb..90d6543465562 100644
--- a/drivers/staging/media/rkisp1/rkisp1-dev.c
+++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
@@ -405,11 +405,9 @@ static irqreturn_t rkisp1_isr(int irq, void *ctx)
 }
 
 static const char * const rk3399_isp_clks[] = {
-   "clk_isp",
-   "aclk_isp",
-   "hclk_isp",
-   "aclk_isp_wrap",
-   "hclk_isp_wrap",
+   "isp",
+   "aclk",
+   "hclk",
 };
 
 static const struct rkisp1_match_data rk3399_isp_clk_data = {
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 8/9] arm64: dts: rockchip: add isp0 node for rk3399

2020-10-20 Thread Helen Koike
From: Shunqian Zheng 

RK3399 has two ISPs, but only isp0 was tested.
Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---

Changes in v6:
- Add status = "disabled" in the isp0 node
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 26 
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index ada724b12f014..af5f8e2c5e64d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1723,6 +1723,32 @@ vopb_mmu: iommu@ff903f00 {
status = "disabled";
};
 
+   isp0: isp0@ff91 {
+   compatible = "rockchip,rk3399-cif-isp";
+   reg = <0x0 0xff91 0x0 0x4000>;
+   interrupts = ;
+   clocks = < SCLK_ISP0>,
+< ACLK_ISP0_WRAPPER>,
+< HCLK_ISP0_WRAPPER>;
+   clock-names = "isp", "aclk", "hclk";
+   iommus = <_mmu>;
+   phys = <_dphy_rx0>;
+   phy-names = "dphy";
+   power-domains = < RK3399_PD_ISP0>;
+   status = "disabled";
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+   };
+   };
+
isp0_mmu: iommu@ff914000 {
compatible = "rockchip,iommu";
reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 4/9] media: staging: dt-bindings: rkisp1: drop parent unit address

2020-10-20 Thread Helen Koike
Fix the following error found with make ARCH=arm64 dt_binding_check:

Documentation/devicetree/bindings/media/rockchip-isp1.example.dts:24.27-101.11:
Warning (unit_address_vs_reg): /example-0/parent@0: node has a unit name, but 
no reg or ranges property

Reported-by: Johan Jonker 
Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
Reviewed-by: Tomasz Figa 
---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 79ebacab83cf3..62a6b9c959498 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -125,7 +125,7 @@ examples:
 #include 
 #include 
 
-parent0: parent@0 {
+parent0: parent {
 #address-cells = <2>;
 #size-cells = <2>;
 
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 9/9] arm64: dts: rockchip: add isp and sensors for Scarlet

2020-10-20 Thread Helen Koike
From: Eddie Cai 

Enable ISP and camera sensor ov2685 and ov5695 for Scarlet Chromebook

Verified with:
make ARCH=arm64 dtbs_check

Signed-off-by: Shunqian Zheng 
Signed-off-by: Eddie Cai 
Signed-off-by: Tomasz Figa 
Signed-off-by: Helen Koike 
Reviewed-by: Tomasz Figa 
---
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++
 1 file changed, 74 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
index 60cd1c18cd4e0..beee5fbb34437 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
@@ -296,6 +296,52 @@ camera:  {
 
/* 24M mclk is shared between world and user cameras */
pinctrl-0 = <_xfer _clkout1>;
+
+   /* Rear-facing camera */
+   wcam: camera@36 {
+   compatible = "ovti,ov5695";
+   reg = <0x36>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dvdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   reset-gpios = < 5 GPIO_ACTIVE_LOW>;
+
+   port {
+   wcam_out: endpoint {
+   remote-endpoint = <_in_wcam>;
+   data-lanes = <1 2>;
+   };
+   };
+   };
+
+   /* Front-facing camera */
+   ucam: camera@3c {
+   compatible = "ovti,ov2685";
+   reg = <0x3c>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   dvdd-supply = <_s0>;
+   reset-gpios = < 3 GPIO_ACTIVE_LOW>;
+
+   port {
+   ucam_out: endpoint {
+   remote-endpoint = <_in_ucam>;
+   data-lanes = <1>;
+   };
+   };
+   };
 };
 
 _dp {
@@ -353,10 +399,38 @@ _domains {
gpio1830-supply = <_s0>; /* APIO4_VDD;  4c 4d */
 };
 
+ {
+   status = "okay";
+
+   ports {
+   port@0 {
+   mipi_in_wcam: endpoint@0 {
+   reg = <0>;
+   remote-endpoint = <_out>;
+   data-lanes = <1 2>;
+   };
+
+   mipi_in_ucam: endpoint@1 {
+   reg = <1>;
+   remote-endpoint = <_out>;
+   data-lanes = <1>;
+   };
+   };
+   };
+};
+
+_mmu {
+   status = "okay";
+};
+
  {
sdmode-gpios = < 2 GPIO_ACTIVE_HIGH>;
 };
 
+_dphy_rx0 {
+   status = "okay";
+};
+
 _dsi {
status = "okay";
clock-master;
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 2/9] media: staging: dt-bindings: rkisp1: drop i2c unit address

2020-10-20 Thread Helen Koike
Add missing required items in Rockchip ISP1 dt-bindings example for
a complete i2c node.
Drop unit address to Fix error:
/example-0/parent/i2c@ff16: node has a unit name, but no reg or ranges 
property
Remove unecessary fields for the example.

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
Reviewed-by: Tomasz Figa 
---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index a77b6ec500c95..4c31cfaee2709 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -168,8 +168,7 @@ examples:
 };
 };
 
-i2c7: i2c@ff16 {
-clock-frequency = <40>;
+i2c7: i2c {
 #address-cells = <1>;
 #size-cells = <0>;
 
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 1/9] media: staging: dt-bindings: rkisp1: add missing required nodes

2020-10-20 Thread Helen Koike
Add missing required nodes in json-schema yaml file for
Rockchip ISP1 dt-bindings.

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
Reviewed-by: Tomasz Figa 
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 8 
 1 file changed, 8 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index af246b71eac6b..a77b6ec500c95 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -94,11 +94,19 @@ properties:
 
   remote-endpoint: true
 
+required:
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
 required:
+  - "#address-cells"
+  - "#size-cells"
   - port@0
 
 required:
   - compatible
+  - reg
   - interrupts
   - clocks
   - clock-names
-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

2020-10-20 Thread Helen Koike
Move the bindings out of drivers/staging and place them in
Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check
and make ARCH=arm64 dt_binding_check.

Tested by verifying images streamed from Scarlet Chromebook

Changes in v6:
- [PATCH v6 5/9] media: staging: rkisp1: remove unecessary clocks
  Define clocks in the top level, and use if/else schema to define how
  many for each compatible as sugested by Rob Herring on
  
https://patchwork.linuxtv.org/project/linux-media/patch/20200722155533.252844-6-helen.ko...@collabora.com/#122626
- [PATCH v6 8/9] arm64: dts: rockchip: add isp0 node for rk3399
  Add status = "disabled" in the isp0 node
- Added Reviewed-by tags from Tomasz Figa
- Added Acked-by tags from Rog Herring
- No changes for other patches in the serie.

Changes in v5:
- Drop unit addresses in dt-bindings example for simplification and fix
errors as suggested by Rob Herring in previous version
- Fix typos
- Re-write clock organization with if/then schema

Changes in v4:
- simplify clocks with "isp", "aclk" and "hclk" as suggested by
Robin Murphy on https://patchwork.kernel.org/patch/11475007/

Changes in v3:
- dropped accepted patches
- cleanup clocks
- fix "no reg" error in dt-bindings parent@0 example
- add linux-rockchip list in MAINTAINERS and reorder items
- add Scarlet sensors dt nodes to the series

Changes in v2:
Add patches modifying bindings, as sugested by Johan Jonker in v1,
before moving them out of staging.

Eddie Cai (1):
  arm64: dts: rockchip: add isp and sensors for Scarlet

Helen Koike (7):
  media: staging: dt-bindings: rkisp1: add missing required nodes
  media: staging: dt-bindings: rkisp1: drop i2c unit address
  media: staging: dt-bindings: rkisp1: re-order properties
  media: staging: dt-bindings: rkisp1: drop parent unit address
  media: staging: rkisp1: remove unecessary clocks
  dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging
  media: MAINTAINERS: rkisp1: add path to dt-bindings

Shunqian Zheng (1):
  arm64: dts: rockchip: add isp0 node for rk3399

 .../bindings/media/rockchip-isp1.yaml | 81 ---
 MAINTAINERS   |  2 +
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi  | 26 ++
 drivers/staging/media/rkisp1/rkisp1-dev.c |  8 +-
 5 files changed, 157 insertions(+), 34 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (81%)

-- 
2.28.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 8/9] arm64: dts: rockchip: add isp0 node for rk3399

2020-10-14 Thread Helen Koike
Thank you Tomasz and Robin for your comments,

On 10/14/20 1:43 PM, Tomasz Figa wrote:
> On Wed, Oct 14, 2020 at 6:27 PM Helen Koike  wrote:
>>
>> Hi Tomasz,
>>
>> On 9/26/20 10:00 AM, Tomasz Figa wrote:
>>> Hi Helen,
>>>
>>> On Wed, Jul 22, 2020 at 12:55:32PM -0300, Helen Koike wrote:
>>>> From: Shunqian Zheng 
>>>>
>>>> RK3399 has two ISPs, but only isp0 was tested.
>>>> Add isp0 node in rk3399 dtsi
>>>>
>>>> Verified with:
>>>> make ARCH=arm64 dtbs_check 
>>>> DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>>>
>>>> Signed-off-by: Shunqian Zheng 
>>>> Signed-off-by: Jacob Chen 
>>>> Signed-off-by: Helen Koike 
>>>>
>>>> ---
>>>>
>>>> V4:
>>>> - update clock names
>>>>
>>>> V3:
>>>> - clean up clocks
>>>>
>>>> V2:
>>>> - re-order power-domains property
>>>>
>>>> V1:
>>>> This patch was originally part of this patchset:
>>>>
>>>> https://patchwork.kernel.org/patch/10267431/
>>>>
>>>> The only difference is:
>>>> - add phy properties
>>>> - add ports
>>>> ---
>>>>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 25 
>>>>  1 file changed, 25 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
>>>> b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>> index dba9641947a3a..ed8ba75dbbce8 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>>> @@ -1721,6 +1721,31 @@ vopb_mmu: iommu@ff903f00 {
>>>>  status = "disabled";
>>>>  };
>>>>
>>>> +isp0: isp0@ff91 {
>>>> +compatible = "rockchip,rk3399-cif-isp";
>>>> +reg = <0x0 0xff91 0x0 0x4000>;
>>>> +interrupts = ;
>>>> +clocks = < SCLK_ISP0>,
>>>> + < ACLK_ISP0_WRAPPER>,
>>>> + < HCLK_ISP0_WRAPPER>;
>>>> +clock-names = "isp", "aclk", "hclk";
>>>> +iommus = <_mmu>;
>>>> +phys = <_dphy_rx0>;
>>>> +phy-names = "dphy";
>>>> +power-domains = < RK3399_PD_ISP0>;
>>>
>>> Should this have status = "disabled" too? The mipi_dphy_rx0 node is
>>> disabled by default too, so in the default configuration the driver
>>> would always fail to probe.
>>
>> I'm thinking what is the overall guideline here.
>> Since isp and mipi_dphy are always present in the rk3399, shouldn't they 
>> always be enabled?
>> Or since they are only useful if a sensor is present, we should let the dts 
>> of the board to
>> enable it?
> 
> I don't have a strong opinion. I'm fine with enabling both by default
> as well, as it shouldn't hurt.
> 
> That said, I recall some alternative CIF IP block being present on
> this SoC as well (and patches posted recently), which AFAIR can't be
> activated at the same time as the ISP, so perhaps both of the
> alternatives should be disabled by default?
> 
> Best regards,
> Tomasz
> 

Based on these two last emails, I think it make sense to disable them by 
default.

I'll just wait for feedback on patch 5/9 to submit an updated version.

Thanks
Helen
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 5/9] media: staging: rkisp1: remove unecessary clocks

2020-10-14 Thread Helen Koike
Hi Rob,

Thnaks for your reply.

On 9/22/20 11:24 AM, Rob Herring wrote:
> On Wed, Jul 22, 2020 at 9:56 AM Helen Koike  wrote:
>>
>> aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
>> hclk_isp, thus we can remove parents from the list.
>>
>> Also, for the isp0, we only need the ISP clock, ACLK and HCLK.
>> In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG
>> clock for RK3288.
>>
>> So with the goal to cleanup the dt-bindings and remove it from staging,
>> simplify clock names to isp, aclk and hclk.
>>
>> Assigned clocks are meant to refer to the full path in the clock tree,
>> i.e. the leaf in the tree.
>> For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK)
>> is aclk_isp0_wrapper.
>>
>> For reference, this is the isp clock topology on RK3399:
>>
>>  xin24m
>> pll_npll
>>npll
>>   clk_isp1
>>   clk_isp0
>> pll_cpll
>>cpll
>>   aclk_isp1
>>  aclk_isp1_noc
>>  hclk_isp1
>> aclk_isp1_wrapper
>> hclk_isp1_noc
>>   aclk_isp0
>>  hclk_isp1_wrapper
>>      aclk_isp0_wrapper
>>  aclk_isp0_noc
>>  hclk_isp0
>> hclk_isp0_wrapper
>> hclk_isp0_noc
>>  pclkin_isp1_wrapper
>>
>> Signed-off-by: Helen Koike 
>>
>> ---
>> Changes in V5:
>> - Use if/then schema as suggested by Rob Herring on
>> https://patchwork.linuxtv.org/project/linux-media/patch/20200702191322.2639681-6-helen.ko...@collabora.com/#119729
>>
>> Changes in V4:
>> - update binding according to suggestion by Robin Murphy
>> on https://patchwork.kernel.org/patch/11475007/
>>
>> Changes in V3:
>> - this is a new patch in the series
>> ---
>>  .../bindings/media/rockchip-isp1.yaml | 50 ---
>>  drivers/staging/media/rkisp1/rkisp1-dev.c |  8 ++-
>>  2 files changed, 36 insertions(+), 22 deletions(-)
>>
>> diff --git 
>> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>  
>> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>> index 62a6b9c959498..23c677d15037a 100644
>> --- 
>> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>> +++ 
>> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>> @@ -24,20 +24,10 @@ properties:
>>  maxItems: 1
>>
>>clocks:
>> -items:
>> -  - description: ISP clock
>> -  - description: ISP AXI clock clock
>> -  - description: ISP AXI clock  wrapper clock
>> -  - description: ISP AHB clock clock
>> -  - description: ISP AHB wrapper clock
>> +minItems: 3
> 
> You need maxItems here too or it will always be 3.
> 
>>
>>clock-names:
>> -items:
>> -  - const: clk_isp
>> -  - const: aclk_isp
>> -  - const: aclk_isp_wrap
>> -  - const: hclk_isp
>> -  - const: hclk_isp_wrap
>> +minItems: 3
>>
>>iommus:
>>  maxItems: 1
>> @@ -116,6 +106,34 @@ required:
>>- power-domains
>>- ports
>>
>> +if:
>> +  properties:
>> +compatible:
>> +  contains:
>> +const: rockchip,rk3399-cif-isp
>> +then:
>> +  properties:
>> +clocks:
>> +  maxItems: 4
>> +  minItems: 3
> 
> For a single compatible you shouldn't really have a variable number of clocks.

I'm not entirely sure how to make this separation, since isp0 and isp1 (not yet 
supported)
would use the same compatible.
Unless if we separate in two compatibles, but maybe this is an overhead just 
for an extra clock.
What do you think?

> 
>> +  items:
>> +# isp0 and isp1
>> +- description: ISP clock
>> +- description: ISP AXI clock
>> +- description: ISP AHB clock
>> +# only for isp1
>> +- description: ISP Pixel clock
>> +clock-names:
>> +  maxItems: 4
>> +  minItems: 3
>> +  items:
>> +# isp0 and isp1
>> +- const: isp
>> +- const: aclk
>> +- const: hclk
>> +# only for isp1
>> +- const: pclk_isp
> 
> Don't you need an 'else' clause. For not rockchip,rk3399-cif-isp,
> there's no definition of what clocks there are.

There is only one compatible defined for now, rk3288 will be added later.
The idea to add if/then is to make it easier to add rk3288:

https://patchwork.kernel.org/project/linux-media/patch/20200406073017.19462-4-karthik.podu...@gmail.com/

Regards,
Helen

> 
> Rob
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 8/9] arm64: dts: rockchip: add isp0 node for rk3399

2020-10-14 Thread Helen Koike
Hi Tomasz,

On 9/26/20 10:00 AM, Tomasz Figa wrote:
> Hi Helen,
> 
> On Wed, Jul 22, 2020 at 12:55:32PM -0300, Helen Koike wrote:
>> From: Shunqian Zheng 
>>
>> RK3399 has two ISPs, but only isp0 was tested.
>> Add isp0 node in rk3399 dtsi
>>
>> Verified with:
>> make ARCH=arm64 dtbs_check 
>> DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>
>> Signed-off-by: Shunqian Zheng 
>> Signed-off-by: Jacob Chen 
>> Signed-off-by: Helen Koike 
>>
>> ---
>>
>> V4:
>> - update clock names
>>
>> V3:
>> - clean up clocks
>>
>> V2:
>> - re-order power-domains property
>>
>> V1:
>> This patch was originally part of this patchset:
>>
>> https://patchwork.kernel.org/patch/10267431/
>>
>> The only difference is:
>> - add phy properties
>> - add ports
>> ---
>>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 25 
>>  1 file changed, 25 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
>> b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> index dba9641947a3a..ed8ba75dbbce8 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> @@ -1721,6 +1721,31 @@ vopb_mmu: iommu@ff903f00 {
>>  status = "disabled";
>>  };
>>  
>> +isp0: isp0@ff91 {
>> +compatible = "rockchip,rk3399-cif-isp";
>> +reg = <0x0 0xff91 0x0 0x4000>;
>> +interrupts = ;
>> +clocks = < SCLK_ISP0>,
>> + < ACLK_ISP0_WRAPPER>,
>> + < HCLK_ISP0_WRAPPER>;
>> +clock-names = "isp", "aclk", "hclk";
>> +iommus = <_mmu>;
>> +phys = <_dphy_rx0>;
>> +phy-names = "dphy";
>> +power-domains = < RK3399_PD_ISP0>;
> 
> Should this have status = "disabled" too? The mipi_dphy_rx0 node is
> disabled by default too, so in the default configuration the driver
> would always fail to probe.

I'm thinking what is the overall guideline here.
Since isp and mipi_dphy are always present in the rk3399, shouldn't they always 
be enabled?
Or since they are only useful if a sensor is present, we should let the dts of 
the board to
enable it?

Thanks
Helen

> 
> Best regards,
> Tomasz
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 9/9] arm64: dts: rockchip: add isp and sensors for Scarlet

2020-07-22 Thread Helen Koike
From: Eddie Cai 

Enable ISP and camera sensor ov2685 and ov5695 for Scarlet Chromebook

Verified with:
make ARCH=arm64 dtbs_check

Signed-off-by: Shunqian Zheng 
Signed-off-by: Eddie Cai 
Signed-off-by: Tomasz Figa 
Signed-off-by: Helen Koike 
---

This patch is based on:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/527854

Changes in V3:
- This patch was first submitted stand alone at
https://lore.kernel.org/patchwork/patch/1223736/
I'm including in this patch series without changes
---
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++
 1 file changed, 74 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
index 4373ed732af76..ae08205aa8e24 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
@@ -296,6 +296,52 @@ camera:  {
 
/* 24M mclk is shared between world and user cameras */
pinctrl-0 = <_xfer _clkout1>;
+
+   /* Rear-facing camera */
+   wcam: camera@36 {
+   compatible = "ovti,ov5695";
+   reg = <0x36>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dvdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   reset-gpios = < 5 GPIO_ACTIVE_LOW>;
+
+   port {
+   wcam_out: endpoint {
+   remote-endpoint = <_in_wcam>;
+   data-lanes = <1 2>;
+   };
+   };
+   };
+
+   /* Front-facing camera */
+   ucam: camera@3c {
+   compatible = "ovti,ov2685";
+   reg = <0x3c>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   dvdd-supply = <_s0>;
+   reset-gpios = < 3 GPIO_ACTIVE_LOW>;
+
+   port {
+   ucam_out: endpoint {
+   remote-endpoint = <_in_ucam>;
+   data-lanes = <1>;
+   };
+   };
+   };
 };
 
 _dp {
@@ -353,10 +399,38 @@ _domains {
gpio1830-supply = <_s0>; /* APIO4_VDD;  4c 4d */
 };
 
+ {
+   status = "okay";
+
+   ports {
+   port@0 {
+   mipi_in_wcam: endpoint@0 {
+   reg = <0>;
+   remote-endpoint = <_out>;
+   data-lanes = <1 2>;
+   };
+
+   mipi_in_ucam: endpoint@1 {
+   reg = <1>;
+   remote-endpoint = <_out>;
+   data-lanes = <1>;
+   };
+   };
+   };
+};
+
+_mmu {
+   status = "okay";
+};
+
  {
sdmode-gpios = < 2 GPIO_ACTIVE_HIGH>;
 };
 
+_dphy_rx0 {
+   status = "okay";
+};
+
 _dsi {
status = "okay";
clock-master;
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 8/9] arm64: dts: rockchip: add isp0 node for rk3399

2020-07-22 Thread Helen Koike
From: Shunqian Zheng 

RK3399 has two ISPs, but only isp0 was tested.
Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---

V4:
- update clock names

V3:
- clean up clocks

V2:
- re-order power-domains property

V1:
This patch was originally part of this patchset:

https://patchwork.kernel.org/patch/10267431/

The only difference is:
- add phy properties
- add ports
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 25 
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index dba9641947a3a..ed8ba75dbbce8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1721,6 +1721,31 @@ vopb_mmu: iommu@ff903f00 {
status = "disabled";
};
 
+   isp0: isp0@ff91 {
+   compatible = "rockchip,rk3399-cif-isp";
+   reg = <0x0 0xff91 0x0 0x4000>;
+   interrupts = ;
+   clocks = < SCLK_ISP0>,
+< ACLK_ISP0_WRAPPER>,
+< HCLK_ISP0_WRAPPER>;
+   clock-names = "isp", "aclk", "hclk";
+   iommus = <_mmu>;
+   phys = <_dphy_rx0>;
+   phy-names = "dphy";
+   power-domains = < RK3399_PD_ISP0>;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+   };
+   };
+
isp0_mmu: iommu@ff914000 {
compatible = "rockchip,iommu";
reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 7/9] media: MAINTAINERS: rkisp1: add path to dt-bindings

2020-07-22 Thread Helen Koike
The Rockchip ISP bindings was moved out of staging.
Update MAINTAINERS file with the new path.

Fields sorted according to output of
./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS
--order

Signed-off-by: Helen Koike 

---

V3:
- Add line:
L: linux-rockc...@lists.infradead.org
- Re-order:
F: drivers/staging/media/rkisp1/

V2:
- This is a new patch in the series
---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5392f00cec46d..bfd947ea5c920 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14717,7 +14717,9 @@ F:  include/linux/hid-roccat*
 ROCKCHIP ISP V1 DRIVER
 M: Helen Koike 
 L: linux-me...@vger.kernel.org
+L: linux-rockc...@lists.infradead.org
 S: Maintained
+F: Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 F: drivers/staging/media/rkisp1/
 
 ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 6/9] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-07-22 Thread Helen Koike
Move rkisp1 bindings to Documentation/devicetree/bindings/media

Verified with:
make ARCH=arm64 dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 b/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
similarity index 100%
rename from 
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
rename to Documentation/devicetree/bindings/media/rockchip-isp1.yaml
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 2/9] media: staging: dt-bindings: rkisp1: drop i2c unit address

2020-07-22 Thread Helen Koike
Add missing required items in Rockchip ISP1 dt-bindings example for
a complete i2c node.
Drop unit address to Fix error:
/example-0/parent/i2c@ff16: node has a unit name, but no reg or ranges 
property
Remove unecessary fields for the example.

Signed-off-by: Helen Koike 
---

Changes in v5:
- Patch re-written to drop unity address instead of completing i2c node

Changes in v2:
- new patch in the series

tmp: i2c drop fields
---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index a77b6ec500c95..4c31cfaee2709 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -168,8 +168,7 @@ examples:
 };
 };
 
-i2c7: i2c@ff16 {
-clock-frequency = <40>;
+i2c7: i2c {
 #address-cells = <1>;
 #size-cells = <0>;
 
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 1/9] media: staging: dt-bindings: rkisp1: add missing required nodes

2020-07-22 Thread Helen Koike
Add missing required nodes in json-schema yaml file for
Rockchip ISP1 dt-bindings.

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
---

Changes in v2:
- New patch in the series
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 8 
 1 file changed, 8 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index af246b71eac6b..a77b6ec500c95 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -94,11 +94,19 @@ properties:
 
   remote-endpoint: true
 
+required:
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
 required:
+  - "#address-cells"
+  - "#size-cells"
   - port@0
 
 required:
   - compatible
+  - reg
   - interrupts
   - clocks
   - clock-names
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 5/9] media: staging: rkisp1: remove unecessary clocks

2020-07-22 Thread Helen Koike
aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
hclk_isp, thus we can remove parents from the list.

Also, for the isp0, we only need the ISP clock, ACLK and HCLK.
In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG
clock for RK3288.

So with the goal to cleanup the dt-bindings and remove it from staging,
simplify clock names to isp, aclk and hclk.

Assigned clocks are meant to refer to the full path in the clock tree,
i.e. the leaf in the tree.
For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK)
is aclk_isp0_wrapper.

For reference, this is the isp clock topology on RK3399:

 xin24m
pll_npll
   npll
  clk_isp1
  clk_isp0
pll_cpll
   cpll
  aclk_isp1
 aclk_isp1_noc
 hclk_isp1
aclk_isp1_wrapper
hclk_isp1_noc
  aclk_isp0
 hclk_isp1_wrapper
 aclk_isp0_wrapper
 aclk_isp0_noc
 hclk_isp0
hclk_isp0_wrapper
hclk_isp0_noc
 pclkin_isp1_wrapper

Signed-off-by: Helen Koike 

---
Changes in V5:
- Use if/then schema as suggested by Rob Herring on
https://patchwork.linuxtv.org/project/linux-media/patch/20200702191322.2639681-6-helen.ko...@collabora.com/#119729

Changes in V4:
- update binding according to suggestion by Robin Murphy
on https://patchwork.kernel.org/patch/11475007/

Changes in V3:
- this is a new patch in the series
---
 .../bindings/media/rockchip-isp1.yaml | 50 ---
 drivers/staging/media/rkisp1/rkisp1-dev.c |  8 ++-
 2 files changed, 36 insertions(+), 22 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 62a6b9c959498..23c677d15037a 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -24,20 +24,10 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: ISP clock
-  - description: ISP AXI clock clock
-  - description: ISP AXI clock  wrapper clock
-  - description: ISP AHB clock clock
-  - description: ISP AHB wrapper clock
+minItems: 3
 
   clock-names:
-items:
-  - const: clk_isp
-  - const: aclk_isp
-  - const: aclk_isp_wrap
-  - const: hclk_isp
-  - const: hclk_isp_wrap
+minItems: 3
 
   iommus:
 maxItems: 1
@@ -116,6 +106,34 @@ required:
   - power-domains
   - ports
 
+if:
+  properties:
+compatible:
+  contains:
+const: rockchip,rk3399-cif-isp
+then:
+  properties:
+clocks:
+  maxItems: 4
+  minItems: 3
+  items:
+# isp0 and isp1
+- description: ISP clock
+- description: ISP AXI clock
+- description: ISP AHB clock
+# only for isp1
+- description: ISP Pixel clock
+clock-names:
+  maxItems: 4
+  minItems: 3
+  items:
+# isp0 and isp1
+- const: isp
+- const: aclk
+- const: hclk
+# only for isp1
+- const: pclk_isp
+
 additionalProperties: false
 
 examples:
@@ -134,11 +152,9 @@ examples:
 reg = <0x0 0xff91 0x0 0x4000>;
 interrupts = ;
 clocks = < SCLK_ISP0>,
- < ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
- < HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
-clock-names = "clk_isp",
-  "aclk_isp", "aclk_isp_wrap",
-  "hclk_isp", "hclk_isp_wrap";
+ < ACLK_ISP0_WRAPPER>,
+ < HCLK_ISP0_WRAPPER>;
+clock-names = "isp", "aclk", "hclk";
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c 
b/drivers/staging/media/rkisp1/rkisp1-dev.c
index a0eb8f08708b9..1ebf10a6f188c 100644
--- a/drivers/staging/media/rkisp1/rkisp1-dev.c
+++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
@@ -406,11 +406,9 @@ static irqreturn_t rkisp1_isr(int irq, void *ctx)
 }
 
 static const char * const rk3399_isp_clks[] = {
-   "clk_isp",
-   "aclk_isp",
-   "hclk_isp",
-   "aclk_isp_wrap",
-   "hclk_isp_wrap",
+   "isp",
+   "aclk",
+   "hclk",
 };
 
 static const struct rkisp1_match_data rk3399_isp_clk_data = {
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 4/9] media: staging: dt-bindings: rkisp1: drop parent unit address

2020-07-22 Thread Helen Koike
Fix the following error found with make ARCH=arm64 dt_binding_check:

Documentation/devicetree/bindings/media/rockchip-isp1.example.dts:24.27-101.11:
Warning (unit_address_vs_reg): /example-0/parent@0: node has a unit name, but 
no reg or ranges property

Reported-by: Johan Jonker 
Signed-off-by: Helen Koike 
---
V5:
- Patch re-written to drop the unit address instead of adding reg

V3:
- this is a new patch in the series
---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 79ebacab83cf3..62a6b9c959498 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -125,7 +125,7 @@ examples:
 #include 
 #include 
 
-parent0: parent@0 {
+parent0: parent {
 #address-cells = <2>;
 #size-cells = <2>;
 
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 3/9] media: staging: dt-bindings: rkisp1: re-order properties

2020-07-22 Thread Helen Koike
Organize properties order in dt-bindings to move it out of staging.

On top: compatible, reg and interrupts.
Then alphabetical order, then properties starting with '#'.

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
---
V5:
- s/binbings/bindings

V2:
- this is a new patch in the series
---
 .../bindings/media/rockchip-isp1.yaml | 32 +--
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 4c31cfaee2709..79ebacab83cf3 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -23,19 +23,6 @@ properties:
   interrupts:
 maxItems: 1
 
-  iommus:
-maxItems: 1
-
-  power-domains:
-maxItems: 1
-
-  phys:
-maxItems: 1
-description: phandle for the PHY port
-
-  phy-names:
-const: dphy
-
   clocks:
 items:
   - description: ISP clock
@@ -52,6 +39,19 @@ properties:
   - const: hclk_isp
   - const: hclk_isp_wrap
 
+  iommus:
+maxItems: 1
+
+  phys:
+maxItems: 1
+description: phandle for the PHY port
+
+  phy-names:
+const: dphy
+
+  power-domains:
+maxItems: 1
+
   # See ./video-interfaces.txt for details
   ports:
 type: object
@@ -110,10 +110,10 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - power-domains
   - iommus
   - phys
   - phy-names
+  - power-domains
   - ports
 
 additionalProperties: false
@@ -139,19 +139,19 @@ examples:
 clock-names = "clk_isp",
   "aclk_isp", "aclk_isp_wrap",
   "hclk_isp", "hclk_isp_wrap";
-power-domains = < RK3399_PD_ISP0>;
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
+power-domains = < RK3399_PD_ISP0>;
 
 ports {
 #address-cells = <1>;
 #size-cells = <0>;
 
 port@0 {
+reg = <0>;
 #address-cells = <1>;
 #size-cells = <0>;
-reg = <0>;
 
 mipi_in_wcam: endpoint@0 {
 reg = <0>;
-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

2020-07-22 Thread Helen Koike
Move the bindings out of drivers/staging and place them in
Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check
and make ARCH=arm64 dt_binding_check.

Tested by verifying images streamed from Scarlet Chromebook

Changes in v5:
- Drop unit addresses in dt-bindings example for simplification and fix
errors as suggested by Rob Herring in previous version
- Fix typos
- Re-write clock organization with if/then schema

Changes in v4:
- simplify clocks with "isp", "aclk" and "hclk" as suggested by
Robin Murphy on https://patchwork.kernel.org/patch/11475007/

Changes in v3:
- dropped accepted patches
- cleanup clocks
- fix "no reg" error in dt-bindings parent@0 example
- add linux-rockchip list in MAINTAINERS and reorder items
- add Scarlet sensors dt nodes to the series

Changes in v2:
Add patches modifying bindings, as sugested by Johan Jonker in v1,
before moving them out of staging.

Eddie Cai (1):
  arm64: dts: rockchip: add isp and sensors for Scarlet

Helen Koike (7):
  media: staging: dt-bindings: rkisp1: add missing required nodes
  media: staging: dt-bindings: rkisp1: drop i2c unit address
  media: staging: dt-bindings: rkisp1: re-order properties
  media: staging: dt-bindings: rkisp1: drop parent unit address
  media: staging: rkisp1: remove unecessary clocks
  dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging
  media: MAINTAINERS: rkisp1: add path to dt-bindings

Shunqian Zheng (1):
  arm64: dts: rockchip: add isp0 node for rk3399

 .../bindings/media/rockchip-isp1.yaml | 81 ---
 MAINTAINERS   |  2 +
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi  | 25 ++
 drivers/staging/media/rkisp1/rkisp1-dev.c |  8 +-
 5 files changed, 156 insertions(+), 34 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (80%)

-- 
2.28.0.rc1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v4 5/9] media: staging: rkisp1: remove unecessary clocks

2020-07-17 Thread Helen Koike
Hi Rob,

Thanks for your review.

On 7/17/20 2:49 PM, Rob Herring wrote:
> On Thu, Jul 2, 2020 at 1:13 PM Helen Koike  wrote:
>>
>> aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
>> hclk_isp, thus we can remove parents from the list.
> 
> But it looks like it is the wrap clocks you are removing.

>From this binding yes, but the idea is to add in the dt wherever clock
responsible for the full ACLK path for instance.
In the example below, clock aclk_isp is ACLK_ISP0_WRAPPER.
Does this make sense?

> 
>>
>> Also, for the isp0, we only need the ISP clock, ACLK and HCLK.
>> In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG
>> clock for RK3288.
>>
>> So with the goal to cleanup the dt-bindings and remove it from staging,
>> simplify clock names to isp, aclk and hclk.
>>
>> For reference, this is the isp clock topology on RK3399:
>>
>>  xin24m
>> pll_npll
>>npll
>>   clk_isp1
>>   clk_isp0
>> pll_cpll
>>cpll
>>   aclk_isp1
>>  aclk_isp1_noc
>>  hclk_isp1
>> aclk_isp1_wrapper
>> hclk_isp1_noc
>>   aclk_isp0
>>  hclk_isp1_wrapper
>>  aclk_isp0_wrapper
>>  aclk_isp0_noc
>>  hclk_isp0
>> hclk_isp0_wrapper
>> hclk_isp0_noc
>>  pclkin_isp1_wrapper
>>
>> Signed-off-by: Helen Koike 
>>
>> ---
>>
>> Changes in V4:
>> - update binding according to suggestion by Robin Murphy
>> on https://patchwork.kernel.org/patch/11475007/
>>
>> Changes in V3:
>> - this is a new patch in the series
>> ---
>>  .../bindings/media/rockchip-isp1.yaml | 30 +--
>>  drivers/staging/media/rkisp1/rkisp1-dev.c |  8 ++---
>>  2 files changed, 17 insertions(+), 21 deletions(-)
>>
>> diff --git 
>> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>>  
>> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>> index 4d111ef2e89c7..f10c53d008748 100644
>> --- 
>> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>> +++ 
>> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>> @@ -24,20 +24,20 @@ properties:
>>  maxItems: 1
>>
>>clocks:
>> -items:
>> -  - description: ISP clock
>> -  - description: ISP AXI clock clock
>> -  - description: ISP AXI clock  wrapper clock
>> -  - description: ISP AHB clock clock
>> -  - description: ISP AHB wrapper clock
> 
> This is the correct way to describe multiple clocks.

The idea was to prepare for rk3288 and rk3399 isp1, as suggested here 
https://patchwork.kernel.org/patch/11475007/#23462085

Or should we do:

clocks:
  oneOf:
# rk3288 clocks
- items:
  - description: ISP clock
  - description: ISP AXI clock
  - description: ISP AHB clock
  - description: ISP Pixel clock
  - description: ISP JPEG source clock
# rk3399 isp0 clocks
- items:
  - description: ISP clock
  - description: ISP AXI clock
  - description: ISP AHB clock
# rk3399 isp1 clocks
- items:
  - description: ISP clock
  - description: ISP AXI clock
  - description: ISP AHB clock
  - description: ISP Pixel clock

?


> 
>> +maxItems: 5
> 
> Now the 4th and 5th clock are undefined.
> 
>> +minItems: 3
>> +description:
>> +  ISP clock
>> +  ISP AXI clock
>> +  ISP AHB clock
>>
>>clock-names:
>> +maxItems: 5
> 
> This should not be more than the number of entries in 'items'.
> 

If we follow what I wrote above, should we have:

clock-names:
  oneOf:
# rk3288 clocks
- items:
  - const: clk_isp
  - const: aclk_isp
  - const: hclk_isp
  - const: pclk_isp_in
  - const: sclk_isp_jpe
# rk3399 isp0 clocks
- items:
  - const: clk_isp
  - const: aclk_isp
  - const: hclk_isp
# rk3399 isp1 clocks
- items:
  - const: clk_isp
  - const: aclk_isp
  - const: hclk_isp
  - const: pclk_isp

?

Thanks
Helen

>> +minItems: 3
>>  items:
>> -  - const: clk_isp
>> -  - const: aclk_isp
>> -  - const: aclk_isp_wrap
>> -  - const: hclk_isp
>> -  - const: hclk_isp_wrap
>> +  - const: isp
>> +   

[PATCH v4 9/9] arm64: dts: rockchip: add isp and sensors for Scarlet

2020-07-02 Thread Helen Koike
From: Eddie Cai 

Enable ISP and camera sensor ov2685 and ov5695 for Scarlet Chromebook

Verified with:
make ARCH=arm64 dtbs_check

Signed-off-by: Shunqian Zheng 
Signed-off-by: Eddie Cai 
Signed-off-by: Tomasz Figa 
Signed-off-by: Helen Koike 
---

This patch is based on:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/527854

Changes in V3:
- This patch was first submitted stand alone at
https://lore.kernel.org/patchwork/patch/1223736/
I'm including in this patch series without changes
---
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++
 1 file changed, 74 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
index 4373ed732af76..ae08205aa8e24 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
@@ -296,6 +296,52 @@ camera:  {
 
/* 24M mclk is shared between world and user cameras */
pinctrl-0 = <_xfer _clkout1>;
+
+   /* Rear-facing camera */
+   wcam: camera@36 {
+   compatible = "ovti,ov5695";
+   reg = <0x36>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dvdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   reset-gpios = < 5 GPIO_ACTIVE_LOW>;
+
+   port {
+   wcam_out: endpoint {
+   remote-endpoint = <_in_wcam>;
+   data-lanes = <1 2>;
+   };
+   };
+   };
+
+   /* Front-facing camera */
+   ucam: camera@3c {
+   compatible = "ovti,ov2685";
+   reg = <0x3c>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   dvdd-supply = <_s0>;
+   reset-gpios = < 3 GPIO_ACTIVE_LOW>;
+
+   port {
+   ucam_out: endpoint {
+   remote-endpoint = <_in_ucam>;
+   data-lanes = <1>;
+   };
+   };
+   };
 };
 
 _dp {
@@ -353,10 +399,38 @@ _domains {
gpio1830-supply = <_s0>; /* APIO4_VDD;  4c 4d */
 };
 
+ {
+   status = "okay";
+
+   ports {
+   port@0 {
+   mipi_in_wcam: endpoint@0 {
+   reg = <0>;
+   remote-endpoint = <_out>;
+   data-lanes = <1 2>;
+   };
+
+   mipi_in_ucam: endpoint@1 {
+   reg = <1>;
+   remote-endpoint = <_out>;
+   data-lanes = <1>;
+   };
+   };
+   };
+};
+
+_mmu {
+   status = "okay";
+};
+
  {
sdmode-gpios = < 2 GPIO_ACTIVE_HIGH>;
 };
 
+_dphy_rx0 {
+   status = "okay";
+};
+
 _dsi {
status = "okay";
clock-master;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 8/9] arm64: dts: rockchip: add isp0 node for rk3399

2020-07-02 Thread Helen Koike
From: Shunqian Zheng 

RK3399 has two ISPs, but only isp0 was tested.
Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---

V4:
- update clock names

V3:
- clean up clocks

V2:
- re-order power-domains property

V1:
This patch was originally part of this patchset:

https://patchwork.kernel.org/patch/10267431/

The only difference is:
- add phy properties
- add ports
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 25 
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index dba9641947a3a..ed8ba75dbbce8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1721,6 +1721,31 @@ vopb_mmu: iommu@ff903f00 {
status = "disabled";
};
 
+   isp0: isp0@ff91 {
+   compatible = "rockchip,rk3399-cif-isp";
+   reg = <0x0 0xff91 0x0 0x4000>;
+   interrupts = ;
+   clocks = < SCLK_ISP0>,
+< ACLK_ISP0_WRAPPER>,
+< HCLK_ISP0_WRAPPER>;
+   clock-names = "isp", "aclk", "hclk";
+   iommus = <_mmu>;
+   phys = <_dphy_rx0>;
+   phy-names = "dphy";
+   power-domains = < RK3399_PD_ISP0>;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+   };
+   };
+
isp0_mmu: iommu@ff914000 {
compatible = "rockchip,iommu";
reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 7/9] media: MAINTAINERS: rkisp1: add path to dt-bindings

2020-07-02 Thread Helen Koike
The Rockchip ISP bindings was moved out of staging.
Update MAINTAINERS file with the new path.

Fields sorted according to output of
./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS
--order

Signed-off-by: Helen Koike 

---

V3:
- Add line:
L: linux-rockc...@lists.infradead.org
- Re-order:
F: drivers/staging/media/rkisp1/

V2:
- This is a new patch in the series
---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 634d2c3d621aa..d7141cf17072f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14679,7 +14679,9 @@ F:  include/linux/hid-roccat*
 ROCKCHIP ISP V1 DRIVER
 M: Helen Koike 
 L: linux-me...@vger.kernel.org
+L: linux-rockc...@lists.infradead.org
 S: Maintained
+F: Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 F: drivers/staging/media/rkisp1/
 
 ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 5/9] media: staging: rkisp1: remove unecessary clocks

2020-07-02 Thread Helen Koike
aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
hclk_isp, thus we can remove parents from the list.

Also, for the isp0, we only need the ISP clock, ACLK and HCLK.
In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG
clock for RK3288.

So with the goal to cleanup the dt-bindings and remove it from staging,
simplify clock names to isp, aclk and hclk.

For reference, this is the isp clock topology on RK3399:

 xin24m
pll_npll
   npll
  clk_isp1
  clk_isp0
pll_cpll
   cpll
  aclk_isp1
 aclk_isp1_noc
 hclk_isp1
aclk_isp1_wrapper
hclk_isp1_noc
  aclk_isp0
 hclk_isp1_wrapper
 aclk_isp0_wrapper
 aclk_isp0_noc
 hclk_isp0
hclk_isp0_wrapper
hclk_isp0_noc
 pclkin_isp1_wrapper

Signed-off-by: Helen Koike 

---

Changes in V4:
- update binding according to suggestion by Robin Murphy
on https://patchwork.kernel.org/patch/11475007/

Changes in V3:
- this is a new patch in the series
---
 .../bindings/media/rockchip-isp1.yaml | 30 +--
 drivers/staging/media/rkisp1/rkisp1-dev.c |  8 ++---
 2 files changed, 17 insertions(+), 21 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 4d111ef2e89c7..f10c53d008748 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -24,20 +24,20 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: ISP clock
-  - description: ISP AXI clock clock
-  - description: ISP AXI clock  wrapper clock
-  - description: ISP AHB clock clock
-  - description: ISP AHB wrapper clock
+maxItems: 5
+minItems: 3
+description:
+  ISP clock
+  ISP AXI clock
+  ISP AHB clock
 
   clock-names:
+maxItems: 5
+minItems: 3
 items:
-  - const: clk_isp
-  - const: aclk_isp
-  - const: aclk_isp_wrap
-  - const: hclk_isp
-  - const: hclk_isp_wrap
+  - const: isp
+  - const: aclk
+  - const: hclk
 
   iommus:
 maxItems: 1
@@ -135,11 +135,9 @@ examples:
 reg = <0x0 0xff91 0x0 0x4000>;
 interrupts = ;
 clocks = < SCLK_ISP0>,
- < ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
- < HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
-clock-names = "clk_isp",
-  "aclk_isp", "aclk_isp_wrap",
-  "hclk_isp", "hclk_isp_wrap";
+ < ACLK_ISP0_WRAPPER>,
+ < HCLK_ISP0_WRAPPER>;
+clock-names = "isp", "aclk", "hclk";
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c 
b/drivers/staging/media/rkisp1/rkisp1-dev.c
index f38801fea10d9..175ac25fe99fa 100644
--- a/drivers/staging/media/rkisp1/rkisp1-dev.c
+++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
@@ -406,11 +406,9 @@ static irqreturn_t rkisp1_isr(int irq, void *ctx)
 }
 
 static const char * const rk3399_isp_clks[] = {
-   "clk_isp",
-   "aclk_isp",
-   "hclk_isp",
-   "aclk_isp_wrap",
-   "hclk_isp_wrap",
+   "isp",
+   "aclk",
+   "hclk",
 };
 
 static const struct rkisp1_match_data rk3399_isp_clk_data = {
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 6/9] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-07-02 Thread Helen Koike
Move rkisp1 bindings to Documentation/devicetree/bindings/media

Verified with:
make ARCH=arm64 dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 b/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
similarity index 100%
rename from 
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
rename to Documentation/devicetree/bindings/media/rockchip-isp1.yaml
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

2020-07-02 Thread Helen Koike
Move the bindings out of drivers/staging and place them in
Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check
and make ARCH=arm64 dt_binding_check.

Tested by verifying images streamed from Scarlet Chromebook

Changes in v4:
- simplify clocks with "isp", "aclk" and "hclk" as suggested by
Robin Murphy on https://patchwork.kernel.org/patch/11475007/

Changes in v3:
- dropped accepted patches
- cleanup clocks
- fix "no reg" error in dt-bindings parent@0 example
- add linux-rockchip list in MAINTAINERS and reorder items
- add Scarlet sensors dt nodes to the series

Changes in v2:
Add patches modifying bindings, as sugested by Johan Jonker in v1,
before moving them out of staging.

Eddie Cai (1):
  arm64: dts: rockchip: add isp and sensors for Scarlet

Helen Koike (7):
  media: staging: dt-bindings: rkisp1: add missing required nodes
  media: staging: dt-bindings: rkisp1: add required items in i2c example
  media: staging: dt-bindings: rkisp1: re-order properties
  media: staging: dt-bindings: rkisp1: fix "no reg" error in parent node
  media: staging: rkisp1: remove unecessary clocks
  dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging
  media: MAINTAINERS: rkisp1: add path to dt-bindings

Shunqian Zheng (1):
  arm64: dts: rockchip: add isp0 node for rk3399

 .../bindings/media/rockchip-isp1.yaml | 64 +---
 MAINTAINERS   |  2 +
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++
 arch/arm64/boot/dts/rockchip/rk3399.dtsi  | 25 +++
 drivers/staging/media/rkisp1/rkisp1-dev.c |  8 +-
 5 files changed, 142 insertions(+), 31 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (83%)

-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 4/9] media: staging: dt-bindings: rkisp1: fix "no reg" error in parent node

2020-07-02 Thread Helen Koike
Fix the following error found with make ARCH=arm64 dt_binding_check:

Documentation/devicetree/bindings/media/rockchip-isp1.example.dts:24.27-101.11:
Warning (unit_address_vs_reg): /example-0/parent@0: node has a unit name, but 
no reg or ranges property

Reported-by: Johan Jonker 
Signed-off-by: Helen Koike 
---

V3:
- this is a new patch in the series
---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index e5b9c0574e352..4d111ef2e89c7 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -126,6 +126,7 @@ examples:
 #include 
 
 parent0: parent@0 {
+reg = <0 0>;
 #address-cells = <2>;
 #size-cells = <2>;
 
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 2/9] media: staging: dt-bindings: rkisp1: add required items in i2c example

2020-07-02 Thread Helen Koike
Add missing required items in Rockchip ISP1 dt-bindings example for
a complete i2c node.

Signed-off-by: Helen Koike 
---

Changes in v2:
- new patch in the series
---
 .../devicetree/bindings/media/rockchip-isp1.yaml | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index a77b6ec500c95..8c7904845788d 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -169,6 +169,11 @@ examples:
 };
 
 i2c7: i2c@ff16 {
+compatible = "rockchip,rk3399-i2c";
+reg = <0x0 0xff16 0x0 0x1000>;
+interrupts = ;
+clocks = < SCLK_I2C7>, < PCLK_I2C7>;
+clock-names = "i2c", "pclk";
 clock-frequency = <40>;
 #address-cells = <1>;
 #size-cells = <0>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 3/9] media: staging: dt-bindings: rkisp1: re-order properties

2020-07-02 Thread Helen Koike
Organize properties order in dt-binbings to move it out of staging.

On top: compatible, reg and interrupts.
Then alphabetical order, then properties starting with '#'.

Signed-off-by: Helen Koike 

---

V2:
- this is a new patch in the series
---
 .../bindings/media/rockchip-isp1.yaml | 32 +--
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 8c7904845788d..e5b9c0574e352 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -23,19 +23,6 @@ properties:
   interrupts:
 maxItems: 1
 
-  iommus:
-maxItems: 1
-
-  power-domains:
-maxItems: 1
-
-  phys:
-maxItems: 1
-description: phandle for the PHY port
-
-  phy-names:
-const: dphy
-
   clocks:
 items:
   - description: ISP clock
@@ -52,6 +39,19 @@ properties:
   - const: hclk_isp
   - const: hclk_isp_wrap
 
+  iommus:
+maxItems: 1
+
+  phys:
+maxItems: 1
+description: phandle for the PHY port
+
+  phy-names:
+const: dphy
+
+  power-domains:
+maxItems: 1
+
   # See ./video-interfaces.txt for details
   ports:
 type: object
@@ -110,10 +110,10 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - power-domains
   - iommus
   - phys
   - phy-names
+  - power-domains
   - ports
 
 additionalProperties: false
@@ -139,19 +139,19 @@ examples:
 clock-names = "clk_isp",
   "aclk_isp", "aclk_isp_wrap",
   "hclk_isp", "hclk_isp_wrap";
-power-domains = < RK3399_PD_ISP0>;
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
+power-domains = < RK3399_PD_ISP0>;
 
 ports {
 #address-cells = <1>;
 #size-cells = <0>;
 
 port@0 {
+reg = <0>;
 #address-cells = <1>;
 #size-cells = <0>;
-reg = <0>;
 
 mipi_in_wcam: endpoint@0 {
 reg = <0>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4 1/9] media: staging: dt-bindings: rkisp1: add missing required nodes

2020-07-02 Thread Helen Koike
Add missing required nodes in json-schema yaml file for
Rockchip ISP1 dt-bindings.

Signed-off-by: Helen Koike 
---

Changes in v2:
- New patch in the series
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 8 
 1 file changed, 8 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index af246b71eac6b..a77b6ec500c95 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -94,11 +94,19 @@ properties:
 
   remote-endpoint: true
 
+required:
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
 required:
+  - "#address-cells"
+  - "#size-cells"
   - port@0
 
 required:
   - compatible
+  - reg
   - interrupts
   - clocks
   - clock-names
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 5/9] media: staging: rkisp1: remove unecessary clocks

2020-07-02 Thread Helen Koike



On 7/2/20 1:54 PM, Helen Koike wrote:
> aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
> hclk_isp, thus we can remove parents from the list, with the goal to
> cleanup the dt-bindings and remove it from staging.
> 
> For reference, this is the isp clock topology:
> 
>  xin24m
> pll_npll
>npll
>   clk_isp1
>   clk_isp0
> pll_cpll
>cpll
>   aclk_isp1
>  aclk_isp1_noc
>  hclk_isp1
> aclk_isp1_wrapper
> hclk_isp1_noc
>   aclk_isp0
>  hclk_isp1_wrapper
>  aclk_isp0_wrapper
>  aclk_isp0_noc
>  hclk_isp0
> hclk_isp0_wrapper
>     hclk_isp0_noc
>  pclkin_isp1_wrapper
> 
> Signed-off-by: Helen Koike 
> ---
> Changes in V3:
> - this is a new patch in the series
> ---
>  .../bindings/media/rockchip-isp1.yaml | 33 ++-
>  drivers/staging/media/rkisp1/rkisp1-dev.c |  2 --
>  2 files changed, 17 insertions(+), 18 deletions(-)
> 
> diff --git 
> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
>  
> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
> index 4d111ef2e89c7..f806820eb8153 100644
> --- 
> a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
> +++ 
> b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
> @@ -24,20 +24,21 @@ properties:
>  maxItems: 1
>  
>clocks:
> -items:
> -  - description: ISP clock
> -  - description: ISP AXI clock clock
> -  - description: ISP AXI clock  wrapper clock
> -  - description: ISP AHB clock clock
> -  - description: ISP AHB wrapper clock
> +maxItems: 5
> +minItems: 3

Sorry, I forgot to mentioned that, as discussed previously on 
https://patchwork.kernel.org/patch/11475007/ ,
this is prepared to add rk3288 support, this is why maxItems is 5 (since rk3288 
has 5 clocks).

> +description:
> +  rk3399 isp0 clocks
> +ISP clock
> +ISP AXI wrapper clock
> +ISP AHB wrapper clock
>  
>clock-names:
> -items:
> -  - const: clk_isp
> -  - const: aclk_isp
> -  - const: aclk_isp_wrap
> -  - const: hclk_isp
> -  - const: hclk_isp_wrap
> +oneOf:

Same for this "oneOf", so we can add "rk3399 isp1 clocks" and "rk3288 clocks" 
later.

Regards,
Helen

> +  # rk3399 isp0 clocks
> +  - items:
> +- const: clk_isp
> +- const: aclk_isp_wrap
> +- const: hclk_isp_wrap
>  
>iommus:
>  maxItems: 1
> @@ -135,11 +136,11 @@ examples:
>  reg = <0x0 0xff91 0x0 0x4000>;
>  interrupts = ;
>  clocks = < SCLK_ISP0>,
> - < ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
> - < HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
> + < ACLK_ISP0_WRAPPER>,
> + < HCLK_ISP0_WRAPPER>;
>  clock-names = "clk_isp",
> -  "aclk_isp", "aclk_isp_wrap",
> -  "hclk_isp", "hclk_isp_wrap";
> +  "aclk_isp_wrap",
> +  "hclk_isp_wrap";
>  iommus = <_mmu>;
>  phys = <>;
>  phy-names = "dphy";
> diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c 
> b/drivers/staging/media/rkisp1/rkisp1-dev.c
> index f38801fea10d9..36f5f3b97a9b9 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-dev.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
> @@ -407,8 +407,6 @@ static irqreturn_t rkisp1_isr(int irq, void *ctx)
>  
>  static const char * const rk3399_isp_clks[] = {
>   "clk_isp",
> - "aclk_isp",
> - "hclk_isp",
>   "aclk_isp_wrap",
>   "hclk_isp_wrap",
>  };
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 8/9] arm64: dts: rockchip: add isp0 node for rk3399

2020-07-02 Thread Helen Koike
From: Shunqian Zheng 

RK3399 has two ISPs, but only isp0 was tested.
Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---

V3:
- clean up clocks

V2:
- re-order power-domains property

V1:
This patch was originally part of this patchset:

https://patchwork.kernel.org/patch/10267431/

The only difference is:
- add phy properties
- add ports
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 27 
 1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 2581e9cc7a1de..a27c3ccf4bd08 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1710,6 +1710,33 @@ vopb_mmu: iommu@ff903f00 {
status = "disabled";
};
 
+   isp0: isp0@ff91 {
+   compatible = "rockchip,rk3399-cif-isp";
+   reg = <0x0 0xff91 0x0 0x4000>;
+   interrupts = ;
+   clocks = < SCLK_ISP0>,
+< ACLK_ISP0_WRAPPER>,
+< HCLK_ISP0_WRAPPER>;
+   clock-names = "clk_isp",
+ "aclk_isp_wrap",
+ "hclk_isp_wrap";
+   iommus = <_mmu>;
+   phys = <_dphy_rx0>;
+   phy-names = "dphy";
+   power-domains = < RK3399_PD_ISP0>;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+   };
+   };
+
isp0_mmu: iommu@ff914000 {
compatible = "rockchip,iommu";
reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 9/9] arm64: dts: rockchip: add isp and sensors for Scarlet

2020-07-02 Thread Helen Koike
From: Eddie Cai 

Enable ISP and camera sensor ov2685 and ov5695 for Scarlet Chromebook

Verified with:
make ARCH=arm64 dtbs_check

Signed-off-by: Shunqian Zheng 
Signed-off-by: Eddie Cai 
Signed-off-by: Tomasz Figa 
Signed-off-by: Helen Koike 
---

This patch is based on:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/527854

Changes in V3:
- This patch was first submitted stand alone at
https://lore.kernel.org/patchwork/patch/1223736/
I'm including in this patch series without changes
---
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++
 1 file changed, 74 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
index 4373ed732af76..ae08205aa8e24 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
@@ -296,6 +296,52 @@ camera:  {
 
/* 24M mclk is shared between world and user cameras */
pinctrl-0 = <_xfer _clkout1>;
+
+   /* Rear-facing camera */
+   wcam: camera@36 {
+   compatible = "ovti,ov5695";
+   reg = <0x36>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dvdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   reset-gpios = < 5 GPIO_ACTIVE_LOW>;
+
+   port {
+   wcam_out: endpoint {
+   remote-endpoint = <_in_wcam>;
+   data-lanes = <1 2>;
+   };
+   };
+   };
+
+   /* Front-facing camera */
+   ucam: camera@3c {
+   compatible = "ovti,ov2685";
+   reg = <0x3c>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rst>;
+
+   clocks = < SCLK_TESTCLKOUT1>;
+   clock-names = "xvclk";
+
+   avdd-supply = <_cam>;
+   dovdd-supply = <_s0>;
+   dvdd-supply = <_s0>;
+   reset-gpios = < 3 GPIO_ACTIVE_LOW>;
+
+   port {
+   ucam_out: endpoint {
+   remote-endpoint = <_in_ucam>;
+   data-lanes = <1>;
+   };
+   };
+   };
 };
 
 _dp {
@@ -353,10 +399,38 @@ _domains {
gpio1830-supply = <_s0>; /* APIO4_VDD;  4c 4d */
 };
 
+ {
+   status = "okay";
+
+   ports {
+   port@0 {
+   mipi_in_wcam: endpoint@0 {
+   reg = <0>;
+   remote-endpoint = <_out>;
+   data-lanes = <1 2>;
+   };
+
+   mipi_in_ucam: endpoint@1 {
+   reg = <1>;
+   remote-endpoint = <_out>;
+   data-lanes = <1>;
+   };
+   };
+   };
+};
+
+_mmu {
+   status = "okay";
+};
+
  {
sdmode-gpios = < 2 GPIO_ACTIVE_HIGH>;
 };
 
+_dphy_rx0 {
+   status = "okay";
+};
+
 _dsi {
status = "okay";
clock-master;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 4/9] media: staging: dt-bindings: rkisp1: fix "no reg" error in parent node

2020-07-02 Thread Helen Koike
Fix the following error found with make ARCH=arm64 dt_binding_check:

Documentation/devicetree/bindings/media/rockchip-isp1.example.dts:24.27-101.11:
Warning (unit_address_vs_reg): /example-0/parent@0: node has a unit name, but 
no reg or ranges property

Reported-by: Johan Jonker 
Signed-off-by: Helen Koike 
---

V3:
- this is a new patch in the series
---
 .../Documentation/devicetree/bindings/media/rockchip-isp1.yaml   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index e5b9c0574e352..4d111ef2e89c7 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -126,6 +126,7 @@ examples:
 #include 
 
 parent0: parent@0 {
+reg = <0 0>;
 #address-cells = <2>;
 #size-cells = <2>;
 
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 1/9] media: staging: dt-bindings: rkisp1: add missing required nodes

2020-07-02 Thread Helen Koike
Add missing required nodes in json-schema yaml file for
Rockchip ISP1 dt-bindings.

Signed-off-by: Helen Koike 
---
Changes in v3: None

Changes in v2:
- New patch in the series
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 8 
 1 file changed, 8 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index af246b71eac6b..a77b6ec500c95 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -94,11 +94,19 @@ properties:
 
   remote-endpoint: true
 
+required:
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
 required:
+  - "#address-cells"
+  - "#size-cells"
   - port@0
 
 required:
   - compatible
+  - reg
   - interrupts
   - clocks
   - clock-names
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 6/9] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-07-02 Thread Helen Koike
Move rkisp1 bindings to Documentation/devicetree/bindings/media

Verified with:
make ARCH=arm64 dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Helen Koike 
Acked-by: Rob Herring 
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 b/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
similarity index 100%
rename from 
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
rename to Documentation/devicetree/bindings/media/rockchip-isp1.yaml
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 3/9] media: staging: dt-bindings: rkisp1: re-order properties

2020-07-02 Thread Helen Koike
Organize properties order in dt-binbings to move it out of staging.

On top: compatible, reg and interrupts.
Then alphabetical order, then properties starting with '#'.

Signed-off-by: Helen Koike 

---
V3: none

V2:
- this is a new patch in the series
---
 .../bindings/media/rockchip-isp1.yaml | 32 +--
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 8c7904845788d..e5b9c0574e352 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -23,19 +23,6 @@ properties:
   interrupts:
 maxItems: 1
 
-  iommus:
-maxItems: 1
-
-  power-domains:
-maxItems: 1
-
-  phys:
-maxItems: 1
-description: phandle for the PHY port
-
-  phy-names:
-const: dphy
-
   clocks:
 items:
   - description: ISP clock
@@ -52,6 +39,19 @@ properties:
   - const: hclk_isp
   - const: hclk_isp_wrap
 
+  iommus:
+maxItems: 1
+
+  phys:
+maxItems: 1
+description: phandle for the PHY port
+
+  phy-names:
+const: dphy
+
+  power-domains:
+maxItems: 1
+
   # See ./video-interfaces.txt for details
   ports:
 type: object
@@ -110,10 +110,10 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - power-domains
   - iommus
   - phys
   - phy-names
+  - power-domains
   - ports
 
 additionalProperties: false
@@ -139,19 +139,19 @@ examples:
 clock-names = "clk_isp",
   "aclk_isp", "aclk_isp_wrap",
   "hclk_isp", "hclk_isp_wrap";
-power-domains = < RK3399_PD_ISP0>;
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
+power-domains = < RK3399_PD_ISP0>;
 
 ports {
 #address-cells = <1>;
 #size-cells = <0>;
 
 port@0 {
+reg = <0>;
 #address-cells = <1>;
 #size-cells = <0>;
-reg = <0>;
 
 mipi_in_wcam: endpoint@0 {
 reg = <0>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 7/9] media: MAINTAINERS: rkisp1: add path to dt-bindings

2020-07-02 Thread Helen Koike
The Rockchip ISP bindings was moved out of staging.
Update MAINTAINERS file with the new path.

Fields sorted according to output of
./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS
--order

Signed-off-by: Helen Koike 

---

V3:
- Add line:
L: linux-rockc...@lists.infradead.org
- Re-order:
F: drivers/staging/media/rkisp1/

V2:
- This is a new patch in the series
---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 634d2c3d621aa..d7141cf17072f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14679,7 +14679,9 @@ F:  include/linux/hid-roccat*
 ROCKCHIP ISP V1 DRIVER
 M: Helen Koike 
 L: linux-me...@vger.kernel.org
+L: linux-rockc...@lists.infradead.org
 S: Maintained
+F: Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 F: drivers/staging/media/rkisp1/
 
 ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 2/9] media: staging: dt-bindings: rkisp1: add required items in i2c example

2020-07-02 Thread Helen Koike
Add missing required items in Rockchip ISP1 dt-bindings example for
a complete i2c node.

Signed-off-by: Helen Koike 
---

Changes in v3: None

Changes in v2:
- new patch in the series
---
 .../devicetree/bindings/media/rockchip-isp1.yaml | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index a77b6ec500c95..8c7904845788d 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -169,6 +169,11 @@ examples:
 };
 
 i2c7: i2c@ff16 {
+compatible = "rockchip,rk3399-i2c";
+reg = <0x0 0xff16 0x0 0x1000>;
+interrupts = ;
+clocks = < SCLK_I2C7>, < PCLK_I2C7>;
+clock-names = "i2c", "pclk";
 clock-frequency = <40>;
 #address-cells = <1>;
 #size-cells = <0>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 0/9] move Rockchip ISP bindings out of staging / add

2020-07-02 Thread Helen Koike
Move the bindings out of drivers/staging and place them in
Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check
and make ARCH=arm64 dt_binding_check.

Tested by verifying images streamed from Scarlet Chromebook

Changes in v3:
- dropped accepted patches
- cleanup clocks
- fix "no reg" error in dt-bindings parent@0 example
- add linux-rockchip list in MAINTAINERS and reorder items
- add Scarlet sensors dt nodes to the series

Changes in v2:
Add patches modifying bindings, as sugested by Johan Jonker in v1,
before moving them out of staging.


Eddie Cai (1):
  arm64: dts: rockchip: add isp and sensors for scarlet

Helen Koike (7):
  media: staging: dt-bindings: rkisp1: add missing required nodes
  media: staging: dt-bindings: rkisp1: add required items in i2c example
  media: staging: dt-bindings: rkisp1: re-order properties
  media: staging: dt-bindings: rkisp1: fix "no reg" error in parent node
  media: staging: rkisp1: remove unecessary clocks
  dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging
  media: MAINTAINERS: rkisp1: add path to dt-bindings

Shunqian Zheng (1):
  arm64: dts: rockchip: add isp0 node for rk3399

 .../bindings/media/rockchip-isp1.yaml | 65 +---
 MAINTAINERS   |  2 +
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 74 +++
 arch/arm64/boot/dts/rockchip/rk3399.dtsi  | 27 +++
 drivers/staging/media/rkisp1/rkisp1-dev.c |  2 -
 5 files changed, 143 insertions(+), 27 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (81%)

-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 5/9] media: staging: rkisp1: remove unecessary clocks

2020-07-02 Thread Helen Koike
aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
hclk_isp, thus we can remove parents from the list, with the goal to
cleanup the dt-bindings and remove it from staging.

For reference, this is the isp clock topology:

 xin24m
pll_npll
   npll
  clk_isp1
  clk_isp0
pll_cpll
   cpll
  aclk_isp1
 aclk_isp1_noc
 hclk_isp1
aclk_isp1_wrapper
hclk_isp1_noc
  aclk_isp0
 hclk_isp1_wrapper
 aclk_isp0_wrapper
 aclk_isp0_noc
 hclk_isp0
hclk_isp0_wrapper
hclk_isp0_noc
 pclkin_isp1_wrapper

Signed-off-by: Helen Koike 
---
Changes in V3:
- this is a new patch in the series
---
 .../bindings/media/rockchip-isp1.yaml | 33 ++-
 drivers/staging/media/rkisp1/rkisp1-dev.c |  2 --
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 4d111ef2e89c7..f806820eb8153 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -24,20 +24,21 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: ISP clock
-  - description: ISP AXI clock clock
-  - description: ISP AXI clock  wrapper clock
-  - description: ISP AHB clock clock
-  - description: ISP AHB wrapper clock
+maxItems: 5
+minItems: 3
+description:
+  rk3399 isp0 clocks
+ISP clock
+ISP AXI wrapper clock
+ISP AHB wrapper clock
 
   clock-names:
-items:
-  - const: clk_isp
-  - const: aclk_isp
-  - const: aclk_isp_wrap
-  - const: hclk_isp
-  - const: hclk_isp_wrap
+oneOf:
+  # rk3399 isp0 clocks
+  - items:
+- const: clk_isp
+- const: aclk_isp_wrap
+- const: hclk_isp_wrap
 
   iommus:
 maxItems: 1
@@ -135,11 +136,11 @@ examples:
 reg = <0x0 0xff91 0x0 0x4000>;
 interrupts = ;
 clocks = < SCLK_ISP0>,
- < ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
- < HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
+ < ACLK_ISP0_WRAPPER>,
+ < HCLK_ISP0_WRAPPER>;
 clock-names = "clk_isp",
-  "aclk_isp", "aclk_isp_wrap",
-  "hclk_isp", "hclk_isp_wrap";
+  "aclk_isp_wrap",
+  "hclk_isp_wrap";
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c 
b/drivers/staging/media/rkisp1/rkisp1-dev.c
index f38801fea10d9..36f5f3b97a9b9 100644
--- a/drivers/staging/media/rkisp1/rkisp1-dev.c
+++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
@@ -407,8 +407,6 @@ static irqreturn_t rkisp1_isr(int irq, void *ctx)
 
 static const char * const rk3399_isp_clks[] = {
"clk_isp",
-   "aclk_isp",
-   "hclk_isp",
"aclk_isp_wrap",
"hclk_isp_wrap",
 };
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 7/9] media: MAINTAINERS: rkisp1: add path to dt-bindings

2020-04-03 Thread Helen Koike
The Rockchip ISP bindings was moved out of staging.
Update MAINTAINERS file with the new path.

Suggested-by: Johan Jonker 
Signed-off-by: Helen Koike 
---

V2:
- This is a new patch in the series
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index d66ac41ef5872..726044b84cf23 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14303,6 +14303,7 @@ M:  Helen Koike 
 L: linux-me...@vger.kernel.org
 S: Maintained
 F: drivers/staging/media/rkisp1/
+F: Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
 ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
 M: Jacob Chen 
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 9/9] arm64: dts: rockchip: add isp0 node for rk3399

2020-04-03 Thread Helen Koike
From: Shunqian Zheng 

RK3399 has two ISPs, but only ISP0 was tested at present.
Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---
V2:
- re-order power-domains property

V1:
This patch was originally part of this patchset:

https://patchwork.kernel.org/patch/10267431/

The only difference is:
- add phy properties
- add ports
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 27 
 1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 6b3380b10e596..b1d62a87c5616 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1718,6 +1718,33 @@ vopb_mmu: iommu@ff903f00 {
status = "disabled";
};
 
+   isp0: isp0@ff91 {
+   compatible = "rockchip,rk3399-cif-isp";
+   reg = <0x0 0xff91 0x0 0x4000>;
+   interrupts = ;
+   clocks = < SCLK_ISP0>,
+< ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
+< HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
+   clock-names = "clk_isp",
+ "aclk_isp", "aclk_isp_wrap",
+ "hclk_isp", "hclk_isp_wrap";
+   iommus = <_mmu>;
+   phys = <_dphy_rx0>;
+   phy-names = "dphy";
+   power-domains = < RK3399_PD_ISP0>;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   };
+   };
+   };
+
isp0_mmu: iommu@ff914000 {
compatible = "rockchip,iommu";
reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 6/9] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-04-03 Thread Helen Koike
Move rkisp1 bindings to Documentation/devicetree/bindings/media

Verified with:
make ARCH=arm64 dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Helen Koike 
---

V2:
- no changes

 .../devicetree/bindings/media/rockchip-isp1.yaml  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 b/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
similarity index 100%
rename from 
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
rename to Documentation/devicetree/bindings/media/rockchip-isp1.yaml
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 4/9] media: staging: dt-bindings: phy-rockchip-dphy-rx0: remove non-used reg property

2020-04-03 Thread Helen Koike
reg property is not used in Rockchip MIPI DPHY RX0 bindings, thus remove
it.

Suggested-by: Johan Jonker 
Signed-off-by: Helen Koike 
---

Changes in v2:
- this is a new patch in the series
---
 .../devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml| 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
 
b/drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
index 5dacece35702b..7d888d3588239 100644
--- 
a/drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
+++ 
b/drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
@@ -18,9 +18,6 @@ properties:
   compatible:
 const: rockchip,rk3399-mipi-dphy-rx0
 
-  reg:
-maxItems: 1
-
   clocks:
 items:
   - description: MIPI D-PHY ref clock
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 1/9] media: staging: dt-bindings: rkisp1: add missing required nodes

2020-04-03 Thread Helen Koike
Add missing required nodes in json-schema yaml file for
Rockchip ISP1 dt-bindings.

Suggested-by: Johan Jonker 
Signed-off-by: Helen Koike 
---

Changes in v2:
- New patch in the series
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 8 
 1 file changed, 8 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index af246b71eac6b..a77b6ec500c95 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -94,11 +94,19 @@ properties:
 
   remote-endpoint: true
 
+required:
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
 required:
+  - "#address-cells"
+  - "#size-cells"
   - port@0
 
 required:
   - compatible
+  - reg
   - interrupts
   - clocks
   - clock-names
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 3/9] media: staging: dt-bindings: rkisp1: re-order properties

2020-04-03 Thread Helen Koike
Organize properties order in dt-binbings to move it out of staging.

On top: compatible, reg and interrupts.
Then alphabetical order, then properties starting with '#'.

Suggested-by: Johan Jonker 
Signed-off-by: Helen Koike 
---

V2:
- this is a new patch in the series
---
 .../bindings/media/rockchip-isp1.yaml | 32 +--
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index 8c7904845788d..e5b9c0574e352 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -23,19 +23,6 @@ properties:
   interrupts:
 maxItems: 1
 
-  iommus:
-maxItems: 1
-
-  power-domains:
-maxItems: 1
-
-  phys:
-maxItems: 1
-description: phandle for the PHY port
-
-  phy-names:
-const: dphy
-
   clocks:
 items:
   - description: ISP clock
@@ -52,6 +39,19 @@ properties:
   - const: hclk_isp
   - const: hclk_isp_wrap
 
+  iommus:
+maxItems: 1
+
+  phys:
+maxItems: 1
+description: phandle for the PHY port
+
+  phy-names:
+const: dphy
+
+  power-domains:
+maxItems: 1
+
   # See ./video-interfaces.txt for details
   ports:
 type: object
@@ -110,10 +110,10 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - power-domains
   - iommus
   - phys
   - phy-names
+  - power-domains
   - ports
 
 additionalProperties: false
@@ -139,19 +139,19 @@ examples:
 clock-names = "clk_isp",
   "aclk_isp", "aclk_isp_wrap",
   "hclk_isp", "hclk_isp_wrap";
-power-domains = < RK3399_PD_ISP0>;
 iommus = <_mmu>;
 phys = <>;
 phy-names = "dphy";
+power-domains = < RK3399_PD_ISP0>;
 
 ports {
 #address-cells = <1>;
 #size-cells = <0>;
 
 port@0 {
+reg = <0>;
 #address-cells = <1>;
 #size-cells = <0>;
-reg = <0>;
 
 mipi_in_wcam: endpoint@0 {
 reg = <0>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 8/9] arm64: dts: rockchip: add rx0 mipi-phy for rk3399

2020-04-03 Thread Helen Koike
From: Shunqian Zheng 

Designware MIPI D-PHY, used for ISP0 in rk3399.

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---

Changes in v2:
- fix alignment of clocks

V1:
This patchset came from the original ISP series from Rockchip:

https://patchwork.kernel.org/patch/10267409/

The only difference is:
- add phy-cells
- update compatible to "rockchip,rk3399-mipi-dphy-rx0"
- commit message
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 33cc21fcf4c10..6b3380b10e596 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1394,6 +1394,17 @@ io_domains: io-domains {
status = "disabled";
};
 
+   mipi_dphy_rx0: mipi-dphy-rx0 {
+   compatible = "rockchip,rk3399-mipi-dphy-rx0";
+   clocks = < SCLK_MIPIDPHY_REF>,
+< SCLK_DPHY_RX0_CFG>,
+< PCLK_VIO_GRF>;
+   clock-names = "dphy-ref", "dphy-cfg", "grf";
+   power-domains = < RK3399_PD_VIO>;
+   #phy-cells = <0>;
+   status = "disabled";
+   };
+
u2phy0: usb2-phy@e450 {
compatible = "rockchip,rk3399-usb2phy";
reg = <0xe450 0x10>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 5/9] dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0 bindings out of staging

2020-04-03 Thread Helen Koike
Move phy-rockchip-dphy-rx0 bindings to Documentation/devicetree/bindings/phy

Verified with:
make ARCH=arm64 dt_binding_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml

Signed-off-by: Helen Koike 
---

V2:
- no changes

 .../devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml   | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/phy-rockchip-dphy-rx0/Documentation => 
Documentation}/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml (100%)

diff --git 
a/drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
 b/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
similarity index 100%
rename from 
drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
rename to Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 2/9] media: staging: dt-bindings: rkisp1: add required items in i2c example

2020-04-03 Thread Helen Koike
Add missing required items in Rockchip ISP1 dt-bindings example for
a complete i2c node.

Suggested-by: Johan Jonker 
Signed-off-by: Helen Koike 
---

Changes in v2:
- new patch in the series
---
 .../devicetree/bindings/media/rockchip-isp1.yaml | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
index a77b6ec500c95..8c7904845788d 100644
--- 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
+++ 
b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
@@ -169,6 +169,11 @@ examples:
 };
 
 i2c7: i2c@ff16 {
+compatible = "rockchip,rk3399-i2c";
+reg = <0x0 0xff16 0x0 0x1000>;
+interrupts = ;
+clocks = < SCLK_I2C7>, < PCLK_I2C7>;
+clock-names = "i2c", "pclk";
 clock-frequency = <40>;
 #address-cells = <1>;
 #size-cells = <0>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

2020-04-03 Thread Helen Koike
Move the bindings out of drivers/staging and place them in
Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check
and make ARCH=arm64 dt_binding_check.

Tested by verifying images streamed from RockPi 4 board with imx219
module.

Changes in v2:
Add patches modifying bindings, as sugested by Johan Jonker in v1,
before moving them out of staging.

Johan, I added a Suggested-by tag in the commits, please let me know if
you prefer not having the tag there.

Helen Koike (7):
  media: staging: dt-bindings: rkisp1: add missing required nodes
  media: staging: dt-bindings: rkisp1: add required items in i2c example
  media: staging: dt-bindings: rkisp1: re-order properties
  media: staging: dt-bindings: phy-rockchip-dphy-rx0: remove non-used
reg property
  dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0
bindings out of staging
  dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging
  media: MAINTAINERS: rkisp1: add path to dt-bindings

Shunqian Zheng (2):
  arm64: dts: rockchip: add rx0 mipi-phy for rk3399
  arm64: dts: rockchip: add isp0 node for rk3399

 .../bindings/media/rockchip-isp1.yaml | 45 ---
 .../bindings/phy/rockchip-mipi-dphy-rx0.yaml  |  3 --
 MAINTAINERS   |  1 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi  | 38 
 4 files changed, 68 insertions(+), 19 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (91%)
 rename {drivers/staging/media/phy-rockchip-dphy-rx0/Documentation => 
Documentation}/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml (98%)

-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/4] dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0 bindings out of staging

2020-04-03 Thread Helen Koike



On 4/2/20 1:17 PM, Ezequiel Garcia wrote:
> (+Kishon)
> 
> Hi Helen,
> 
> I was wondering if we couldn't also move the phy driver out of staging.

I think we can, let's move it.

Regards,
Helen

> 
> Thanks,
> Ezequiel
>  
> On Wed, 2020-04-01 at 21:02 -0300, Helen Koike wrote:
>> Move phy-rockchip-dphy-rx0 bindings to Documentation/devicetree/bindings/phy
>>
>> Signed-off-by: Helen Koike 
>> ---
>>  .../devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml   | 0
>>  1 file changed, 0 insertions(+), 0 deletions(-)
>>  rename {drivers/staging/media/phy-rockchip-dphy-rx0/Documentation => 
>> Documentation}/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml (100%)
>>
>> diff --git 
>> a/drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
>> b/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
>> similarity index 100%
>> rename from 
>> drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
>> rename to Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
> 
> 
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] arm64: dts: rockchip: add isp0 node for rk3399

2020-04-02 Thread Helen Koike



On 4/2/20 2:20 PM, Johan Jonker wrote:
> Hi Helen,
> 
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
>> b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> index fc0295d2a65a1..815099a0cd0dd 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> @@ -1718,6 +1718,33 @@ vopb_mmu: iommu@ff903f00 {
>>  status = "disabled";
>>  };
>>  
>> +isp0: isp0@ff91 {
>> +compatible = "rockchip,rk3399-cif-isp";
>> +reg = <0x0 0xff91 0x0 0x4000>;
>> +interrupts = ;
>> +clocks = < SCLK_ISP0>,
>> + < ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
>> + < HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
>> +clock-names = "clk_isp",
>> +  "aclk_isp", "aclk_isp_wrap",
>> +  "hclk_isp", "hclk_isp_wrap";
> 
>> +power-domains = < RK3399_PD_ISP0>;
>> +iommus = <_mmu>;
>> +phys = <_dphy_rx0>;
>> +phy-names = "dphy";
> 
> Maybe a little sort? But keep rest as it is. Also in example.
> 
>   iommus = <_mmu>;
>   phys = <_dphy_rx0>;
>   phy-names = "dphy";
>   power-domains = < RK3399_PD_ISP0>;

Are you proposing only to move power-domains after phy? And keep the rest?
What is the main logic?

Thanks
Helen

> 
>> +
>> +ports {
>> +#address-cells = <1>;
>> +#size-cells = <0>;
>> +
>> +port@0 {
> 
>> +#address-cells = <1>;
>> +#size-cells = <0>;
>> +reg = <0>;
> 
> Move reg above #address-cells. Change that in example as well.
> 
>   reg = <0>;
>   #address-cells = <1>;
>   #size-cells = <0>;
> 
>> +};
>> +};
>> +};
>> +
>>  isp0_mmu: iommu@ff914000 {
>>  compatible = "rockchip,iommu";
>>  reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
>> -- 
>> 2.26.0
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/4] dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0 bindings out of staging

2020-04-02 Thread Helen Koike
Hi Johan,

On 4/2/20 9:16 AM, Johan Jonker wrote:
> Hi Helen,
> 
>> # SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> %YAML 1.2
>> ---
>> $id: http://devicetree.org/schemas/phy/rockchip-mipi-dphy-rx0.yaml#
>> $schema: http://devicetree.org/meta-schemas/core.yaml#
>>
>> title: Rockchip SoC MIPI RX0 D-PHY Device Tree Bindings
>>
>> maintainers:
>>   - Helen Koike 
>>   - Ezequiel Garcia 
>>
>> description: |
>>   The Rockchip SoC has a MIPI D-PHY bus with an RX0 entry which connects to
>>   the ISP1 (Image Signal Processing unit v1.0) for CSI cameras.
>>
>> properties:
>>   compatible:
>> const: rockchip,rk3399-mipi-dphy-rx0
>>
> 
>>   reg:
>> maxItems: 1
> 
> If 'reg' is not used => remove it.

ok, I'll add a patch removing it.

Thanks,
Helen

> 
>>
>>   clocks:
>> items:
>>   - description: MIPI D-PHY ref clock
>>   - description: MIPI D-PHY RX0 cfg clock
>>   - description: Video in/out general register file clock
>>
>>   clock-names:
>> items:
>>   - const: dphy-ref
>>   - const: dphy-cfg
>>   - const: grf
>>
>>   '#phy-cells':
>> const: 0
>>
>>   power-domains:
>> description: Video in/out power domain.
>> maxItems: 1
>>
>> required:
>>   - compatible
>>   - clocks
>>   - clock-names
>>   - '#phy-cells'
>>   - power-domains
>>
>> additionalProperties: false
>>
>> examples:
>>   - |
>>
>> /*
>>  * MIPI D-PHY RX0 use registers in "general register files", it
>>  * should be a child of the GRF.
>>  *
>>  * grf: syscon@ff77 {
>>  *  compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
>>  *  ...
>>  * };
>>  */
>>
>> #include 
>> #include 
>>
>> mipi_dphy_rx0: mipi-dphy-rx0 {
>> compatible = "rockchip,rk3399-mipi-dphy-rx0";
>> clocks = < SCLK_MIPIDPHY_REF>,
>>  < SCLK_DPHY_RX0_CFG>,
>>  < PCLK_VIO_GRF>;
>> clock-names = "dphy-ref", "dphy-cfg", "grf";
>> power-domains = < RK3399_PD_VIO>;
>> #phy-cells = <0>;
>> };
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/4] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-04-02 Thread Helen Koike
Hi Johan,

Thanks for your review.

On 4/2/20 8:35 AM, Johan Jonker wrote:
> Hi Helen,
> 
>> # SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> %YAML 1.2
>> ---
>> $id: http://devicetree.org/schemas/media/rockchip-isp1.yaml#
>> $schema: http://devicetree.org/meta-schemas/core.yaml#
>>
> 
>> title: Rockchip SoC Image Signal Processing unit v1
> 
> Where do we need 'v1' for? Is there a 'v2'?

ISPv1 is the Rockchip's name for the IP block.

> 
>>
>> maintainers:
>>   - Helen Koike 
>>
>> description: |
>>   Rockchip ISP1 is the Camera interface for the Rockchip series of SoCs
>>   which contains image processing, scaling, and compression functions.
>>
>> properties:
>>   compatible:
>> const: rockchip,rk3399-cif-isp
>>
>>   reg:
>> maxItems: 1
>>
>>   interrupts:
>> maxItems: 1
>>
>>   iommus:
>> maxItems: 1
>>
>>   power-domains:
>> maxItems: 1
>>
>>   phys:
>> maxItems: 1
>> description: phandle for the PHY port
>>
>>   phy-names:
>> const: dphy
>>
>>   clocks:
>> items:
>>   - description: ISP clock
>>   - description: ISP AXI clock clock
>>   - description: ISP AXI clock  wrapper clock
>>   - description: ISP AHB clock clock
>>   - description: ISP AHB wrapper clock
>>
>>   clock-names:
>> items:
>>   - const: clk_isp
>>   - const: aclk_isp
>>   - const: aclk_isp_wrap
>>   - const: hclk_isp
>>   - const: hclk_isp_wrap
>>
>>   # See ./video-interfaces.txt for details
>>   ports:
>> type: object
>> additionalProperties: false
>>
>> properties:
>>   "#address-cells":
>> const: 1
>>
>>   "#size-cells":
>> const: 0
>>
>>   port@0:
>> type: object
>> description: connection point for sensors at MIPI-DPHY RX0
> 
>> additionalProperties: false
> 
> Nothing required here?

I was thinking that if there is no endpoint, then nothing is required.
But if there is, then #address-cells, #size-cells and reg are. I guess
I can just add them as required.

I'll add it in the patchseries.

> 
>>
>> properties:
>>   "#address-cells":
>> const: 1
>>
>>   "#size-cells":
>> const: 0
>>
>>   reg:
>> const: 0
>>
>> patternProperties:
>>   endpoint:
>> type: object
>> additionalProperties: false
>>
>> properties:
>>   reg:
>> maxItems: 1
>>
>>   data-lanes:
>> minItems: 1
>> maxItems: 4
>>
>>   remote-endpoint: true
>>
>> required:
> 
>>   - port@0
> 
> The use of '@0' makes "#address-cells" and "#size-cells" also a requirement.
> 
> - "#address-cells"
> - "#size-cells"

Ok, I'll add it.

> 
>>
>> required:
>>   - compatible
> 
> How about 'reg'?
> 
> - reg

ack, I'll add another patch in the series fixing this.

> 
>>   - interrupts
>>   - clocks
>>   - clock-names
>>   - power-domains
>>   - iommus
>>   - phys
>>   - phy-names
>>   - ports
>>
>> additionalProperties: false
>>
>> examples:
>>   - |
>>
>> #include 
>> #include 
>> #include 
>>
>> parent0: parent@0 {
>> #address-cells = <2>;
>> #size-cells = <2>;
>>
>> isp0: isp0@ff91 {
>> compatible = "rockchip,rk3399-cif-isp";
>> reg = <0x0 0xff91 0x0 0x4000>;
>> interrupts = ;
>> clocks = < SCLK_ISP0>,
>>  < ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
>>  < HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
>> clock-names = "clk_isp",
>>   "aclk_isp", "aclk_isp_wrap",
>>   "hclk_isp", "hclk_isp_wrap";
>> power-domains = < RK3399_PD_ISP0>;
>> iommus = <_mmu>;
>> phys = <>;
>> phy-names = "dphy";
>>
>> ports {
>&g

Re: [PATCH 3/4] arm64: dts: rockchip: add rx0 mipi-phy for rk3399

2020-04-02 Thread Helen Koike
Hi,

On 4/2/20 11:31 AM, Heiko Stübner wrote:
> Am Donnerstag, 2. April 2020, 15:48:02 CEST schrieb Johan Jonker:
>> Hi Helen,
>>
>>> From: Helen Koike 
>>
>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
>>> b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>> index 33cc21fcf4c10..fc0295d2a65a1 100644
>>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>>> @@ -1394,6 +1394,17 @@ io_domains: io-domains {
>>> status = "disabled";
>>> };
>>>  
>>
>>> +   mipi_dphy_rx0: mipi-dphy-rx0 {
>>
>> For Heiko sort syscon@ff77 subnodes alphabetical or reg value first?
> 
> Similar to main nodes ... so things without reg alphabetical,
> the rest by reg address
> 
> 
>>
>>> +   compatible = "rockchip,rk3399-mipi-dphy-rx0";
>>> +   clocks = < SCLK_MIPIDPHY_REF>,
>>
>>> +   < SCLK_DPHY_RX0_CFG>,
>>> +   < PCLK_VIO_GRF>;
>>
>> Align^

ack.

Thanks
Helen

>>
>>> +   clock-names = "dphy-ref", "dphy-cfg", "grf";
>>> +   power-domains = < RK3399_PD_VIO>;
>>> +   #phy-cells = <0>;
>>> +   status = "disabled";
>>> +   };
>>> +
>>> u2phy0: usb2-phy@e450 {
>>> compatible = "rockchip,rk3399-usb2phy";
>>> reg = <0xe450 0x10>;
>>
>>
> 
> 
> 
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/4] dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0 bindings out of staging

2020-04-01 Thread Helen Koike
Move phy-rockchip-dphy-rx0 bindings to Documentation/devicetree/bindings/phy

Signed-off-by: Helen Koike 
---
 .../devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml   | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/phy-rockchip-dphy-rx0/Documentation => 
Documentation}/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml (100%)

diff --git 
a/drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
 b/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
similarity index 100%
rename from 
drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
rename to Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/4] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399

2020-04-01 Thread Helen Koike
Move the bindings out of drivers/staging and place them in
Documentation/devicetree/bindings instead.

Also, add DT nodes for RK3399 and verify with make ARCH=arm64 dtbs_check

Tested by verifying images streamed from RockPi 4 board with imx219
module.

Helen Koike (2):
  dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0
bindings out of staging
  dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

Shunqian Zheng (2):
  arm64: dts: rockchip: add rx0 mipi-phy for rk3399
  arm64: dts: rockchip: add isp0 node for rk3399

 .../bindings/media/rockchip-isp1.yaml |  0
 .../bindings/phy/rockchip-mipi-dphy-rx0.yaml  |  0
 arch/arm64/boot/dts/rockchip/rk3399.dtsi  | 38 +++
 3 files changed, 38 insertions(+)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)
 rename {drivers/staging/media/phy-rockchip-dphy-rx0/Documentation => 
Documentation}/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml (100%)

-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/4] arm64: dts: rockchip: add rx0 mipi-phy for rk3399

2020-04-01 Thread Helen Koike
From: Shunqian Zheng 

Designware MIPI D-PHY, used for ISP0 in rk3399.

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---

This patchset came from the original ISP series from Rockchip:

https://patchwork.kernel.org/patch/10267409/

The only difference is:
- add phy-cells
- update compatible to "rockchip,rk3399-mipi-dphy-rx0"
- commit message
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 33cc21fcf4c10..fc0295d2a65a1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1394,6 +1394,17 @@ io_domains: io-domains {
status = "disabled";
};
 
+   mipi_dphy_rx0: mipi-dphy-rx0 {
+   compatible = "rockchip,rk3399-mipi-dphy-rx0";
+   clocks = < SCLK_MIPIDPHY_REF>,
+   < SCLK_DPHY_RX0_CFG>,
+   < PCLK_VIO_GRF>;
+   clock-names = "dphy-ref", "dphy-cfg", "grf";
+   power-domains = < RK3399_PD_VIO>;
+   #phy-cells = <0>;
+   status = "disabled";
+   };
+
u2phy0: usb2-phy@e450 {
compatible = "rockchip,rk3399-usb2phy";
reg = <0xe450 0x10>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/4] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging

2020-04-01 Thread Helen Koike
Move rkisp1 bindings to Documentation/devicetree/bindings/media

Signed-off-by: Helen Koike 
---
 .../devicetree/bindings/media/rockchip-isp1.yaml  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {drivers/staging/media/rkisp1/Documentation => 
Documentation}/devicetree/bindings/media/rockchip-isp1.yaml (100%)

diff --git 
a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
 b/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
similarity index 100%
rename from 
drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
rename to Documentation/devicetree/bindings/media/rockchip-isp1.yaml
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/4] arm64: dts: rockchip: add isp0 node for rk3399

2020-04-01 Thread Helen Koike
From: Shunqian Zheng 

RK3399 has two ISPs, but only ISP0 was tested at present.
Add isp0 node in rk3399 dtsi

Verified with:
make ARCH=arm64 dtbs_check 
DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml

Signed-off-by: Shunqian Zheng 
Signed-off-by: Jacob Chen 
Signed-off-by: Helen Koike 

---
This patch was originally part of this patchset:

https://patchwork.kernel.org/patch/10267431/

The only difference is:
- add phy properties
- add ports
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 27 
 1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi 
b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index fc0295d2a65a1..815099a0cd0dd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1718,6 +1718,33 @@ vopb_mmu: iommu@ff903f00 {
status = "disabled";
};
 
+   isp0: isp0@ff91 {
+   compatible = "rockchip,rk3399-cif-isp";
+   reg = <0x0 0xff91 0x0 0x4000>;
+   interrupts = ;
+   clocks = < SCLK_ISP0>,
+< ACLK_ISP0>, < ACLK_ISP0_WRAPPER>,
+< HCLK_ISP0>, < HCLK_ISP0_WRAPPER>;
+   clock-names = "clk_isp",
+ "aclk_isp", "aclk_isp_wrap",
+ "hclk_isp", "hclk_isp_wrap";
+   power-domains = < RK3399_PD_ISP0>;
+   iommus = <_mmu>;
+   phys = <_dphy_rx0>;
+   phy-names = "dphy";
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0>;
+   };
+   };
+   };
+
isp0_mmu: iommu@ff914000 {
compatible = "rockchip,iommu";
reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
-- 
2.26.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/4] media Kconfig reorg - part 2

2020-03-25 Thread Helen Koike
Hello,

On 3/25/20 1:03 PM, Mauro Carvalho Chehab wrote:
> That's the second part of media Kconfig changes. The entire series is
> at:
> 
>   https://git.linuxtv.org/mchehab/experimental.git/log/?h=media-kconfig

I made a quick experiment (using this branch) with someone who works with the 
kernel for his master degree, but doesn't have much experience in kernel 
development in general.
I asked him to enable Vimc (from default configs, where multimedia starts 
disabled).
He knows that Vimc is a virtual camera driver, and this is how he behaved:

=== Start of experiment:

* He pressed '/' and searched for vimc to see the location path.
* Then he enabled "Multimedia support" and went straight to "Media drivers" 
(which just shows USB and PCI).
* He went back to "Multimedia support", entered "Media device types" and 
enabled "Test drivers".
* He went back to "Media drivers" again and didn't find Vimc (nothing changed 
in this menu).
* He seemed a bit lost, going back and forth in the menus a couple of times.
* Then he pressed '/' again to search for vimc and see the location path, and 
he realized that there
should be an option called "V4L test drivers" under "Media drivers" that is not 
showing up.
* He went back to "Media device types" again and start re-reading the options.
* He selected "Cameras and video grabbers" ant went back to "Media drivers".
* He sees "V4L test drivers", selects it, and enter this menu.
* He selects "Virtual Media Controller Driver".

I asked his impressions, and he mentioned that he thought that enabling just 
"Test drivers" would be enough, without need
to combine "Test drivers" with "Cameras and video grabbers".
He also asked me why virtual drivers should be hidden, and he mentioned that 
the word "Virtual" in front would be enough.

Then I showed him he could have disabled the option "Filter devices by their 
types" to see everything at one (which he didn't
realized by himself until that moment, nor tried it out to see what would 
happen).

He mentioned that hiding is nice, because it shows less options, but not very 
nice to search for something.
He also mentioned that if he had understood the filter mechanism from the 
start, he would have disabled "Filter devices by their types" sooner.

=== End of experiment

This was just one experiment from one person, I'll see if I can get some other 
people from lkcamp.dev group to also check
and send us their impressions. I think it would be nice to get more data about 
user experience, from people that are not used to
kernel development (kernel dev newbies for instance).

Just another remark from me:

>From the default config, "Media drivers" shows USB and PCI, and selecting 
>those doesn't do anything, and people can even think
that, if they want to enable an USB device, just enabling the USB option there 
is enough (which is not), since no drivers
shows up.

I hope this helps
Helen


> 
> It addresses some issues I noticed when reviewing the series, and do
> some changes on how things will be displayed.
> 
> It also simplify dependencencies on media-controller-dependent drivers,
> by auto-selecting the needed deps.
> 
> It should be noticed that the media controller may also optionally
> selected for several other drivers, so there is still a prompt to allow
> manually enabling it, in the case it was not auto-selected.
> 
> PS.: While not needed anymore, because all dependent drivers auto
> select, at least for now, I opted to keep the prompt for:
> 
> - VIDEO_V4L2_SUBDEV_API
> 
>   The rationale is that there are a few drivers that can optionally depend
>   on it (like tvp5150). So, better to keep the dependency, in order to be
>   able to test those drivers with and without the option.
> 
> - MEDIA_CONTROLLER_REQUEST_API
> 
>   The rationale is that there are some warnings at the Request API, and
>   it would be good to keep it, at least while drivers are on staging.
> 
> Mauro Carvalho Chehab (4):
>   media: dvb-core: Kconfig: default to use dynamic minors
>   media: Kconfig files: use select for V4L2 subdevs and MC
>   media: i2c/Kconfig: reorganize items there
>   media: Kconfig: don't use visible for device type select
> 
>  drivers/media/Kconfig |  25 +-
>  drivers/media/dvb-core/Kconfig|   1 +
>  drivers/media/i2c/Kconfig | 406 +++---
>  drivers/media/i2c/et8ek8/Kconfig  |   4 +-
>  drivers/media/i2c/m5mols/Kconfig  |   5 +-
>  drivers/media/i2c/smiapp/Kconfig  |   5 +-
>  drivers/media/pci/cobalt/Kconfig  |   4 +-
>  drivers/media/pci/intel/ipu3/Kconfig  |   4 +-
>  drivers/media/pci/sta2x11/Kconfig |   6 +-
>  drivers/media/platform/Kconfig|  28 +-
>  drivers/media/platform/am437x/Kconfig |   4 +-
>  drivers/media/platform/atmel/Kconfig  |   4 +-
>  drivers/media/platform/cadence/Kconfig|   8 +-
>  drivers/media/platform/exynos4-is/Kconfig   

Re: [PATCH] staging: media: rkisp1: make links immutable by default

2020-01-19 Thread Helen Koike


On 1/17/20 8:36 PM, Niklas Söderlund wrote:
> Hi Helen,
> 
> Thanks for your work.
> 
> On 2020-01-17 17:12:18 -0300, Helen Koike wrote:
>> The only places which make sese to allow users to enable or disable
>> links are:
>>
>> * between sensors and isp:
>> So users can select which sensor should be used while streaming
>>
>> * between isp and the resizers:
>>   |
>>   v here
>> rkisp1_isp:2 -> rkisp1_resizer_mainpath -> rkisp1_mainpath (capture)
>> \-> rkisp1_resizer_selfpath -> rkisp1_selfpath (capture)
>>   ^ here
>>   |
>>
>> So users can disable one of the capture paths when unused, to avoid
>> worring about matching formats.
>>
>> Make the following links immutable to simplify userspace:
>>
>> rkisp1_resizer_mainpath -> rkisp1_mainpath
>> rkisp1_resizer_selfpath -> rkisp1_selfpath
>> rkisp1_params   -> rkisp1_isp
>> rkisp1_isp  -> rkisp1_stats
>>
>> Signed-off-by: Helen Koike 
>>
>> ---
>> This is the topology graph after disabling all the links with
>> media -r
>> http://col.la/rkisp1immutable
>>
>> Dashed links are the only one can can be enabled/disabled, the others
>> are immutable.
>>
>>  drivers/staging/media/rkisp1/rkisp1-dev.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c 
>> b/drivers/staging/media/rkisp1/rkisp1-dev.c
>> index 558126e66465..4030d5e71af1 100644
>> --- a/drivers/staging/media/rkisp1/rkisp1-dev.c
>> +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
>> @@ -145,14 +145,15 @@ static int rkisp1_create_links(struct rkisp1_device 
>> *rkisp1)
>>  flags = 0;
>>  }
>>  
>> -flags = MEDIA_LNK_FL_ENABLED;
>> +flags = MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE;
>>  
>>  /* create ISP->RSZ->CAP links */
>>  for (i = 0; i < 2; i++) {
>>  source = >isp.sd.entity;
>>  sink = >resizer_devs[i].sd.entity;
> 
> nit: To keep with the style of the rest of the function I would set 
> flags here and once more bellow in the same loop.


Do you mean this: http://ix.io/27Pm ?
hmm, I don't see why to assign flags inside the loop.
the previous loop is a different case, since it sets the link
to the first sensor as enabled, but the other sensor links are disabled
(in case there are more then one link).

> 
> With or without this fixed,
> 
> Reviewed-by: Niklas Söderlund 

Thanks,
Helen

> 
>>  ret = media_create_pad_link(source, RKISP1_ISP_PAD_SOURCE_VIDEO,
>> -sink, RKISP1_RSZ_PAD_SINK, flags);
>> +sink, RKISP1_RSZ_PAD_SINK,
>> +MEDIA_LNK_FL_ENABLED);
>>  if (ret)
>>  return ret;
>>  
>> -- 
>> 2.24.0
>>
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: media: rkisp1: make links immutable by default

2020-01-17 Thread Helen Koike
The only places which make sese to allow users to enable or disable
links are:

* between sensors and isp:
So users can select which sensor should be used while streaming

* between isp and the resizers:
  |
  v here
rkisp1_isp:2 -> rkisp1_resizer_mainpath -> rkisp1_mainpath (capture)
\-> rkisp1_resizer_selfpath -> rkisp1_selfpath (capture)
  ^ here
  |

So users can disable one of the capture paths when unused, to avoid
worring about matching formats.

Make the following links immutable to simplify userspace:

rkisp1_resizer_mainpath -> rkisp1_mainpath
rkisp1_resizer_selfpath -> rkisp1_selfpath
rkisp1_params   -> rkisp1_isp
rkisp1_isp  -> rkisp1_stats

Signed-off-by: Helen Koike 

---
This is the topology graph after disabling all the links with
media -r
http://col.la/rkisp1immutable

Dashed links are the only one can can be enabled/disabled, the others
are immutable.

 drivers/staging/media/rkisp1/rkisp1-dev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c 
b/drivers/staging/media/rkisp1/rkisp1-dev.c
index 558126e66465..4030d5e71af1 100644
--- a/drivers/staging/media/rkisp1/rkisp1-dev.c
+++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
@@ -145,14 +145,15 @@ static int rkisp1_create_links(struct rkisp1_device 
*rkisp1)
flags = 0;
}
 
-   flags = MEDIA_LNK_FL_ENABLED;
+   flags = MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE;
 
/* create ISP->RSZ->CAP links */
for (i = 0; i < 2; i++) {
source = >isp.sd.entity;
sink = >resizer_devs[i].sd.entity;
ret = media_create_pad_link(source, RKISP1_ISP_PAD_SOURCE_VIDEO,
-   sink, RKISP1_RSZ_PAD_SINK, flags);
+   sink, RKISP1_RSZ_PAD_SINK,
+   MEDIA_LNK_FL_ENABLED);
if (ret)
return ret;
 
-- 
2.24.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] media: staging: rkisp1: Fix undefined reference to `phy_mipi_dphy_get_default_config' in rkisp1_mipi_csi2_start

2020-01-13 Thread Helen Koike


On 1/13/20 11:53 PM, zhangxiaoxu (A) wrote:
> 
> 
> 在 2020/1/14 1:34, Helen Koike 写道:
>> Hi Zhang,
>>
>> Thank you for the patch.
>>
>> On 1/13/20 1:48 AM, Zhang Xiaoxu wrote:
>>> If 'GENERIC_PHY_MIPI_DPHY' not configured, there is an error:
>>>
>>> drivers/staging/media/rkisp1/rkisp1-isp.o:
>>> In function `rkisp1_mipi_csi2_start.isra.5':
>>> rkisp1-isp.c:(.text+0x1238):
>>> undefined reference to `phy_mipi_dphy_get_default_config'
>>> make: *** [vmlinux] Error 1
>>>
>>> Signed-off-by: Zhang Xiaoxu 
>>> ---
>>>   drivers/staging/media/rkisp1/Kconfig | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/staging/media/rkisp1/Kconfig 
>>> b/drivers/staging/media/rkisp1/Kconfig
>>> index b859a493caba..788bcb703376 100644
>>> --- a/drivers/staging/media/rkisp1/Kconfig
>>> +++ b/drivers/staging/media/rkisp1/Kconfig
>>> @@ -8,6 +8,7 @@ config VIDEO_ROCKCHIP_ISP1
>>>   select VIDEOBUF2_VMALLOC
>>>   select V4L2_FWNODE
>>>   select PHY_ROCKCHIP_DPHY_RX0
>>> +    select GENERIC_PHY_MIPI_DPHY
>>>   default n
>>>   help
>>>     Enable this to support the Image Signal Processing (ISP) module
>>>
>>
>> How are you reproducing this?
>>
>> VIDEO_ROCKCHIP_ISP1 selects PHY_ROCKCHIP_DPHY_RX0
>>
>> and
>>
>> PHY_ROCKCHIP_DPHY_RX0 already selects GENERIC_PHY_MIPI_DPHY,
>>
>> So it shouldn't be a problem (unless I misunderstood something, which is 
>> probably the case).
> Yes, you are right.
> 
> This can be reproduce with the following config:
> # CONFIG_OF is not set
> #
> # soc_camera sensor drivers
> #
> CONFIG_PHY_ROCKCHIP_DPHY_RX0=y
> CONFIG_VIDEO_ROCKCHIP_ISP1=y
> 
> I think the cause of the problem is:
> 'CONFIG_PHY_ROCKCHIP_DPHY_RX0' should also be depended on 'CONFIG_OF'.
> 

You probably mean 'CONFIG_VIDEO_ROCKCHIP_ISP1' right? As the phy driver already 
depends on OF.
Yes, if I understand correctly it should. Could you send a patching adding it?

Thanks
Helen
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] media: staging: rkisp1: Fix undefined reference to `phy_mipi_dphy_get_default_config' in rkisp1_mipi_csi2_start

2020-01-13 Thread Helen Koike
Hi Zhang,

Thank you for the patch.

On 1/13/20 1:48 AM, Zhang Xiaoxu wrote:
> If 'GENERIC_PHY_MIPI_DPHY' not configured, there is an error:
> 
> drivers/staging/media/rkisp1/rkisp1-isp.o:
>   In function `rkisp1_mipi_csi2_start.isra.5':
> rkisp1-isp.c:(.text+0x1238):
>   undefined reference to `phy_mipi_dphy_get_default_config'
> make: *** [vmlinux] Error 1
> 
> Signed-off-by: Zhang Xiaoxu 
> ---
>  drivers/staging/media/rkisp1/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/media/rkisp1/Kconfig 
> b/drivers/staging/media/rkisp1/Kconfig
> index b859a493caba..788bcb703376 100644
> --- a/drivers/staging/media/rkisp1/Kconfig
> +++ b/drivers/staging/media/rkisp1/Kconfig
> @@ -8,6 +8,7 @@ config VIDEO_ROCKCHIP_ISP1
>   select VIDEOBUF2_VMALLOC
>   select V4L2_FWNODE
>   select PHY_ROCKCHIP_DPHY_RX0
> + select GENERIC_PHY_MIPI_DPHY
>   default n
>   help
> Enable this to support the Image Signal Processing (ISP) module
> 

How are you reproducing this?

VIDEO_ROCKCHIP_ISP1 selects PHY_ROCKCHIP_DPHY_RX0

and

PHY_ROCKCHIP_DPHY_RX0 already selects GENERIC_PHY_MIPI_DPHY,

So it shouldn't be a problem (unless I misunderstood something, which is 
probably the case).

Thanks
Helen
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [Lkcamp] [PATCH] isdn: hysdn: fix code style error from checkpatch

2019-08-05 Thread Helen Koike
Hi,

On Fri, Aug 2, 2019 at 6:55 PM Stephen Hemminger
 wrote:
>
> On Fri,  2 Aug 2019 19:50:17 +
> Ricardo Bruno Lopes da Silva  wrote:
>
> > Fix error bellow from checkpatch.
> >
> > WARNING: Block comments use * on subsequent lines
> > +/***
> > +
> >
> > Signed-off-by: Ricardo Bruno Lopes da Silva 
>
> Read the TODO, these drivers are scheduled for removal, so changes
> are not helpful at this time.

I'm sorry, it was me who suggested Ricardo to make this change
as his first contribution, I didn't see the TODO file.

Ricardo, it would be great if you could send a patch to another staging driver
to get starting and to learn how the kernel development cycle works.
Feel free to ping me or the lkcamp group if you want some pointers/guidance.

Thanks both for your contribution.
Helen

>
> ___
> Lkcamp mailing list
> lkc...@lists.libreplanetbr.org
> https://lists.libreplanetbr.org/mailman/listinfo/lkcamp
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [Lkcamp] [PATCH] staging: isdn: remove unnecessary parentheses

2019-08-05 Thread Helen Koike
Hi,

On Mon, Aug 5, 2019 at 11:51 AM Dan Carpenter  wrote:
>
> This driver is obselete so we're just keeping it around for a couple
> kernel releases and then deleting it.  We're not taking cleanups for it.

I'm sorry, it was me who suggested Thiago to make this change
as his first contribution, I didn't see the TODO file.

Thiago, it would be great if you could send a patch to another staging driver
to get starting and to learn how the kernel development cycle works.
Feel free to ping me or the lkcamp group if you want some pointers/guidance.

Thanks both for your contribution.
Helen

>
> regards,
> dan carpenter
>
>
> ___
> Lkcamp mailing list
> lkc...@lists.libreplanetbr.org
> https://lists.libreplanetbr.org/mailman/listinfo/lkcamp
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [Lkcamp] [PATCH] staging/rtl8723bs: Fix code indent.

2019-04-03 Thread Helen Koike
Hi Beatriz,

Thank you for the patch, just some small comments.

Regarding the patch title, if you run

git log drivers/staging/rtl8723bs/hal/hal_com_phycfg.c

You will see that commits starts with the following tags "staging:
rtl8723bs: "

Also, try to add a bit more information to the title, for example:

"staging: rtl8723bs: replace spaces by tabs"

See my other comments below:

On Wed, Apr 3, 2019 at 3:42 PM Beatriz Martins de Carvalho
 wrote:
>
> Fix Error: code indent

Please, add more information to your messages, you can add which
checkpatch error you fixed.
See this example: https://lkml.org/lkml/2019/4/2/1184

Please, re-submit version 2 of this patch, it should start with: [PATCH v2]
If you are using git send-email, you can use the option "-v2" and it
will fix the title for you.
Remember to add a change log, see this example:
https://marc.info/?l=linux-kernel=154201089629031=2
See the change log after the "---". It is important to be after the
triple dashes, as this is a comment to help reviewers and it is not
meant for mainline.

I hope this helps! Let me know if you have any questions :)

Regards,
Helen

>
> Signed-off-by: Beatriz Martins de Carvalho 
> 
> ---
>  drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c 
> b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
> index 828b328adab8..fc49cdfcd477 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
> @@ -1723,7 +1723,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 
> reg_pwr_tbl_sel,
> idx_rate_sctn = get_rate_sctn_idx(data_rate);
>
> if (band_type == BAND_ON_5G && idx_rate_sctn == 0)
> -DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", DataRate);
> +   DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", DataRate);
>
> /*  workaround for wrong index combination to obtain tx power limit, 
> */
> /*  OFDM only exists in BW 20M */
> --
> 2.17.1
>
>
> ___
> Lkcamp mailing list
> lkc...@lists.libreplanetbr.org
> https://lists.libreplanetbr.org/mailman/listinfo/lkcamp
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel