From patchwork Wed Jan 1 16:31:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 1003 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CB7893F1C9 for ; Wed, 1 Jan 2020 17:31:40 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id z10sf16325226wrt.21 for ; Wed, 01 Jan 2020 08:31:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577896300; cv=pass; d=google.com; s=arc-20160816; b=s6kGPKvZiIzEZ9xfsM8NY35udI9yB+JE9Vo3EEv4WjhLM9mgbvm464maavmGEIzry2 3nzIIBFNHeSIbpR/77Rsgg+A7st6ipSbCxPoGG5PoQz+fO+MpbE6IgcxQkAHJdqv0XCZ nkNRDLnz1z/Zt0mmAH19xh2zaiy40wYxeQ953jjWEhL5ljnKjMIqCIoYxYM8l6JcPSF1 QUbMuBXsNrLJQjcI/gVfYqNcqJyhq2Fp0FHqT1PTae14L9fvED9zWexgZjA4DsP11Hya ZvoxSgje5ohhUsZ/s5Ry3ogIzd0ynGAJFYFB23GzaJdDSlWrrmXKnnlaVU/0/fhG8EMZ i4GQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=LiDYQeTXEA0yO1RVK5Kx+jrjyuSYj4KwjmAMrV7XBTU=; b=puqJeQEECoaAVfoAVqsi/d862Za5zmESF0jO4QPlLBTiBdJdTFuu5vIwnnHCav29XS SIbCjJxqsGo5l05Up9aCs328mtsSBrKq/ZbX9CdpkdLq/7/6xei06qibOKI7DwvLGzHq bGNPMnYZ8dZ1zESdCDncDpOBAI8ocxCIeOaGd/xNjv/Tdp8EjayYSjN/gAhW+vV4sS1T 1D65IsAqVKeBuQyQEkts81kT9cUcQfTOrqFlfjZ6p31zqF0UQ0H2Bmz/2qUhB0l7DVbs gqL9cRhcwlEMWchIj09FiZLcZKrywTiJWMnlh6DwP+Wv68OvIZ3b68GQ5+cpDcn/NXay n5nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XrhJoKJb; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=LiDYQeTXEA0yO1RVK5Kx+jrjyuSYj4KwjmAMrV7XBTU=; b=cyvjCIXbXRpxnBTKX3Jfe4H/GarH8EPQXeKFFPfWL+On0O9XQ1dYkg2chzT6d1rRSI 1mn4rcWGhU0CyT2qHRvP11TNx4X3P1WU9hOV8dOf8z3huKMQ6HwyBBir/OtVBLu4Qj5n wxGj+Tj7b63B0Vuc068weSAL+5SU9pgYewJtY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=LiDYQeTXEA0yO1RVK5Kx+jrjyuSYj4KwjmAMrV7XBTU=; b=WrDPXhBx24FFf2TyXXSFk7qrOC2xnDblp4r2g71Y8uh1CXFlSy9NoTDxoNSCrAp268 /g5/RaZ8e2e/akZ5rTw8Qc5kJoQBRHtgWvzLzkHq9q8JV29Ek8hRDKmIFdQTZsxryOau 5oaacuE1kctHMjIf2bVUS5lUjm7jb6mAK5/SdaKCvjJdMBkw1PoPvmsXOmPaLqZaSpsx +96O3ApOVY0K+U0/HXsoU1+podCiWDWglKnQTCzkA77kniPV7HmIKXtDyxo+ma4eTz8V bqWJDABXjyImTthFGeeN27gy7/IjlkHg8MhVVh8+MYir7Mj4CBu+YZBkQGx8aZIG+ctY r1DA== X-Gm-Message-State: APjAAAUWGUcWp9uejQyQNVVWwTEetKwgfKPY3hjPtp82o98dpa6OAfHr ce3zYhkwea7xnHlsIT16klfR5zNA X-Google-Smtp-Source: APXvYqxIEYi9B9OHYKKMkDZ4CPYVczNB0g50c6AJehWo2uQtZ8Y/cMksnO+GmX0xMiUTalqgIE79Bw== X-Received: by 2002:a1c:3dc3:: with SMTP id k186mr9724067wma.95.1577896300558; Wed, 01 Jan 2020 08:31:40 -0800 (PST) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:eb4c:: with SMTP id u12ls9669152wrn.6.gmail; Wed, 01 Jan 2020 08:31:40 -0800 (PST) X-Received: by 2002:adf:f6c1:: with SMTP id y1mr83840631wrp.17.1577896299883; Wed, 01 Jan 2020 08:31:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577896299; cv=none; d=google.com; s=arc-20160816; b=ToLuwz65NqEk6JU5/ayKhhSuVtYbdEOU6sjAmfDHqW7v13DIlHa6XCEG4qF7vSYK+w UlyY//18YcgeqZg1HAAdXuJkr0driO0YT5LK9x6csUoYtq48KhEGcjIP+RgvGZ2uI1pF 5Xo0Cnb1cIk3GFKAXVyWCAGOBhllzU+GWQRcYXTVkp/yMt6MYkc84KIOhjAtLT8blXlI sodq8Ptnq3bwcXbAiHI8KBJw+RA3D2SNL4dplnlpzp8gvp4IT0lcVlovMlyWZhfNtlgb C+DLxHOWxhwFASws3Ib6eTHyk7iApUWazM0n7dXpg34SQ/K60oJeiX9wdTtn9rXfV6P7 Lzug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P5gcp8jIwlMlhfhGOxLkJPAb88nDGX2ujZMaHgP9/W0=; b=uaAM03J/UOurFuZj3AtyKWdEwaLBD0VlAiUGjwJZuoi4YCeiZ288teyWuI++NpMS7w 9nnqwSfv92nte0wBmjoikfXbkT1XxihN9OH3nv1Vqu1+1uC4cKbolYHUffjQgBpYwLVm 6R1E/ODfBjyIhtc7OPFo3Z9KHyrE0RmLYF+45aX6AJpI19b7ubkT2WYzz9yAsdDKIOqq i8LtDp+VH0RdVDqXXSQhkWSAH8qE0Gs4QYjPZ3WYbN5EqYAqCGm3it+LaYRqk8lkR12w kacABBv0lMgRfoOHRDUnE7EX8rbITHzCBSguUuWu948h2ktA2hzx2oRc/t15Oycuprl5 7aNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XrhJoKJb; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a20sor2488192wmj.24.2020.01.01.08.31.39 for (Google Transport Security); Wed, 01 Jan 2020 08:31:39 -0800 (PST) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a1c:740b:: with SMTP id p11mr10763156wmc.78.1577896299551; Wed, 01 Jan 2020 08:31:39 -0800 (PST) Received: from panicking.lan (93-46-124-24.ip107.fastwebnet.it. [93.46.124.24]) by smtp.gmail.com with ESMTPSA id u13sm6108580wmd.36.2020.01.01.08.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 08:31:39 -0800 (PST) From: Michael Trimarchi To: Shawn Guo Cc: Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Fabio Estevam , Rob Herring , Mark Rutland , linux-amarula@amarulasolutions.com Subject: [PATCH 1/3] soc: imx: gpcv2: add support for i.MX8MM SoC Date: Wed, 1 Jan 2020 17:31:34 +0100 Message-Id: <20200101163136.1586-2-michael@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200101163136.1586-1-michael@amarulasolutions.com> References: <20200101163136.1586-1-michael@amarulasolutions.com> X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XrhJoKJb; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The GPCv2 on the Freescale i.MX8MM SoC works in the same way as the GPCv2 on the i.MX8MQ, with a slight different mapping. Signed-off-by: Michael Trimarchi Reported-by: kbuild test robot --- .../bindings/power/fsl,imx-gpcv2.txt | 4 +- drivers/soc/imx/gpcv2.c | 110 ++++++++++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt index 61649202f6f5..fde651cd06d0 100644 --- a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt @@ -9,6 +9,7 @@ Required properties: - compatible: Should be one of: - "fsl,imx7d-gpc" - "fsl,imx8mq-gpc" + - "fsl,imx8mm-gpc" - reg: should be register base and length as documented in the datasheet @@ -25,7 +26,8 @@ Required properties: - reg: Power domain index. Valid values are defined in include/dt-bindings/power/imx7-power.h for fsl,imx7d-gpc and - include/dt-bindings/power/imx8m-power.h for fsl,imx8mq-gpc + include/dt-bindings/power/imx8m-power.h for fsl,imx8mq-gpc and + include/dt-bindings/power/imx8mm-power.h for fsl,imx8mm-gpc - #power-domain-cells: Should be 0 diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index b0dffb06c05d..d3c012a61c11 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -16,6 +16,7 @@ #include #include #include +#include #define GPC_LPCR_A_CORE_BSC 0x000 @@ -41,6 +42,20 @@ #define IMX8M_PCIE1_A53_DOMAIN BIT(3) #define IMX8M_MIPI_A53_DOMAIN BIT(2) +#define IMX8MM_VPU_H1_A53_DOMAIN BIT(15) +#define IMX8MM_VPU_G2_A53_DOMAIN BIT(14) +#define IMX8MM_VPU_G1_A53_DOMAIN BIT(13) +#define IMX8MM_DISPMIX_A53_DOMAIN BIT(12) +#define IMX8MM_GPU_3D_A53_DOMAIN BIT(11) +#define IMX8MM_VPUMIX_A53_DOMAIN BIT(10) +#define IMX8MM_GPUMIX_A53_DOMAIN BIT(9) +#define IMX8MM_GPU_2D_A53_DOMAIN BIT(8) +#define IMX8MM_DDR1_A53_DOMAIN BIT(7) +#define IMX8MM_OTG2_A53_DOMAIN BIT(5) +#define IMX8MM_OTG1_A53_DOMAIN BIT(4) +#define IMX8MM_PCIE1_A53_DOMAIN BIT(3) +#define IMX8MM_MIPI_A53_DOMAIN BIT(2) + #define GPC_PU_PGC_SW_PUP_REQ 0x0f8 #define GPC_PU_PGC_SW_PDN_REQ 0x104 @@ -64,6 +79,20 @@ #define IMX8M_PCIE1_SW_Pxx_REQ BIT(1) #define IMX8M_MIPI_SW_Pxx_REQ BIT(0) +#define IMX8MM_VPU_H1_SW_Pxx_REQ BIT(13) +#define IMX8MN_VPU_G2_SW_Pxx_REQ BIT(12) +#define IMX8MN_VPU_G1_SW_Pxx_REQ BIT(11) +#define IMX8MM_DISPMIX_SW_Pxx_REQ BIT(10) +#define IMX8MM_GPU_3D_SW_Pxx_REQ BIT(9) +#define IMX8MM_VPUMIX_SW_Pxx_REQ BIT(8) +#define IMX8MM_GPUMIX_SW_Pxx_REQ BIT(7) +#define IMX8MM_GPU_2D_SW_Pxx_REQ BIT(6) +#define IMX8MM_DDR1_SW_Pxx_REQ BIT(5) +#define IMX8MM_OTG2_SW_Pxx_REQ BIT(3) +#define IMX8MM_OTG1_SW_Pxx_REQ BIT(2) +#define IMX8MM_PCIE1_SW_Pxx_REQ BIT(1) +#define IMX8MM_MIPI_SW_Pxx_REQ BIT(0) + #define GPC_M4_PU_PDN_FLG 0x1bc #define GPC_PU_PWRHSK 0x1fc @@ -94,6 +123,20 @@ #define IMX8M_PGC_MIPI_CSI2 28 #define IMX8M_PGC_PCIE2 29 +#define IMX8MM_PGC_MIPI 16 +#define IMX8MM_PGC_PCIE1 17 +#define IMX8MM_PGC_OTG1 18 +#define IMX8MM_PGC_OTG2 19 +#define IMX8MM_PGC_DDR1 21 +#define IMX8MM_PGC_GPU_2D 22 +#define IMX8MM_PGC_GPUMIX 17 +#define IMX8MM_PGC_VPUMIX 18 +#define IMX8MM_PGC_GPU_3D 19 +#define IMX8MM_PGC_DSPMIX 20 +#define IMX8MM_PGC_VPU_G1 21 +#define IMX8MM_PGC_VPU_G2 22 +#define IMX8MM_PGC_VPU_H1 22 + #define GPC_PGC_CTRL(n) (0x800 + (n) * 0x40) #define GPC_PGC_SR(n) (GPC_PGC_CTRL(n) + 0xc) @@ -442,6 +485,72 @@ static const struct imx_pgc_domain_data imx8m_pgc_domain_data = { .reg_access_table = &imx8m_access_table, }; +static const struct imx_pgc_domain imx8mm_pgc_domains[] = { + [IMX8MM_POWER_DOMAIN_USB_OTG1] = { + .genpd = { + .name = "usb-otg1", + }, + .bits = { + .pxx = IMX8MM_OTG1_SW_Pxx_REQ, + .map = IMX8MM_OTG1_A53_DOMAIN, + }, + .pgc = IMX8MM_PGC_OTG1, + }, + + [IMX8MM_POWER_DOMAIN_USB_OTG2] = { + .genpd = { + .name = "usb-otg2", + }, + .bits = { + .pxx = IMX8MM_OTG2_SW_Pxx_REQ, + .map = IMX8MM_OTG2_A53_DOMAIN, + }, + .pgc = IMX8MM_PGC_OTG2, + }, +}; + +static const struct regmap_range imx8mm_yes_ranges[] = { + regmap_reg_range(GPC_LPCR_A_CORE_BSC, + GPC_PU_PWRHSK), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_MIPI), + GPC_PGC_SR(IMX8MM_PGC_MIPI)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_PCIE1), + GPC_PGC_SR(IMX8MM_PGC_PCIE1)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_OTG1), + GPC_PGC_SR(IMX8MM_PGC_OTG1)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_OTG2), + GPC_PGC_SR(IMX8MM_PGC_OTG2)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_DDR1), + GPC_PGC_SR(IMX8MM_PGC_DDR1)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_GPU_2D), + GPC_PGC_SR(IMX8MM_PGC_GPU_2D)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_GPUMIX), + GPC_PGC_SR(IMX8MM_PGC_GPUMIX)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_VPUMIX), + GPC_PGC_SR(IMX8MM_PGC_VPUMIX)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_GPU_3D), + GPC_PGC_SR(IMX8MM_PGC_GPU_3D)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_DSPMIX), + GPC_PGC_SR(IMX8MM_PGC_DSPMIX)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_VPU_G1), + GPC_PGC_SR(IMX8MM_PGC_VPU_G1)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_VPU_G2), + GPC_PGC_SR(IMX8MM_PGC_VPU_G2)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MM_PGC_VPU_H1), + GPC_PGC_SR(IMX8MM_PGC_VPU_H1)), +}; + +static const struct regmap_access_table imx8mm_access_table = { + .yes_ranges = imx8mm_yes_ranges, + .n_yes_ranges = ARRAY_SIZE(imx8mm_yes_ranges), +}; + +static const struct imx_pgc_domain_data imx8mm_pgc_domain_data = { + .domains = imx8mm_pgc_domains, + .domains_num = ARRAY_SIZE(imx8mm_pgc_domains), + .reg_access_table = &imx8mm_access_table, +}; + static int imx_pgc_get_clocks(struct imx_pgc_domain *domain) { int i, ret; @@ -641,6 +750,7 @@ static int imx_gpcv2_probe(struct platform_device *pdev) static const struct of_device_id imx_gpcv2_dt_ids[] = { { .compatible = "fsl,imx7d-gpc", .data = &imx7_pgc_domain_data, }, { .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, }, + { .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, }, { } }; From patchwork Wed Jan 1 16:31:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 1004 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D43373F03F for ; Wed, 1 Jan 2020 17:31:41 +0100 (CET) Received: by mail-wm1-f70.google.com with SMTP id 18sf429880wmp.0 for ; Wed, 01 Jan 2020 08:31:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577896301; cv=pass; d=google.com; s=arc-20160816; b=QAbYZG0pqHvpHMmT9P6feAAMhXjxQxtJ9OSM973fsf6ySZ4mn5s2W12zHCj5hqBrK6 tJFtODlncGNeGeJWqm1SQJLGOzJDhzMLOEfzAbByTfIUxJXduPIesRuZV4SLiSB21HNZ lrCf67tDbvk9Vfuu31VD7B6bYLpVdYx3Fn5Hv4b8Tche69HtkAYwi6MbPJdmuDj1eg0p krnkakzOusvK9iwK4v+1CaJ3qWFovMeTbV17wUXJPZblClrXti18Bw0+T9w2qdrirWuf anqG5ySzpIVZ6QL8UWZaHjPm0y0Z2TmrbqnEORTRMWNKVt8oaEmPhHglScDPzU4rbPpm Urkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=0ihrGbEC3GR3tkdcGzUYOHCxArjG7Rp14l/LxvvlIU8=; b=Xt26S4wQddJ3QwjoIk0PfxNxSedJAlyNVg6r6RnxTHj0UFa9hqFoZdK4fqpV9fXZLq Jmdds1itZywJQ+vykOuwuDRQ3Bb9tDV2iRU6jjHXn+3L+RTX89yjMziOV7rGFWy1JfXw zjhxdKhqElKLP4inxroq4jJ1Qs0Izm60zTyebXyv/rb5oPyv1gl7MHrFkNmzgfTwMiOA BHTI8jYa1yOZS4xijX++lvr+lrLG57+hr61evsbt8J3S4tTW5oNTcFZFeJogu2rbrBiQ yQED56RFb19Rlb8npfWkPRBDM9E9y2vNa4MkXH/K7byFeih4shJ1stRj/iAU+f0rWiUX QRkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HTgpjlTE; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0ihrGbEC3GR3tkdcGzUYOHCxArjG7Rp14l/LxvvlIU8=; b=oiCq5GS66m2Nx4zJyAX5hdkqfDFV2FrOmrWxnZ1NpH7SraZIUfoCdJXbeI+msuBkLI bUESbVhJ6Ju/wqgz1IKpBnmiXcDtEgUWDvs7E+vQn6f2X4aG0YC3C/wNXfjfLg7qTPeP x7GygJEsUqKoCO42+UkST/bherzjFmN9J5up0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=0ihrGbEC3GR3tkdcGzUYOHCxArjG7Rp14l/LxvvlIU8=; b=LRJo3FSN6E6tie6EUTNjjXDb1jZxLEp36s2oPaHhd9uJcXd0AITqSZNOKOV4KIofWu r287VQ6ohayhBt0WJZfEhnGfwdhvATYJNvyPtS+0tPtHfWUFx3nQbYS183O1EnXsDPGF uo0xaZlOoegPYVP4YknpYtzCV+hfEosaIuXXN2cxXoQBk8bU0ofzmhRRTUf/wotG+qCW THPZo2a9obOphn8NEiS8TO8A5UyOwJId5xiNg/5QuhH1Z/oQI8mwGzp7ikBkm4mWn15z xuQNiQnqtK+avVTZIsJmSXLoTTvHZBfKa1p7AWojq5j8OQrnWJmT81FFiSNCUGHDP/ld x6yQ== X-Gm-Message-State: APjAAAU4caW1oc/H8z01lgPPj+xkN/ODd7nhAxM5pnqmNmYHnFMDVhjr HRwbF03oq8zrKvI/wZYuPBw5P5Ep X-Google-Smtp-Source: APXvYqy9CbwEAyne05RkGmgB4A1QGACI0Rh55WHee2nLU7PGQbb+DEcN0FkB9Mlt8pOMqc2ntFToCg== X-Received: by 2002:a05:600c:145:: with SMTP id w5mr10735445wmm.157.1577896301616; Wed, 01 Jan 2020 08:31:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:65d0:: with SMTP id e16ls9681069wrw.1.gmail; Wed, 01 Jan 2020 08:31:41 -0800 (PST) X-Received: by 2002:adf:ee45:: with SMTP id w5mr75505145wro.352.1577896300866; Wed, 01 Jan 2020 08:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577896300; cv=none; d=google.com; s=arc-20160816; b=zYuQP4aJtFOKUqToewALMFOitGiCH0GVPVrv4U3RdcC3NsIE1Xlx4rGQ+JwMcBJnuJ 5/6iTw00byzfLcY7/k7Vth35wle2CQ9bO3rixZTuWc+4amdv9l2mKU7u2T+zqI7i7WS3 ZZ79+VTrjKHJGI9I9pzFuxu61Hme1lRW6+MgMvHCZ9VZIKQdSgEu66QybJemcpHnAToH NEoOnnCmcrL9q0Coy8jUtl6Egpan5UEsz+ioopf+o7Oiq31/aAVgLl/f0bEp9b6inbAw R+H7Ckpbe6+OKh9jl7xZjzwlhF8iCjAXhG3ZLwBFsxQqHf0JCJ2I/ygvEyVhXhanOw53 atfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gYZKhe3uyN0VpRDDzaRxilm8f5Lw+XJVpBkexHfk67g=; b=vVLm9ysIfWH/S3EThOtFt2GgvRlnNZBRiPi2KKdlKMbUbho2EAUlaXZaNL04TxZ+3m 9zno/iOry+eO5pEdKAVCVrd3Bm45GVF75jEvEBg0f1Vw6JE5NWYtBhRi7YZLdS4RFw7P xlqWyLsbiFbZJF/tmgsCPd9DzlVm3xdKdgfaIaTmjp3YluWTGV9PQyMRcUOSoA99QrG+ vyMYWFCMUSeoJssRE4mTdKD304lGbdUCR7T4qYaC+3dpL042f59YpgwVdVsxC/CrUAI2 lsaqoSSz/uDBrnm9FdWuQa/BONED3ZJS9HbJx1ealNczMJMp8TOP/rUnpjisaZypNQnC YxlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HTgpjlTE; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id u128sor2504951wme.9.2020.01.01.08.31.40 for (Google Transport Security); Wed, 01 Jan 2020 08:31:40 -0800 (PST) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a7b:c5d8:: with SMTP id n24mr9904376wmk.124.1577896300553; Wed, 01 Jan 2020 08:31:40 -0800 (PST) Received: from panicking.lan (93-46-124-24.ip107.fastwebnet.it. [93.46.124.24]) by smtp.gmail.com with ESMTPSA id u13sm6108580wmd.36.2020.01.01.08.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 08:31:40 -0800 (PST) From: Michael Trimarchi To: Shawn Guo Cc: Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Fabio Estevam , Rob Herring , Mark Rutland , linux-amarula@amarulasolutions.com Subject: [PATCH 2/3] irqchip/irq-imx-gpcv2: Add IRQCHIP_DECLARE for i.MX8MM compatible Date: Wed, 1 Jan 2020 17:31:35 +0100 Message-Id: <20200101163136.1586-3-michael@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200101163136.1586-1-michael@amarulasolutions.com> References: <20200101163136.1586-1-michael@amarulasolutions.com> X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HTgpjlTE; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The GPC node on i.MX8MM can not claim to be compatible with the i.MX8MQ GPC, as the power gating part has some significant differences. Thus we can not rely on the irqchip being probed with the old compatible. Signed-off-by: Michael Trimarchi --- drivers/irqchip/irq-imx-gpcv2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index 4f74c15c4755..80855f15539c 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -196,6 +196,7 @@ static const struct irq_domain_ops gpcv2_irqchip_data_domain_ops = { static const struct of_device_id gpcv2_of_match[] = { { .compatible = "fsl,imx7d-gpc", .data = (const void *) 2 }, { .compatible = "fsl,imx8mq-gpc", .data = (const void *) 4 }, + { .compatible = "fsl,imx8mm-gpc", .data = (const void *) 4 }, { /* END */ } }; @@ -290,3 +291,4 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, IRQCHIP_DECLARE(imx_gpcv2_imx7d, "fsl,imx7d-gpc", imx_gpcv2_irqchip_init); IRQCHIP_DECLARE(imx_gpcv2_imx8mq, "fsl,imx8mq-gpc", imx_gpcv2_irqchip_init); +IRQCHIP_DECLARE(imx_gpcv2_imx8mm, "fsl,imx8mm-gpc", imx_gpcv2_irqchip_init); From patchwork Wed Jan 1 16:31:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 1005 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9DC4A3F1C9 for ; Wed, 1 Jan 2020 17:31:42 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id d8sf14054540wrq.12 for ; Wed, 01 Jan 2020 08:31:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577896302; cv=pass; d=google.com; s=arc-20160816; b=HC16YdOOFngaBEphJ4fr8169JW2fK/s8HMqO9qzQM/qZNOJtFbzanDbSy4KqeJ8WxB 1RPeAkSx8Pwo1612CEHdJt9VgYWAfMxOqL+lU77VarSykZZf3RvSr9WqbeoUcutsq8VI DVz26DsbST5m+9h/GKPvrFWYT6Ib22Xb0DXlArMDZrXPz9wNBslWUX1nKDbReY58az7B yCwX4X1Ut+Z7WbrWAHohGAW1bf2kEPW5c3XC4iZAZPLTqlbvC6VydVo9xo0SScP5YH9w TApXahm8IJtuAs7cdbvdQA5eYQh+vUaYfYDKfcltBr4V/sfvRm3RR6ppXKBXZOVuI4Mf pLZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=y5bDofZwfHEmYxK6heiAQ8Y8tzmCHcqNJ4f2vTkl1IU=; b=KOgowobX5PBvdupxOJDOq5/83xEDVrv8IY6kjNbViAV1GMRlofttwKkXiGhR/zEQr7 /vEr4tITwiQ/0YwM10uYRAbPmPETUfHUtxJcr/LchSMob2l5jK+b+LOZgJA8eRbh+oqe Na4/n8fa2uYG5gajDazDbxdeWfKgnfPeb1mY1snY8mmJVS3tlJ2iWBT1pDfJwliiG1aU KEtB3OfE8rV/EK27an6A4UqDVM8kNMxZiCrmb/yPYdExD8DHjgZMn7+zweOJX82UDGw3 zFsmN3k0vauPKN4b04GknqQE/bVdvrqQTyOJ1GuUJJAwO2CNzA+1ydWdh+KQQH9p3CWG j+aw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hp+dQqpa; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=y5bDofZwfHEmYxK6heiAQ8Y8tzmCHcqNJ4f2vTkl1IU=; b=fK6FzrUJC2QroKOH+7DmRQ0iZ13cqbgi2h2DiwVgy0jqUoJ1f8dSlHiaNFqopUbITN h+sCyrA+gO9JQZ0BdMl86jo6F00iJS4HNpWVnZERiT2+1Jrnq0HX0E0zlLpUVlcYet2K Vsdx9lMvTG7q5A5wWj74QJW2LGt9pIruP+2Vo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=y5bDofZwfHEmYxK6heiAQ8Y8tzmCHcqNJ4f2vTkl1IU=; b=uAuOlta7B2XqUkMQdYZgoQW+tKIZ0O/Ea9Ah7XY+tNWhLsJ+SGfmS+ytatFIKYsEgy LpLXknwGwwjkCw+CWqkoS6s2+4336W65pAnIRhTHFqFYtJRpdPb2pMrNXkPbw9XaqZsR zooIwXxQj5jODNe13rEZBtUK6xnsIGii0Ninb+DarSqtnex8yWjG9SxTHsgKgBMnACA1 9r4LywDXnJITRkZo4EJ4Yhwrvo5aBrsdsqwbmQarJ4VLWu7ywjIJMxVIY60IT1yCKavA MXKZmOxbdcBReI68KqMUxu0To50j4l/TzKzKesTLrGY0SOOky16qDrCflzmk8ndXB0DW YTFg== X-Gm-Message-State: APjAAAXQvRMcaycOzQQe9wvDfWtLxT/kkM1O8dkestFci5ObA0E8DlnJ dWZS863ZSGYe7+gaaIlgspaoG1N1 X-Google-Smtp-Source: APXvYqwKQDx2VGTfKz1FJTgJaMdJxGT8647C1iSSooBXw9jaadOSmiWwh4mqUIUKNAdUJTMoLUEj5Q== X-Received: by 2002:adf:fc0c:: with SMTP id i12mr82378209wrr.74.1577896302420; Wed, 01 Jan 2020 08:31:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a7b:c452:: with SMTP id l18ls1367507wmi.1.canary-gmail; Wed, 01 Jan 2020 08:31:42 -0800 (PST) X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr10419627wma.6.1577896301853; Wed, 01 Jan 2020 08:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577896301; cv=none; d=google.com; s=arc-20160816; b=BTxuhkgJhFTwKCHY1EYe2faFJfUxIp49Qtvbe6/mf+FP0IXym9oAJ1cmEpTJ3Jl2cr 0NUzHqNw+yuVy5GmTTO9v0AMwaajDQlsD9T3LmT7vx/ABTX5NYktkEOeWeYxpiWhJScm K10sUs0C+CvHfm7d5gs76P57z3LLIOm0T6kJ8akExSUTX/1wercjj4yABS41bCrpxrzy /XQaLRN339eFXu2tz4Grjdpxg2D/qgSzdkX+xk8/esNMNOKS4HMDLwms9fKPHRINPUjb V+nwYN3lud3/ZD5j85yzgLyfO1rs0SWNqPdbKl4QYhPb5CtkWY6UgMMu5egoWhrj/w+f J35w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0FtJRvYoh9q2xNKRzVf3Zc+0eiYysgU3x6WIKkWsIjw=; b=ZtVWXpAT0I3Vu6BtbIyaC4zfo4RCBXiREst+phzCcnMkdEzYcyxOTdA0A/ggcZzXfQ tUl4Yi6m6SNQavYsukJ+oS0r6Ed6Ey4tIkC1cuiOJ7zMpDH7Kh4Bas3acB2jKnNfm0tk eRiizE+dSRFgg9t5XyUs+TwFlE+JdPCDV5hC4NuAvCBa1UfNMA+8EG64wcZc433MBTKc TMA3E5A9mvmD7uI1DWPHBSxcrqvuVM29jYk8DZ7VQQr8THiWLrDQX7+l3TojvqAgNb8e 2TXCmNf6BGL31PaTOH4gtcY/0ceBiHD/2dcTohx1EbiHcLqikoLt/sPKQ4iTxDjoFjaY CYlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hp+dQqpa; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 21sor2472649wmg.18.2020.01.01.08.31.41 for (Google Transport Security); Wed, 01 Jan 2020 08:31:41 -0800 (PST) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a7b:cfc9:: with SMTP id f9mr10515511wmm.1.1577896301541; Wed, 01 Jan 2020 08:31:41 -0800 (PST) Received: from panicking.lan (93-46-124-24.ip107.fastwebnet.it. [93.46.124.24]) by smtp.gmail.com with ESMTPSA id u13sm6108580wmd.36.2020.01.01.08.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 08:31:41 -0800 (PST) From: Michael Trimarchi To: Shawn Guo Cc: Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Fabio Estevam , Rob Herring , Mark Rutland , linux-amarula@amarulasolutions.com Subject: [PATCH 3/3] arm64: dts: imx8mm: properly describe IRQ hierarchy Date: Wed, 1 Jan 2020 17:31:36 +0100 Message-Id: <20200101163136.1586-4-michael@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200101163136.1586-1-michael@amarulasolutions.com> References: <20200101163136.1586-1-michael@amarulasolutions.com> X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hp+dQqpa; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The GPCv2 sits between most of the peripherals and the GIC and functions as a wakeup controller for the CPU cores. Add already two power domains. Those domains was tested on imx8mm board Signed-off-by: Michael Trimarchi Reported-by: kbuild test robot --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 31 ++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 6edbdfe2d0d7..7360dc0685eb 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -12,7 +13,7 @@ #include "imx8mm-pinfunc.h" / { - interrupt-parent = <&gic>; + interrupt-parent = <&gpc>; #address-cells = <2>; #size-cells = <2>; @@ -197,6 +198,7 @@ interrupts = ; interrupt-affinity = <&A53_0>, <&A53_1>, <&A53_2>, <&A53_3>; + interrupt-parent = <&gic>; }; timer { @@ -206,6 +208,7 @@ , /* Virtual */ ; /* Hypervisor */ clock-frequency = <8000000>; + interrupt-parent = <&gic>; arm,no-tick-in-suspend; }; @@ -498,6 +501,29 @@ interrupts = ; #reset-cells = <1>; }; + + gpc: gpc@303a0000 { + compatible = "fsl,imx8mm-gpc"; + reg = <0x303a0000 0x10000>; + interrupt-parent = <&gic>; + interrupt-controller; + #interrupt-cells = <3>; + + pgc { + #address-cells = <1>; + #size-cells = <0>; + + pgc_otg1: power-domain@2 { + #power-domain-cells = <0>; + reg = ; + }; + + pgc_otg2: power-domain@3 { + #power-domain-cells = <0>; + reg = ; + }; + }; + }; }; aips2: bus@30400000 { @@ -790,6 +816,7 @@ assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; fsl,usbphy = <&usbphynop1>; fsl,usbmisc = <&usbmisc1 0>; + power-domains = <&pgc_otg1>; status = "disabled"; }; @@ -809,6 +836,7 @@ assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_500M>; fsl,usbphy = <&usbphynop2>; fsl,usbmisc = <&usbmisc2 0>; + power-domains = <&pgc_otg2>; status = "disabled"; }; @@ -856,6 +884,7 @@ #interrupt-cells = <3>; interrupt-controller; interrupts = ; + interrupt-parent = <&gic>; }; ddr-pmu@3d800000 {