linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: Eric Anholt <eric@anholt.net>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	 Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: devicetree@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org
Subject: Re: [PATCH V2 05/13] clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support
Date: Fri, 13 Sep 2019 03:20:24 +0200	[thread overview]
Message-ID: <097c31de-4b11-92a8-af22-c34d6317359c@gmx.net> (raw)
In-Reply-To: <87o8zp1h4u.fsf@anholt.net>

Am 12.09.19 um 20:52 schrieb Eric Anholt:
> Matthias Brugger <matthias.bgg@gmail.com> writes:
>
>> On 13/08/2019 18:20, Stefan Wahren wrote:
>>> 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>
>>> Reviewed-by: Matthias Brugger <mbrugger@suse.com>
>>> Acked-by: Eric Anholt <eric@anholt.net>
>>> ---
>>>  drivers/clk/bcm/clk-bcm2835.c | 20 +++++++++++++++++++-
>>>  1 file changed, 19 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
>>> index 21cd952..fdf672a 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
>>> @@ -2003,6 +2006,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,
>>> @@ -2238,8 +2251,13 @@ static const struct cprman_plat_data cprman_bcm2835_plat_data = {
>>>  	.soc = SOC_BCM2835,
>>>  };
>>>
>>> +static const struct cprman_plat_data cprman_bcm2711_plat_data = {
>>> +	.soc = SOC_BCM2711,
>>> +};
>>> +
>>>  static const struct of_device_id bcm2835_clk_of_match[] = {
>>>  	{ .compatible = "brcm,bcm2835-cprman", .data = &cprman_bcm2835_plat_data },
>>> +	{ .compatible = "brcm,bcm2711-cprman", .data = &cprman_bcm2711_plat_data },
>> Because the RPi4 FW uses bcm2838-cprman as compatible, we will need to add this
>> here as well.
> Upstream has not committed to backwards compat with Pi's firmware.  That
> makes the ABI requirement we get held to for upstream's DT absurd, but
> that's the state of things.

We also learned from past, that's not possible to keep things downstream
compatible. As soon as a binding is not accepted, this wont work
anymore. A lot of the downstream stuff is hacky.

For example yesterday, i learned that the thermal node is broken
(register is part of ring oscillator block). So do we really want to be
compatible with a hack? I would say: No


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-13  1:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 16:20 [PATCH V2 00/13] ARM: Add minimal Raspberry Pi 4 support Stefan Wahren
2019-08-13 16:20 ` [PATCH V2 01/13] ARM: dts: bcm283x: Enable HDMI at board level Stefan Wahren
2019-08-13 16:20 ` [PATCH V2 02/13] ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi Stefan Wahren
2019-08-13 16:20 ` [PATCH V2 03/13] dt-bindings: bcm2835-cprman: Add bcm2711 support Stefan Wahren
2019-08-16 17:41   ` Stephen Boyd
2019-08-27 16:00   ` Rob Herring
2019-08-13 16:20 ` [PATCH V2 04/13] clk: bcm2835: Introduce SoC specific clock registration Stefan Wahren
2019-08-13 16:20 ` [PATCH V2 05/13] clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support Stefan Wahren
2019-09-12 17:24   ` Matthias Brugger
2019-09-12 18:52     ` Eric Anholt
2019-09-13  1:20       ` Stefan Wahren [this message]
2019-09-13  7:13         ` Matthias Brugger
2019-09-13 23:02           ` Florian Fainelli
2019-08-13 16:20 ` [PATCH V2 06/13] clk: bcm2835: Mark PLLD_PER as CRITICAL Stefan Wahren
2019-08-16 17:39   ` Stephen Boyd
2019-08-13 16:20 ` [PATCH V2 07/13] dt-bindings: i2c: bcm2835: Add brcm, bcm2711 compatible Stefan Wahren
2019-08-27 16:00   ` [PATCH V2 07/13] dt-bindings: i2c: bcm2835: Add brcm,bcm2711 compatible Rob Herring
2019-08-13 16:20 ` [PATCH V2 08/13] i2c: bcm2835: Avoid clk stretch quirk for BCM2711 Stefan Wahren
2019-08-14 19:36   ` Wolfram Sang
2019-08-17  7:32     ` Stefan Wahren
2019-08-17  8:30       ` Wolfram Sang
2019-08-13 16:20 ` [PATCH V2 09/13] dt-bindings: arm: Convert BCM2835 board/soc bindings to json-schema Stefan Wahren
2019-08-13 17:22   ` Rob Herring
2019-08-14 19:21     ` Stefan Wahren
2019-08-14 23:06       ` Rob Herring
2019-08-13 16:20 ` [PATCH V2 10/13] dt-bindings: arm: bcm2835: Add Raspberry Pi 4 to DT schema Stefan Wahren
2019-08-13 16:20 ` [PATCH V2 11/13] ARM: bcm: Add support for BCM2711 SoC Stefan Wahren
2019-09-10 14:13   ` Matthias Brugger
2019-08-13 16:20 ` [PATCH V2 12/13] ARM: dts: Add minimal Raspberry Pi 4 support Stefan Wahren
2019-08-13 16:20 ` [PATCH V2 13/13] MAINTAINERS: Add BCM2711 to BCM2835 ARCH Stefan Wahren
2019-08-13 20:42 ` [PATCH V2 00/13] ARM: Add minimal Raspberry Pi 4 support Eric Anholt

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=097c31de-4b11-92a8-af22-c34d6317359c@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=wsa@the-dreams.de \
    /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).