Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp99186pxk; Wed, 2 Sep 2020 15:49:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybEP+Mi4a8cZw+LzfVJXnVASWKjzY7GdM65XlJfV1FVrS7EJIkmldk6ss4A6khEPp8Dh3B X-Received: by 2002:a17:906:3091:: with SMTP id 17mr349066ejv.515.1599086969060; Wed, 02 Sep 2020 15:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599086969; cv=none; d=google.com; s=arc-20160816; b=MowpppPpi1cUyZgnm66vSponcS4f09LMcvOnbWauxeNQFqK8JIj5ETZh1QA73YptbH GNUKKoAiUIKn9BEMDfxJGbtL56qq795bWFVkr6no+QR3XV302isrnZuo8n9ZSm6g/8Me xcPF5Yc6zngSINEHBxhaYMVR+gdqazrbqjRThzyEbzxheWG2hHsaOq4gL56g0TodwRv4 +P1JnHXWsyJZj7QMSA/23fd0bem4K364X059xMtjJUSJj7HCyFRACGvND1ZY16LCZVxk nKazKW2scQ+tI8GpOqXWDuaQgw7oJeQu2hH+t29IBYNLQugcigi416KOUtVhOCXIOBal IL+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=l80LLYGa/yYmt3H9jqHnhQDWkk8QQ1YTQWwpquPQW8Q=; b=Hl6e7Lv9V5GX8cIAHyj8YbVQ0xQGU5hEImthYd7IB67BLrMLFA7RUljomD3oRAMm/y yLjblgn6iiboC6DaQWNIuk3hZ70kWHoEqAMbDFUT7eg/jqryMQldAeNPIO1befd0MMqk IBrz7qsve3yQeP4PvfI2pKQg8xwPZ2EnZ3hAIU3KEeUwviJF1u8iuUz9wNd5NjtQCcg0 xn4ljBVrKXfOVVI2Dje8gaZU4CiZ40vFdJQVauGwgUS3eafz2EdkgfZly0hLy58SbOj6 dHz0LJpBZSpbKu14oAjHzQiSWsJOTgN9BJWzkL+CkRkX8sZYkGcHAqSv109f0dlyWoNR ftYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nuwm7bil; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si538861ejj.713.2020.09.02.15.49.05; Wed, 02 Sep 2020 15:49:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nuwm7bil; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbgIBWsX (ORCPT + 99 others); Wed, 2 Sep 2020 18:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726310AbgIBWsT (ORCPT ); Wed, 2 Sep 2020 18:48:19 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11426C061244 for ; Wed, 2 Sep 2020 15:48:19 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id t10so1074521wrv.1 for ; Wed, 02 Sep 2020 15:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l80LLYGa/yYmt3H9jqHnhQDWkk8QQ1YTQWwpquPQW8Q=; b=nuwm7bilclieGOSY2ZWyaQnC5HjoU7juXZSnF039IugZj8wLuLXsFFqF7YHrQzDJJX pKqwXoM9mQrAdmZgV6mPwaelAFb1YUvkZkr565NZZXAQ8Eoha8o1gf/8odXr5OWhHwWm aGYN3wplbcEGgf8jXv8nBNjFyjZyrYkMAXNvA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l80LLYGa/yYmt3H9jqHnhQDWkk8QQ1YTQWwpquPQW8Q=; b=e5k9fe4ZdxSSlU1Lmwjgmdy1s/RExpmglPRASXBc9UgVDT7ntnbYrMW4pwszqaQR/F iOXXcnNzE09D9Fwbe7WigdnlXPP6izeTbFdfUvXdqADrx8QIvwKyBNnSayJwtrlVaIa8 yj+UeQtMBNNb6RsrBgEebg1rezeLiN3+k3agl7wySthdzEr15A/5Gx2OHElzWu9oIc7X O++YEnJQ41l79nXbFZieEQP7WzAKYYKoOHvBO67rAGqJyZkSAdm3Z+DHeZxuluOY0+8E q/F1gQ2u1BmzhAslJF16bNkyaaPvsFfpJXsnQO4pBdUv5uC5bgcXDReumsNzqhVjJGl8 QmRg== X-Gm-Message-State: AOAM5324mIfEydKNxnv1betQgrVTQRDbT0jpQzfGGpLK+oyAnVO72Ncb 2gOGmyrBatk9B0gxF9x/U+M3Ag== X-Received: by 2002:adf:e6c8:: with SMTP id y8mr392900wrm.229.1599086897633; Wed, 02 Sep 2020 15:48:17 -0700 (PDT) Received: from tfiga.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id m125sm1557568wme.35.2020.09.02.15.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 15:48:17 -0700 (PDT) From: Tomasz Figa To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Rob Herring , Sakari Ailus , Hao He , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, drinkcat@chromium.org, Xingyu Wu , dongchun.zhu@mediatek.com, sj.huang@mediatek.com, darfur_liu@gcoreinc.com, hao.he7@gmail.com, Tomasz Figa Subject: [PATCH v4 0/4] Galaxycore GC5035 sensor driver Date: Wed, 2 Sep 2020 22:48:09 +0000 Message-Id: <20200902224813.14283-1-tfiga@chromium.org> X-Mailer: git-send-email 2.28.0.402.g5ffc5be6b7-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everyone, This series adds YAML DT binding and V4L2 sub-device driver for Galaxycore GC5035 5-megapixel 10-bit Bayer CMOS 1/4" sensor, which has a two-lane MIPI CSI-2 data interface and uses the I2C bus for control The initial version supports the following features: - Manual exposure, analog and digital gain control - Vertical blanking interval control - Test pattern generator (color bars) - Media controller support - Runtime PM support - Support operating modes: o 2592x1944 at 30fps, o 1296x972 at 30fps, o 1280x720 at 60fps. A separate patch in the series adds support for loading manufacture-time configuration from the sensor OTP, which currently includes: - register patch table, - DPC table. This is based on Hao He's and Xingyu Wu's v3 series that partially reached the maling lists: - patch 1/3 - equivalent of patch 1/4 of this seres: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/1597380295-6297-3-git-send-email-wuxy@bitland.com.cn/ - patch 3/3 - equivalent of patches 3/4 + 4/4 of this series: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/1597380295-6297-5-git-send-email-wuxy@bitland.com.cn/ Patch 2/3 that adds DT bindings was missing so I recreated it from scratch on my own. Changes from v3: - Require and handle clock-frequency and link-frequencies device properties. - Separate the driver patch into one for base functionality and another for OTP handling. - Do not perform OTP initialization on driver probe, since it's a costly operation. Instead do it at first streaming time. - Fix power sequencing to match the hardware specification. - Set system PM ops. - Various stylistic changes and general clean-up. - Add myself as a maintainer. Hao He (3): dt-bindings: Add a vendor prefix for Galaxycore Inc. media: i2c: Add a driver for the Galaxycore GC5035 sensor media: i2c: gc5035: Add OTP configuration handling Tomasz Figa (1): media: dt-bindings: media: i2c: Add bindings for GC5035 .../devicetree/bindings/media/i2c/gc5035.yaml | 142 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 7 + drivers/media/i2c/Kconfig | 13 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/gc5035.c | 1972 +++++++++++++++++ 6 files changed, 2137 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/gc5035.yaml create mode 100644 drivers/media/i2c/gc5035.c -- 2.28.0.402.g5ffc5be6b7-goog