From: Sascha Hauer <s.hauer@pengutronix.de>
To: Frank Wunderlich <linux@fw-web.de>
Cc: barebox@lists.infradead.org, Frank Wunderlich <frank-w@public-files.de>
Subject: Re: [urgent] ARM: rockchip: fix iodomain for r2pro V1.0
Date: Mon, 16 May 2022 10:41:26 +0200 [thread overview]
Message-ID: <20220516084126.GL25578@pengutronix.de> (raw)
In-Reply-To: <20220514155609.8306-1-linux@fw-web.de>
On Sat, May 14, 2022 at 05:56:09PM +0200, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w@public-files.de>
>
> Current code sets vccio4 and vccio6 both to 1v8. R2Pro v1.0 needs 3v3
> setting on vccio4, else gmac0 (switch for lan-ports) will be damaged.
By damaged you mean physically damaged? How can this happen? Does that
mean some input signals are not 3v3 tolerant when the domain is supplied
with 1v8?
Sascha
>
> IO-domain is per default 3v3 so only vccio6 needs to be set to 1v8 and
> clear this bit in the 3v3 register.
>
> Fixes: 8ba96c5942d6 ("ARM: rockchip: add BPI-R2-Pro V00 board")
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c | 9 ++++++---
> arch/arm/mach-rockchip/include/mach/rockchip.h | 3 +++
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
> index 4c5b4751b3fb..2a6e0700233a 100644
> --- a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
> +++ b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
> @@ -17,10 +17,13 @@ static noinline void rk3568_start(void *fdt_blob_fixed_offset)
> void *fdt;
>
> /*
> - * Enable vccio4 1.8V and vccio6 1.8V
> - * Needed for GMAC to work.
> + * set iodomain vccio6 to 1.8V needed for GMAC1 to work.
> + * vccio4 (gmac0/switch) needs to stay at 3v3 (default)
> */
> - writel(RK_SETBITS(0x50), 0xfdc20140);
> + //set bit 6 in PMU_GRF_IO_VSEL0 for vccio6 1v8
> + writel(RK_SETBITS(BIT(6)), PMU_GRF_IO_VSEL0);
> + //clear bit 6 for 3v3 as it was set to 1v8
> + writel(RK_CLRBITS(BIT(6)), PMU_GRF_IO_VSEL1);
>
> fdt = fdt_blob_fixed_offset;
>
> diff --git a/arch/arm/mach-rockchip/include/mach/rockchip.h b/arch/arm/mach-rockchip/include/mach/rockchip.h
> index f24db36f0161..ff8b1109f858 100644
> --- a/arch/arm/mach-rockchip/include/mach/rockchip.h
> +++ b/arch/arm/mach-rockchip/include/mach/rockchip.h
> @@ -23,6 +23,9 @@ static inline int rk3288_init(void)
>
> #ifdef CONFIG_ARCH_RK3568
> int rk3568_init(void);
> +#define PMU_GRF 0xfdc20000
> +#define PMU_GRF_IO_VSEL0 (PMU_GRF + 0x140)
> +#define PMU_GRF_IO_VSEL1 (PMU_GRF + 0x144)
> #else
> static inline int rk3568_init(void)
> {
> --
> 2.25.1
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2022-05-16 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 15:56 Frank Wunderlich
2022-05-16 8:37 ` Sascha Hauer
2022-05-16 8:41 ` Sascha Hauer [this message]
2022-05-16 9:11 ` Frank Wunderlich
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=20220516084126.GL25578@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=frank-w@public-files.de \
--cc=linux@fw-web.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