From patchwork Sun Apr 23 21:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 677374 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E319EC6FD18 for ; Sun, 23 Apr 2023 21:27:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbjDWV1K (ORCPT ); Sun, 23 Apr 2023 17:27:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjDWV1K (ORCPT ); Sun, 23 Apr 2023 17:27:10 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 377D31BD; Sun, 23 Apr 2023 14:27:07 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-763c3429abaso50882739f.1; Sun, 23 Apr 2023 14:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682285226; x=1684877226; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SOjlnvDsvb6bgAKebVUE0qApMvQz1jb06beyFrnv+hI=; b=JdKY7LVOvz6pfW6YMi1FWh663LWft33E69+aZxmpCZS0DF+Xa67kHnd7hfrX0uLKDV 9doXrAmkjqdGXxo/lP9WxQhF/c6ynqECrbQg1thddHgKGN21BLOp6yBk/Q0T9ecs5fiw obEBzOyDc6v7Y2BoJWBcQY8plOgV/o7fvtEWyfFgKhc0+2DTtdBQbV+SmvWUct4J7SdP XgAo0mPGX8UA4Zdi8PAD0EYiBNUOWqrRkttEXaNFKb5/S5GGdqPgzkLreuktxVffoOjd d+z9YeEXeQ9Fx7e1ebpJmJoXdl2gj5Kpt+u3nLSFtbiwP7HhR9vQsloVbJ0NQgWOQVXh rtCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682285226; x=1684877226; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SOjlnvDsvb6bgAKebVUE0qApMvQz1jb06beyFrnv+hI=; b=l+eAstTasw3E5nmcTcWDb5cLOXqvRmWbzgHf8qbVm/HggARRACB/cT3mpJHZS/reoL VAagxqggiqG/4+oRQMM40VSvRxWzYj1tSM6h+S+o751ZdTIbM1uek24l7UJGAmXFPJ3H /NbjR0KcC2kPlK9SDgqugc2cLh/wfzI7N3H0E3i8i8KYQBdZn5nwKh0EWjHjDW1Dfw95 QmfNdMdN3JGAYi2Ldw8hFO82fhzeAT9ka4uRhy7rfXFh58wdpjQ+RO0sh2LwyxFwuJ8C oIjaJUmpWeHmbvOR2EqGJFIQnleMPch4aRuGUYwO+roX+8WYRiB2cSMQ50+XzuvK1FrB CXcg== X-Gm-Message-State: AAQBX9eTiHuiLopRjhQy3ACl6kAe9RGz+JqrbwZQohtnxVg7Dd8WZg2j H1EvoFhphr7MCBh88M96Beo= X-Google-Smtp-Source: AKy350Zxk1soynFZ/2qIEkzJVAsJqEoziH6TbN5V+g3lXWbh9c9y9NTnfo7xiVs1PUgj8cKo2wH9vA== X-Received: by 2002:a5e:9202:0:b0:760:b45d:7d54 with SMTP id y2-20020a5e9202000000b00760b45d7d54mr4569336iop.13.1682285226325; Sun, 23 Apr 2023 14:27:06 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:83d3:c200:cd2e:6159]) by smtp.gmail.com with ESMTPSA id d1-20020a028581000000b004050767f779sm2897403jai.164.2023.04.23.14.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 14:27:05 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: laurent.pinchart@ideasonboard.com, Adam Ford , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: imx8mn: Enable CSI and ISI Nodes Date: Sun, 23 Apr 2023 16:26:55 -0500 Message-Id: <20230423212656.1381002-1-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The CSI in the imx8mn is the same as what is used in the imx8mm, but it's routed to the ISI on the Nano. Add both the ISI and CSI nodes, and pointing them to each other. Since the CSI capture is dependent on an attached camera, mark both ISI and CSI as disabled by default. Signed-off-by: Adam Ford diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index 8be8f090e8b8..102550b41f22 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -1104,6 +1104,24 @@ dsim_from_lcdif: endpoint { }; }; + isi: isi@32e20000 { + compatible = "fsl,imx8mn-isi"; + reg = <0x32e20000 0x100>; + interrupts = ; + clocks = <&clk IMX8MN_CLK_DISP_AXI_ROOT>, + <&clk IMX8MN_CLK_DISP_APB_ROOT>; + clock-names = "axi", "apb"; + fsl,blk-ctrl = <&disp_blk_ctrl>; + power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_ISI>; + status = "disabled"; + + port { + isi_in: endpoint { + remote-endpoint = <&mipi_csi_out>; + }; + }; + }; + disp_blk_ctrl: blk-ctrl@32e28000 { compatible = "fsl,imx8mn-disp-blk-ctrl", "syscon"; reg = <0x32e28000 0x100>; @@ -1147,6 +1165,42 @@ 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 IMX8MN_CLK_CAMERA_PIXEL>, + <&clk IMX8MN_CLK_CSI1_PHY_REF>; + assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>, + <&clk IMX8MN_SYS_PLL2_1000M>; + assigned-clock-rates = <333000000>; + clock-frequency = <333000000>; + clocks = <&clk IMX8MN_CLK_DISP_APB_ROOT>, + <&clk IMX8MN_CLK_CAMERA_PIXEL>, + <&clk IMX8MN_CLK_CSI1_PHY_REF>, + <&clk IMX8MN_CLK_DISP_AXI_ROOT>; + clock-names = "pclk", "wrap", "phy", "axi"; + power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_MIPI_CSI>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + + mipi_csi_out: endpoint { + remote-endpoint = <&isi_in>; + }; + }; + }; + }; + usbotg1: usb@32e40000 { compatible = "fsl,imx8mn-usb", "fsl,imx7d-usb", "fsl,imx27-usb"; reg = <0x32e40000 0x200>; From patchwork Sun Apr 23 21:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 676349 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12CF1C77B76 for ; Sun, 23 Apr 2023 21:27:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbjDWV1L (ORCPT ); Sun, 23 Apr 2023 17:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229948AbjDWV1K (ORCPT ); Sun, 23 Apr 2023 17:27:10 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F803E48; Sun, 23 Apr 2023 14:27:08 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-763c3429abaso50884239f.1; Sun, 23 Apr 2023 14:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682285227; x=1684877227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RwtrvNdrZ4vfVSuyxPzOu7AvsLJyx+3KZ2XDlNlyNjU=; b=PsDLJ5oXlioc5siNLkJtGr1cgaCY6lIOP9fsFmQsyolaf9nxZJ96PlhbuvZ5oXAdZY qZO6nmLwo1Gi8VxHHS889EgYntDuHSSDVICKba+rpWTHV3lNIVMEAbQR7DI3vMd1wEAu kHyglmQ+CudE2CdneZdfIS3rLUDi4yL35e1le/LClh+k4Sj7e/hCoeqjMnUy8r4vS17a eZB9jtPwf8XsKFFwKxsbgXsfx/9shuZ2EqHepZKk6RW5wUMklntq2VrhniqyXisOk7EA spA/gvLUZ0+F/9Jr1b2FMv7xGYPCEowc/a8gq7lINGMpfEFrkaGzceta+/7sBfySyxlK H86Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682285227; x=1684877227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RwtrvNdrZ4vfVSuyxPzOu7AvsLJyx+3KZ2XDlNlyNjU=; b=O04Jrm0ViBdgF4YzCdvhHhAHHHp7dFxG48shy8C8EJsk/qSw2+6x6HdNVBwLR/4tB8 RL2LEhinEcES5hbeTFOcybPI8M7nZqS+YyZ0hJWzneT9a+sAj2BdNSy+Cbs/9Db1cAhE sXkd2ZbCBnaXvRSZpg8xLDhIe6uDvhfTUvYZd0SR+Hje/Pjq+xVa++SUTTJqpvMTgT1g XTa/ihaukGPpnjyStY5jYAFgsgkGCbZjMNdYGahTvcqbhJEB9FApnFip0kCNWgx6QK1w JqcsorC2tvXdx0k0Dx7ATNMefDPLd2svW/8JK3jfU31IZWmjmfwXgUx+xEgsSy/vAzs6 Wj4Q== X-Gm-Message-State: AAQBX9f0LaR1rhg8UbMtWBIANlpw6Y0A8iq/XKUMofbVjPpR0VzegHD/ VNGsIm8P7nx3OyT7euF8Bp4= X-Google-Smtp-Source: AKy350afgA8iGftiANAovOQTuIUaZ1zVajWHrvD3enekMBaOZvc771PTtshJczvn72lCOvbzX9e5vw== X-Received: by 2002:a6b:f704:0:b0:761:22af:1e3b with SMTP id k4-20020a6bf704000000b0076122af1e3bmr4772455iog.2.1682285227602; Sun, 23 Apr 2023 14:27:07 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:83d3:c200:cd2e:6159]) by smtp.gmail.com with ESMTPSA id d1-20020a028581000000b004050767f779sm2897403jai.164.2023.04.23.14.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 14:27:07 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: laurent.pinchart@ideasonboard.com, Adam Ford , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] arm64: defconfig: Enable video capture drivers on imx8mm/imx8mn Date: Sun, 23 Apr 2023 16:26:56 -0500 Message-Id: <20230423212656.1381002-2-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230423212656.1381002-1-aford173@gmail.com> References: <20230423212656.1381002-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The imx8m Mini and imx8m Nano both use the same CSIS driver for interfacing with sensors and cameras. The Mini routes the CSIS output to the imx7-CSI driver, and the Nano routes the CSIS through the imx8-isi driver like the one used on the imx8mp. Enable the drivers necessary to facilitate capture on both of these two platforms. Signed-off-by: Adam Ford Reviewed-by: Laurent Pinchart diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index a24609e14d50..7005640fbb8e 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -743,6 +743,10 @@ CONFIG_SDR_PLATFORM_DRIVERS=y CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_MEDIATEK_JPEG=m CONFIG_VIDEO_MEDIATEK_VCODEC=m +CONFIG_VIDEO_IMX7_CSI=m +CONFIG_VIDEO_IMX_MIPI_CSIS=m +CONFIG_VIDEO_IMX8_ISI=m +CONFIG_VIDEO_IMX8_ISI_M2M=y CONFIG_VIDEO_QCOM_CAMSS=m CONFIG_VIDEO_QCOM_VENUS=m CONFIG_VIDEO_RCAR_ISP=m