devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 000/106] CCS driver
@ 2020-10-07  8:44 Sakari Ailus
  2020-10-07  8:44 ` [PATCH v2 020/106] dt-bindings: nokia,smia: Fix link-frequencies documentation Sakari Ailus
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:44 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

Hello everyone,

Here's a set of patches that turn the existing SMIA driver into a MIPI CCS
driver while maintaining SMIA support. A number of bugs in the existing
code are fixed in this set, too.

The changes at this point are primarily focused on dealing with new
mandatory driver features related to PLL configuration (as CCS allows for
much more variation there) and things such as integer conversion from
U16.U16 format instead of float. There are some other new features as well
such as digital gain and support for getting device specific analogue gain
coefficients.

A new feature in CCS is CCS static data which makes it possible to obtain
sensor's capabilities and limits from a file chosen based on sensor
identification. CCS static data is used also for storing MSR registers so
supporting new, CCS compliant devices requires no driver changes.

Note that the library as well as the register definitions are dual
licensed under GNU GPL v2 OR BSD 3-clause licenses for use outside the
Linux kernel.

Also DT bindings are updated accordingly and converted to YAML format.

More information on MIPI CCS can be found here:

<URL:https://www.mipi.org/specifications/camera-command-set>

Comments are welcome.

since v1 (DT bindings):

- Remove DT vendor prefix, use vendor-less compatible string

- Add spec version specific compatible strings together with the generic one

- Add VCore and VIO regulators

- Fix rotation property description

- Use less verbose definition of data-lanes property

- Remove CSI-1 bus; this isn't really there, the old stuff is all CCP2

- Make bus-type a required property

- Use additionalProperties: false on the device

- Fix the example (change compatible string, remove nokia,nvm leftover
  property)

- Fix MAINTAINERS

since v1 (driver):

- Generate register and limit definitions from source

- Style fixes in ccs-pll.c

- Use correct MODULE_LICENSE in ccs-pll.c

- Support for VCore and VIO regulators

- Remove extra delays from power-up sequence

- Adapt to parsing changes in v4l2_fwnode_endpoint_alloc_parse(), i.e.
  call it just once. This also fixes parsing bus-type-less DT binaries.

- Fix MAINTAINERS

Sakari Ailus (106):
  smiapp: Generate CCS register definitions and limits
  smiapp: Use CCS register flags
  smiapp: Calculate CCS limit offsets and limit buffer size
  smiapp: Remove macros for defining registers, merge definitions
  smiapp: Add macros for accessing CCS registers
  smiapp: Use MIPI CCS version and manufacturer ID information
  smiapp: Read CCS limit values
  smiapp: Switch to CCS limits
  smiapp: Obtain frame descriptor from CCS limits
  smiapp: Use CCS limits in reading data format descriptors
  smiapp: Use CCS limits in reading binning capabilities
  smiapp: Use CCS registers
  smiapp: Remove quirk function for writing a single 8-bit register
  smiapp: Rename register access functions
  smiapp: Internal rename to CCS
  smiapp: Differentiate CCS sensors from SMIA in subdev naming
  smiapp: Rename as "ccs"
  ccs: Remove profile concept
  ccs: Give all subdevs a function
  dt-bindings: nokia,smia: Fix link-frequencies documentation
  dt-bindings: nokia,smia: Make vana-supply optional
  dt-bindings: nokia,smia: Remove nokia,nvm-size property
  dt-bindings: nokia,smia: Convert to YAML
  dt-bindings: nokia,smia: Use better active polarity for reset
  dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support
  dt-bindings: mipi-ccs: Add bus-type for C-PHY support
  ccs: Request for "reset" GPIO
  ccs: Add MIPI CCS compatible strings
  ccs: Remove the I²C ID table
  ccs: Remove remaining support for platform data
  ccs: Make hwcfg part of the device specific struct
  ccs: Fix obtaining bus information from firmware
  ccs: Add CCS static data parser library
  ccs: Combine revision number major and minor into one
  ccs: Read CCS static data from firmware binaries
  ccs: Stop reading arrays after the first zero
  ccs: The functions to get compose or crop rectangle never return NULL
  ccs: Replace somewhat harsh internal checks based on BUG with WARN_ON
  ccs: Refactor register reading a little
  ccs: Make real to integer number conversion optional
  ccs: Move limit value real to integer conversion from read to access
    time
  ccs: Read ireal numbers correctly
  smiapp-pll: Rename as ccs-pll
  ccs-pll: Fix MODULE_LICENSE
  ccs: Change my e-mail address
  ccs: Add support for manufacturer regs from sensor and module files
  ccs: Use static data read-only registers
  ccs: Clean up runtime PM usage
  ccs: Wrap long lines, unwrap short ones
  ccs: Add device compatible identifiers for telling SMIA and CCS apart
  ccs: Use longer pre-I²C sleep for CCS compliant devices
  ccs: Remove unnecessary delays from power-up sequence
  dt-bindings: mipi,ccs: Don't mention vana voltage
  dt-bindings: mipi,ccs: Add vcore and vio supplies
  ccs: Use all regulators
  ccs-pll: Don't use div_u64 to divide a 32-bit number
  ccs-pll: Split limits and PLL configuration into front and back parts
  ccs-pll: Use correct VT divisor for calculating VT SYS divisor
  ccs-pll: End search if there are no better values available
  ccs-pll: Remove parallel bus support
  ccs-pll: Differentiate between CSI-2 D-PHY and C-PHY
  ccs-pll: Move the flags field down, away from 8-bit fields
  ccs-pll: Document the structs in the header as well as the function
  ccs-pll: Use the BIT macro
  ccs-pll: Begin calculation from OP system clock frequency
  ccs-pll: Fix condition for pre-PLL divider lower bound
  ccs-pll: Avoid overflow in pre-PLL divisor lower bound search
  ccs-pll: Fix comment on check against maximum PLL multiplier
  ccs-pll: Fix check for PLL multiplier upper bound
  ccs-pll: Use explicit 32-bit unsigned type
  ccs-pll: Add support for lane speed model
  ccs: Add support for lane speed model
  ccs-pll: Add support for decoupled OP domain calculation
  ccs-pll: Add support for extended input PLL clock divider
  ccs-pll: Support two cycles per pixel on OP domain
  ccs-pll: Add support flexible OP PLL pixel clock divider
  ccs-pll: Add sanity checks
  ccs-pll: Add C-PHY support
  ccs-pll: Split off VT subtree calculation
  ccs-pll: Check for derating and overrating, support non-derating
    sensors
  ccs-pll: Better separate OP and VT sub-tree calculation
  ccs-pll: Print relevant information on PLL tree
  ccs-pll: Rework bounds checks
  ccs-pll: Make VT divisors 16-bit
  ccs-pll: Fix VT post-PLL divisor calculation
  ccs-pll: Separate VT divisor limit calculation from the rest
  ccs-pll: Add trivial dual PLL support
  ccs: Dual PLL support
  ccs-pll: Add support for DDR OP system and pixel clocks
  ccs: Add support for DDR OP SYS and OP PIX clocks
  ccs: Print written register values
  ccs-pll: Print pixel rates
  ccs: Add support for obtaining C-PHY configuration from firmware
  ccs: Add digital gain support
  ccs: Add support for old-style SMIA digital gain
  ccs: Remove analogue gain field
  ccs: Only add analogue gain control if the device supports it
  v4l: uapi: Add user control base for CCS controls
  v4l: uapi: ccs: Add controls for analogue gain constants
  ccs: Add support for analogue gain coefficient controls
  v4l: uapi: ccs: Add controls for CCS alternative analogue gain
  ccs: Add support for alternate analogue global gain
  ccs: Add debug prints for MSR registers
  v4l: uapi: ccs: Add CCS controls for shading correction
  ccs: Add shading correction and luminance correction level controls
  ccs: Add CCS ACPI device ID

 .../bindings/media/i2c/mipi-ccs.yaml          |  135 +
 .../bindings/media/i2c/nokia,smia.txt         |   66 -
 MAINTAINERS                                   |   21 +-
 drivers/media/i2c/Kconfig                     |    4 +-
 drivers/media/i2c/Makefile                    |    4 +-
 drivers/media/i2c/{smiapp-pll.c => ccs-pll.c} | 1012 ++++---
 drivers/media/i2c/{smiapp-pll.h => ccs-pll.h} |  196 +-
 drivers/media/i2c/{smiapp => ccs}/Kconfig     |    9 +-
 drivers/media/i2c/{smiapp => ccs}/Makefile    |   18 +-
 .../{smiapp/smiapp-core.c => ccs/ccs-core.c}  | 2426 ++++++++++-------
 drivers/media/i2c/ccs/ccs-data-defs.h         |  215 ++
 drivers/media/i2c/ccs/ccs-data.c              |  949 +++++++
 drivers/media/i2c/ccs/ccs-data.h              |  116 +
 drivers/media/i2c/ccs/ccs-os.h                |   15 +
 .../smiapp-quirk.c => ccs/ccs-quirk.c}        |  105 +-
 .../smiapp-quirk.h => ccs/ccs-quirk.h}        |   54 +-
 .../smiapp-regs.c => ccs/ccs-reg-access.c}    |  296 +-
 .../smiapp-regs.h => ccs/ccs-reg-access.h}    |   40 +-
 drivers/media/i2c/ccs/ccs-regs.txt            | 1041 +++++++
 .../media/i2c/{smiapp/smiapp.h => ccs/ccs.h}  |  185 +-
 drivers/media/i2c/ccs/mk-ccs-regs             |  405 +++
 .../smiapp-reg.h => ccs/smiapp-reg-defs.h}    |  502 +++-
 drivers/media/i2c/smiapp/smiapp-limits.c      |  118 -
 drivers/media/i2c/smiapp/smiapp-limits.h      |  114 -
 drivers/media/i2c/smiapp/smiapp-reg-defs.h    |  489 ----
 include/uapi/linux/ccs.h                      |   21 +
 include/uapi/linux/v4l2-controls.h            |    6 +
 27 files changed, 6166 insertions(+), 2396 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
 rename drivers/media/i2c/{smiapp-pll.c => ccs-pll.c} (16%)
 rename drivers/media/i2c/{smiapp-pll.h => ccs-pll.h} (18%)
 rename drivers/media/i2c/{smiapp => ccs}/Kconfig (48%)
 rename drivers/media/i2c/{smiapp => ccs}/Makefile (14%)
 rename drivers/media/i2c/{smiapp/smiapp-core.c => ccs/ccs-core.c} (43%)
 create mode 100644 drivers/media/i2c/ccs/ccs-data-defs.h
 create mode 100644 drivers/media/i2c/ccs/ccs-data.c
 create mode 100644 drivers/media/i2c/ccs/ccs-data.h
 create mode 100644 drivers/media/i2c/ccs/ccs-os.h
 rename drivers/media/i2c/{smiapp/smiapp-quirk.c => ccs/ccs-quirk.c} (63%)
 rename drivers/media/i2c/{smiapp/smiapp-quirk.h => ccs/ccs-quirk.h} (53%)
 rename drivers/media/i2c/{smiapp/smiapp-regs.c => ccs/ccs-reg-access.c} (37%)
 rename drivers/media/i2c/{smiapp/smiapp-regs.h => ccs/ccs-reg-access.h} (16%)
 create mode 100644 drivers/media/i2c/ccs/ccs-regs.txt
 rename drivers/media/i2c/{smiapp/smiapp.h => ccs/ccs.h} (52%)
 create mode 100644 drivers/media/i2c/ccs/mk-ccs-regs
 rename drivers/media/i2c/{smiapp/smiapp-reg.h => ccs/smiapp-reg-defs.h} (10%)
 delete mode 100644 drivers/media/i2c/smiapp/smiapp-limits.c
 delete mode 100644 drivers/media/i2c/smiapp/smiapp-limits.h
 delete mode 100644 drivers/media/i2c/smiapp/smiapp-reg-defs.h
 create mode 100644 include/uapi/linux/ccs.h

-- 
2.27.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v2 020/106] dt-bindings: nokia,smia: Fix link-frequencies documentation
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
@ 2020-10-07  8:44 ` Sakari Ailus
  2020-10-07  8:44 ` [PATCH v2 021/106] dt-bindings: nokia,smia: Make vana-supply optional Sakari Ailus
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:44 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

The link-frequencies property belongs to the endpoint, not to the node
representing the device.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/media/i2c/nokia,smia.txt          | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
index 10ece8108081..6c45c79ef91f 100644
--- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
+++ b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
@@ -20,8 +20,6 @@ Mandatory properties
   dependent).
 - clocks: External clock to the sensor
 - clock-frequency: Frequency of the external clock to the sensor
-- link-frequencies: List of allowed data link frequencies. An array of
-  64-bit elements.
 
 
 Optional properties
@@ -39,6 +37,8 @@ Endpoint node mandatory properties
 ----------------------------------
 
 - data-lanes: <1..n>
+- link-frequencies: List of allowed data link frequencies. An array of
+  64-bit elements.
 
 
 Example
@@ -55,11 +55,13 @@ Example
 		clocks = <&omap3_isp 0>;
 		clock-frequency = <9600000>;
 		nokia,nvm-size = <512>; /* 8 * 64 */
-		link-frequencies = /bits/ 64 <199200000 210000000 499200000>;
 		port {
 			smiapp_ep: endpoint {
 				data-lanes = <1 2>;
 				remote-endpoint = <&csi2a_ep>;
+				link-frequencies =
+					/bits/ 64 <199200000 210000000
+						   499200000>;
 			};
 		};
 	};
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 021/106] dt-bindings: nokia,smia: Make vana-supply optional
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
  2020-10-07  8:44 ` [PATCH v2 020/106] dt-bindings: nokia,smia: Fix link-frequencies documentation Sakari Ailus
