From patchwork Tue May 19 01:16:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kovalivskyi X-Patchwork-Id: 209778 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70F21C433E1 for ; Tue, 19 May 2020 01:16:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D20C207D8 for ; Tue, 19 May 2020 01:16:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=globallogic.com header.i=@globallogic.com header.b="YzLYBztL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728054AbgESBQ4 (ORCPT ); Mon, 18 May 2020 21:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726731AbgESBQ4 (ORCPT ); Mon, 18 May 2020 21:16:56 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2E48C061A0C for ; Mon, 18 May 2020 18:16:55 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id b6so11921278ljj.1 for ; Mon, 18 May 2020 18:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=globallogic.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=7L2zG59TWGJfih0i/D2e6VuwseQDT/Gv+Tbho6jYsmg=; b=YzLYBztLRqdtpL6C1U4ECjFv/yADbBd35LwtGHVt/KxEz3fwqf9t/hnhDYp6XlcH67 cZwvtdNOweY6yzpU/HZ5jUVLcTjYHrKAi7cK4InMnRqWkOdsauygsNv4i3klzPFjbZg/ hnGi4LYHu/pxsK1XI+NuHpZcAlCb2eQTsCR8ZCwNYrQ6GQu9hEeP1EQ/ZXIhmgK3+GtL 3baaROyzKmSnzB7Z6wVi7HpzhhrpyNGrVR9034xiGdmgYCyWWPEnPr7ARHuWVbdpmaHV xuQVcpD56m2flFcJLiWFik5lUPi5h4v9OJaJJFjxLpknLQkVSJLWLuWnohjRZzb/nmN2 HYGg== 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:in-reply-to :references:in-reply-to:references; bh=7L2zG59TWGJfih0i/D2e6VuwseQDT/Gv+Tbho6jYsmg=; b=alYUJJORXE3YJEN9t8T0UC442DX5US86Eo6+eF28CjG2L2jfEtfaLbOrguZCxZuY26 1DyiPJJYMN5qrUs1cAStCj8no//3guQcbhLpFFL4XR9L7QW/sdQs4oq9g/tk9rGPafs6 XAjQFlZZLpbrkbUVMLe4ELrqU1ADYJio5tr0PJZiKXRelXaMsXhPNBc/76PCVBx4BP1S SYaAq4z44rO2fm0mQ09xLHmXp4LFqAxfUsc+PVD1ksj5y55LPqP0/6RUlU+1oeKTADs/ EB3sG6X0J9RAQlz6qTqIc/ddrXsd0e/v6UHZKIq4hyc4Nts9f3lk+gOI+8aIZiWj0HrF 0S6g== X-Gm-Message-State: AOAM530s0uZG3kInC29yOj7FwdQGlcIEDxSHxWPZp3aO7EW/hQhXzX3c supl2tUv667704vxwNH6glZznQ== X-Google-Smtp-Source: ABdhPJyeWgqpM3ZzdT87L7XvXU2AlmWEEpASGJl2ly6pgrw4CaVmYaYbFxX1LWcuTx/boW+LY6I5FA== X-Received: by 2002:a2e:6e13:: with SMTP id j19mr12219584ljc.292.1589851014166; Mon, 18 May 2020 18:16:54 -0700 (PDT) Received: from localhost.localdomain ([159.224.5.60]) by smtp.googlemail.com with ESMTPSA id i8sm4764244lfl.72.2020.05.18.18.16.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 18:16:52 -0700 (PDT) From: Roman Kovalivskyi To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Luis Oliveira , =?utf-8?q?Niklas_S=C3=B6derlund?= , Jacopo Mondi , Michael Rodin , Mauro Carvalho Chehab , Sakari Ailus , Hugues Fruchet , Maxime Ripard , Adam Ford , Todor Tomov , Suresh Udipi , Andrew Gabbasov , Eugeniu Rosca , Dave Stevenson , Roman Kovalivskyi Subject: [PATCH v2 2/6] media: ov5647: Add support for PWDN GPIO. Date: Tue, 19 May 2020 04:16:17 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Dave Stevenson Add support for an optional GPIO connected to PWDN on the sensor. This allows the use of hardware standby mode where internal device clock and circuit activities are halted. Please nothe that power is off when PWDN is high. Signed-off-by: Dave Stevenson Signed-off-by: Roman Kovalivskyi --- drivers/media/i2c/ov5647.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index 3e587eb0a30e..796cc80f8ee1 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -35,6 +36,13 @@ #define SENSOR_NAME "ov5647" +/* + * From the datasheet, "20ms after PWDN goes low or 20ms after RESETB goes + * high if reset is inserted after PWDN goes high, host can access sensor's + * SCCB to initialize sensor." + */ +#define PWDN_ACTIVE_DELAY_MS 20 + #define MIPI_CTRL00_CLOCK_LANE_GATE BIT(5) #define MIPI_CTRL00_BUS_IDLE BIT(2) #define MIPI_CTRL00_CLOCK_LANE_DISABLE BIT(0) @@ -86,6 +94,7 @@ struct ov5647 { unsigned int height; int power_count; struct clk *xclk; + struct gpio_desc *pwdn; }; static inline struct ov5647 *to_state(struct v4l2_subdev *sd) @@ -93,6 +102,11 @@ static inline struct ov5647 *to_state(struct v4l2_subdev *sd) return container_of(sd, struct ov5647, sd); } +static inline void msleep_range(unsigned int delay_base) +{ + usleep_range(delay_base * 1000, delay_base * 1000 + 5000); +} + static struct regval_list sensor_oe_disable_regs[] = { {0x3000, 0x00}, {0x3001, 0x00}, @@ -355,6 +369,11 @@ static int ov5647_sensor_power(struct v4l2_subdev *sd, int on) if (on && !ov5647->power_count) { dev_dbg(&client->dev, "OV5647 power on\n"); + if (ov5647->pwdn) { + gpiod_set_value(ov5647->pwdn, 0); + msleep_range(PWDN_ACTIVE_DELAY_MS); + } + ret = clk_prepare_enable(ov5647->xclk); if (ret < 0) { dev_err(&client->dev, "clk prepare enable failed\n"); @@ -392,6 +411,8 @@ static int ov5647_sensor_power(struct v4l2_subdev *sd, int on) dev_dbg(&client->dev, "soft stby failed\n"); clk_disable_unprepare(ov5647->xclk); + + gpiod_set_value(ov5647->pwdn, 1); } /* Update the power count. */ @@ -603,6 +624,10 @@ static int ov5647_probe(struct i2c_client *client) return -EINVAL; } + /* Request the power down GPIO asserted */ + sensor->pwdn = devm_gpiod_get_optional(&client->dev, "pwdn", + GPIOD_OUT_HIGH); + mutex_init(&sensor->lock); sd = &sensor->sd; @@ -616,7 +641,15 @@ static int ov5647_probe(struct i2c_client *client) if (ret < 0) goto mutex_remove; + if (sensor->pwdn) { + gpiod_set_value(sensor->pwdn, 0); + msleep_range(PWDN_ACTIVE_DELAY_MS); + } + ret = ov5647_detect(sd); + + gpiod_set_value(sensor->pwdn, 1); + if (ret < 0) goto error; From patchwork Tue May 19 01:16:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kovalivskyi X-Patchwork-Id: 209776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63DA8C433E1 for ; Tue, 19 May 2020 01:17:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F80A207E8 for ; Tue, 19 May 2020 01:17:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=globallogic.com header.i=@globallogic.com header.b="VTogGKZn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728182AbgESBRC (ORCPT ); Mon, 18 May 2020 21:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728139AbgESBRB (ORCPT ); Mon, 18 May 2020 21:17:01 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF5D0C05BD09 for ; Mon, 18 May 2020 18:16:59 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id h26so9775645lfg.6 for ; Mon, 18 May 2020 18:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=globallogic.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=43OydlKMeB2soLpqk183X/YWIZp+nTEpweso2ysEnH8=; b=VTogGKZn+8HP6GLONdbHWU4k1rjj64jS78ZiVB++LI5W7p7SrXGVUzIPFmY50BLNIk Cax85IyQomdbhLSFvPdkDaka+MFsdCLDe9scDrLEAwpbPc07vgtEuTxVH1M9ttxOa2sf RQI5dBeIl71cBJvEEgkz7FaK5TYvsMyVWi8vJTVO4hRKmog7A/BuDSDU5aMRA0pKGOdK HBAAckL80AmiKDHQw2joI2h5SJISobfBWyd2C8m8ecD+PVLwdMTDQJuB4U8NXwoHYAiQ 1cL6iVEOIjfrQMibRTL1y7T0MkfnacAQ4TcIZ/HXOtBuAkRPxRL23E6rs05GvC0E3rNT kU9w== 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:in-reply-to :references:in-reply-to:references; bh=43OydlKMeB2soLpqk183X/YWIZp+nTEpweso2ysEnH8=; b=kcmnii0guIXEIBXffIuhlKbIIlNK8z7imNARoNIKZrrODYMYbxNrFUrqaxT3PBGOAf myFg2T8iJP8Sbki/C4MvAiyPNy/UD98HJfQLF/5ImBbJJMWRZYpHbF+LYD1yKagcC2lr li+kUV5PDB8qfPebz3i4oC5dCrKnw3QkGIq/IoWJLdzRtvTlTnRNYdu6Fn3aKNGFYlV6 NPRYBSxLQSfmuGVUUqPjf3A7Piy3B74mMH5+sGFeGSezHxFGr9iAk2RAcMtVl5qkycBn /7O6G+A9W8pzN9cq//HjSLeLeZ8toOmBwJgGw+3Qtl90kP/tK7Txhr3BVA5kagAilY70 wMpQ== X-Gm-Message-State: AOAM5313zdOJhwB4gHYBGGNeyoCYXLQ9KHw9H+WRpwDK1YVVst1F2iee e2/+8hTL0swAzlJgTbHsrUIuEw== X-Google-Smtp-Source: ABdhPJxcnMOesb+fL00R07l3WHxAvKG8zfvphHel04zHEX97w5/GIihgHhN0s7YHytf2m6QMXp6I/A== X-Received: by 2002:a05:6512:3082:: with SMTP id z2mr13587206lfd.32.1589851018350; Mon, 18 May 2020 18:16:58 -0700 (PDT) Received: from localhost.localdomain ([159.224.5.60]) by smtp.googlemail.com with ESMTPSA id i8sm4764244lfl.72.2020.05.18.18.16.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 18:16:57 -0700 (PDT) From: Roman Kovalivskyi To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Luis Oliveira , =?utf-8?q?Niklas_S=C3=B6derlund?= , Jacopo Mondi , Michael Rodin , Mauro Carvalho Chehab , Sakari Ailus , Hugues Fruchet , Maxime Ripard , Adam Ford , Todor Tomov , Suresh Udipi , Andrew Gabbasov , Eugeniu Rosca , Dave Stevenson , Roman Kovalivskyi Subject: [PATCH v2 3/6] media: ov5647: Add support for non-continuous clock mode Date: Tue, 19 May 2020 04:16:18 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Dave Stevenson The driver was only supporting continuous clock mode although this was not stated anywhere. Non-continuous clock saves a small amount of power and on some SoCs is easier to interface with. Signed-off-by: Dave Stevenson Signed-off-by: Roman Kovalivskyi --- drivers/media/i2c/ov5647.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index 796cc80f8ee1..10f35c637f91 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -44,6 +44,7 @@ #define PWDN_ACTIVE_DELAY_MS 20 #define MIPI_CTRL00_CLOCK_LANE_GATE BIT(5) +#define MIPI_CTRL00_LINE_SYNC_ENABLE BIT(4) #define MIPI_CTRL00_BUS_IDLE BIT(2) #define MIPI_CTRL00_CLOCK_LANE_DISABLE BIT(0) @@ -95,6 +96,7 @@ struct ov5647 { int power_count; struct clk *xclk; struct gpio_desc *pwdn; + bool is_clock_contiguous; }; static inline struct ov5647 *to_state(struct v4l2_subdev *sd) @@ -274,9 +276,15 @@ static int ov5647_set_virtual_channel(struct v4l2_subdev *sd, int channel) static int ov5647_stream_on(struct v4l2_subdev *sd) { + struct ov5647 *ov5647 = to_state(sd); + u8 val = MIPI_CTRL00_BUS_IDLE; int ret; - ret = ov5647_write(sd, OV5647_REG_MIPI_CTRL00, MIPI_CTRL00_BUS_IDLE); + if (ov5647->is_clock_contiguous) + val |= MIPI_CTRL00_CLOCK_LANE_GATE | + MIPI_CTRL00_LINE_SYNC_ENABLE; + + ret = ov5647_write(sd, OV5647_REG_MIPI_CTRL00, val); if (ret < 0) return ret; @@ -573,7 +581,7 @@ static const struct v4l2_subdev_internal_ops ov5647_subdev_internal_ops = { .open = ov5647_open, }; -static int ov5647_parse_dt(struct device_node *np) +static int ov5647_parse_dt(struct ov5647 *sensor, struct device_node *np) { struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 }; struct device_node *ep; @@ -586,6 +594,17 @@ static int ov5647_parse_dt(struct device_node *np) ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &bus_cfg); + if (!ret) { + of_node_put(ep); + of_node_put(np); + return ret; + } + + if (bus_cfg.bus_type == V4L2_MBUS_CSI2_DPHY + || bus_cfg.bus_type == V4L2_MBUS_CSI2_CPHY) + sensor->is_clock_contiguous = bus_cfg.bus.mipi_csi2.flags + & V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK; + of_node_put(ep); return ret; } @@ -604,7 +623,7 @@ static int ov5647_probe(struct i2c_client *client) return -ENOMEM; if (IS_ENABLED(CONFIG_OF) && np) { - ret = ov5647_parse_dt(np); + ret = ov5647_parse_dt(sensor, np); if (ret) { dev_err(dev, "DT parsing error: %d\n", ret); return ret; From patchwork Tue May 19 01:16:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kovalivskyi X-Patchwork-Id: 209777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72FCBC433E1 for ; Tue, 19 May 2020 01:17:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E96820849 for ; Tue, 19 May 2020 01:17:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=globallogic.com header.i=@globallogic.com header.b="dnGRrZss" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728245AbgESBRF (ORCPT ); Mon, 18 May 2020 21:17:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728216AbgESBRD (ORCPT ); Mon, 18 May 2020 21:17:03 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54A2BC05BD09 for ; Mon, 18 May 2020 18:17:03 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id v5so9731035lfp.13 for ; Mon, 18 May 2020 18:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=globallogic.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=P9lg9epxYOzkosVwby4Ch0c5f3sEFwO/BYfn6STJCRA=; b=dnGRrZssVumc5SEFAZDBsPOY9hvFC40lYXZykyXE9HitinWK3gVLHaowFu/ndnKf3E Eahvt7emsbSwgH5KfQC284+soIz189FhkiiyMymQ7DVuc15qQRLJUc/fYYb2hYtGD3l4 4O3u+RWaTI3idfzHkF6+PIDzS/vf8ZOFoBhhc5Q/T5JncefXj3qg0DRf8tB7GkLN6422 Ktp0rBPJY7jQGlixyD+2soZN+Fc1/INvkzy2KS4vAPK7/V4T4OIcYFq4YdF6cVF2rQJq ZPhF6si4grS3QFHFkGPXKaJmjos/q1wd/T06xCeYhm8yy05tie3ptyUQZOs0QGiB/PgC aQOw== 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:in-reply-to :references:in-reply-to:references; bh=P9lg9epxYOzkosVwby4Ch0c5f3sEFwO/BYfn6STJCRA=; b=Bv/cqkbUMupNF4oVjYd9D/s4QhOZ4QGxu1JZqZR0GXMHNYJjVu9i4kgE3XaSJpZvxw utDptEEmebdT8RrOZ8QcVF5bEZHyH+vBy0lkMFLGzrrZwAdQUOXn46XejCzhVYnZ1DTJ JIBRTrJlK4PO9oqbu+/NZiU+6y+yteUADVvhqwubsnkoVE315UkJfiL9UumfwCtazZL5 ljnAXFbYXjqOS6yg2uku9NyFkbID0Yo2IwvoitFmHdmGAMCwcwJW3x3wXzSJIaym0tyT iAZ9Lt+QJMzoevNCt8wDDLy6Bxonq9jhvx2d7IMfFeCBRutL3wpkorcxGcnSfbuOxoXO CHsQ== X-Gm-Message-State: AOAM532OULnRcZswpq9bSEDvM6G/wKEClBYf5qjsg01Y1Xc9bT8vCUws 40N8jQpZIL1u4FPYizNAKXZVRQ== X-Google-Smtp-Source: ABdhPJxUWZSHm+8W4zyIHf+3MNavCDTyvyl8RtkB0iPvNIiUOFO5Nejen8EZS1lW4DYxSFMygiHsoQ== X-Received: by 2002:a19:c311:: with SMTP id t17mr7309705lff.58.1589851021800; Mon, 18 May 2020 18:17:01 -0700 (PDT) Received: from localhost.localdomain ([159.224.5.60]) by smtp.googlemail.com with ESMTPSA id i8sm4764244lfl.72.2020.05.18.18.17.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 18:17:01 -0700 (PDT) From: Roman Kovalivskyi To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Luis Oliveira , =?utf-8?q?Niklas_S=C3=B6derlund?= , Jacopo Mondi , Michael Rodin , Mauro Carvalho Chehab , Sakari Ailus , Hugues Fruchet , Maxime Ripard , Adam Ford , Todor Tomov , Suresh Udipi , Andrew Gabbasov , Eugeniu Rosca , Dave Stevenson , Roman Kovalivskyi Subject: [PATCH v2 5/6] media: dt-bindings: ov5647: Add property for PWDN control Date: Tue, 19 May 2020 04:16:20 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Dave Stevenson Add optional GPIO pwdn to connect to the PWDN line on the sensor. Signed-off-by: Dave Stevenson Signed-off-by: Roman Kovalivskyi --- Documentation/devicetree/bindings/media/i2c/ov5647.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/ov5647.txt b/Documentation/devicetree/bindings/media/i2c/ov5647.txt index 22e44945b661..70f06c24f470 100644 --- a/Documentation/devicetree/bindings/media/i2c/ov5647.txt +++ b/Documentation/devicetree/bindings/media/i2c/ov5647.txt @@ -10,6 +10,9 @@ Required properties: - reg : I2C slave address of the sensor. - clocks : Reference to the xclk clock. +Optional Properties: +- pwdn-gpios: reference to the GPIO connected to the pwdn pin, if any. + The common video interfaces bindings (see video-interfaces.txt) should be used to specify link to the image data receiver. The OV5647 device node should contain one 'port' child node with an 'endpoint' subnode. @@ -26,6 +29,7 @@ Example: compatible = "ovti,ov5647"; reg = <0x36>; clocks = <&camera_clk>; + pwdn-gpios = <&pioE 29 GPIO_ACTIVE_HIGH>; port { camera_1: endpoint { remote-endpoint = <&csi1_ep1>;