From patchwork Tue Oct 8 12:55:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 175487 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5662747ill; Tue, 8 Oct 2019 05:56:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxESKhtCHvauWpJtWznAuXX3/d9I671qJ8TrIgbIRvKzP4n9O1gQ8M/l8XyWpqJ/SyhjsR2 X-Received: by 2002:a05:6402:1699:: with SMTP id a25mr33862183edv.91.1570539370737; Tue, 08 Oct 2019 05:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570539370; cv=none; d=google.com; s=arc-20160816; b=SjE1cOBOmmhxvEukTT9nWLuaC58QmcJTFkpghxo7yP8QW2rSIkYwXMW0/jsGZSZrdD b5AKWOukWLH1IbB6r/kR7DxhBBIHIggM2SlGBDQLN9LxC7w/ZEc4gVpXGMVDa6cT45Nf jtBfehjWVQqr0CmRcA+iml0e2QOOlTGSOLt+k2xKpPh6bFFekN+2CPqHFdydM7kFYe1e sk2liEZlhVpcb/zyqy+nxkT2steT3PZkzyYJ2KfSjRhT3orVZQGzfYQXXDbWwKRsOBh4 XrFSLF6F1v9QTKe9ub8RRdB0prsEiurUxTbSMxbwp/hfsxaPjCvejwrw1BAqWaJuTkAu tDDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hcftpBMP2gQsYIzIi5S84qh2X88Wcx3kW8vrYbRpjDU=; b=tspORHqdbkst26AUrVifOzImOkCEuwCNC4N+qn4MgG2Y9hdg7y9ViJkNJJ62Cdq2jR KaK+GqsWP5l6JNpIasVZM5U4IdtOZZCwb5FK7qvqMkc1cqfd1kS//njeuHhgzkVHLxrN 2QKFwl35cBd+2IpnTGeG1g8PBRqzr5+bAa9rtJtAQHg1O3YEVLsz5wxbFeb+GZguGeIC VAr4lZM6V7BXfgSwgPhf143lH4TZnVtWuAcNuOBRhRBGCIpMy5o3yvWLodBn4VzUK89D qMafGbetBdNBS0MxjUhy0imDW5uIw53vixjoPNkQIOSBmT/Q1IqIvZoLvA7Z0iu+LHW7 IQfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=phf8RE8H; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si10344318edb.324.2019.10.08.05.56.10; Tue, 08 Oct 2019 05:56:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=phf8RE8H; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730915AbfJHM4J (ORCPT + 5 others); Tue, 8 Oct 2019 08:56:09 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:44544 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730963AbfJHM4I (ORCPT ); Tue, 8 Oct 2019 08:56:08 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x98Ctxna126438; Tue, 8 Oct 2019 07:55:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570539359; bh=hcftpBMP2gQsYIzIi5S84qh2X88Wcx3kW8vrYbRpjDU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=phf8RE8HVPkS8XtuSVfw5DsKcS0ZEw2Avx5hdYEZ3FLMjjavhhR9UD98+l74a8pt9 7DU8iV16471dfNBHjprYeL5zJOAT+LgKW08kZwytDYlyicr/uzxBGZLe/eXazduZOl y8yWJYgxpjWdzQR+TCJ00X0BuWOyTqOtIQvAU61g= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x98Ctxg1126537 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Oct 2019 07:55:59 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 8 Oct 2019 07:55:56 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 8 Oct 2019 07:55:58 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x98Ctk5C046741; Tue, 8 Oct 2019 07:55:57 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv8 5/9] soc: ti: omap-prm: add omap4 PRM data Date: Tue, 8 Oct 2019 15:55:40 +0300 Message-ID: <20191008125544.20679-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008125544.20679-1-t-kristo@ti.com> References: <20191008125544.20679-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add PRM data for omap4 family of SoCs. Initially this is just used to provide reset support. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 3d9393ff67e3..24b1da3492c0 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -58,7 +58,29 @@ struct omap_reset_data { #define OMAP_PRM_HAS_RESETS (OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_RSTST) +static const struct omap_rst_map rst_map_01[] = { + { .rst = 0, .st = 0 }, + { .rst = 1, .st = 1 }, + { .rst = -1 }, +}; + +static const struct omap_rst_map rst_map_012[] = { + { .rst = 0, .st = 0 }, + { .rst = 1, .st = 1 }, + { .rst = 2, .st = 2 }, + { .rst = -1 }, +}; + +static const struct omap_prm_data omap4_prm_data[] = { + { .name = "tesla", .base = 0x4a306400, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "core", .base = 0x4a306700, .rstctrl = 0x210, .rstst = 0x214, .clkdm_name = "ducati", .rstmap = rst_map_012 }, + { .name = "ivahd", .base = 0x4a306f00, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_012 }, + { .name = "device", .base = 0x4a307b00, .rstctrl = 0x0, .rstst = 0x4, .rstmap = rst_map_01, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, + { }, +}; + static const struct of_device_id omap_prm_id_table[] = { + { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data }, { }, }; From patchwork Tue Oct 8 12:55:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 175486 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5662727ill; Tue, 8 Oct 2019 05:56:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCiET8w+IV4vSHOQ1OSrRhHi313gjyTl2X/lI5pei+pQLwBrfDXutjhk/StfHp9Z/Ta8Zd X-Received: by 2002:a17:906:fd1:: with SMTP id c17mr29069104ejk.45.1570539370063; Tue, 08 Oct 2019 05:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570539370; cv=none; d=google.com; s=arc-20160816; b=XHewASGRQbluSzRhP9O31plO4UjWOcU6P3rRdMyHGGkpBLcb/2jyf5TACN5mgDNgfZ J569TAavEx8Zm7rGqP6XZuWLormiemqGw2NNxs+kEUJKVok2NV53iyogqMNmsd0flWWE jiOAtu88ifcnEPSNHI6YqM79QNSMRVVLuD0Iqa01T163GkZv1JA8xTNH4kh43CRPkjDs 1ZXQyBQMvkajTF5Jx25i7iLkw9Hl0z3Hrbu/40HnFdlxNVXZBKzZPdYoR7i4BRzDlagC NGCVz+KHIntEn3sQlIsV7VpbZ14/z8TsvuLELdlv0Q4X5nSYi0oskxiB6Yd6mQerkNtS cgGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jVjHqDUh4JTBppk9XVlo05dAGntMMljP5k/tZSWLMM4=; b=AjhdPD5z0NeizI24xEEShCk7DITKJ7cvNwk7WhsGiJ/xT3CAurxdBPjxR0PjMxGxGX Lxxmvvpxq1wawRJ0zMdtAj+vC3ApwcHxq5EK9XVgDfvnFPyoTqYuxHWtaFXUSNkHJE7Y Au50utxxnlVQC1QjKchPIRxgpisEgPhlktgECO/uKjF0cshnBJnUODXuvvMDmLLcQsmM imJ5PPJSqw3NZcWpw099FGbzSGPu9FyazCd0wnCRMffsLBF8S9HwVGSTt/viyjOy7MkN eIn3ZvXmWRkhAroQqHoF/1Xz537xwRYrKSksYhjP5qpBK5V9R6BEVV0mqVGkvyeKezpX 6S8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jQ2cWviI; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si10344318edb.324.2019.10.08.05.56.09; Tue, 08 Oct 2019 05:56:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jQ2cWviI; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730980AbfJHM4I (ORCPT + 5 others); Tue, 8 Oct 2019 08:56:08 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:36000 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730915AbfJHM4H (ORCPT ); Tue, 8 Oct 2019 08:56:07 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x98Cu1X7128857; Tue, 8 Oct 2019 07:56:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570539361; bh=jVjHqDUh4JTBppk9XVlo05dAGntMMljP5k/tZSWLMM4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jQ2cWviIii3om3WFKJ70rSXyIleSFElQW/R8jv3yeNKm+tn/ZZusxXa0untQ3zwtb lY6rJxvhvUlI87DfHSwjHKAATxg9wPzhbqNXc5k1O1d+Zohsmo4wXy9xfwXZ02fqbV LQTG9rrqCcL2zlckA4m4+bKQpVvMi7HmPnpBuLcg= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x98Cu1N2104117; Tue, 8 Oct 2019 07:56:01 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 8 Oct 2019 07:55:58 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 8 Oct 2019 07:55:58 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x98Ctk5D046741; Tue, 8 Oct 2019 07:55:59 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv8 6/9] soc: ti: omap-prm: add data for am33xx Date: Tue, 8 Oct 2019 15:55:41 +0300 Message-ID: <20191008125544.20679-7-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008125544.20679-1-t-kristo@ti.com> References: <20191008125544.20679-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add PRM instance data for AM33xx SoC. Includes some basic register definitions and reset data for now. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 24b1da3492c0..a5fde34f6afd 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -58,6 +58,11 @@ struct omap_reset_data { #define OMAP_PRM_HAS_RESETS (OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_RSTST) +static const struct omap_rst_map rst_map_0[] = { + { .rst = 0, .st = 0 }, + { .rst = -1 }, +}; + static const struct omap_rst_map rst_map_01[] = { { .rst = 0, .st = 0 }, { .rst = 1, .st = 1 }, @@ -79,8 +84,27 @@ static const struct omap_prm_data omap4_prm_data[] = { { }, }; +static const struct omap_rst_map am3_per_rst_map[] = { + { .rst = 1 }, + { .rst = -1 }, +}; + +static const struct omap_rst_map am3_wkup_rst_map[] = { + { .rst = 3, .st = 5 }, + { .rst = -1 }, +}; + +static const struct omap_prm_data am3_prm_data[] = { + { .name = "per", .base = 0x44e00c00, .rstctrl = 0x0, .rstmap = am3_per_rst_map, .flags = OMAP_PRM_HAS_RSTCTRL, .clkdm_name = "pruss_ocp" }, + { .name = "wkup", .base = 0x44e00d00, .rstctrl = 0x0, .rstst = 0xc, .rstmap = am3_wkup_rst_map, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, + { .name = "device", .base = 0x44e00f00, .rstctrl = 0x0, .rstst = 0x8, .rstmap = rst_map_01, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, + { .name = "gfx", .base = 0x44e01100, .rstctrl = 0x4, .rstst = 0x14, .rstmap = rst_map_0, .clkdm_name = "gfx_l3" }, + { }, +}; + static const struct of_device_id omap_prm_id_table[] = { { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data }, + { .compatible = "ti,am3-prm-inst", .data = am3_prm_data }, { }, };