From: Robert Marko <robimarko@gmail.com>
To: bjorn.andersson@linaro.org, agross@kernel.org,
mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, tdas@codeaurora.org,
absahu@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, dmitry.baryshkov@linaro.org
Cc: Robert Marko <robimarko@gmail.com>
Subject: [PATCH v4 09/11] clk: qcom: ipq8074: add USB GDSCs
Date: Sun, 15 May 2022 23:00:46 +0200 [thread overview]
Message-ID: <20220515210048.483898-9-robimarko@gmail.com> (raw)
In-Reply-To: <20220515210048.483898-1-robimarko@gmail.com>
Add GDSC-s for each of the two USB controllers built-in the IPQ8074.
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
Changes in v2:
* Use proper GSDCs instead of raw regmap writes.
---
drivers/clk/qcom/Kconfig | 1 +
drivers/clk/qcom/gcc-ipq8074.c | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index d01436be6d7a..00fe5f066de5 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -166,6 +166,7 @@ config IPQ_LCC_806X
config IPQ_GCC_8074
tristate "IPQ8074 Global Clock Controller"
+ select QCOM_GDSC
help
Support for global clock controller on ipq8074 devices.
Say Y if you want to use peripheral devices such as UART, SPI,
diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c
index 85076c1383c7..3204d550ff76 100644
--- a/drivers/clk/qcom/gcc-ipq8074.c
+++ b/drivers/clk/qcom/gcc-ipq8074.c
@@ -22,6 +22,7 @@
#include "clk-alpha-pll.h"
#include "clk-regmap-divider.h"
#include "clk-regmap-mux.h"
+#include "gdsc.h"
#include "reset.h"
enum {
@@ -4407,6 +4408,22 @@ static struct clk_branch gcc_pcie0_axi_s_bridge_clk = {
},
};
+static struct gdsc usb0_gdsc = {
+ .gdscr = 0x3e078,
+ .pd = {
+ .name = "usb0_gdsc",
+ },
+ .pwrsts = PWRSTS_OFF_ON,
+};
+
+static struct gdsc usb1_gdsc = {
+ .gdscr = 0x3f078,
+ .pd = {
+ .name = "usb1_gdsc",
+ },
+ .pwrsts = PWRSTS_OFF_ON,
+};
+
static const struct alpha_pll_config ubi32_pll_config = {
.l = 0x4e,
.config_ctl_val = 0x200d4aa8,
@@ -4810,6 +4827,11 @@ static const struct qcom_reset_map gcc_ipq8074_resets[] = {
[GCC_PCIE1_AXI_MASTER_STICKY_ARES] = { 0x76040, 6 },
};
+static struct gdsc *gcc_ipq8074_gdscs[] = {
+ [USB0_GDSC] = &usb0_gdsc,
+ [USB1_GDSC] = &usb1_gdsc,
+};
+
static const struct of_device_id gcc_ipq8074_match_table[] = {
{ .compatible = "qcom,gcc-ipq8074" },
{ }
@@ -4832,6 +4854,8 @@ static const struct qcom_cc_desc gcc_ipq8074_desc = {
.num_resets = ARRAY_SIZE(gcc_ipq8074_resets),
.clk_hws = gcc_ipq8074_hws,
.num_clk_hws = ARRAY_SIZE(gcc_ipq8074_hws),
+ .gdscs = gcc_ipq8074_gdscs,
+ .num_gdscs = ARRAY_SIZE(gcc_ipq8074_gdscs),
};
static int gcc_ipq8074_probe(struct platform_device *pdev)
--
2.36.1
next prev parent reply other threads:[~2022-05-15 21:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-15 21:00 [PATCH v4 01/11] clk: qcom: ipq8074: fix NSS core PLL-s Robert Marko
2022-05-15 21:00 ` [PATCH v4 02/11] clk: qcom: ipq8074: SW workaround for UBI32 PLL lock Robert Marko
2022-05-15 21:00 ` [PATCH v4 03/11] clk: qcom: ipq8074: fix NSS port frequency tables Robert Marko
2022-05-15 21:00 ` [PATCH v4 04/11] dt-bindings: clock: qcom: ipq8074: add PPE crypto clock Robert Marko
2022-05-15 21:00 ` [PATCH v4 05/11] clk: " Robert Marko
2022-05-15 21:00 ` [PATCH v4 06/11] clk: qcom: ipq8074: set BRANCH_HALT_DELAY flag for UBI clocks Robert Marko
2022-05-15 21:00 ` [PATCH v4 07/11] dt-bindings: clocks: qcom,gcc-ipq8074: support power domains Robert Marko
2022-05-17 8:11 ` Krzysztof Kozlowski
2022-05-15 21:00 ` [PATCH v4 08/11] dt-bindings: clock: qcom: ipq8074: add USB GDSCs Robert Marko
2022-05-17 8:12 ` Krzysztof Kozlowski
2022-05-15 21:00 ` Robert Marko [this message]
2022-05-15 21:00 ` [PATCH v4 10/11] clk: qcom: ipq8074: dont disable gcc_sleep_clk_src Robert Marko
2022-07-11 21:10 ` Stephen Boyd
2022-07-11 21:14 ` Robert Marko
2022-07-29 23:27 ` Stephen Boyd
2022-05-15 21:00 ` [PATCH v4 11/11] arm64: dts: ipq8074: add USB power domains Robert Marko
2022-07-03 3:56 ` (subset) " Bjorn Andersson
2022-07-03 3:56 ` (subset) [PATCH v4 01/11] clk: qcom: ipq8074: fix NSS core PLL-s Bjorn Andersson
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=20220515210048.483898-9-robimarko@gmail.com \
--to=robimarko@gmail.com \
--cc=absahu@codeaurora.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=tdas@codeaurora.org \
/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).