@ 2020-10-07  8:44 ` Sakari Ailus
  2020-10-07  8:44 ` [PATCH v2 022/106] dt-bindings: nokia,smia: Remove nokia,nvm-size property Sakari Ailus
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:44 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

vana-supply is optional in the spec, therefore make it optional in
bindings, too.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/i2c/nokia,smia.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
index 6c45c79ef91f..5ea4f799877b 100644
--- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
+++ b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
@@ -16,8 +16,6 @@ Mandatory properties
 
 - compatible: "nokia,smia"
 - reg: I2C address (0x10, or an alternative address)
-- vana-supply: Analogue voltage supply (VANA), typically 2,8 volts (sensor
-  dependent).
 - clocks: External clock to the sensor
 - clock-frequency: Frequency of the external clock to the sensor
 
@@ -31,6 +29,8 @@ Optional properties
 - rotation: Integer property; valid values are 0 (sensor mounted upright)
 	    and 180 (sensor mounted upside down). See
 	    ../video-interfaces.txt .
+- vana-supply: Analogue voltage supply (VANA), typically 2,8 volts (sensor
+  dependent).
 
 
 Endpoint node mandatory properties
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 022/106] dt-bindings: nokia,smia: Remove nokia,nvm-size property
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
  2020-10-07  8:44 ` [PATCH v2 020/106] dt-bindings: nokia,smia: Fix link-frequencies documentation Sakari Ailus
  2020-10-07  8:44 ` [PATCH v2 021/106] dt-bindings: nokia,smia: Make vana-supply optional Sakari Ailus
