From patchwork Wed Jul 15 01:18:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 8818 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 1B606BD790 for ; Wed, 15 Jul 2020 01:18:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DC44660981; Wed, 15 Jul 2020 03:18:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="lsIZdzOu"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 163BA6093B for ; Wed, 15 Jul 2020 03:18:50 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9DEF210F6; Wed, 15 Jul 2020 03:18:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1594775929; bh=7P9NzvN+DZTuH/Nxx/FWMP8a11gb+FuiTvuL/pQzL/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lsIZdzOuMhEFUk87Th1u7xE87XBi8/9z0qSLVwHb9M0EmUzli9SCPsVBJbeGmCNd/ MVn+2WAcrvVxvpWR8l1InIQ+WycSyGlChWh74gemlfzIr39u4JeuwtMnxKyMV5xOf7 yJXPbM0Mmw35PzX+stg4kchVlBzeIJw1AkKmX2I0= From: Laurent Pinchart To: Dave Stevenson Date: Wed, 15 Jul 2020 04:18:32 +0300 Message-Id: <20200715011833.24600-13-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200715011833.24600-1-laurent.pinchart@ideasonboard.com> References: <20200715011833.24600-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 12/13] dt/dtoverlays: imx219: Add parameter to set camera module rotation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libcamera-devel@lists.libcamera.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a rotation DT overlay parameter to allow specifying the camera module mounting rotation. Set the default rotation to 180 as the module is typically mounted upside-down. Signed-off-by: Laurent Pinchart --- arch/arm/boot/dts/overlays/README | 5 +++-- arch/arm/boot/dts/overlays/imx219-overlay.dts | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 2e11964f33cb..914e9a34bdc2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -1433,8 +1433,9 @@ Name: imx219 Info: Sony IMX219 camera module. Uses Unicam 1, which is the standard camera connector on most Pi variants. -Load: dtoverlay=imx219 -Params: +Load: dtoverlay=imx219,= +Params: rotation Mounting rotation of the camera sensor (0 or + 180) Name: imx290 diff --git a/arch/arm/boot/dts/overlays/imx219-overlay.dts b/arch/arm/boot/dts/overlays/imx219-overlay.dts index 3c2d3fac93d2..dce07b335c4e 100644 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts @@ -27,6 +27,8 @@ VDIG-supply = <&imx219_vdig>; /* 1.8v */ VDDL-supply = <&imx219_vddl>; /* 1.2v */ + rotation = <180>; + port { imx219_0: endpoint { remote-endpoint = <&csi1_ep>; @@ -110,4 +112,8 @@ cam0-pwdn = <&imx219_vana>,"gpio:4"; }; }; + + __overrides__ { + rotation = <&imx219>,"rotation:0"; + }; };