From patchwork Mon Dec 3 10:07:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10709069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3C9914BD for ; Mon, 3 Dec 2018 10:08:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1A6E2AFDF for ; Mon, 3 Dec 2018 10:08:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2B272AFE1; Mon, 3 Dec 2018 10:08:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F91E2AFDF for ; Mon, 3 Dec 2018 10:08:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726186AbeLCKIT (ORCPT ); Mon, 3 Dec 2018 05:08:19 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:47045 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbeLCKIT (ORCPT ); Mon, 3 Dec 2018 05:08:19 -0500 Received: by mail-wr1-f68.google.com with SMTP id l9so11450798wrt.13 for ; Mon, 03 Dec 2018 02:07:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RQOdFC9CjkWwFX8rp28xoDvtflvd5veREOu6vb3xEl4=; b=PrRwAGZpg1WSrlH+nDKOti9QiT/ISdGKiiT4vfkKVsyTZVwnWnbKZPr7Obm0IpQlCa XabiZsDcWjoAP54MnwGasjqYwpsrdMVThmbNZ97Rz+2QOjIvgzfl8XrfbrchG6syivEf EPRkfutL2oPKkSfwvSzTDm2cbN7sz82/gGum8= 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:mime-version:content-transfer-encoding; bh=RQOdFC9CjkWwFX8rp28xoDvtflvd5veREOu6vb3xEl4=; b=pavYFBmM4z8gOSaMs9uQYGYr1KX525qn2sNeJqYi+xUWyWOsjIYHEObkEZEerpkxrc W088W7uFMkVu5Ii78wS5jq5EQSfvETRLVRn5Ezw5tNR4un0m910ZnwyTVDtYQk1ckERg 0bWAB/gUWe9BIKaBQ+Ev4KFlgMAaUiqMnLaZium1O7F+r4FrOy7XYs8Pl/4XIRtMygcR jw6mbbetxb7KzJMqBKVdNF1v2A+YM1b4g/TUP86ahl9ORfGsQTrEhPPhrR90hocd2cl/ P5nPj1OmU65Zjwdnhal4LPE3B6lX36X6JRAamOUoknzwPOfBJ/sskuX/VOJs9s/jSo0s DLLA== X-Gm-Message-State: AA+aEWYro1Km9z1q7Rx7/Nz+q4JrVDQiQnMy5+ODxoQpLs114MRzUlxp VC/J6C7uXTCUU3SPj7hiCmghLA== X-Google-Smtp-Source: AFSGD/VPp+6EJ1yRntChb1CpYmwMyPbxm1MNxORzNUzpMr2buG2vPfa1uRSYwFnePbVCUHlq6tSumg== X-Received: by 2002:a5d:45d0:: with SMTP id b16mr12686122wrs.86.1543831676559; Mon, 03 Dec 2018 02:07:56 -0800 (PST) Received: from localhost.localdomain (conf.hotelmediterraneo.com. [2.228.78.71]) by smtp.gmail.com with ESMTPSA id n15sm18589236wrt.21.2018.12.03.02.07.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 02:07:55 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jagan Teki Subject: [PATCH 1/5] dt-bindings: media: sun6i: Add A64 CSI compatible (w/ H3 fallback) Date: Mon, 3 Dec 2018 15:37:43 +0530 Message-Id: <20181203100747.16442-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181203100747.16442-1-jagan@amarulasolutions.com> References: <20181203100747.16442-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allwinner A64 CSI has single channel time-multiplexed BT.656 CMOS sensor interface like H3. Add a compatible string for it with H3 fallback compatible string, in this case the H3 driver can be used. Signed-off-by: Jagan Teki --- Documentation/devicetree/bindings/media/sun6i-csi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/sun6i-csi.txt b/Documentation/devicetree/bindings/media/sun6i-csi.txt index cc37cf7fd051..e78cf4f9bc8c 100644 --- a/Documentation/devicetree/bindings/media/sun6i-csi.txt +++ b/Documentation/devicetree/bindings/media/sun6i-csi.txt @@ -7,6 +7,7 @@ Required properties: - compatible: value must be one of: * "allwinner,sun6i-a31-csi" * "allwinner,sun8i-h3-csi" + * "allwinner,sun50i-a64-csi", "allwinner,sun8i-h3-csi" * "allwinner,sun8i-v3s-csi" - reg: base address and size of the memory-mapped region. - interrupts: interrupt associated to this IP From patchwork Mon Dec 3 10:07:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10709053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 420451731 for ; Mon, 3 Dec 2018 10:08:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3231D2AFDB for ; Mon, 3 Dec 2018 10:08:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 269CF2AFDE; Mon, 3 Dec 2018 10:08:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB7A72AFDB for ; Mon, 3 Dec 2018 10:08:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbeLCKIV (ORCPT ); Mon, 3 Dec 2018 05:08:21 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:38294 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726188AbeLCKIV (ORCPT ); Mon, 3 Dec 2018 05:08:21 -0500 Received: by mail-wm1-f68.google.com with SMTP id m22so4993621wml.3 for ; Mon, 03 Dec 2018 02:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pZwHMdseiN89HEVSRgqoNt8QGqFQI8aSS6wIp4a9e3c=; b=WYp4dBnqnA6t8f4+3/r7Q81AkOf/D53JEKyfYAKWJED6IieqTZDwsiyXXmPKJHl1xZ /RjT7/ug/RPxhzKJPKHYNYqijoS9xqNrGjrvmsOWZH9G4OWsogzCYTTqJlJaQJNndrHy X2iaiTd7eBx3Cf+srP9C9KRZChXve5BWfRZUs= 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:mime-version:content-transfer-encoding; bh=pZwHMdseiN89HEVSRgqoNt8QGqFQI8aSS6wIp4a9e3c=; b=Ju6WHSyeyua/DbDGzfhb2V4pEbXbcY+Solyb1fYWp+jbEVfinRzZokI7oGkYYHpIAm DYoiIP7LirurwDWU/iDq/Unw4jah2bHzXkCyrjIfBSvPs2Pu4oszbwDMM+djphX5sApb B+b9PCdE8IWo+RX3rnUxaUqdMQQRlWk1qPox6BP+wYuKgNo0Yx8tOtE8aaEv8ifH2UaS drcfthX2G7wJd+5lrcUSbyhpf2f33Si2VRS0FIsA62pPiBSgkMwdxhb9rPC2NctIvlFr wFPjE/jK4qYyjYkELufDiPwRE4Kw854sWna3sL7K3g+jIYmGsWw+aKUveQpT+GD5nuZ2 m4lg== X-Gm-Message-State: AA+aEWbY98SKtxPjEcmvpbevxGMxzMpYcdSlp3M13Hm/KaERLg/w61aQ xThME6DfKYQaRyFjo1L8ahcoXA== X-Google-Smtp-Source: AFSGD/XnbFNuiD20WI4SVXVx7wsH0dmxqBf/ID0DyAkKyFtb/MOGzGfmOYAWr2InYDDaGLbjQuGBFw== X-Received: by 2002:a1c:307:: with SMTP id 7-v6mr7540895wmd.146.1543831677859; Mon, 03 Dec 2018 02:07:57 -0800 (PST) Received: from localhost.localdomain (conf.hotelmediterraneo.com. [2.228.78.71]) by smtp.gmail.com with ESMTPSA id n15sm18589236wrt.21.2018.12.03.02.07.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 02:07:57 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jagan Teki Subject: [PATCH 2/5] dt-bindings: media: sun6i: Add vcc-csi supply property Date: Mon, 3 Dec 2018 15:37:44 +0530 Message-Id: <20181203100747.16442-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181203100747.16442-1-jagan@amarulasolutions.com> References: <20181203100747.16442-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most of the Allwinner A64 CSI controllers are supply with VCC-PE pin. which need to supply for some of the boards to trigger the power. So, document the supply property as vcc-csi so-that the required board can eable it via device tree. Used vcc-csi instead of vcc-pe to have better naming convention wrt other controller pin supplies. Signed-off-by: Jagan Teki --- Documentation/devicetree/bindings/media/sun6i-csi.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/media/sun6i-csi.txt b/Documentation/devicetree/bindings/media/sun6i-csi.txt index e78cf4f9bc8c..5fb6fd4e2c7d 100644 --- a/Documentation/devicetree/bindings/media/sun6i-csi.txt +++ b/Documentation/devicetree/bindings/media/sun6i-csi.txt @@ -18,6 +18,9 @@ Required properties: - clock-names: the clock names mentioned above - resets: phandles to the reset line driving the CSI +Optional properties: + - vcc-csi-supply: the VCC-CSI power supply of the CSI PE group + The CSI node should contain one 'port' child node with one child 'endpoint' node, according to the bindings defined in Documentation/devicetree/bindings/media/video-interfaces.txt. From patchwork Mon Dec 3 10:07:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10709065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 104CB1923 for ; Mon, 3 Dec 2018 10:08:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 000232AFDA for ; Mon, 3 Dec 2018 10:08:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E84DC2AFDF; Mon, 3 Dec 2018 10:08:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE79A2AFDB for ; Mon, 3 Dec 2018 10:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbeLCKIX (ORCPT ); Mon, 3 Dec 2018 05:08:23 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36759 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726209AbeLCKIW (ORCPT ); Mon, 3 Dec 2018 05:08:22 -0500 Received: by mail-wr1-f68.google.com with SMTP id u3so11452689wrs.3 for ; Mon, 03 Dec 2018 02:07:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dg+DbPWOiIWTEBIboqaFlKrQScH+lEmDG+NCL3SG4qM=; b=Hr/xAyT52bglpYPM26vtwVjw0lVi0riGdwBTt/Uqb6wsvE2smy8q0cbYurg03WIILo cG805J7COWGGGcN1i/oPutV5O29qrzM/zr6QKkWDl7I1ma9c7znHWIEClb+j0PzuWgIu NIhsAm9mzdwTmQmwt2f9mKA0av9nbuxKtVIss= 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:mime-version:content-transfer-encoding; bh=Dg+DbPWOiIWTEBIboqaFlKrQScH+lEmDG+NCL3SG4qM=; b=s6qoSTTQII6RlD5WMY2HQEDBCQRJVa1+b0orpB42ycn9WWI9zCsIPmr7XcgUJg2r2p SNeXAuwxa4Dh3hIslw+8n1AT/8HW7e+dp4Q0GG4ix8FrueAjumeGOk340OMVwpyuPUHi T+dwll7AGwTlBa0pb/6GNvhWlWd0i/U32DEOxb0wAs7slD5HeHi1tiMqIZfKQQAVB2Yw FnwHJurogpU67BoqTMtb9MZcxMomHCTcduRosWQZ7wlYQhc8s1xJWtJO9bldfBa/uXBC 62xOQ4RAKRfqnWYO4GFyxAz+DTT77vgIW+IXRW/R11sFBbTsy1sCWp+nqp8rulc5PFkw LNVw== X-Gm-Message-State: AA+aEWbVKNU61LJRzRxsjJyaCra+qjWPFXvtCOP742rxTtMgUlMz33CJ yjidMGjiz/Rlxz4GhniRR3m8og== X-Google-Smtp-Source: AFSGD/UK9g8q6lqOZkyiIHQVvaX8DUIaGiep5wexUKg8ZFn8bAxbcvqvPj7E0tiWbgOM/Hf0bE/ZmQ== X-Received: by 2002:adf:f8d2:: with SMTP id f18mr9094939wrq.265.1543831679146; Mon, 03 Dec 2018 02:07:59 -0800 (PST) Received: from localhost.localdomain (conf.hotelmediterraneo.com. [2.228.78.71]) by smtp.gmail.com with ESMTPSA id n15sm18589236wrt.21.2018.12.03.02.07.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 02:07:58 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jagan Teki Subject: [PATCH 3/5] media: sun6i: Add vcc-csi supply regulator Date: Mon, 3 Dec 2018 15:37:45 +0530 Message-Id: <20181203100747.16442-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181203100747.16442-1-jagan@amarulasolutions.com> References: <20181203100747.16442-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most of the Allwinner A64 CSI controllers are supply with VCC-PE pin, which may not be turned on by default. Add support for such boards by adding voltage regulator handling code to sun6i csi driver. Used vcc-csi instead of vcc-pe to have better naming convention wrt other controller pin supplies. Signed-off-by: Jagan Teki --- .../media/platform/sunxi/sun6i-csi/sun6i_csi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index 6950585edb5a..5836fa5e6b01 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -36,6 +37,7 @@ struct sun6i_csi_dev { struct clk *clk_mod; struct clk *clk_ram; struct reset_control *rstc_bus; + struct regulator *regulator; int planar_offset[3]; }; @@ -163,9 +165,16 @@ int sun6i_csi_set_power(struct sun6i_csi *csi, bool enable) clk_disable_unprepare(sdev->clk_ram); clk_disable_unprepare(sdev->clk_mod); reset_control_assert(sdev->rstc_bus); + regulator_disable(sdev->regulator); return 0; } + ret = regulator_enable(sdev->regulator); + if (ret) { + dev_err(sdev->dev, "Enable vcc csi supply err %d\n", ret); + return ret; + } + ret = clk_prepare_enable(sdev->clk_mod); if (ret) { dev_err(sdev->dev, "Enable csi clk err %d\n", ret); @@ -809,6 +818,12 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev, if (IS_ERR(io_base)) return PTR_ERR(io_base); + sdev->regulator = devm_regulator_get(&pdev->dev, "vcc-csi"); + if (IS_ERR(sdev->regulator)) { + dev_err(&pdev->dev, "Unable to acquire csi vcc supply\n"); + return PTR_ERR(sdev->regulator); + } + sdev->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "bus", io_base, &sun6i_csi_regmap_config); if (IS_ERR(sdev->regmap)) { From patchwork Mon Dec 3 10:07:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10709055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8D7B1731 for ; Mon, 3 Dec 2018 10:08:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B98FA2AFDA for ; Mon, 3 Dec 2018 10:08:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADC422AFDD; Mon, 3 Dec 2018 10:08:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D6CA2AFDA for ; Mon, 3 Dec 2018 10:08:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726063AbeLCKIY (ORCPT ); Mon, 3 Dec 2018 05:08:24 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52154 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbeLCKIY (ORCPT ); Mon, 3 Dec 2018 05:08:24 -0500 Received: by mail-wm1-f65.google.com with SMTP id s14so5106087wmh.1 for ; Mon, 03 Dec 2018 02:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SaTHXuzdJjMTWekY2/DsirLmYaUh6d39j/40yOw9ADA=; b=aVmN+pEPQpdTu26ytBH6ev469JzbamvV7CCnubiDPyOpmzonabtdr3gd//ELjNxIgM cGOYPfwYML5EoVHTlkG1sAAYiQOBPai3zb+4elxLYiyRImtP/NYnSgIMLs0a01woZb/z o8vORLdcIToa0TyHYyYc+IFw9CPmu207BMDx8= 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:mime-version:content-transfer-encoding; bh=SaTHXuzdJjMTWekY2/DsirLmYaUh6d39j/40yOw9ADA=; b=H80bgmo6/FyptGdLnSHeokITY2SeB/pvgm9EmC0d/8/rxLE68frGliGU2w6Azp7Hlo rLF3zHn7ob63QO9SK3bx6BKpanZdc6Ygr6havHJjCt2fVPrMBLCKin8+XZzTYNVDU8wK 0t3OeVWJts/5SbR45U7uHg47xY3u66TOXq5qAhMh+fF1Et1yKrQQwYTa26EB8BHmeIbZ +umveVMScV259CzLiJZNZTPTre74ZXZq6hN5xhh/Cj8VGTlaOP62VEU4/PmbWOYVC8nK 8Al0+RHaWf/akP/bGwAXMKk3mximfmHhgDY19Du5oeTh0O1vnUYOJWbHIC53Vr2DLFm7 677g== X-Gm-Message-State: AA+aEWb84q4eY5ZNBEN+5+dSLga+ZR073eMfh2VeG7EK9gLOAWAm2vka g6m9qTq2xgO9nhOEGXwaFCj7iA== X-Google-Smtp-Source: AFSGD/XXID2lcNa2SrO9/ABXfaFcfhJBWMw99ZZqav47P2OVn/8dG2m9kDDGnVhHa33Fr1z3Y/KK/A== X-Received: by 2002:a1c:b687:: with SMTP id g129mr7464602wmf.59.1543831680419; Mon, 03 Dec 2018 02:08:00 -0800 (PST) Received: from localhost.localdomain (conf.hotelmediterraneo.com. [2.228.78.71]) by smtp.gmail.com with ESMTPSA id n15sm18589236wrt.21.2018.12.03.02.07.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 02:07:59 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jagan Teki Subject: [PATCH 4/5] arm64: dts: allwinner: a64: Add A64 CSI controller Date: Mon, 3 Dec 2018 15:37:46 +0530 Message-Id: <20181203100747.16442-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181203100747.16442-1-jagan@amarulasolutions.com> References: <20181203100747.16442-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allwinner A64 CSI controller has similar features as like in H3, So add support for A64 via H3 fallback. Signed-off-by: Jagan Teki --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 384c417cb7a2..d32ff694ac5c 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -532,6 +532,12 @@ interrupt-controller; #interrupt-cells = <3>; + csi_pins: csi-pins { + pins = "PE0", "PE2", "PE3", "PE4", "PE5", "PE6", + "PE7", "PE8", "PE9", "PE10", "PE11"; + function = "csi0"; + }; + i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0"; @@ -899,6 +905,21 @@ status = "disabled"; }; + csi: csi@1cb0000 { + compatible = "allwinner,sun50i-a64-csi", + "allwinner,sun8i-h3-csi"; + reg = <0x01cb0000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI_SCLK>, + <&ccu CLK_DRAM_CSI>; + clock-names = "bus", "mod", "ram"; + resets = <&ccu RST_BUS_CSI>; + pinctrl-names = "default"; + pinctrl-0 = <&csi_pins>; + status = "disabled"; + }; + hdmi: hdmi@1ee0000 { compatible = "allwinner,sun50i-a64-dw-hdmi", "allwinner,sun8i-a83t-dw-hdmi"; From patchwork Mon Dec 3 10:07:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10709057 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D76F813BF for ; Mon, 3 Dec 2018 10:08:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C890B2AFDA for ; Mon, 3 Dec 2018 10:08:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCC6F2AFDD; Mon, 3 Dec 2018 10:08:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C6F72AFDA for ; Mon, 3 Dec 2018 10:08:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726251AbeLCKIZ (ORCPT ); Mon, 3 Dec 2018 05:08:25 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:41188 "EHLO mail-wr1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbeLCKIZ (ORCPT ); Mon, 3 Dec 2018 05:08:25 -0500 Received: by mail-wr1-f48.google.com with SMTP id x10so11449624wrs.8 for ; Mon, 03 Dec 2018 02:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8g+uoe2D0wbUmeVGWobhlMg09E9u+QyXMer1oiBcYAk=; b=AYMfQAZYz5o2/kkSAsIQmbtkGPKTB4spjIXNR78pptmK9KqHI1S0qOiAXe3PIPUt2V 6cdy3GA7OWSQ8rNjvPHvrBMflwbnR3cKp1YFBn2C/D2DDtwxo7vm6oF7QYLOMAWNHCjy jXdBOT9NDpQf2ZAocmFItxwTfI/uDxMHEApmA= 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:mime-version:content-transfer-encoding; bh=8g+uoe2D0wbUmeVGWobhlMg09E9u+QyXMer1oiBcYAk=; b=EPpFkOTg7K3xqAmFNsMuhzqsT+Sjp6B+3213W5EaW4STXo+A28i5H597nBODMKzVK3 QcsfMRJMOhujqT6Ygk6mLAxqxOSgJWmgAu52mzdSK7922xiBhDV15F9FN4m+L7GRH7LF G++DyB9XA+uKESTNOjTrUN/yqnMi4IrKO8DGCzitoLxcvAIA4XF2fgFAO+FoaReyiNW9 NZE+oqv8hVG7ETCqVYesGa0xKZ7GJuFNoJy0yNLp9LTJxpZGOEF5vOfsjJ+mLXQm1r5e QWgyUoWm/U3Q9RiuxH+aft61jmDmukJCA/BJqYPLWW4h03sBtoddZEkCKZcgjhL/1Ke8 MXYw== X-Gm-Message-State: AA+aEWZeYqVbkPXImUcLiVLPgImbK3GzqlKFU0Hf8a/b4WvXGMLZg/zf hRyF8B6ekLwGHwVp3jihzsSFmg== X-Google-Smtp-Source: AFSGD/XXnRvxPu+v/q0zi96QmqEJxLzAnSJQrpfhNl1nyainR2UMa5onjVEXfYEj5+c4mOqkVdyVbA== X-Received: by 2002:adf:e846:: with SMTP id d6mr14057493wrn.72.1543831681810; Mon, 03 Dec 2018 02:08:01 -0800 (PST) Received: from localhost.localdomain (conf.hotelmediterraneo.com. [2.228.78.71]) by smtp.gmail.com with ESMTPSA id n15sm18589236wrt.21.2018.12.03.02.08.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 02:08:01 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jagan Teki Subject: [PATCH 5/5] arm64: dts: allwinner: a64-amarula-relic: Add OV5640 camera node Date: Mon, 3 Dec 2018 15:37:47 +0530 Message-Id: <20181203100747.16442-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181203100747.16442-1-jagan@amarulasolutions.com> References: <20181203100747.16442-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Amarula A64-Relic board by default bound with OV5640 camera, so add support for it with below pin information. - PE13, PE12 via i2c-gpio bitbanging - CLK_CSI_MCLK as external clock - PE1 as external clock pin muxing - DLDO3 as vcc-csi supply - DLDO3 as AVDD supply - ALDO1 as DOVDD supply - ELDO3 as DVDD supply - PE14 gpio for reset pin - PE15 gpio for powerdown pin Signed-off-by: Jagan Teki --- .../allwinner/sun50i-a64-amarula-relic.dts | 54 +++++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 ++ 2 files changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts index 6cb2b7f0c817..9ac6d773188b 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts @@ -22,6 +22,41 @@ stdout-path = "serial0:115200n8"; }; + i2c-csi { + compatible = "i2c-gpio"; + sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&pio 4 12 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <5>; + #address-cells = <1>; + #size-cells = <0>; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&csi_mclk_pin>; + clocks = <&ccu CLK_CSI_MCLK>; + clock-names = "xclk"; + + AVDD-supply = <®_dldo3>; + DOVDD-supply = <®_aldo1>; + DVDD-supply = <®_eldo3>; + reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */ + powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */ + + port { + ov5640_ep: endpoint { + remote-endpoint = <&csi_ep>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; + }; + }; + wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc 1>; @@ -30,6 +65,25 @@ }; }; +&csi { + vcc-csi-supply = <®_dldo3>; + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + csi_ep: endpoint { + remote-endpoint = <&ov5640_ep>; + bus-width = <8>; + hsync-active = <1>; /* Active high */ + vsync-active = <0>; /* Active low */ + data-active = <1>; /* Active high */ + pclk-sample = <1>; /* Rising */ + }; + }; +}; + &ehci0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index d32ff694ac5c..844bb44a78af 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -538,6 +538,11 @@ function = "csi0"; }; + csi_mclk_pin: csi-mclk { + pins = "PE1"; + function = "csi0"; + }; + i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0";