From patchwork Mon Feb 28 15:47:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12763496 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66B42C433F5 for ; Mon, 28 Feb 2022 15:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YMrqtemyK6n212Oq8HcBrpwDAkb+4B5uysgmGbYcHes=; b=p+APgEhfuXOVWP mSeZJVF/nhhwaBFZucD0NnLl8wisb2siOyVKHtrGxFA+WqTz3+YanvZx9z+PuEJizDlFEa+XDuh/a OPcjQQveeG3XYgUgbc2j3L5c1fYF0f5qtcb27Pwr+V/lQJiH3pBMPc1GctYVeFup2Dr3rpTclUb19 axZXB/qjHCPaCGiWgroafpYaQs0yEut/pZWC+107zYMYrbKnVQlcUETkjeDVC6vfmZzSClQ1iTM63 /EBUucIX1ud+cONGHgjY3SrnVEjpOA6nMdhRM4rGP4ZpcfkZFRoNLuHT8d24gtwcHHEXEJ0eErILo gl6bPVk5YmbNGW6NUJZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiGQ-00DDBV-Hz; Mon, 28 Feb 2022 15:48:42 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiGC-00DD5q-Bd for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 15:48:30 +0000 Received: from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp [175.177.42.148]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A4DD7486; Mon, 28 Feb 2022 16:48:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1646063304; bh=IVUry2y6A0CkH8kK7ptUA/ba2DtbKlrpdmN1rJJQwNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DFk2MP8lpjL41UAZGPZGzvMp+bKN6NAc/PAzkLOSQYXf1PvOVFRBt9/vDT0yK32YL vXFZ7FftIsQ2kQPMLDgJzSgvb2FC5r/TQ9NV1PwbzhdTnck2NrplQjHTasbMewwSDU FlxE90HAgnY72RagPpCJDZWmn4fFoaCZOt8VWkII= From: Paul Elder To: Rob Herring , Shawn Guo , Sascha Hauer Cc: Paul Elder , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Laurent Pinchart , Lucas Stach , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] dt-bindings: soc: Add i.MX8MP media block control DT bindings Date: Tue, 1 Mar 2022 00:47:58 +0900 Message-Id: <20220228154801.1347487-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220228154801.1347487-1-paul.elder@ideasonboard.com> References: <20220228154801.1347487-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_074828_640233_EFBFB75D X-CRM114-Status: GOOD ( 15.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The i.MX8MP Media Block Control (MEDIA BLK_CTRL) is a top-level peripheral providing access to the NoC and ensuring proper power sequencing of the peripherals within the MEDIAMIX domain. Add DT bindings for it. There is already a driver for block controls of other SoCs in the i.MX8M family, so these bindings will expand upon that. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring --- .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 105 ++++++++++++++++++ include/dt-bindings/power/imx8mp-power.h | 10 ++ 2 files changed, 115 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml new file mode 100644 index 000000000000..b41a8802081a --- /dev/null +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8MP Media Block Control + +maintainers: + - Paul Elder + +description: + The i.MX8MP Media Block Control (MEDIA BLK_CTRL) is a top-level peripheral + providing access to the NoC and ensuring proper power sequencing of the + peripherals within the MEDIAMIX domain. + +properties: + compatible: + items: + - const: fsl,imx8mp-media-blk-ctrl + - const: syscon + + reg: + maxItems: 1 + + '#power-domain-cells': + const: 1 + + power-domains: + maxItems: 10 + + power-domain-names: + items: + - const: bus + - const: mipi-dsi1 + - const: mipi-csi1 + - const: lcdif1 + - const: isi + - const: mipi-csi2 + - const: lcdif2 + - const: isp + - const: dwe + - const: mipi-dsi2 + + clocks: + items: + - description: The APB clock + - description: The AXI clock + - description: The pixel clock for the first CSI2 receiver (aclk) + - description: The pixel clock for the second CSI2 receiver (aclk) + - description: The pixel clock for the first LCDIF (pix_clk) + - description: The pixel clock for the second LCDIF (pix_clk) + - description: The core clock for the ISP (clk) + - description: The MIPI-PHY reference clock used by DSI + + clock-names: + items: + - const: apb + - const: axi + - const: cam1 + - const: cam2 + - const: disp1 + - const: disp2 + - const: isp + - const: phy + +required: + - compatible + - reg + - '#power-domain-cells' + - power-domains + - power-domain-names + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + + media_blk_ctl: blk-ctl@32ec0000 { + compatible = "fsl,imx8mp-media-blk-ctrl", "syscon"; + reg = <0x32ec0000 0x10000>; + power-domains = <&mediamix_pd>, <&mipi_phy1_pd>, + <&mipi_phy1_pd>, <&mediamix_pd>, + <&mediamix_pd>, <&mipi_phy2_pd>, + <&mediamix_pd>, <&ispdwp_pd>, + <&ispdwp_pd>, <&mipi_phy2_pd>; + power-domain-names = "bus", "mipi-dsi1", "mipi-csi1", "lcdif1", "isi", + "mipi-csi2", "lcdif2", "isp", "dwe", "mipi-dsi2"; + clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>, + <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>, + <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_CAM2_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_DISP1_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_DISP2_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_ISP_ROOT>, + <&clk IMX8MP_CLK_MEDIA_MIPI_PHY1_REF_ROOT>; + clock-names = "apb", "axi", "cam1", "cam2", "disp1", "disp2", + "isp", "phy"; + #power-domain-cells = <1>; + }; +... diff --git a/include/dt-bindings/power/imx8mp-power.h b/include/dt-bindings/power/imx8mp-power.h index 9f90c40a2c6c..bc8458f1e725 100644 --- a/include/dt-bindings/power/imx8mp-power.h +++ b/include/dt-bindings/power/imx8mp-power.h @@ -32,4 +32,14 @@ #define IMX8MP_HSIOBLK_PD_PCIE 3 #define IMX8MP_HSIOBLK_PD_PCIE_PHY 4 +#define IMX8MP_MEDIABLK_PD_MIPI_DSI_1 0 +#define IMX8MP_MEDIABLK_PD_MIPI_CSI2_1 1 +#define IMX8MP_MEDIABLK_PD_LCDIF_1 2 +#define IMX8MP_MEDIABLK_PD_ISI 3 +#define IMX8MP_MEDIABLK_PD_MIPI_CSI2_2 4 +#define IMX8MP_MEDIABLK_PD_LCDIF_2 5 +#define IMX8MP_MEDIABLK_PD_ISP 6 +#define IMX8MP_MEDIABLK_PD_DWE 7 +#define IMX8MP_MEDIABLK_PD_MIPI_DSI_2 8 + #endif From patchwork Mon Feb 28 15:47:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12763497 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16AF5C433EF for ; Mon, 28 Feb 2022 15:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5eDoXI0/JA0mOaY9Sx2dq3klxNSzDxwSlZxoKBkaccM=; b=vC9tmPYWdq84eJ kH1H/NhYNkOnL/Vrhd7Kq+gPitVQKzPFo/9pc3M6zueTkH0fxyxWG4y0BRxfKpa+LhN4J4yO/s7ve m3O6kXMZSlPaTm9xPS8tFYMmHpIX/1m+RR9S49exalGm55AKwtopLoeitNlOWMs6afY/s0n3tqT4m o4uQ/5NNkV/G6OVZ00TAtLYQEoMsubhXQqr9ReTIjye16QI34L4bVLpX4RXhQhSPsMVET94peKj52 igk06rVAW0uAHCdcj3YKTfZUoJ1Old7zWy5YpCMNLFVzkKsER4QnZd1sDB+Bk60Nri8x+JoyvLGzP PfEB9zXrxOkoU+w+AGtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiGc-00DDEG-IT; Mon, 28 Feb 2022 15:48:54 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiGE-00DD7F-L1 for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 15:48:32 +0000 Received: from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp [175.177.42.148]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5C20CA67; Mon, 28 Feb 2022 16:48:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1646063308; bh=xiH/1G23CdldiBqjTNNmZSmyVGIdwhm1EeWYgUv+tIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qf4xTMi6W9EFsYZCOTDyqBhd6l84grSKjQ3bbutaIHC31OtaSFyNQ4GvPD4FGjMK+ 430kBGxvaD6BK7QUCfWzy0jiTEBa0halSspUHfZBatRvHdYDbj29xxG9Nz48BPNDG8 yH5ftIFE62sUDN+qv06u15lgvzUabo5oKIp25ilY= From: Paul Elder To: Shawn Guo , Sascha Hauer Cc: Paul Elder , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Laurent Pinchart , Lucas Stach , Adam Ford , Dan Carpenter , Philipp Zabel , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] soc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl Date: Tue, 1 Mar 2022 00:47:59 +0900 Message-Id: <20220228154801.1347487-3-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220228154801.1347487-1-paul.elder@ideasonboard.com> References: <20220228154801.1347487-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_074830_931468_0C6365E6 X-CRM114-Status: GOOD ( 20.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the description for the i.MX8MP media blk-ctrl. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- drivers/soc/imx/imx8m-blk-ctrl.c | 123 ++++++++++++++++++++++++++++++- 1 file changed, 121 insertions(+), 2 deletions(-) diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c index 511e74f0db8a..a0a0d2d7ca4a 100644 --- a/drivers/soc/imx/imx8m-blk-ctrl.c +++ b/drivers/soc/imx/imx8m-blk-ctrl.c @@ -15,10 +15,11 @@ #include #include +#include #define BLK_SFT_RSTN 0x0 #define BLK_CLK_EN 0x4 -#define BLK_MIPI_RESET_DIV 0x8 /* Mini/Nano DISPLAY_BLK_CTRL only */ +#define BLK_MIPI_RESET_DIV 0x8 /* Mini/Nano/Plus DISPLAY_BLK_CTRL only */ struct imx8m_blk_ctrl_domain; @@ -40,7 +41,7 @@ struct imx8m_blk_ctrl_domain_data { u32 clk_mask; /* - * i.MX8M Mini and Nano have a third DISPLAY_BLK_CTRL register + * i.MX8M Mini, Nano and Plus have a third DISPLAY_BLK_CTRL register * which is used to control the reset for the MIPI Phy. * Since it's only present in certain circumstances, * an if-statement should be used before setting and clearing this @@ -589,6 +590,121 @@ static const struct imx8m_blk_ctrl_data imx8mn_disp_blk_ctl_dev_data = { .num_domains = ARRAY_SIZE(imx8mn_disp_blk_ctl_domain_data), }; +static int imx8mp_media_power_notifier(struct notifier_block *nb, + unsigned long action, void *data) +{ + struct imx8m_blk_ctrl *bc = container_of(nb, struct imx8m_blk_ctrl, + power_nb); + + if (action != GENPD_NOTIFY_ON && action != GENPD_NOTIFY_PRE_OFF) + return NOTIFY_OK; + + /* Enable bus clock and deassert bus reset */ + regmap_set_bits(bc->regmap, BLK_CLK_EN, BIT(8)); + regmap_set_bits(bc->regmap, BLK_SFT_RSTN, BIT(8)); + + /* + * On power up we have no software backchannel to the GPC to + * wait for the ADB handshake to happen, so we just delay for a + * bit. On power down the GPC driver waits for the handshake. + */ + if (action == GENPD_NOTIFY_ON) + udelay(5); + + return NOTIFY_OK; +} + +/* + * From i.MX 8M Plus Applications Processor Reference Manual, Rev. 1, + * section 13.2.2, 13.2.3 + * isp-ahb and dwe are not in Figure 13-5. Media BLK_CTRL Clocks + */ +static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[] = { + [IMX8MP_MEDIABLK_PD_MIPI_DSI_1] = { + .name = "mediablk-mipi-dsi-1", + .clk_names = (const char *[]){ "apb", "phy", }, + .num_clks = 2, + .gpc_name = "mipi-dsi1", + .rst_mask = BIT(0) | BIT(1), + .clk_mask = BIT(0) | BIT(1), + .mipi_phy_rst_mask = BIT(17), + }, + [IMX8MP_MEDIABLK_PD_MIPI_CSI2_1] = { + .name = "mediablk-mipi-csi2-1", + .clk_names = (const char *[]){ "apb", "cam1" }, + .num_clks = 2, + .gpc_name = "mipi-csi1", + .rst_mask = BIT(2) | BIT(3), + .clk_mask = BIT(2) | BIT(3), + .mipi_phy_rst_mask = BIT(16), + }, + [IMX8MP_MEDIABLK_PD_LCDIF_1] = { + .name = "mediablk-lcdif-1", + .clk_names = (const char *[]){ "disp1", "apb", "axi", }, + .num_clks = 3, + .gpc_name = "lcdif1", + .rst_mask = BIT(4) | BIT(5) | BIT(23), + .clk_mask = BIT(4) | BIT(5) | BIT(23), + }, + [IMX8MP_MEDIABLK_PD_ISI] = { + .name = "mediablk-isi", + .clk_names = (const char *[]){ "axi", "apb" }, + .num_clks = 2, + .gpc_name = "isi", + .rst_mask = BIT(6) | BIT(7), + .clk_mask = BIT(6) | BIT(7), + }, + [IMX8MP_MEDIABLK_PD_MIPI_CSI2_2] = { + .name = "mediablk-mipi-csi2-2", + .clk_names = (const char *[]){ "apb", "cam2" }, + .num_clks = 2, + .gpc_name = "mipi-csi2", + .rst_mask = BIT(9) | BIT(10), + .clk_mask = BIT(9) | BIT(10), + .mipi_phy_rst_mask = BIT(30), + }, + [IMX8MP_MEDIABLK_PD_LCDIF_2] = { + .name = "mediablk-lcdif-2", + .clk_names = (const char *[]){ "disp1", "apb", "axi", }, + .num_clks = 3, + .gpc_name = "lcdif2", + .rst_mask = BIT(11) | BIT(12) | BIT(24), + .clk_mask = BIT(11) | BIT(12) | BIT(24), + }, + [IMX8MP_MEDIABLK_PD_ISP] = { + .name = "mediablk-isp", + .clk_names = (const char *[]){ "isp", "axi", "apb" }, + .num_clks = 3, + .gpc_name = "isp", + .rst_mask = BIT(16) | BIT(17) | BIT(18), + .clk_mask = BIT(16) | BIT(17) | BIT(18), + }, + [IMX8MP_MEDIABLK_PD_DWE] = { + .name = "mediablk-dwe", + .clk_names = (const char *[]){ "axi", "apb" }, + .num_clks = 2, + .gpc_name = "dwe", + .rst_mask = BIT(19) | BIT(20) | BIT(21), + .clk_mask = BIT(19) | BIT(20) | BIT(21), + }, + [IMX8MP_MEDIABLK_PD_MIPI_DSI_2] = { + .name = "mediablk-mipi-dsi-2", + .clk_names = (const char *[]){ "phy", }, + .num_clks = 1, + .gpc_name = "mipi-dsi2", + .rst_mask = BIT(22), + .clk_mask = BIT(22), + .mipi_phy_rst_mask = BIT(29), + }, +}; + +static const struct imx8m_blk_ctrl_data imx8mp_media_blk_ctl_dev_data = { + .max_reg = 0x138, + .power_notifier_fn = imx8mp_media_power_notifier, + .domains = imx8mp_media_blk_ctl_domain_data, + .num_domains = ARRAY_SIZE(imx8mp_media_blk_ctl_domain_data), +}; + static const struct of_device_id imx8m_blk_ctrl_of_match[] = { { .compatible = "fsl,imx8mm-vpu-blk-ctrl", @@ -599,6 +715,9 @@ static const struct of_device_id imx8m_blk_ctrl_of_match[] = { }, { .compatible = "fsl,imx8mn-disp-blk-ctrl", .data = &imx8mn_disp_blk_ctl_dev_data + }, { + .compatible = "fsl,imx8mp-media-blk-ctrl", + .data = &imx8mp_media_blk_ctl_dev_data }, { /* Sentinel */ } From patchwork Mon Feb 28 15:48:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12763498 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA6ADC433F5 for ; Mon, 28 Feb 2022 15:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w9JhIP88htnH++Ud6CeCaQFk7FP3dRUdJIE2lv78dYU=; b=MUmJePZRzyQ11T yeCNjRAcX4wGz3Upg4iOLF9Lb4R3f6EA28tPHun2wJSHIkW5A9bvH9MGYKiFaZLqMxSoEim0sksp5 cVFZKdw+QpvIxtA5V41SZCq8n2xxQi50Y01WtASOzlLnNSSUB2wXt9d4ZiGuuiJgFtXjeVjGbhd9s RHmP7bqaN5U3oTxOst9zB2TLAoaMHx9X1WTYlS5b/SEpiQXhpJufzVB7p+23+D0p4AXv/O0dMBX68 StT+62Eae8Qk8QTLldcXRr1voyCKxFHFl+097SgohZUonCoKYyXbpAogZMgEyJ/5+PY66NLV+J0Zt QDw+AiLhRTiBSjZ4F9fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiGp-00DDHU-0b; Mon, 28 Feb 2022 15:49:07 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiGJ-00DD98-FM for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 15:48:38 +0000 Received: from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp [175.177.42.148]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5A2D51010; Mon, 28 Feb 2022 16:48:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1646063313; bh=rxnJRv2ilek3fvm+7tWS8lSy+brxusBl8X4Z400ehDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hFYTiRAgi1LPba/ASlOsl6Z9VvkD/mF8UIa8/77eXBr83JknD6JXH5Qjqa0g2Yj2Z HY+FCL/hjWSAN3U8hD1m3/Gd+ZxQX0vRS967/HXM0CHUf5cN6vHdKfo3V2WAqrhYdY 2Ay3e3FDpetz2KM57WK7FedVlwL6Jsmpp7a+KZXU= From: Paul Elder To: Rob Herring , Shawn Guo , Sascha Hauer Cc: Laurent Pinchart , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Joakim Zhang , Lucas Stach , Peng Fan , Marek Vasut , Jacky Bai , Daniel Baluta , Zhen Lei , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/4] arm64: dts: imx8mp: Add MEDIAMIX power domains Date: Tue, 1 Mar 2022 00:48:00 +0900 Message-Id: <20220228154801.1347487-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220228154801.1347487-1-paul.elder@ideasonboard.com> References: <20220228154801.1347487-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_074835_744549_A3FE661F X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurent Pinchart Add the power domains related to the MEDIAMIX to the GPC. Signed-off-by: Laurent Pinchart --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index c89acb53be4a..eecd820a1193 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -488,6 +488,11 @@ pgc { #address-cells = <1>; #size-cells = <0>; + pgc_mipi_phy1: power-domain@0 { + #power-domain-cells = <0>; + reg = ; + }; + pgc_pcie_phy: power-domain@1 { #power-domain-cells = <0>; reg = ; @@ -530,6 +535,21 @@ pgc_gpu3d: power-domain@9 { power-domains = <&pgc_gpumix>; }; + pgc_mediamix: power-domain@10 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>, + <&clk IMX8MP_CLK_MEDIA_APB_ROOT>; + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>, + <&clk IMX8MP_CLK_MEDIA_APB_ROOT>; + assigned-clock-rates = <500000000>, <200000000>; + }; + + pgc_mipi_phy2: power-domain@16 { + #power-domain-cells = <0>; + reg = ; + }; + pgc_hsiomix: power-domains@17 { #power-domain-cells = <0>; reg = ; @@ -539,6 +559,12 @@ pgc_hsiomix: power-domains@17 { assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>; assigned-clock-rates = <500000000>; }; + + pgc_ispdwp: power-domain@18 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MP_CLK_MEDIA_ISP_DIV>; + }; }; }; }; From patchwork Mon Feb 28 15:48:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12763499 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C16EC433EF for ; Mon, 28 Feb 2022 15:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dpe5Wq/voZM1Y4C/BxVHOXOR7OnZRKg4fToWq4kv45w=; b=uhnaOMakYB+c3v /Vv7xMS/1t3vqlg01CeWFyToS1kN/63ZtFmqtzQ7U0LCMWwS1UWlyMmA5PMIqA2WCt2svPVFCS7p9 /Rzke+cKPgmyH2doOzY1cI7l6KUw+Pru9DFl7ExV1wiPnZbdFwP+FfwawoTOkEx73spJ62hGj3zdJ 85x9+3SIpwxePZ4gSElK1PbOljOPIdeCZjxIMYbYGtD/AF5xzlJAVzjVYNnamzkf6GwJM1PrRaiZC sJeXuErtuLyYMTwRaeosHApGTyWiC4b0tIfcrrZUB70/5tlP/5SIfmBHD+OHVWv7Fs2unRxtRmXKt aOQXUE1/1drXbbIQcu7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiH2-00DDN1-SN; Mon, 28 Feb 2022 15:49:21 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOiGO-00DDAy-Rn for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 15:48:42 +0000 Received: from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp [175.177.42.148]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4F3C6478; Mon, 28 Feb 2022 16:48:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1646063318; bh=J04Jb8HVriI9lDHRNv832a/kx03L6NrzItZlEt50Jw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RGOegc9J/i3CL16hS7pfUIZnj8XrHeqC9E7Qm8V2fogatpIww1ynUr4WTRou2MMol Mb3wgoFmXOc5yo3Ku2TqL9hsN/XrNKE0Cx9fvHH77wCF5RoEYKGKF8htjAsfvCURlP zvhjGRqJYJtWGzioDfXN0LU/Lj7x+MH+JADON200= From: Paul Elder To: Rob Herring , Shawn Guo , Sascha Hauer Cc: Paul Elder , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Joakim Zhang , Laurent Pinchart , Peng Fan , Lucas Stach , Marek Vasut , Zhen Lei , Daniel Baluta , Jacky Bai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/4] arm64: dts: imx8mp: Add MEDIA_BLK_CTRL Date: Tue, 1 Mar 2022 00:48:01 +0900 Message-Id: <20220228154801.1347487-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220228154801.1347487-1-paul.elder@ideasonboard.com> References: <20220228154801.1347487-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_074841_125566_53EFF3BF X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a DT node for the MEDIA_BLK_CTRL, which provides power domains for the camera and display devices. Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index eecd820a1193..a1fdb96024d0 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -984,6 +984,46 @@ eqos: ethernet@30bf0000 { }; }; + aips4: bus@32c00000 { + compatible = "fsl,aips-bus", "simple-bus"; + reg = <0x32c00000 0x400000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + media_blk_ctrl: blk-ctrl@32ec0000 { + compatible = "fsl,imx8mp-media-blk-ctrl", + "syscon"; + reg = <0x32ec0000 0x10000>; + power-domains = <&pgc_mediamix>, + <&pgc_mipi_phy1>, + <&pgc_mipi_phy1>, + <&pgc_mediamix>, + <&pgc_mediamix>, + <&pgc_mipi_phy2>, + <&pgc_mediamix>, + <&pgc_ispdwp>, + <&pgc_ispdwp>, + <&pgc_mipi_phy2>; + power-domain-names = "bus", "mipi-dsi1", "mipi-csi1", + "lcdif1", "isi", "mipi-csi2", + "lcdif2", "isp", "dwe", + "mipi-dsi2"; + clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>, + <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>, + <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_CAM2_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_DISP1_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_DISP2_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_ISP_ROOT>, + <&clk IMX8MP_CLK_MEDIA_MIPI_PHY1_REF_ROOT>; + clock-names = "apb", "axi", "cam1", "cam2", + "disp1", "disp2", "isp", "phy"; + + #power-domain-cells = <1>; + }; + }; + gpu3d: gpu@38000000 { compatible = "vivante,gc"; reg = <0x38000000 0x8000>;