From patchwork Wed Jun 15 22:14:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 582025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E1E9CCA47F for ; Wed, 15 Jun 2022 22:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345119AbiFOWOc (ORCPT ); Wed, 15 Jun 2022 18:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349105AbiFOWO2 (ORCPT ); Wed, 15 Jun 2022 18:14:28 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6222A562E3; Wed, 15 Jun 2022 15:14:28 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 09D78BAC; Thu, 16 Jun 2022 00:14:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655331266; bh=X4VAEaTQTKnkyaZPESA6BesMEuNlxpGI2l6hsWy9eI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=is+KaZEF3cyWDxv4uVVnNNSI7FTo5isYApwsDRrqyM6aHgS6Kw7Ci1b0IRUecKMGR 5X7hhq2dzWhWAiWbh+3RXt9DLFEdUlnps9Bx0l+4jbnmKPO82B1WYN+Iq1w4hxMOh7 TF5cRnt1FmcaP2F3CWRLK69U6w4IlpMq6A8WOHvs= From: Laurent Pinchart To: devicetree@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , Sakari Ailus , Jacopo Mondi , Eugen Hristev , Hugues Fruchet , Maxime Coquelin , Alexandre Torgue , Lad Prabhakar , Fabio Estevam , Shawn Guo Subject: [PATCH v3 1/6] dt-bindings: media: Add macros for video interface bus types Date: Thu, 16 Jun 2022 01:14:05 +0300 Message-Id: <20220615221410.27459-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220615221410.27459-1-laurent.pinchart@ideasonboard.com> References: <20220615221410.27459-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a new dt-bindings/media/video-interfaces.h header that defines macros corresponding to the bus types from media/video-interfaces.yaml. This allows avoiding hardcoded constants in device tree sources. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder --- Changes since v2: - Go back to PARALLEL Changes since v1: - Dual-license under GPL-2.0-only or MIT - Rename PARALLEL TO BT601 --- include/dt-bindings/media/video-interfaces.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 include/dt-bindings/media/video-interfaces.h diff --git a/include/dt-bindings/media/video-interfaces.h b/include/dt-bindings/media/video-interfaces.h new file mode 100644 index 000000000000..68ac4e05e37f --- /dev/null +++ b/include/dt-bindings/media/video-interfaces.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Copyright (C) 2022 Laurent Pinchart + */ + +#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ +#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ + +#define MEDIA_BUS_TYPE_CSI2_CPHY 1 +#define MEDIA_BUS_TYPE_CSI1 2 +#define MEDIA_BUS_TYPE_CCP2 3 +#define MEDIA_BUS_TYPE_CSI2_DPHY 4 +#define MEDIA_BUS_TYPE_PARALLEL 5 +#define MEDIA_BUS_TYPE_BT656 6 + +#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */ From patchwork Wed Jun 15 22:14:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 582024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA572CCA481 for ; Wed, 15 Jun 2022 22:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349105AbiFOWOc (ORCPT ); Wed, 15 Jun 2022 18:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349199AbiFOWOa (ORCPT ); Wed, 15 Jun 2022 18:14:30 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A59E9562E5; Wed, 15 Jun 2022 15:14:29 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A0586DBF; Thu, 16 Jun 2022 00:14:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655331268; bh=Rj9m4XdnFprH+5aAECRkpDNWimuVp4oUvktXzyOgDvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mFcLqAL16F2ZSLj5nMW9nA5bw6ZWI2c+bbkMrVKVs7bwLSemfslDbLnAHMPsCPVH2 9gUWj2B5PWqKECnI924Qebb1eLQ6aB7GB8Ub5Uumh+LRskhndZxhT2nqyVr8fibUFr 8Jen0J5UgPPKIIMegz3MjG5lt3S6i3rhBxKe0rtY= From: Laurent Pinchart To: devicetree@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , Sakari Ailus , Jacopo Mondi , Eugen Hristev , Hugues Fruchet , Maxime Coquelin , Alexandre Torgue , Lad Prabhakar , Fabio Estevam , Shawn Guo Subject: [PATCH v3 2/6] dt-bindings: Use new video interface bus type macros in examples Date: Thu, 16 Jun 2022 01:14:06 +0300 Message-Id: <20220615221410.27459-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220615221410.27459-1-laurent.pinchart@ideasonboard.com> References: <20220615221410.27459-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT binding examples. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring --- Changes since v2: - Go back to PARALLEL Changes since v1: - Rename PARALLEL to BT601 --- .../devicetree/bindings/display/bridge/analogix,anx7625.yaml | 1 + Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml | 3 ++- Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml | 3 ++- .../devicetree/bindings/media/marvell,mmp2-ccic.yaml | 3 ++- Documentation/devicetree/bindings/media/microchip,xisc.yaml | 3 ++- Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml | 4 +++- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml index 35a48515836e..b0e5585f93e2 100644 --- a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +++ b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml @@ -118,6 +118,7 @@ additionalProperties: false examples: - | #include + #include i2c0 { #address-cells = <1>; diff --git a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml index 39395ea8c318..edde4201116f 100644 --- a/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml +++ b/Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml @@ -104,6 +104,7 @@ additionalProperties: false examples: - | #include + #include i2c2 { #address-cells = <1>; @@ -124,7 +125,7 @@ examples: remote-endpoint = <&csi2a_ep>; link-frequencies = /bits/ 64 <199200000 210000000 499200000>; - bus-type = <4>; + bus-type = ; }; }; }; diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml index 44529425ce3a..161e6d598e1c 100644 --- a/Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml @@ -105,6 +105,7 @@ additionalProperties: false examples: - | #include + #include i2c0 { #address-cells = <1>; @@ -118,7 +119,7 @@ examples: port { ov772x_0: endpoint { - bus-type = <5>; + bus-type = ; vsync-active = <0>; hsync-active = <0>; pclk-sample = <0>; diff --git a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml index b39b84c5f012..0e3478551e13 100644 --- a/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml +++ b/Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml @@ -68,6 +68,7 @@ additionalProperties: false examples: - | #include + #include #include camera@d420a000 { @@ -83,7 +84,7 @@ examples: port { camera0_0: endpoint { remote-endpoint = <&ov7670_0>; - bus-type = <5>; /* Parallel */ + bus-type = ; hsync-active = <1>; /* Active high */ vsync-active = <1>; /* Active high */ pclk-sample = <0>; /* Falling */ diff --git a/Documentation/devicetree/bindings/media/microchip,xisc.yaml b/Documentation/devicetree/bindings/media/microchip,xisc.yaml index 8b37fccab5e2..25f5f79d40ce 100644 --- a/Documentation/devicetree/bindings/media/microchip,xisc.yaml +++ b/Documentation/devicetree/bindings/media/microchip,xisc.yaml @@ -106,6 +106,7 @@ examples: #include #include #include + #include xisc: xisc@e1408000 { compatible = "microchip,sama7g5-isc"; @@ -118,7 +119,7 @@ examples: port { xisc_in: endpoint { - bus-type = <5>; /* Parallel */ + bus-type = ; remote-endpoint = <&csi2dc_out>; hsync-active = <1>; vsync-active = <1>; diff --git a/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml b/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml index 9c1262a276b5..285c6075950a 100644 --- a/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +++ b/Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml @@ -90,7 +90,9 @@ examples: - | #include #include + #include #include + # dcmi: dcmi@4c006000 { compatible = "st,stm32-dcmi"; reg = <0x4c006000 0x400>; @@ -104,7 +106,7 @@ examples: port { dcmi_0: endpoint { remote-endpoint = <&ov5640_0>; - bus-type = <5>; + bus-type = ; bus-width = <8>; hsync-active = <0>; vsync-active = <0>; From patchwork Wed Jun 15 22:14:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 582023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9564CCA485 for ; Wed, 15 Jun 2022 22:14:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349199AbiFOWOf (ORCPT ); Wed, 15 Jun 2022 18:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350525AbiFOWOe (ORCPT ); Wed, 15 Jun 2022 18:14:34 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF2D115FE4; Wed, 15 Jun 2022 15:14:33 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 71F031356; Thu, 16 Jun 2022 00:14:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655331272; bh=hYw/XG1wi5ZlvDQ178c/bGN3IuQNb9BadCv6ZsV1h1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAlSmvf8tlZ4mhO5fsFMt9WsM/BiuSUs4ahJ07wNZmGr23eXjByCKwe7owQ2j+APh GL2vrtFTrhVEbGLFnaBRO/a4k6rvaYlwGkuhvJimsJh/P/w9IC2g/yTYW+UnEeoL+W p9eh91iukhDhwjIVHhFZEgbq9qXIiam9MnO6cKZ8= From: Laurent Pinchart To: devicetree@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , Sakari Ailus , Jacopo Mondi , Eugen Hristev , Hugues Fruchet , Maxime Coquelin , Alexandre Torgue , Lad Prabhakar , Fabio Estevam , Shawn Guo Subject: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros Date: Thu, 16 Jun 2022 01:14:09 +0300 Message-Id: <20220615221410.27459-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220615221410.27459-1-laurent.pinchart@ideasonboard.com> References: <20220615221410.27459-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven --- arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 11 +++++++---- .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 4 +++- .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 4 +++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts index 4e58c54cde17..33ac4bd1e63b 100644 --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts @@ -7,6 +7,9 @@ */ /dts-v1/; + +#include + #include "r8a7742-iwg21d-q7.dts" / { @@ -242,7 +245,7 @@ port { vin0ep: endpoint { remote-endpoint = <&cam0ep>; bus-width = <8>; - bus-type = <6>; + bus-type = ; }; }; }; @@ -273,7 +276,7 @@ port { vin1ep: endpoint { remote-endpoint = <&cam1ep>; bus-width = <8>; - bus-type = <6>; + bus-type = ; }; }; }; @@ -305,7 +308,7 @@ vin2ep: endpoint { remote-endpoint = <&cam2ep>; bus-width = <8>; data-shift = <8>; - bus-type = <6>; + bus-type = ; }; }; }; @@ -335,7 +338,7 @@ port { vin3ep: endpoint { remote-endpoint = <&cam3ep>; bus-width = <8>; - bus-type = <6>; + bus-type = ; }; }; }; diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi index 40cef0b1d1e6..c73160df619d 100644 --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi @@ -7,6 +7,8 @@ * Copyright (C) 2020 Renesas Electronics Corp. */ +#include + #define CAM_ENABLED 1 &CAM_PARENT_I2C { @@ -26,7 +28,7 @@ port { CAM_EP: endpoint { bus-width = <8>; data-shift = <2>; - bus-type = <6>; + bus-type = ; pclk-sample = <1>; remote-endpoint = <&VIN_EP>; }; diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi index f5e77f024251..a7f5cfec64b8 100644 --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi @@ -7,6 +7,8 @@ * Copyright (C) 2020 Renesas Electronics Corp. */ +#include + #define CAM_ENABLED 1 &CAM_PARENT_I2C { @@ -21,7 +23,7 @@ ov7725@21 { port { CAM_EP: endpoint { bus-width = <8>; - bus-type = <6>; + bus-type = ; remote-endpoint = <&VIN_EP>; }; };