From patchwork Tue Oct 24 00:59:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 13433805 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 6E269C00A8F for ; Tue, 24 Oct 2023 01:04:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbjJXBEF (ORCPT ); Mon, 23 Oct 2023 21:04:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjJXBEE (ORCPT ); Mon, 23 Oct 2023 21:04:04 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E561DDA; Mon, 23 Oct 2023 18:04:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F56AC433C9; Tue, 24 Oct 2023 01:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698109442; bh=iSkrQebPrNfhGLZEYWj4p51adyMkES+9wtC8UUFPKTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nmT9U0vHp/SuI9GnBbyw4ih7dm2x5iMqC8cijgCn02G5v0RNRJvvFf+FcFHj2dsT/ AJLrLe+r4CA2BBzDjQVsL1b6HoYhRlL/4AcUqyiQJQbrYGNamFLNNnSG+Q6oVyEaaC uIpBZm36nOUsqZT5BtHz2NoeKmmXmityd6rOD5IBLV6+A4DB2xfOI3fmg1ebV7V9rP Z4fBmnOAsgUzhY/OILxMWVwoKVkNN/yrrVmEUrjyNb4prdsqx4vM3j1cn8sevkt+ZN Y6rgNbLMHy1AS442sCmzn0nHy1ZV7ocSy1zvMXuTKvvHDeh/TRMZr2/dU03NaNQWig nmxdaA7PPVHSA== Received: by mercury (Postfix, from userid 1000) id AD5F9106057C; Tue, 24 Oct 2023 03:03:59 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel , Sakari Ailus , Jacopo Mondi Cc: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] media: dt-bindings: gc0308: add binding Date: Tue, 24 Oct 2023 02:59:51 +0200 Message-ID: <20231024010355.1877523-3-sre@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231024010355.1877523-1-sre@kernel.org> References: <20231024010355.1877523-1-sre@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add DT binding for GalaxyCore GC0308 camera sensor. Signed-off-by: Sebastian Reichel Reviewed-by: Krzysztof Kozlowski --- .../bindings/media/i2c/galaxycore,gc0308.yaml | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/galaxycore,gc0308.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/galaxycore,gc0308.yaml b/Documentation/devicetree/bindings/media/i2c/galaxycore,gc0308.yaml new file mode 100644 index 000000000000..f81e7daed67b --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/galaxycore,gc0308.yaml @@ -0,0 +1,108 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/galaxycore,gc0308.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Galaxycore GC0308 and GC0309 Image Sensors + +maintainers: + - Sebastian Reichel + +description: | + The GalaxyCore GC0308 (1/6.5") and GC0309 (1/9") are 640x480 VGA sensors + programmable through an I2C interface and connected via parallel bus. + They include an ISP capable of auto exposure and auto white balance. + +allOf: + - $ref: ../video-interface-devices.yaml# + +properties: + compatible: + oneOf: + - const: galaxycore,gc0308 + - items: + - const: galaxycore,gc0309 + - const: galaxycore,gc0308 + + reg: + const: 0x21 + + clocks: + description: Reference to the xclk clock. + maxItems: 1 + + reset-gpios: + description: GPIO descriptor for the reset pin. + maxItems: 1 + + powerdown-gpios: + description: GPIO descriptor for the powerdown pin. + maxItems: 1 + + vdd28-supply: + description: 2.8V supply + + port: + $ref: /schemas/graph.yaml#/$defs/port-base + description: | + Video output port. + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + bus-width: true + data-shift: true + hsync-active: true + vsync-active: true + data-active: true + pclk-sample: true + + required: + - bus-width + + additionalProperties: false + +required: + - compatible + - reg + - clocks + - powerdown-gpios + - port + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + camera-sensor@21 { + compatible = "galaxycore,gc0308"; + reg = <0x21>; + clocks = <&camera_clk>; + powerdown-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + vdd28-supply = <&vdd28>; + + port { + gc0308_ep: endpoint { + remote-endpoint = <¶llel_from_gc0308>; + bus-width = <8>; + data-shift = <2>; /* lines 9:2 are used */ + hsync-active = <1>; /* active high */ + vsync-active = <1>; /* active high */ + data-active = <1>; /* active high */ + pclk-sample = <1>; /* sample on rising edge */ + }; + }; + }; + }; + +...