From: Matthias Brugger <matthias.bgg@gmail.com>
To: Stefan Wahren <wahrenst@gmx.net>,
Wolfram Sang <wsa@the-dreams.de>, Eric Anholt <eric@anholt.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>
Cc: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] i2c: bcm2835: Avoid clk stretch quirk for BCM2711
Date: Thu, 12 Sep 2019 19:21:02 +0200 [thread overview]
Message-ID: <c43878d8-e7d0-bc13-107b-2b6045692504@gmail.com> (raw)
In-Reply-To: <1566925456-5928-3-git-send-email-wahrenst@gmx.net>
On 27/08/2019 19:04, Stefan Wahren wrote:
> The I2C block on the BCM2711 isn't affected by the clk stretching bug.
> So there is no need to apply the corresponding quirk.
>
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Reviewed-by: Eric Anholt <eric@anholt.net>
> ---
> drivers/i2c/busses/i2c-bcm2835.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
> index 67752f7..ab5502f 100644
> --- a/drivers/i2c/busses/i2c-bcm2835.c
> +++ b/drivers/i2c/busses/i2c-bcm2835.c
> @@ -12,6 +12,7 @@
> #include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/module.h>
> +#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
>
> @@ -389,7 +390,7 @@ static const struct i2c_algorithm bcm2835_i2c_algo = {
> };
>
> /*
> - * This HW was reported to have problems with clock stretching:
> + * The BCM2835 was reported to have problems with clock stretching:
> * http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html
> * https://www.raspberrypi.org/forums/viewtopic.php?p=146272
> */
> @@ -475,7 +476,7 @@ static int bcm2835_i2c_probe(struct platform_device *pdev)
> adap->algo = &bcm2835_i2c_algo;
> adap->dev.parent = &pdev->dev;
> adap->dev.of_node = pdev->dev.of_node;
> - adap->quirks = &bcm2835_i2c_quirks;
> + adap->quirks = of_device_get_match_data(&pdev->dev);
>
> bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, 0);
>
> @@ -501,7 +502,8 @@ static int bcm2835_i2c_remove(struct platform_device *pdev)
> }
>
> static const struct of_device_id bcm2835_i2c_of_match[] = {
> - { .compatible = "brcm,bcm2835-i2c" },
> + { .compatible = "brcm,bcm2711-i2c" },
> + { .compatible = "brcm,bcm2835-i2c", .data = &bcm2835_i2c_quirks },
RPi4 FW seems to still use bcm2835-i2c as compatible in it's DTB blob. Does this
break the driver or is this something we can improve by changing the FW blob in
the future without breaking the driver now?
Regards,
Matthias
> {},
> };
> MODULE_DEVICE_TABLE(of, bcm2835_i2c_of_match);
> --
> 2.7.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2019-09-12 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 17:04 [PATCH 0/3] i2c: bcm2835: Add bcm2711 support Stefan Wahren
2019-08-27 17:04 ` [PATCH 1/3] dt-bindings: i2c: bcm2835: Add brcm,bcm2711 compatible Stefan Wahren
2019-08-29 18:52 ` Wolfram Sang
2019-08-27 17:04 ` [PATCH 2/3] i2c: bcm2835: Avoid clk stretch quirk for BCM2711 Stefan Wahren
2019-08-29 18:52 ` Wolfram Sang
2019-09-12 17:21 ` Matthias Brugger [this message]
2019-08-27 17:04 ` [PATCH 3/3] i2c: bcm2835: Add full name of devicetree node to adapter name Stefan Wahren
2019-08-27 21:10 ` Scott Branden
2019-08-29 18:52 ` Wolfram Sang
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=c43878d8-e7d0-bc13-107b-2b6045692504@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=wahrenst@gmx.net \
--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).