From patchwork Fri Nov 5 13:42:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12604731 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FEA0C433EF for ; Fri, 5 Nov 2021 13:42:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 301916124D for ; Fri, 5 Nov 2021 13:42:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232604AbhKENpd (ORCPT ); Fri, 5 Nov 2021 09:45:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232410AbhKENpc (ORCPT ); Fri, 5 Nov 2021 09:45:32 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86D0AC061205; Fri, 5 Nov 2021 06:42:53 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id k1so9478182ilo.7; Fri, 05 Nov 2021 06:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FJVMN8J4fSdVamG2Tu6JD0TQF0L5ocpUKb2/MzMiTRQ=; b=A4kIRCh+R1s7T5qNJGo2RHDB8a/X5QXZCV/tWNkM0gd9AGXz4tQlX0xgBxbUb9A3tj 8EgfMqW5nMkScjVDnolJbFiybGyo8TOAThRt4Cji5z1WnQippwdW/z8K4JQvM+HVmTu9 XVYausyOqi332Zw2Td4Wp8+LLysqOXTe5GGZdt1apKtCo6VOifWeFxX8WI83GdGUFsP5 ISIlFqfNoMa1rbZ4qa8Ky8n5YTRgXlTwDecEPuIFzqvxkfv/rzmKoWwtcUSROIYY76ZR PI9ZFr1ITa4DWso0mCSzRbT3xWbsTKJZ3LRADyI6oaGLt53jQ5QqhmAb1rupqoBX0tlR JGtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FJVMN8J4fSdVamG2Tu6JD0TQF0L5ocpUKb2/MzMiTRQ=; b=G6xueb+gQJ+ON7ohCSidzs/LoBkhzoTshbpL0Om7WyJP3KX17W6OQJw/5kQHIuiusY O1NR0jrK0huNUmlG/pmzRJh+OaSJ5N9WDlDGswYojhejHlSADUi6nJqpDEedxp8CZZ1H kmhfIVwMZqAMknjLpjJ07GjoVErLG6URSIbJFhZ7ETq2ePL/ShEtsRPI3U/DmR0fFrzj tcRF6Q1F5q9m5RIaHg3WFRic4MdI1UPIS5hVXPrvdNFic9HycieVAP9nfQMwuEaUouoo NY6JR0MPjK8AgKSsxxNTu48vpynBlyObKx7unVRCnT0aXGayBzOTv/OQApvR8JRd0AAZ wtvA== X-Gm-Message-State: AOAM5319fMg1YObnThykqz1ZTutSWpEC6Tq0pqK10CMVrEnY6Fp+u8pF 6TuTfk/79bUC5uDlNNupNjs= X-Google-Smtp-Source: ABdhPJy/sYAZAytj/M9FqrjFeO4wsLbFO+aQIVqWJUJvqJxMT2sgXWKziGVZgXj+E9E5VU56HsLTmw== X-Received: by 2002:a05:6e02:180d:: with SMTP id a13mr38231436ilv.117.1636119772392; Fri, 05 Nov 2021 06:42:52 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id j15sm4537909ile.65.2021.11.05.06.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 06:42:50 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: tharvey@gateworks.com, frieder.schrempf@kontron.de, linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, aford@beaconembedded.com, cstevens@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , Lucas Stach , Peng Fan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] soc: imx: imx8m-blk-ctrl: Fix imx8mm mipi reset Date: Fri, 5 Nov 2021 08:42:24 -0500 Message-Id: <20211105134228.731331-1-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Most of the blk-ctrl reset bits are found in one register, however there are two bits in offset 8 for pulling the MIPI DPHY out of reset and these need to be set when IMX8MM_DISPBLK_PD_MIPI_CSI is brought out of reset or the MIPI_CSI hangs. Fixes: 926e57c065df ("soc: imx: imx8m-blk-ctrl: add DISP blk-ctrl") Signed-off-by: Adam Ford --- drivers/soc/imx/imx8m-blk-ctrl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c index 519b3651d1d9..5506bd075c35 100644 --- a/drivers/soc/imx/imx8m-blk-ctrl.c +++ b/drivers/soc/imx/imx8m-blk-ctrl.c @@ -17,6 +17,7 @@ #define BLK_SFT_RSTN 0x0 #define BLK_CLK_EN 0x4 +#define BLK_MIPI_RESET_DIV 0x8 struct imx8m_blk_ctrl_domain; @@ -36,6 +37,7 @@ struct imx8m_blk_ctrl_domain_data { const char *gpc_name; u32 rst_mask; u32 clk_mask; + u32 mipi_rst_mask; }; #define DOMAIN_MAX_CLKS 3 @@ -78,6 +80,7 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd) /* put devices into reset */ regmap_clear_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask); + regmap_clear_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_rst_mask); /* enable upstream and blk-ctrl clocks to allow reset to propagate */ ret = clk_bulk_prepare_enable(data->num_clks, domain->clks); @@ -99,6 +102,7 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd) /* release reset */ regmap_set_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask); + regmap_set_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_rst_mask); /* disable upstream clocks */ clk_bulk_disable_unprepare(data->num_clks, domain->clks); @@ -122,6 +126,7 @@ static int imx8m_blk_ctrl_power_off(struct generic_pm_domain *genpd) /* put devices into reset and disable clocks */ regmap_clear_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask); regmap_clear_bits(bc->regmap, BLK_CLK_EN, data->clk_mask); + regmap_clear_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_rst_mask); /* power down upstream GPC domain */ pm_runtime_put(domain->power_dev); @@ -488,6 +493,7 @@ static const struct imx8m_blk_ctrl_domain_data imx8mm_disp_blk_ctl_domain_data[] .gpc_name = "mipi-csi", .rst_mask = BIT(3) | BIT(4), .clk_mask = BIT(10) | BIT(11), + .mipi_rst_mask = BIT(16) | BIT(17), }, }; From patchwork Fri Nov 5 13:42:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12604733 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E70BC433EF for ; Fri, 5 Nov 2021 13:42:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B32761215 for ; Fri, 5 Nov 2021 13:42:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232865AbhKENpf (ORCPT ); Fri, 5 Nov 2021 09:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbhKENpe (ORCPT ); Fri, 5 Nov 2021 09:45:34 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF358C061714; Fri, 5 Nov 2021 06:42:54 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id i79so10408626ioa.13; Fri, 05 Nov 2021 06:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ifcLTX2qc/APSfweGVmairfZtv2yLEXVOJe6R7tXqVw=; b=BunBD/agWpqx5V+LH0jIhcNYq3Vy5d6til/mcvoP3LZNmtNBz+RZJsBDUh/cNswxoS Wwoqy+MIQr0JohAumatCt5vybwfw3ESi8KtNvTLN59pMkBmhJV1mKOgbfIsG0tra0pTV ROoN1OsSP4dZjejG7Ss2qWQvaw4SAmXD5+axzM0sJ0aSJd+zJLKmF5O8eDQTTr3lo/8g zTrZkkWgkDds3Ua3YeKR/sILhRsBowWze8zMwS1Dppg7N6WLr+cumlcJVgfRAEdNuttF cWdulf0eAeoH9Octyo0OmhYGtUnzIgY3IpWCP9jFfyDbOe2LbwUaCjbcwlSkjpyvhkc6 2j3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ifcLTX2qc/APSfweGVmairfZtv2yLEXVOJe6R7tXqVw=; b=kfr0ImQux3fjYAt1MkQTdj2gmLtBZa8ULmPMmPPhZVe7hiFUyzWtFDv2AVOXOIbUqt K5DhoA1+/482e/8cgVuy/2CH/2Zq68Y2NJCmSU9enP++YZRXYwuxGVObGGn/+kC5DUbr LijlHyd7BuaQyzywge3FcwS6xmDNbeFrpcyCLxDB1OAv9MjYfjrLhzAyc2Hi7gk/6jLS qK0tgfC38VLwArICsOILZ+gZe6tRwNKI1f2VbDTymxj73a92H92GLWDNJW54uMkZNGxl iGMhUQRtjvu1AOq9HqHjEkAjcuGdMlNPY38PveL+VYWFbwPGOuVNNnCaw/c9bXMb788N hOeA== X-Gm-Message-State: AOAM533iuOm61R5CIPcCAE+xlyxcAdYR8VV+T8ddsyuLrY6jSCjtXN3C dXoPM9ozPQLIKK9GpgN+YYI= X-Google-Smtp-Source: ABdhPJzuN92BDBHAMq2ySGrKTMJBOBXkbBpQBXwDYvvlYfPASpgIUMxjvpDnRfxXy8joby7l+5CICw== X-Received: by 2002:a5d:9492:: with SMTP id v18mr40717531ioj.158.1636119774299; Fri, 05 Nov 2021 06:42:54 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id j15sm4537909ile.65.2021.11.05.06.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 06:42:53 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: tharvey@gateworks.com, frieder.schrempf@kontron.de, linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, aford@beaconembedded.com, cstevens@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , Lucas Stach , Peng Fan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] arm64: dts: imx8mm: Add CSI nodes Date: Fri, 5 Nov 2021 08:42:25 -0500 Message-Id: <20211105134228.731331-2-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211105134228.731331-1-aford173@gmail.com> References: <20211105134228.731331-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There is a csi bridge and csis interface that tie together to allow csi2 capture. Signed-off-by: Adam Ford Reviewed-by: Laurent Pinchart Reviewed-By: Tim Harvey Tested-By: Tim Harvey --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index c2f3f118f82e..1f69c14d953f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -1068,6 +1068,22 @@ aips4: bus@32c00000 { #size-cells = <1>; ranges = <0x32c00000 0x32c00000 0x400000>; + csi: csi@32e20000 { + compatible = "fsl,imx8mm-csi", "fsl,imx7-csi"; + reg = <0x32e20000 0x1000>; + interrupts = ; + clocks = <&clk IMX8MM_CLK_CSI1_ROOT>; + clock-names = "mclk"; + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_CSI_BRIDGE>; + status = "disabled"; + + port { + csi_in: endpoint { + remote-endpoint = <&imx8mm_mipi_csi_out>; + }; + }; + }; + disp_blk_ctrl: blk-ctrl@32e28000 { compatible = "fsl,imx8mm-disp-blk-ctrl", "syscon"; reg = <0x32e28000 0x100>; @@ -1095,6 +1111,41 @@ disp_blk_ctrl: blk-ctrl@32e28000 { #power-domain-cells = <1>; }; + mipi_csi: mipi-csi@32e30000 { + compatible = "fsl,imx8mm-mipi-csi2"; + reg = <0x32e30000 0x1000>; + interrupts = ; + assigned-clocks = <&clk IMX8MM_CLK_CSI1_CORE>, + <&clk IMX8MM_CLK_CSI1_PHY_REF>; + assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_1000M>, + <&clk IMX8MM_SYS_PLL2_1000M>; + clock-frequency = <333000000>; + clocks = <&clk IMX8MM_CLK_DISP_APB_ROOT>, + <&clk IMX8MM_CLK_CSI1_ROOT>, + <&clk IMX8MM_CLK_CSI1_PHY_REF>, + <&clk IMX8MM_CLK_DISP_AXI_ROOT>; + clock-names = "pclk", "wrap", "phy", "axi"; + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_CSI>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + + imx8mm_mipi_csi_out: endpoint { + remote-endpoint = <&csi_in>; + }; + }; + }; + }; + usbotg1: usb@32e40000 { compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb"; reg = <0x32e40000 0x200>; From patchwork Fri Nov 5 13:42:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12604735 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C57D0C433F5 for ; Fri, 5 Nov 2021 13:42:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0958611C0 for ; Fri, 5 Nov 2021 13:42:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233052AbhKENph (ORCPT ); Fri, 5 Nov 2021 09:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233017AbhKENpg (ORCPT ); Fri, 5 Nov 2021 09:45:36 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC66C061714; Fri, 5 Nov 2021 06:42:57 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id n128so10724872iod.9; Fri, 05 Nov 2021 06:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6DnJaZejjY7YGe416zQO8xP6uy0r2CR+DYTO7evqJCs=; b=lgQMPgtN3ciqhxYSE7CONAKA4Z39z9EhyjV6TvHxbgtzdODg9Gq56jgvKP+OaJVL5J sGfl78z+78CujrieYJo2tgkEgJi4sSEYe6F4tllHbZWSspYp48bqjvo3PM4T+sdzdLFu CxeQXvXFVE3hHuIYsvLtdJj+sZvBO5MQ0RDokomOZC+PWa2OFdq4CbgppbaOA8i9GYAQ /UIMi8C98WhGoYe9NxqXxJETmz3GiWoYpdxCN73ARt/XU4YecAo52//kMS6q6ioElUwf 0V+PWl7HsO4GGxFlv8zTWkriBM4R93UDHC6zDQ7upOgW/JJM0n5HY4IvyQNFYlWCt0bg q13Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6DnJaZejjY7YGe416zQO8xP6uy0r2CR+DYTO7evqJCs=; b=2k50y+HHOwq/Y1T3Yyr6/mfQkHM7Cg8xLuWrYQrXv2o/TjjbaaoA3dMYR81MbeCOos Rsf8nUxSY5Z7K6TYt49tsIB7yhuAZYeyhcptQiw/8vlqsx1mghvzVJC3sRPX/PWGmdyw oJc27MxhjpN7SMuEzGtc56Jb/ZNnXrKtYdlM8ibLXHmJPdc+TIEt5pPFiVrgED7jqC0C cTvmz54W4/JXhoBQ/JU8v6zzjcO2fgMZW1aEk4m/wTo+cbg+7W1CgZhbTJN22f+q2Tgx jgFHLk7q0MlnSK9tTb02aEWhJp15KXxDUe6Xo+w8/VqMeSHrPZ1VqSGkqAOvXQK5v8gt 9gQA== X-Gm-Message-State: AOAM532cikkoXh+bytUU2T385Kr3Wo9kmoUMvqn+hZfg04o03m4f1jQc zKLmC19/smi4r3ix0CluQFw= X-Google-Smtp-Source: ABdhPJwLlg0veKa0TrQOcgkCplFB2aVy7GIdxoXuy989hQkB7x/PRNCebsTw0gIvc27bBPGbbaLB6A== X-Received: by 2002:a05:6638:3048:: with SMTP id u8mr9042902jak.103.1636119776617; Fri, 05 Nov 2021 06:42:56 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id j15sm4537909ile.65.2021.11.05.06.42.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 06:42:55 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: tharvey@gateworks.com, frieder.schrempf@kontron.de, linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, aford@beaconembedded.com, cstevens@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , Lucas Stach , Peng Fan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] arm64: defconfig: Enable VIDEO_IMX_MEDIA Date: Fri, 5 Nov 2021 08:42:26 -0500 Message-Id: <20211105134228.731331-3-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211105134228.731331-1-aford173@gmail.com> References: <20211105134228.731331-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org To use a camera, the CSIS and CSI drivers need to be enabled with VIDEO_IMX_MEDIA. Signed-off-by: Adam Ford --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index f2e2b9bdd702..bc261cf2ef5a 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -958,6 +958,7 @@ CONFIG_MFD_CROS_EC_DEV=y CONFIG_STAGING=y CONFIG_STAGING_MEDIA=y CONFIG_VIDEO_HANTRO=m +CONFIG_VIDEO_IMX_MEDIA=m CONFIG_CHROME_PLATFORMS=y CONFIG_CROS_EC=y CONFIG_CROS_EC_I2C=y From patchwork Fri Nov 5 13:42:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12604737 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B8D4C433EF for ; Fri, 5 Nov 2021 13:43:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77DA3611AE for ; Fri, 5 Nov 2021 13:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbhKENpq (ORCPT ); Fri, 5 Nov 2021 09:45:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233082AbhKENpj (ORCPT ); Fri, 5 Nov 2021 09:45:39 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 088E2C061205; Fri, 5 Nov 2021 06:43:00 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id j28so9504245ila.1; Fri, 05 Nov 2021 06:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SarUraL3MNewUYrIR1gjIrvQNh1IHGXftn6tysi+onY=; b=BFKnkms3Yvsl99PMfqniXuAWo8Xc41e1L6vsekeHPdcmBmCaUVlMxbBifpx0sNaGvg KLjLFbUtZP72D7rzTVYrNsiFe+Nx3F3PQnSEHK55gxRml/KtXZXCZBYvz9s3zr5I0gU9 7ZcoXbD5fkBackuPOw/OfqWEpvLqu1JKsI9TaFQgRrbOMSszZf6o/UB4lJ2Zk6APPzXa gNJZaUQCvZ7IAn3DOJfI9Qz62YybjVnX9EAEFgOxM75QzTxJ4wh9Nf8rdx47JpBwmchm c4i7cTRsl2w9Jjp/VokU5gD6gUkKAHYPMywmAiCyovt82zzS4boNeLFHLUNPdrPyBbAa pLog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SarUraL3MNewUYrIR1gjIrvQNh1IHGXftn6tysi+onY=; b=AnBUCuPb1ZYibCDr+wHL81/LK5j7gAWubTFShlPfxPrN5OwPT0gA3svBMPaR15fNMu tkF7Luu3BBuYrpHOVnH/TzoC/ne0z5wzvfsOIT5xYG5C5Wim+KTjEaHk/TMp/J76PBt5 cQnQCxSzoqRF0TNDOzVSINtttCLLWPfKjueloPsz0vVpSkqSl4hRNWxCX+LJxhC2T63j ZjAY85umx0gjIxgjkPsjauae0p8y2XXR5MqFeo7WHFU4itR9zOrp0y+WB1LHgBkrLTXT E3yBlu8pbAp51WalEg4a1aJXBt/ey+ffTMqHcepjmRoxxw7vFZZL+Pn7PsMWLQ5yHc+r eM5A== X-Gm-Message-State: AOAM531zqpbDgIELFVHLCfPY7REcXYV/nlVwYxItU1PPgnPF5pDlZNcy I2eEI4N6QcqLvi25YBxeVr8= X-Google-Smtp-Source: ABdhPJzLq3UvMLphxCEWMLq1ouYIv2fU+fB1+Jm4nDVL7aswxiaNpxLnY7RTPGDVU7ftlalBbIDD1w== X-Received: by 2002:a05:6e02:148c:: with SMTP id n12mr14926231ilk.131.1636119779379; Fri, 05 Nov 2021 06:42:59 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id j15sm4537909ile.65.2021.11.05.06.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 06:42:57 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: tharvey@gateworks.com, frieder.schrempf@kontron.de, linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, aford@beaconembedded.com, cstevens@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , Lucas Stach , Peng Fan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] arm64: dts: imx8mm-beacon: Enable OV5640 Camera Date: Fri, 5 Nov 2021 08:42:27 -0500 Message-Id: <20211105134228.731331-4-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211105134228.731331-1-aford173@gmail.com> References: <20211105134228.731331-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The baseboard has support for a TDNext 5640 Camera which uses an OV5640 connected to a 2-lane CSI2 interface. With the CSI and mipi_csi2 drivers pointing to an OV5640 camera, the media pipeline can be configured with the following: media-ctl --links "'ov5640 1-003c':0->'imx7-mipi-csis.0':0[1]" The camera and various nodes in the pipeline can be configured for UYVY: media-ctl -v -V "'ov5640 1-003c':0 [fmt:UYVY8_1X16/640x480 field:none]" media-ctl -v -V "'csi':0 [fmt:UYVY8_1X16/640x480 field:none]" Signed-off-by: Adam Ford --- .../freescale/imx8mm-beacon-baseboard.dtsi | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi index 6f5e63696ec0..0fb95f4a5e78 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi @@ -43,6 +43,16 @@ reg_audio: regulator-audio { enable-active-high; }; + reg_camera: regulator-camera { + compatible = "regulator-fixed"; + regulator-name = "mipi_pwr"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + gpio = <&pca6416_1 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <100000>; + }; + reg_usdhc2_vmmc: regulator-usdhc2 { compatible = "regulator-fixed"; regulator-name = "VSD_3V3"; @@ -67,6 +77,10 @@ sound { }; }; +&csi { + status = "okay"; +}; + &ecspi2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_espi2>; @@ -90,6 +104,30 @@ &i2c2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2>; status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5640>; + reg = <0x3c>; + clocks = <&clk IMX8MM_CLK_CLKO1>; + clock-names = "xclk"; + assigned-clocks = <&clk IMX8MM_CLK_CLKO1>; + assigned-clock-parents = <&clk IMX8MM_CLK_24M>; + assigned-clock-rates = <24000000>; + AVDD-supply = <®_camera>; /* 2.8v */ + powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + + port { + /* MIPI CSI-2 bus endpoint */ + ov5640_to_mipi_csi2: endpoint { + remote-endpoint = <&imx8mm_mipi_csi_in>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; }; &i2c4 { @@ -141,6 +179,18 @@ pca6416_1: gpio@21 { }; }; +&mipi_csi { + status = "okay"; + ports { + port@0 { + imx8mm_mipi_csi_in: endpoint { + remote-endpoint = <&ov5640_to_mipi_csi2>; + data-lanes = <1 2>; + }; + }; + }; +}; + &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; @@ -209,6 +259,14 @@ MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x41 >; }; + pinctrl_ov5640: ov5640grp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19 + MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19 + MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 0x59 + >; + }; + pinctrl_pcal6414: pcal6414-gpiogrp { fsl,pins = < MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19 From patchwork Fri Nov 5 13:42:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12604739 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63872C433EF for ; Fri, 5 Nov 2021 13:43:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 415E5611C0 for ; Fri, 5 Nov 2021 13:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233179AbhKENpt (ORCPT ); Fri, 5 Nov 2021 09:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233062AbhKENpn (ORCPT ); Fri, 5 Nov 2021 09:45:43 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B61C7C06120C; Fri, 5 Nov 2021 06:43:01 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id r3so9259083iod.6; Fri, 05 Nov 2021 06:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GVr9UbvBqKhMKqrCL+QAuy1UOuRrPQt/vqzzfEWHG9U=; b=QdkMVgCl4s70IFXnwLkwMw7vnMfI5woUZFGqI38zfO4AGEO9ZzBNg1O4jtQTqjIcaD OU/udSKAPnulFYLQpNaURYUgFf6/A3fN9CvzzK+oE5+V+C2NcisjY1X1R5xG5vpyvqPi w6eTpGNdzgTSUJL34d9i2LdB6uPcs6jAmf8no9j0amLCNOe/dY+hm5lDYEamQsNLUVnj f7VcailRea2wt3yZFL5zTQbZ3PqdF9XScx5kN0cnxvYG7PAksEbCoEi38e804/0KZhIt wSXoosIsxypT5uIgbCFA2uK0KNY68h1GPb8HkYlYEb5FfL9plN3FLgpSr4aXlZ+AP3lA 5mww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GVr9UbvBqKhMKqrCL+QAuy1UOuRrPQt/vqzzfEWHG9U=; b=zS3m+aToIfGImjl7s/69I290bVJsA/AYGMho+z+pCI+iROL8HDgsQaUZwHDZSi8JbB dyUOM/gSzlojwP1bjjkViA2Ded9+ZpgTkVh1JJ37MpyJ0IJdEWqsaqJ7tb72gkW6WMLy CKwRcahkBB9xx2V0ugLichCHahz6AMc+39jysvGCXKtHFU290vXHrFl4ngATR+dEt++8 jLapbXMyRzf0UivW1sSJR6NValoNVpDLm2nkdhwtFwyPIpmlCsDMvh6jfbRakoAkQrK8 MjZlOfKW9yvsozau2RD/0KhOVQsIS2OEq9mCVMnzZufV+mEtB2mvPlpbyLlf9yzvG9HX 61QQ== X-Gm-Message-State: AOAM532VLknJW98LByV0/pFDGzInhNhvlxV+y6Wd5mZceyIDeuWAcmVf S2SsNYsGqse4XU++/3H0lSw= X-Google-Smtp-Source: ABdhPJyaCp0y/ZZ7VWLi4RArSfHIskr9dm2tjm8AgcgrqcqwpOgP3hG0AEAXLuOyOaJIGWnhJda75g== X-Received: by 2002:a5d:9b86:: with SMTP id r6mr42742226iom.50.1636119781060; Fri, 05 Nov 2021 06:43:01 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id j15sm4537909ile.65.2021.11.05.06.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 06:43:00 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: tharvey@gateworks.com, frieder.schrempf@kontron.de, linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, aford@beaconembedded.com, cstevens@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , Lucas Stach , Peng Fan , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] arm64: defconfig: Enable OV5640 Date: Fri, 5 Nov 2021 08:42:28 -0500 Message-Id: <20211105134228.731331-5-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211105134228.731331-1-aford173@gmail.com> References: <20211105134228.731331-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The Beacon EmbeddedWorks imx8mm development kit has a TD Next 5640 Camera. Enable the OV5640 driver to use the camera. Signed-off-by: Adam Ford --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index bc261cf2ef5a..4c1eb9aae5e5 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -668,6 +668,7 @@ CONFIG_VIDEO_QCOM_VENUS=m CONFIG_SDR_PLATFORM_DRIVERS=y CONFIG_VIDEO_RCAR_DRIF=m CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_OV5640=m CONFIG_VIDEO_OV5645=m CONFIG_VIDEO_QCOM_CAMSS=m CONFIG_DRM=m