linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: "Benoît Cousson" <bcousson@baylibre.com>,
	devicetree@vger.kernel.org, "Adam Ford" <aford173@gmail.com>,
	"Filip Matijević" <filip.matijevic.pz@gmail.com>,
	"H. Nikolaus Schaller" <hns@goldelico.com>,
	"Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
	"moaz korena" <moaz@korena.xyz>,
	"Merlijn Wajer" <merlijn@wizzup.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>,
	"Philipp Rossak" <embed3d@gmail.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Tero Kristo" <t-kristo@ti.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
	linux-clk@vger.kernel.org
Subject: [PATCH 3/6] clk: ti: add clkctrl data omap5 sgx
Date: Wed, 14 Aug 2019 06:14:05 -0700	[thread overview]
Message-ID: <20190814131408.57162-4-tony@atomide.com> (raw)
In-Reply-To: <20190814131408.57162-1-tony@atomide.com>

Looks like we have sgx clock missing currently so let's add it.

Cc: Adam Ford <aford173@gmail.com>
Cc: Filip Matijević <filip.matijevic.pz@gmail.com>
Cc: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: moaz korena <moaz@korena.xyz>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Cc: Philipp Rossak <embed3d@gmail.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-clk@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/clk/ti/clk-54xx.c         | 34 +++++++++++++++++++++++++++++++
 include/dt-bindings/clock/omap5.h |  3 +++
 2 files changed, 37 insertions(+)

diff --git a/drivers/clk/ti/clk-54xx.c b/drivers/clk/ti/clk-54xx.c
--- a/drivers/clk/ti/clk-54xx.c
+++ b/drivers/clk/ti/clk-54xx.c
@@ -314,6 +314,39 @@ static const struct omap_clkctrl_reg_data omap5_dss_clkctrl_regs[] __initconst =
 	{ 0 },
 };
 
+static const char * const omap5_gpu_core_mux_parents[] __initconst = {
+	"dpll_core_h14x2_ck",
+	"dpll_per_h14x2_ck",
+	NULL,
+};
+
+static const char * const omap5_gpu_hyd_mux_parents[] __initconst = {
+	"dpll_core_h14x2_ck",
+	"dpll_per_h14x2_ck",
+	NULL,
+};
+
+static const char * const omap5_gpu_sys_clk_parents[] __initconst = {
+	"sys_clkin",
+	NULL,
+};
+
+static const struct omap_clkctrl_div_data omap5_gpu_sys_clk_data __initconst = {
+	.max_div = 2,
+};
+
+static const struct omap_clkctrl_bit_data omap5_gpu_core_bit_data[] __initconst = {
+	{ 24, TI_CLK_MUX, omap5_gpu_core_mux_parents, NULL },
+	{ 25, TI_CLK_MUX, omap5_gpu_hyd_mux_parents, NULL },
+	{ 26, TI_CLK_DIVIDER, omap5_gpu_sys_clk_parents, &omap5_gpu_sys_clk_data },
+	{ 0 },
+};
+
+static const struct omap_clkctrl_reg_data omap5_gpu_clkctrl_regs[] __initconst = {
+	{ OMAP5_GPU_CLKCTRL, omap5_gpu_core_bit_data, CLKF_SW_SUP, "gpu_cm:clk:0000:24" },
+	{ 0 },
+};
+
 static const char * const omap5_mmc1_fclk_mux_parents[] __initconst = {
 	"func_128m_clk",
 	"dpll_per_m2x2_ck",
@@ -470,6 +503,7 @@ const struct omap_clkctrl_data omap5_clkctrl_data[] __initconst = {
 	{ 0x4a008e20, omap5_l3instr_clkctrl_regs },
 	{ 0x4a009020, omap5_l4per_clkctrl_regs },
 	{ 0x4a009420, omap5_dss_clkctrl_regs },
+	{ 0x4a009520, omap5_gpu_clkctrl_regs },
 	{ 0x4a009620, omap5_l3init_clkctrl_regs },
 	{ 0x4ae07920, omap5_wkupaon_clkctrl_regs },
 	{ 0 },
diff --git a/include/dt-bindings/clock/omap5.h b/include/dt-bindings/clock/omap5.h
--- a/include/dt-bindings/clock/omap5.h
+++ b/include/dt-bindings/clock/omap5.h
@@ -89,6 +89,9 @@
 /* dss clocks */
 #define OMAP5_DSS_CORE_CLKCTRL	OMAP5_CLKCTRL_INDEX(0x20)
 
+/* gpu clocks */
+#define OMAP5_GPU_CLKCTRL	OMAP5_CLKCTRL_INDEX(0x20)
+
 /* l3init clocks */
 #define OMAP5_MMC1_CLKCTRL	OMAP5_CLKCTRL_INDEX(0x28)
 #define OMAP5_MMC2_CLKCTRL	OMAP5_CLKCTRL_INDEX(0x30)
-- 
2.21.0

  parent reply	other threads:[~2019-08-14 13:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 13:14 [PATCH 0/6] Configure sgx interconnect data for some omap variants Tony Lindgren
2019-08-14 13:14 ` [PATCH 1/6] ARM: OMAP2+: Drop legacy platform data for omap4 gpu Tony Lindgren
2019-08-14 13:14 ` [PATCH 2/6] bus: ti-sysc: Add module enable quirk for SGX on omap36xx Tony Lindgren
2019-08-14 13:14 ` Tony Lindgren [this message]
2019-08-14 13:14 ` [PATCH 4/6] ARM: dts: Configure sgx for omap5 Tony Lindgren
     [not found]   ` <20190815182348.8A1BA2063F@mail.kernel.org>
2019-08-17  6:56     ` Tony Lindgren
2019-08-26 14:55       ` Tony Lindgren
2019-09-05 15:03         ` H. Nikolaus Schaller
2019-09-05 15:28           ` Tony Lindgren
2019-10-05 16:20         ` H. Nikolaus Schaller
2019-08-14 13:14 ` [PATCH 5/6] ARM: dts: Configure interconnect target module for omap3 sgx Tony Lindgren
2019-08-14 14:46   ` Andrew F. Davis
2019-08-19 19:12   ` Adam Ford
2019-09-07 11:51     ` H. Nikolaus Schaller
2019-08-14 13:14 ` [PATCH 6/6] ARM: dts: Configure rstctrl reset for SGX Tony Lindgren
2019-09-13  9:49   ` H. Nikolaus Schaller
2019-09-16 15:17     ` Tony Lindgren
2019-09-16 18:04       ` Tony Lindgren
2019-09-16 18:12         ` H. Nikolaus Schaller
2019-09-16 19:15           ` H. Nikolaus Schaller
2019-09-16 19:20             ` Adam Ford
2019-09-16 19:45               ` H. Nikolaus Schaller
2019-08-14 19:13 ` [PATCH 0/6] Configure sgx interconnect data for some omap variants Adam Ford
2019-08-15  4:02   ` Tony Lindgren
2019-08-15  4:15     ` Tony Lindgren
2019-08-15 13:05       ` Adam Ford
2019-08-17  7:05         ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190814131408.57162-4-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=aford173@gmail.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=embed3d@gmail.com \
    --cc=filip.matijevic.pz@gmail.com \
    --cc=hns@goldelico.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=moaz@korena.xyz \
    --cc=mturquette@baylibre.com \
    --cc=pawel.mikolaj.chmiel@gmail.com \
    --cc=sboyd@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).