linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: Eric Anholt <eric@anholt.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Matthias Brugger <mbrugger@suse.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>
Cc: bcm-kernel-feedback-list@broadcom.com,
	linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
	linux-mmc@vger.kernel.org, Stefan Wahren <wahrenst@gmx.net>
Subject: [PATCH 08/18] clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support
Date: Mon, 22 Jul 2019 07:54:39 +0200	[thread overview]
Message-ID: <1563774880-8061-9-git-send-email-wahrenst@gmx.net> (raw)
In-Reply-To: <1563774880-8061-1-git-send-email-wahrenst@gmx.net>

The new BCM2711 supports an additional clock for the emmc2 block.
So add a new compatible and register this clock only for BCM2711.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
 drivers/clk/bcm/clk-bcm2835.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index 3231b76..fbdc4e1 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -114,6 +114,8 @@
 #define CM_AVEODIV		0x1bc
 #define CM_EMMCCTL		0x1c0
 #define CM_EMMCDIV		0x1c4
+#define CM_EMMC2CTL		0x1d0
+#define CM_EMMC2DIV		0x1d4

 /* General bits for the CM_*CTL regs */
 # define CM_ENABLE			BIT(4)
@@ -290,7 +292,8 @@
 #define BCM2835_MAX_FB_RATE	1750000000u

 #define SOC_BCM2835		BIT(0)
-#define SOC_ALL			(SOC_BCM2835)
+#define SOC_BCM2711		BIT(1)
+#define SOC_ALL			(SOC_BCM2835 | SOC_BCM2711)

 /*
  * Names of clocks used within the driver that need to be replaced
@@ -1999,6 +2002,16 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
 		.frac_bits = 8,
 		.tcnt_mux = 39),

+	/* EMMC2 clock (only available for BCM2711) */
+	[BCM2711_CLOCK_EMMC2]	= REGISTER_PER_CLK(
+		SOC_BCM2711,
+		.name = "emmc2",
+		.ctl_reg = CM_EMMC2CTL,
+		.div_reg = CM_EMMC2DIV,
+		.int_bits = 4,
+		.frac_bits = 8,
+		.tcnt_mux = 42),
+
 	/* General purpose (GPIO) clocks */
 	[BCM2835_CLOCK_GP0]	= REGISTER_PER_CLK(
 		SOC_ALL,
@@ -2230,6 +2243,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev)

 static const struct of_device_id bcm2835_clk_of_match[] = {
 	{ .compatible = "brcm,bcm2835-cprman", .data = (void *)SOC_BCM2835 },
+	{ .compatible = "brcm,bcm2711-cprman", .data = (void *)SOC_BCM2711 },
 	{}
 };
 MODULE_DEVICE_TABLE(of, bcm2835_clk_of_match);
--
2.7.4


  parent reply	other threads:[~2019-07-22  5:56 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22  5:54 [PATCH 00/18] ARM: Add minimal Raspberry Pi 4 support Stefan Wahren
2019-07-22  5:54 ` [PATCH 01/18] ARM: bcm283x: Reduce register ranges for UART, SPI and I2C Stefan Wahren
2019-07-24 20:01   ` Stefan Wahren
2019-07-22  5:54 ` [PATCH 02/18] ARM: bcm2835: DMA can only address 1GB Stefan Wahren
2019-07-22  5:54 ` [PATCH 03/18] ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi Stefan Wahren
2019-07-22 17:54   ` Eric Anholt
2019-07-22  5:54 ` [PATCH 04/18] ARM: dts: bcm283x: Define MMC interfaces at board level Stefan Wahren
2019-08-12 21:03   ` Stefan Wahren
2019-07-22  5:54 ` [PATCH 05/18] ARM: dts: bcm283x: Define memory " Stefan Wahren
2019-08-12 21:02   ` Stefan Wahren
2019-07-22  5:54 ` [PATCH 06/18] dt-bindings: bcm2835-cprman: Add bcm2711 support Stefan Wahren
2019-07-22  5:54 ` [PATCH 07/18] clk: bcm2835: Introduce SoC specific clock registration Stefan Wahren
2019-07-22 10:30   ` Matthias Brugger
2019-08-11 20:43   ` Stefan Wahren
2019-07-22  5:54 ` Stefan Wahren [this message]
2019-07-22 10:30   ` [PATCH 08/18] clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support Matthias Brugger
2019-07-22  5:54 ` [PATCH 09/18] dt-bindings: sdhci-iproc: Add brcm,bcm2711-emmc2 Stefan Wahren
2019-07-22 10:31   ` Matthias Brugger
2019-07-24 14:08   ` Ulf Hansson
2019-07-22 11:26 ` [PATCH 00/18] ARM: Add minimal Raspberry Pi 4 support Matthias Brugger
2019-07-22 13:18 ` Nicolas Saenz Julienne
2019-07-22 18:10   ` Stefan Wahren
2019-07-23  9:34     ` Christoph Hellwig
2019-07-23 13:32       ` Nicolas Saenz Julienne
2019-07-23 14:33         ` Christoph Hellwig
2019-07-23 16:26         ` Stefan Wahren
2019-07-23 17:33           ` Nicolas Saenz Julienne
2019-07-23 21:30             ` Stefan Wahren
2019-07-24  2:53             ` Chen-Yu Tsai
2019-07-24  8:37               ` Nicolas Saenz Julienne
2019-07-25  8:22             ` Nicolas Saenz Julienne
2019-07-25 22:09               ` Stefan Wahren
2019-07-22 18:01 ` Eric Anholt
2019-07-28 11:22 ` Stefan Wahren
2019-08-05  9:33   ` Linus Walleij

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=1563774880-8061-9-git-send-email-wahrenst@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=adrian.hunter@intel.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mbrugger@suse.com \
    --cc=mturquette@baylibre.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=ulf.hansson@linaro.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).