[PATCH v5 16/16] MAINTAINERS: Add entry for the Allwinner A83T MIPI CSI-2 bridge

2021-01-15 Thread Paul Kocialkowski
Add myself as maintainer of the A83T MIPI CSI-2 bridge media driver. Signed-off-by: Paul Kocialkowski --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a41c41f6387c..af8095085f0f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -718,6 +718,1

[PATCH v5 14/16] media: sunxi: Add support for the A83T MIPI CSI-2 controller

2021-01-15 Thread Paul Kocialkowski
The A83T supports MIPI CSI-2 with a composite controller, covering both the protocol logic and the D-PHY implementation. This controller seems to be found on the A83T only and probably was abandoned since. This implementation splits the protocol and D-PHY registers and uses the PHY framework inter

[PATCH v5 15/16] ARM: dts: sun8i: a83t: Add MIPI CSI-2 controller node

2021-01-15 Thread Paul Kocialkowski
MIPI CSI-2 is supported on the A83T with a dedicated controller that covers both the protocol and D-PHY. It can be connected to the CSI interface as a V4L2 subdev through the fwnode graph. This is not done by default since connecting the bridge without a subdev attached to it will cause a failure

[PATCH v5 12/16] MAINTAINERS: Add entry for the Allwinner A31 MIPI CSI-2 bridge

2021-01-15 Thread Paul Kocialkowski
Add myself as maintainer of the A31 MIPI CSI-2 bridge media driver. Signed-off-by: Paul Kocialkowski --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 57f9e3047227..a41c41f6387c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -710,6 +710,14

[PATCH v5 11/16] ARM: dts: sun8i: v3s: Add nodes for MIPI CSI-2 support

2021-01-15 Thread Paul Kocialkowski
MIPI CSI-2 is supported on the V3s with an A31-based MIPI CSI-2 bridge controller. The controller uses a separate D-PHY, which is the same that is otherwise used for MIPI DSI, but used in Rx mode. On the V3s, the CSI0 controller is dedicated to MIPI CSI-2 as it does not have access to any parallel

[PATCH v5 07/16] dt-bindings: media: sun6i-a31-csi: Add MIPI CSI-2 input port

2021-01-15 Thread Paul Kocialkowski
The A31 CSI controller supports two distinct input interfaces: parallel and an external MIPI CSI-2 bridge. The parallel interface is often connected to a set of hardware pins while the MIPI CSI-2 bridge is an internal FIFO-ish link. As a result, these two inputs are distinguished as two different p

[PATCH v5 13/16] dt-bindings: media: Add A83T MIPI CSI-2 bindings documentation

2021-01-15 Thread Paul Kocialkowski
This introduces YAML bindings documentation for the A83T MIPI CSI-2 controller. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring --- .../media/allwinner,sun8i-a83t-mipi-csi2.yaml | 147 ++ 1 file changed, 147 insertions(+) create mode 100644 Documentation/devicetree/b

[PATCH v5 09/16] dt-bindings: media: Add A31 MIPI CSI-2 bindings documentation

2021-01-15 Thread Paul Kocialkowski
This introduces YAML bindings documentation for the A31 MIPI CSI-2 controller. Signed-off-by: Paul Kocialkowski Reviewed-by: Maxime Ripard Reviewed-by: Rob Herring --- .../media/allwinner,sun6i-a31-mipi-csi2.yaml | 156 ++ 1 file changed, 156 insertions(+) create mode 100644

[PATCH v5 08/16] media: sun6i-csi: Add support for MIPI CSI-2 bridge input

2021-01-15 Thread Paul Kocialkowski
The A31 CSI controller supports a MIPI CSI-2 bridge input, which has its own dedicated port in the fwnode graph. Support for this input is added with this change: - two pads are defined for the media entity instead of one and only one needs to be connected at a time; - the pads currently match t

[PATCH v5 10/16] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2021-01-15 Thread Paul Kocialkowski
The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 bridge 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. It is repr

[PATCH v5 04/16] media: sun6i-csi: Stop using the deprecated fwnode endpoint parser

2021-01-15 Thread Paul Kocialkowski
The v4l2_async_notifier_parse_fwnode_endpoints helper is getting deprecated in favor of explicit parsing of the endpoints. Implement it instead of using this deprecated function. Since this was the last user of the helper, it should now be safe to remove. Signed-off-by: Paul Kocialkowski --- .

[PATCH v5 05/16] media: sun6i-csi: Use common V4L2 format info for storage bpp

2021-01-15 Thread Paul Kocialkowski
V4L2 has a common helper which can be used for calculating the number of stored bits per pixels of a given (stored) image format. Use the helper-returned structure instead of our own switch/case list. Note that a few formats are not in that list so we keep them as special cases. The custom switch

[PATCH v5 00/16] Allwinner MIPI CSI-2 support for A31/V3s/A83T