@ 2020-10-07  8:44 ` Sakari Ailus
  2020-10-07 16:04   ` Rob Herring
  2020-10-07  8:45 ` [PATCH v2 023/106] dt-bindings: nokia,smia: Convert to YAML Sakari Ailus
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:44 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

nokia,nvm-size property was removed from the bindings but it was left in
the example. Remove it from the example, too.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 Documentation/devicetree/bindings/media/i2c/nokia,smia.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
index 5ea4f799877b..5f39a7070c51 100644
--- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
+++ b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
@@ -54,7 +54,6 @@ Example
 		vana-supply = <&vaux3>;
 		clocks = <&omap3_isp 0>;
 		clock-frequency = <9600000>;
-		nokia,nvm-size = <512>; /* 8 * 64 */
 		port {
 			smiapp_ep: endpoint {
 				data-lanes = <1 2>;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 023/106] dt-bindings: nokia,smia: Convert to YAML
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
                   ` (2 preceding siblings ...)
  2020-10-07  8:44 ` [PATCH v2 022/106] dt-bindings: nokia,smia: Remove nokia,nvm-size property Sakari Ailus
@ 2020-10-07  8:45 ` Sakari Ailus
  2020-10-07 16:06   ` Rob Herring
  2020-10-07  8:45 ` [PATCH v2 024/106] dt-bindings: nokia,smia: Use better active polarity for reset Sakari Ailus
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:45 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