2021-01-15 Thread Paul Kocialkowski
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 distinguis

[PATCH v5 06/16] media: sun6i-csi: Only configure the interface data width for parallel

2021-01-15 Thread Paul Kocialkowski
Bits related to the interface data width are only applicable to the parallel interface and are irrelevant when the CSI controller is taking input from the MIPI CSI-2 controller. In prevision of adding support for this case, set these bits conditionally so there is no ambiguity. The conditional blo

[PATCH v5 03/16] phy: allwinner: phy-sun6i-mipi-dphy: Support D-PHY Rx mode for MIPI CSI-2

2021-01-15 Thread Paul Kocialkowski
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 Allwinner's V3s Linux SDK implementation, which was used as a documentation base. Sig

[PATCH v5 02/16] phy: Distinguish between Rx and Tx for MIPI D-PHY with submodes

2021-01-15 Thread Paul Kocialkowski
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

[PATCH v5 01/16] docs: phy: Add a part about PHY mode and submode

2021-01-15 Thread Paul Kocialkowski
Besides giving pointers to the relevant functions for PHY mode and submode configuration, this clarifies the need to set them before powering on the PHY. Signed-off-by: Paul Kocialkowski Reviewed-by: Maxime Ripard --- Documentation/driver-api/phy/phy.rst | 18 ++ 1 file changed,

[staging:staging-linus] BUILD SUCCESS a1bfb0ccf94dc79223d0db0d50237d3b3898f0b2

2021-01-15 Thread kernel test robot
lmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig x86_64 randconfig-a004-20210115 x86_64 randconfig-a006-20210115 x86_64 randconfig-a001-20210

Re: [PATCH v3 4/4] phy: phy-hi3670-usb3: move driver from staging into phy

2021-01-15 Thread Rob Herring
On Fri, 15 Jan 2021 09:10:03 +0100, Mauro Carvalho Chehab wrote: > The phy USB3 driver for Hisilicon 970 (hi3670) is ready > for mainstream. Mode it from staging into the main driver's > phy/ directory. > > Signed-off-by: Mauro Carvalho Chehab > --- > .../bindings/phy/phy-hi3670-usb3.yaml

Re: [PATCH v3 4/4] phy: phy-hi3670-usb3: move driver from staging into phy

2021-01-15 Thread Joe Perches
On Fri, 2021-01-15 at 09:10 +0100, Mauro Carvalho Chehab wrote: > The phy USB3 driver for Hisilicon 970 (hi3670) is ready > for mainstream. Mode it from staging into the main driver's > phy/ directory. [] > diff --git a/Documentation/devicetree/bindings/phy/phy-hi3670-usb3.yaml > b/Documentation/d

[PATCH v3 4/4] phy: phy-hi3670-usb3: move driver from staging into phy

2021-01-15 Thread Mauro Carvalho Chehab
The phy USB3 driver for Hisilicon 970 (hi3670) is ready for mainstream. Mode it from staging into the main driver's phy/ directory. Signed-off-by: Mauro Carvalho Chehab --- .../bindings/phy/phy-hi3670-usb3.yaml | 72 ++ MAINTAINERS | 9 +- drivers/phy

[PATCH v3 1/4] staging: hikey9xx: phy-hi3670-usb3.c: use bitfield macros

2021-01-15 Thread Mauro Carvalho Chehab
Cleanup the bitfield macros by using FIELD_PREP() and GENMASK(). While here, place all hexadecimal values in lowercase. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/phy-hi3670-usb3.c | 61 ++ 1 file changed, 28 insertions(+), 33 deletions(-) diff --git

[PATCH v3 0/4] Promote Hikey 970 USB phy out of staging

2021-01-15 Thread Mauro Carvalho Chehab
Hi Vinod/Rob, This series moves the Hikey 970 USB PHY driver out of staging. The 3 initial patches address the issues pointed by Vinod: patch 1 change the logic to use GENMASK and FIELD_GET/FIELD_PREP macros. It also places all hexadecimal values in lowercase; patch 2 add a delay inside the re

[PATCH v3 2/4] staging: hikey9xx: phy-hi3670-usb3.c: adjust retry logic

2021-01-15 Thread Mauro Carvalho Chehab
Instead of running a loop up to 100k times, add a small delay inside it, running it up to 10 times, waiting up to 100-200 us. It should be noticed that I don't have the datasheet for this PHY. So, not sure if this time will cover all situations. Signed-off-by: Mauro Carvalho Chehab --- drivers/

[PATCH v3 3/4] staging: hikey9xx: phy-hi3670-usb3.c: hi3670_is_abbclk_seleted() returns bool

2021-01-15 Thread Mauro Carvalho Chehab
Instead of using 1/0 for true/false, change the type to boolean and change the returned value. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/phy-hi3670-usb3.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/hikey9xx/phy-hi3670-us