Convert nokia,smia DT bindings to YAML.

Also add explicit license to bindings.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 .../bindings/media/i2c/nokia,smia.txt         |  67 -----------
 .../bindings/media/i2c/nokia,smia.yaml        | 106 ++++++++++++++++++
 MAINTAINERS                                   |   2 +-
 3 files changed, 107 insertions(+), 68 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
 create mode 100644 Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml

diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
deleted file mode 100644
index 5f39a7070c51..000000000000
--- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-SMIA/SMIA++ sensor
-
-SMIA (Standard Mobile Imaging Architecture) is an image sensor standard
-defined jointly by Nokia and ST. SMIA++, defined by Nokia, is an extension
-of that. These definitions are valid for both types of sensors.
-
-More detailed documentation can be found in
-Documentation/devicetree/bindings/media/video-interfaces.txt .
-
-The device node should contain a "port" node which may contain one or more
-endpoint nodes, in accordance with video interface bindings defined in
-Documentation/devicetree/bindings/media/video-interfaces.txt .
-
-Mandatory properties
---------------------
-
-- compatible: "nokia,smia"
-- reg: I2C address (0x10, or an alternative address)
-- clocks: External clock to the sensor
-- clock-frequency: Frequency of the external clock to the sensor
-
-
-Optional properties
--------------------
-
-- reset-gpios: XSHUTDOWN GPIO
-- flash-leds: See ../video-interfaces.txt
-- lens-focus: See ../video-interfaces.txt
-- rotation: Integer property; valid values are 0 (sensor mounted upright)
-	    and 180 (sensor mounted upside down). See
-	    ../video-interfaces.txt .
-- vana-supply: Analogue voltage supply (VANA), typically 2,8 volts (sensor
-  dependent).
-
-
-Endpoint node mandatory properties
-----------------------------------
-
-- data-lanes: <1..n>
-- link-frequencies: List of allowed data link frequencies. An array of
-  64-bit elements.
-
-
-Example
--------
-
-&i2c2 {
-	clock-frequency = <400000>;
-
-	camera-sensor@10 {
-		compatible = "nokia,smia";
-		reg = <0x10>;
-		reset-gpios = <&gpio3 20 0>;
-		vana-supply = <&vaux3>;
-		clocks = <&omap3_isp 0>;
-		clock-frequency = <9600000>;
-		port {
-			smiapp_ep: endpoint {
-				data-lanes = <1 2>;
-				remote-endpoint = <&csi2a_ep>;
-				link-frequencies =
-					/bits/ 64 <199200000 210000000
-						   499200000>;
-			};
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml b/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
new file mode 100644
index 000000000000..ee552489fa2b
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2014--2020 Intel Corporation
+
+$id: http://devicetree.org/schemas/media/i2c/nokia,smia.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SMIA/SMIA++ sensor
+
+maintainers:
+  - Sakari Ailus <sakari.ailus@linux.intel.com>
+
+description:
+
+  SMIA (Standard Mobile Imaging Architecture) is an image sensor standard
+  defined jointly by Nokia and ST. SMIA++, defined by Nokia, is an extension of
+  that. These definitions are valid for both types of sensors.
+
+  More detailed documentation can be found in
+  Documentation/devicetree/bindings/media/video-interfaces.txt .
+
+properties:
+  compatible:
+    const: nokia,smia
+
+  reg:
+    maxItems: 1
+
+  vana-supply:
+    description: Analogue voltage supply (VANA), typically 2,8 volts (sensor
+      dependent).
+    maxItems: 1
+
+  clocks:
+    description: External clock to the sensor.
+    maxItems: 1
+
+  clock-frequency:
+    description: Frequency of the external clock to the sensor in Hz.
+
+  reset-gpios:
+    description: Reset GPIO. Also commonly called XSHUTDOWN in hardware
+      documentation.
+    maxItems: 1
+
+  flash-leds:
+    description: Flash LED phandles. See ../video-interfaces.txt for details.
+
+  lens-focus:
+    description: Lens focus controller phandles. See ../video-interfaces.txt
+      for details.
+
+  rotation:
+    description: Rotation of the sensor.  See ../video-interfaces.txt for
+      details.
+    enum: [ 0, 180 ]
+
+  port:
+    type: object
+    properties:
+      endpoint:
+        type: object
+        properties:
+          link-frequencies:
+            $ref: /schemas/types.yaml#/definitions/uint64-array
+            description: List of allowed data link frequencies.
+          data-lanes:
+            minItems: 1
+            maxItems: 8
+        required:
+          - link-frequencies
+          - data-lanes
+
+required:
+  - compatible
+  - reg
+  - clock-frequency
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c2 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        clock-frequency = <400000>;
+
+        camera-sensor@10 {
+            compatible = "nokia,smia";
+            reg = <0x10>;
+            reset-gpios = <&gpio3 20 0>;
+            vana-supply = <&vaux3>;
+            clocks = <&omap3_isp 0>;
+            clock-frequency = <9600000>;
+            port {
+                smiapp_ep: endpoint {
+                    data-lanes = <1 2>;
+                    remote-endpoint = <&csi2a_ep>;
+                    link-frequencies = /bits/ 64 <199200000 210000000
+                                                  499200000>;
+                };
+            };
+        };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index f604993cead9..ec99e94e2273 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11564,7 +11564,7 @@ MIPI CCS, SMIA AND SMIA++ IMAGE SENSOR DRIVER
 M:	Sakari Ailus <sakari.ailus@linux.intel.com>
 L:	linux-media@vger.kernel.org
 S:	Maintained
-F:	Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
+F:	Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
 F:	drivers/media/i2c/ccs/
 F:	drivers/media/i2c/smiapp-pll.c
 F:	drivers/media/i2c/smiapp-pll.h
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 024/106] dt-bindings: nokia,smia: Use better active polarity for reset
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
                   ` (3 preceding siblings ...)
  2020-10-07  8:45 ` [PATCH v2 023/106] dt-bindings: nokia,smia: Convert to YAML Sakari Ailus
@ 2020-10-07  8:45 ` Sakari Ailus
  2020-10-07  8:45 ` [PATCH v2 025/106] dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support Sakari Ailus
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:45 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

Generally reset signal is active low on camera sensors. The example had it
high. Make it low, and use GPIO_ACTIVE_LOW in gpio.h for that.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml b/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
index ee552489fa2b..47df08338a42 100644
--- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
@@ -80,6 +80,8 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/gpio/gpio.h>
+
     i2c2 {
         #address-cells = <1>;
         #size-cells = <0>;
@@ -89,7 +91,7 @@ examples:
         camera-sensor@10 {
             compatible = "nokia,smia";
             reg = <0x10>;
-            reset-gpios = <&gpio3 20 0>;
+            reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
             vana-supply = <&vaux3>;
             clocks = <&omap3_isp 0>;
             clock-frequency = <9600000>;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 025/106] dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
                   ` (4 preceding siblings ...)
  2020-10-07  8:45 ` [PATCH v2 024/106] dt-bindings: nokia,smia: Use better active polarity for reset Sakari Ailus
@ 2020-10-07  8:45 ` Sakari Ailus
  2020-10-07 16:07   ` Rob Herring
  2020-10-07  8:45 ` [PATCH v2 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support Sakari Ailus
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:45 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

Amend the existing SMIA bindings by adding MIPI CCS support, with separate
compatible strings for CCS 1.0 and CCS 1.1. Rename the old bindings
accordingly as CCS is the current standard.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 .../i2c/{nokia,smia.yaml => mipi-ccs.yaml}    | 23 ++++++++++++++-----
 MAINTAINERS                                   |  2 +-
 2 files changed, 18 insertions(+), 7 deletions(-)
 rename Documentation/devicetree/bindings/media/i2c/{nokia,smia.yaml => mipi-ccs.yaml} (81%)

diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
similarity index 81%
rename from Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
rename to Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
index 47df08338a42..a386ee246956 100644
--- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
@@ -1,26 +1,37 @@
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 # Copyright (C) 2014--2020 Intel Corporation
 
-$id: http://devicetree.org/schemas/media/i2c/nokia,smia.yaml#
+$id: http://devicetree.org/schemas/media/i2c/mipi-ccs.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: SMIA/SMIA++ sensor
+title: MIPI CCS, SMIA++ and SMIA compliant camera sensors
 
 maintainers:
   - Sakari Ailus <sakari.ailus@linux.intel.com>
 
 description:
 
+  CCS (Camera Command Set) is a raw Bayer camera sensor standard defined by the
+  MIPI Alliance; see
+  <URL:https://www.mipi.org/specifications/camera-command-set>.
+
   SMIA (Standard Mobile Imaging Architecture) is an image sensor standard
   defined jointly by Nokia and ST. SMIA++, defined by Nokia, is an extension of
-  that. These definitions are valid for both types of sensors.
+  that.
 
   More detailed documentation can be found in
   Documentation/devicetree/bindings/media/video-interfaces.txt .
 
 properties:
   compatible:
-    const: nokia,smia
+    oneOf:
+      - items:
+        - const: mipi-ccs-1.1
+        - const: mipi-ccs
+      - items:
+        - const: mipi-ccs-1.0
+        - const: mipi-ccs
+      - const: nokia,smia
 
   reg:
     maxItems: 1
@@ -89,14 +100,14 @@ examples:
         clock-frequency = <400000>;
 
         camera-sensor@10 {
-            compatible = "nokia,smia";
+            compatible = "mipi-ccs-1.0", "mipi-ccs";
             reg = <0x10>;
             reset-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
             vana-supply = <&vaux3>;
             clocks = <&omap3_isp 0>;
             clock-frequency = <9600000>;
             port {
-                smiapp_ep: endpoint {
+                ccs_ep: endpoint {
                     data-lanes = <1 2>;
                     remote-endpoint = <&csi2a_ep>;
                     link-frequencies = /bits/ 64 <199200000 210000000
diff --git a/MAINTAINERS b/MAINTAINERS
index ec99e94e2273..135d41b823a4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11564,7 +11564,7 @@ MIPI CCS, SMIA AND SMIA++ IMAGE SENSOR DRIVER
 M:	Sakari Ailus <sakari.ailus@linux.intel.com>
 L:	linux-media@vger.kernel.org
 S:	Maintained
-F:	Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
+F:	Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
 F:	drivers/media/i2c/ccs/
 F:	drivers/media/i2c/smiapp-pll.c
 F:	drivers/media/i2c/smiapp-pll.h
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
                   ` (5 preceding siblings ...)
  2020-10-07  8:45 ` [PATCH v2 025/106] dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support Sakari Ailus
@ 2020-10-07  8:45 ` Sakari Ailus
  2020-10-07 13:52   ` Rob Herring
  2020-10-07  8:45 ` [PATCH v2 053/106] dt-bindings: mipi,ccs: Don't mention vana voltage Sakari Ailus
  2020-10-07  8:45 ` [PATCH v2 054/106] dt-bindings: mipi,ccs: Add vcore and vio supplies Sakari Ailus
  8 siblings, 1 reply; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:45 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

The bus-type property is required for C-PHY support. Add it, including
values for CCP2 and CSI-2 D-PHY.

Also require the bus-type property. Effectively all new sensors are MIPI
D-PHY or C-PHY that cannot be told apart without the bus-type property.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 .../devicetree/bindings/media/i2c/mipi-ccs.yaml          | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
index a386ee246956..b641debcd6a2 100644
--- a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
@@ -77,9 +77,17 @@ properties:
           data-lanes:
             minItems: 1
             maxItems: 8
+          bus-type:
+            description: The type of the data bus.
+            oneOf:
+              - const: 1 # CSI-2 C-PHY
+              - const: 3 # CCP2
+              - const: 4 # CSI-2 D-PHY
+
         required:
           - link-frequencies
           - data-lanes
+	  - bus-type
 
 required:
   - compatible
@@ -112,6 +120,7 @@ examples:
                     remote-endpoint = <&csi2a_ep>;
                     link-frequencies = /bits/ 64 <199200000 210000000
                                                   499200000>;
+                    bus-type = <4>;
                 };
             };
         };
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 053/106] dt-bindings: mipi,ccs: Don't mention vana voltage
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
                   ` (6 preceding siblings ...)
  2020-10-07  8:45 ` [PATCH v2 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support Sakari Ailus
@ 2020-10-07  8:45 ` Sakari Ailus
  2020-10-07 16:07   ` Rob Herring
  2020-10-07  8:45 ` [PATCH v2 054/106] dt-bindings: mipi,ccs: Add vcore and vio supplies Sakari Ailus
  8 siblings, 1 reply; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:45 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

It was mentioned vana voltage is typically 2,8 volts. This is truly sensor
dependent, and nowadays 2,8 volts is a lot.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
index b641debcd6a2..c52b603d946c 100644
--- a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
@@ -37,8 +37,7 @@ properties:
     maxItems: 1
 
   vana-supply:
-    description: Analogue voltage supply (VANA), typically 2,8 volts (sensor
-      dependent).
+    description: Analogue voltage supply (VANA), sensor dependent.
     maxItems: 1
 
   clocks:
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 054/106] dt-bindings: mipi,ccs: Add vcore and vio supplies
  2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
                   ` (7 preceding siblings ...)
  2020-10-07  8:45 ` [PATCH v2 053/106] dt-bindings: mipi,ccs: Don't mention vana voltage Sakari Ailus
@ 2020-10-07  8:45 ` Sakari Ailus
  2020-10-07 16:08   ` Rob Herring
  8 siblings, 1 reply; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07  8:45 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree

Vcore and vio supplies are also part of the spec and used by many sensors.
Do not specify the voltages as they are generally sensor dependent.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
index c52b603d946c..029b2dad9ffb 100644
--- a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
@@ -40,6 +40,14 @@ properties:
     description: Analogue voltage supply (VANA), sensor dependent.
     maxItems: 1
 
+  vcore-supply:
+    description: Core voltage supply (VCore), sensor dependent.
+    maxItems: 1
+
+  vio-supply:
+    description: I/O voltage supply (VIO), sensor dependent.
+    maxItems: 1
+
   clocks:
     description: External clock to the sensor.
     maxItems: 1
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support
  2020-10-07  8:45 ` [PATCH v2 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support Sakari Ailus
@ 2020-10-07 13:52   ` Rob Herring
  2020-10-07 14:46     ` Sakari Ailus
  2020-10-07 14:49     ` [PATCH v3 " Sakari Ailus
  0 siblings, 2 replies; 19+ messages in thread
From: Rob Herring @ 2020-10-07 13:52 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: devicetree, linux-media

On Wed, 07 Oct 2020 11:45:03 +0300, Sakari Ailus wrote:
> The bus-type property is required for C-PHY support. Add it, including
> values for CCP2 and CSI-2 D-PHY.
> 
> Also require the bus-type property. Effectively all new sensors are MIPI
> D-PHY or C-PHY that cannot be told apart without the bus-type property.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  .../devicetree/bindings/media/i2c/mipi-ccs.yaml          | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 


My bot found errors running 'make dt_binding_check' on your patch:

Traceback (most recent call last):
  File "/usr/local/bin/dt-extract-example", line 45, in <module>
    binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 343, in load
    return constructor.get_single_data()
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 111, in get_single_data
    node = self.composer.get_single_node()
  File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
  File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
  File "_ruamel_yaml.pyx", line 773, in _ruamel_yaml.CParser._compose_node
  File "_ruamel_yaml.pyx", line 852, in _ruamel_yaml.CParser._compose_sequence_node
  File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.scanner.ScannerError: while scanning a plain scalar
  in "<unicode string>", line 89, column 13
found a tab character that violates indentation
  in "<unicode string>", line 90, column 1
make[1]: *** [Documentation/devicetree/bindings/Makefile:18: Documentation/devicetree/bindings/media/i2c/mipi-ccs.example.dts] Error 1
make[1]: *** Deleting file 'Documentation/devicetree/bindings/media/i2c/mipi-ccs.example.dts'
make[1]: *** Waiting for unfinished jobs....
./Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml:  while scanning a plain scalar
  in "<unicode string>", line 89, column 13
found a tab character that violates indentation
  in "<unicode string>", line 90, column 1
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml: ignoring, error parsing file
warning: no schema found in file: ./Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
make: *** [Makefile:1366: dt_binding_check] Error 2


See https://patchwork.ozlabs.org/patch/1377845

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support
  2020-10-07 13:52   ` Rob Herring
@ 2020-10-07 14:46     ` Sakari Ailus
  2020-10-07 14:49     ` [PATCH v3 " Sakari Ailus
  1 sibling, 0 replies; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07 14:46 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-media

Hi Rob,

On Wed, Oct 07, 2020 at 08:52:25AM -0500, Rob Herring wrote:
> On Wed, 07 Oct 2020 11:45:03 +0300, Sakari Ailus wrote:
> > The bus-type property is required for C-PHY support. Add it, including
> > values for CCP2 and CSI-2 D-PHY.
> > 
> > Also require the bus-type property. Effectively all new sensors are MIPI
> > D-PHY or C-PHY that cannot be told apart without the bus-type property.
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> >  .../devicetree/bindings/media/i2c/mipi-ccs.yaml          | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> 
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> Traceback (most recent call last):
>   File "/usr/local/bin/dt-extract-example", line 45, in <module>
>     binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
>   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 343, in load
>     return constructor.get_single_data()
>   File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 111, in get_single_data
>     node = self.composer.get_single_node()
>   File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
>   File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
>   File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
>   File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
>   File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
>   File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
>   File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
>   File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
>   File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
>   File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
>   File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
>   File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
>   File "_ruamel_yaml.pyx", line 773, in _ruamel_yaml.CParser._compose_node
>   File "_ruamel_yaml.pyx", line 852, in _ruamel_yaml.CParser._compose_sequence_node
>   File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
> ruamel.yaml.scanner.ScannerError: while scanning a plain scalar
>   in "<unicode string>", line 89, column 13
> found a tab character that violates indentation
>   in "<unicode string>", line 90, column 1
> make[1]: *** [Documentation/devicetree/bindings/Makefile:18: Documentation/devicetree/bindings/media/i2c/mipi-ccs.example.dts] Error 1
> make[1]: *** Deleting file 'Documentation/devicetree/bindings/media/i2c/mipi-ccs.example.dts'
> make[1]: *** Waiting for unfinished jobs....
> ./Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml:  while scanning a plain scalar
>   in "<unicode string>", line 89, column 13
> found a tab character that violates indentation
>   in "<unicode string>", line 90, column 1
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml: ignoring, error parsing file
> warning: no schema found in file: ./Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
> make: *** [Makefile:1366: dt_binding_check] Error 2
> 
> 
> See https://patchwork.ozlabs.org/patch/1377845
> 
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure dt-schema is up to date:
> 
> pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
> 
> Please check and re-submit.

I tested this but somehow I managed to change it after testing it. :-)

I'll resend in a moment.

-- 
Kind regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v3 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support
  2020-10-07 13:52   ` Rob Herring
  2020-10-07 14:46     ` Sakari Ailus
@ 2020-10-07 14:49     ` Sakari Ailus
  2020-10-07 16:24       ` Rob Herring
  1 sibling, 1 reply; 19+ messages in thread
From: Sakari Ailus @ 2020-10-07 14:49 UTC (permalink / raw)
  To: linux-media; +Cc: devicetree, Rob Herring

The bus-type property is required for C-PHY support. Add it, including
values for CCP2 and CSI-2 D-PHY.

Also require the bus-type property. Effectively all new sensors are MIPI
D-PHY or C-PHY that cannot be told apart without the bus-type property.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 .../devicetree/bindings/media/i2c/mipi-ccs.yaml          | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
index a386ee246956..1d90767a6196 100644
--- a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml
@@ -77,9 +77,17 @@ properties:
           data-lanes:
             minItems: 1
             maxItems: 8
+          bus-type:
+            description: The type of the data bus.
+            oneOf:
+              - const: 1 # CSI-2 C-PHY
+              - const: 3 # CCP2
+              - const: 4 # CSI-2 D-PHY
+
         required:
           - link-frequencies
           - data-lanes
+          - bus-type
 
 required:
   - compatible
@@ -112,6 +120,7 @@ examples:
                     remote-endpoint = <&csi2a_ep>;
                     link-frequencies = /bits/ 64 <199200000 210000000
                                                   499200000>;
+                    bus-type = <4>;
                 };
             };
         };
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 022/106] dt-bindings: nokia,smia: Remove nokia,nvm-size property
  2020-10-07  8:44 ` [PATCH v2 022/106] dt-bindings: nokia,smia: Remove nokia,nvm-size property Sakari Ailus
@ 2020-10-07 16:04   ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2020-10-07 16:04 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: devicetree, linux-media

On Wed, 07 Oct 2020 11:44:59 +0300, Sakari Ailus wrote:
> nokia,nvm-size property was removed from the bindings but it was left in
> the example. Remove it from the example, too.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  Documentation/devicetree/bindings/media/i2c/nokia,smia.txt | 1 -
>  1 file changed, 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 023/106] dt-bindings: nokia,smia: Convert to YAML
  2020-10-07  8:45 ` [PATCH v2 023/106] dt-bindings: nokia,smia: Convert to YAML Sakari Ailus
@ 2020-10-07 16:06   ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2020-10-07 16:06 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, devicetree

On Wed, 07 Oct 2020 11:45:00 +0300, Sakari Ailus wrote:
> Convert nokia,smia DT bindings to YAML.
> 
> Also add explicit license to bindings.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  .../bindings/media/i2c/nokia,smia.txt         |  67 -----------
>  .../bindings/media/i2c/nokia,smia.yaml        | 106 ++++++++++++++++++
>  MAINTAINERS                                   |   2 +-
>  3 files changed, 107 insertions(+), 68 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/nokia,smia.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 025/106] dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support
  2020-10-07  8:45 ` [PATCH v2 025/106] dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support Sakari Ailus
@ 2020-10-07 16:07   ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2020-10-07 16:07 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, devicetree

On Wed, 07 Oct 2020 11:45:02 +0300, Sakari Ailus wrote:
> Amend the existing SMIA bindings by adding MIPI CCS support, with separate
> compatible strings for CCS 1.0 and CCS 1.1. Rename the old bindings
> accordingly as CCS is the current standard.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  .../i2c/{nokia,smia.yaml => mipi-ccs.yaml}    | 23 ++++++++++++++-----
>  MAINTAINERS                                   |  2 +-
>  2 files changed, 18 insertions(+), 7 deletions(-)
>  rename Documentation/devicetree/bindings/media/i2c/{nokia,smia.yaml => mipi-ccs.yaml} (81%)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 053/106] dt-bindings: mipi,ccs: Don't mention vana voltage
  2020-10-07  8:45 ` [PATCH v2 053/106] dt-bindings: mipi,ccs: Don't mention vana voltage Sakari Ailus
@ 2020-10-07 16:07   ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2020-10-07 16:07 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: devicetree, linux-media

On Wed, 07 Oct 2020 11:45:04 +0300, Sakari Ailus wrote:
> It was mentioned vana voltage is typically 2,8 volts. This is truly sensor
> dependent, and nowadays 2,8 volts is a lot.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 054/106] dt-bindings: mipi,ccs: Add vcore and vio supplies
  2020-10-07  8:45 ` [PATCH v2 054/106] dt-bindings: mipi,ccs: Add vcore and vio supplies Sakari Ailus
@ 2020-10-07 16:08   ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2020-10-07 16:08 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, devicetree

On Wed, 07 Oct 2020 11:45:05 +0300, Sakari Ailus wrote:
> Vcore and vio supplies are also part of the spec and used by many sensors.
> Do not specify the voltages as they are generally sensor dependent.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v3 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support
  2020-10-07 14:49     ` [PATCH v3 " Sakari Ailus
@ 2020-10-07 16:24       ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2020-10-07 16:24 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media, devicetree

On Wed, 07 Oct 2020 17:49:37 +0300, Sakari Ailus wrote:
> The bus-type property is required for C-PHY support. Add it, including
> values for CCP2 and CSI-2 D-PHY.
> 
> Also require the bus-type property. Effectively all new sensors are MIPI
> D-PHY or C-PHY that cannot be told apart without the bus-type property.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  .../devicetree/bindings/media/i2c/mipi-ccs.yaml          | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-10-07 16:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07  8:44 [PATCH v2 000/106] CCS driver Sakari Ailus
2020-10-07  8:44 ` [PATCH v2 020/106] dt-bindings: nokia,smia: Fix link-frequencies documentation Sakari Ailus
2020-10-07  8:44 ` [PATCH v2 021/106] dt-bindings: nokia,smia: Make vana-supply optional Sakari Ailus
2020-10-07  8:44 ` [PATCH v2 022/106] dt-bindings: nokia,smia: Remove nokia,nvm-size property Sakari Ailus
2020-10-07 16:04   ` Rob Herring
2020-10-07  8:45 ` [PATCH v2 023/106] dt-bindings: nokia,smia: Convert to YAML Sakari Ailus
2020-10-07 16:06   ` Rob Herring
2020-10-07  8:45 ` [PATCH v2 024/106] dt-bindings: nokia,smia: Use better active polarity for reset Sakari Ailus
2020-10-07  8:45 ` [PATCH v2 025/106] dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support Sakari Ailus
2020-10-07 16:07   ` Rob Herring
2020-10-07  8:45 ` [PATCH v2 026/106] dt-bindings: mipi-ccs: Add bus-type for C-PHY support Sakari Ailus
2020-10-07 13:52   ` Rob Herring
2020-10-07 14:46     ` Sakari Ailus
2020-10-07 14:49     ` [PATCH v3 " Sakari Ailus
2020-10-07 16:24       ` Rob Herring
2020-10-07  8:45 ` [PATCH v2 053/106] dt-bindings: mipi,ccs: Don't mention vana voltage Sakari Ailus
2020-10-07 16:07   ` Rob Herring
2020-10-07  8:45 ` [PATCH v2 054/106] dt-bindings: mipi,ccs: Add vcore and vio supplies Sakari Ailus
2020-10-07 16:08   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).