From: "Jernej Škrabec" <jernej.skrabec@siol.net>
To: u-boot@lists.denx.de
Subject: [linux-sunxi] [PATCH 10/17] sunxi: add support for R_I2C on H616
Date: Mon, 04 Jan 2021 19:36:17 +0100 [thread overview]
Message-ID: <4107316.5SLNN0qdvM@jernej-laptop> (raw)
In-Reply-To: <0fffcaf4-93cd-6396-73b3-45fa40b69850@sholland.org>
Dne ponedeljek, 04. januar 2021 ob 03:33:12 CET je Samuel Holland napisal(a):
> On 1/3/21 3:26 AM, Jernej Skrabec wrote:
> > This port is needed for communication with PMIC. SPL uses it to set DRAM
> > voltage on H616 boards.
> >
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> >
> > arch/arm/include/asm/arch-sunxi/gpio.h | 1 +
> > board/sunxi/board.c | 4 ++++
> > 2 files changed, 5 insertions(+)
> >
> > diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h
> > b/arch/arm/include/asm/arch-sunxi/gpio.h index cdb7dbd5b8e5..de77bf638e21
> > 100644
> > --- a/arch/arm/include/asm/arch-sunxi/gpio.h
> > +++ b/arch/arm/include/asm/arch-sunxi/gpio.h
> > @@ -220,6 +220,7 @@ enum sunxi_gpio_number {
> >
> > #define SUN8I_A23_GPL_R_TWI 3
> > #define SUN8I_GPL_R_UART 2
> > #define SUN50I_GPL_R_TWI 2
> >
> > +#define SUN50I_H616_GPL_R_TWI 3
>
> The fact that I2C is at function 3 makes me suspicious that there is RSB
> at function 2. Have you checked if that is the case?
BSP Linux pinctrl has function 2 s_rsb0, so yes, that should be the case.
However, it doesn't have RSB DT node anywhere. Datasheet mentions RSB only in
CCU diagram, so no details anywhere. I didn't test it.
Best regards,
Jernej
>
> Either way:
>
> Reviewed-by: Samuel Holland <samuel@sholland.org>
>
> > #define SUN9I_GPN_R_RSB 3
> >
> > diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> > index 54ff9bc92396..727e8320318f 100644
> > --- a/board/sunxi/board.c
> > +++ b/board/sunxi/board.c
> > @@ -196,6 +196,10 @@ void i2c_init_board(void)
> >
> > clock_twi_onoff(5, 1);
> > sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI);
> > sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI);
> >
> > +#elif CONFIG_MACH_SUN50I_H616
> > + clock_twi_onoff(5, 1);
> > + sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN50I_H616_GPL_R_TWI);
> > + sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN50I_H616_GPL_R_TWI);
> >
> > #else
> >
> > clock_twi_onoff(5, 1);
> > sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_H3_GPL_R_TWI);
next prev parent reply other threads:[~2021-01-04 18:36 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-03 9:26 [PATCH 00/17] sunxi: Introduce H616 support Jernej Skrabec
2021-01-03 9:26 ` [PATCH 01/17] sunxi: Add support for AXP305 PMIC Jernej Skrabec
2021-01-05 22:36 ` Jaehoon Chung
2021-01-06 10:11 ` André Przywara
2021-01-06 23:33 ` Jaehoon Chung
2021-01-07 9:49 ` André Przywara
2021-01-11 0:02 ` André Przywara
2021-01-11 1:32 ` Jaehoon Chung
2021-01-11 19:48 ` Jernej Škrabec
2021-01-03 9:26 ` [PATCH 02/17] sunxi: Introduce common symbol for H6 like SoCs Jernej Skrabec
2021-01-03 23:43 ` [linux-sunxi] " Samuel Holland
2021-01-04 10:35 ` André Przywara
2021-01-04 18:28 ` Jernej Škrabec
2021-01-11 0:13 ` André Przywara
2021-01-03 9:26 ` [PATCH 03/17] mmc: sunxi: Replace H6 ifdefs with H6 gen macro Jernej Skrabec
2021-01-11 0:13 ` André Przywara
2021-01-03 9:26 ` [PATCH 04/17] i2c: mvtwsi: sunxi: update macro Jernej Skrabec
2021-01-03 23:55 ` [linux-sunxi] " Samuel Holland
2021-01-04 5:57 ` Heiko Schocher
2021-01-03 9:26 ` [PATCH 05/17] sunxi: prcm: Add memory map for H6 like SoCs Jernej Skrabec
2021-01-04 0:03 ` [linux-sunxi] " Samuel Holland
2021-01-11 16:13 ` Jernej Škrabec
2021-01-03 9:26 ` [PATCH 06/17] sunxi: Add support for I2C on " Jernej Skrabec
2021-01-04 0:04 ` [linux-sunxi] " Samuel Holland
2021-01-03 9:26 ` [PATCH 07/17] sunxi: support loading with SPL > 32KB Jernej Skrabec
2021-01-04 2:02 ` [linux-sunxi] " Samuel Holland
2021-01-11 18:17 ` Jernej Škrabec
2021-01-03 9:26 ` [PATCH 08/17] sunxi: introduce support for H616 clocks Jernej Skrabec
2021-01-04 2:28 ` [linux-sunxi] " Samuel Holland
2021-01-03 9:26 ` [PATCH 09/17] sunxi: add support for H616 uart0 Jernej Skrabec
2021-01-04 2:30 ` [linux-sunxi] " Samuel Holland
2021-01-03 9:26 ` [PATCH 10/17] sunxi: add support for R_I2C on H616 Jernej Skrabec
2021-01-04 2:33 ` [linux-sunxi] " Samuel Holland
2021-01-04 18:36 ` Jernej Škrabec [this message]
2021-01-03 9:26 ` [PATCH 11/17] sunxi: Add H616 DRAM support Jernej Skrabec
2021-01-04 2:39 ` [linux-sunxi] " Samuel Holland
2021-01-04 18:39 ` Jernej Škrabec
2021-01-05 3:14 ` Samuel Holland
2021-01-03 9:26 ` [PATCH 12/17] sunxi: Add support for H616 SoC Jernej Skrabec
2021-01-04 2:47 ` [linux-sunxi] " Samuel Holland
2021-01-04 18:43 ` Jernej Škrabec
2021-01-03 9:26 ` [PATCH 13/17] net: sun8i-emac: Determine pinmux based on SoC, not EMAC type Jernej Skrabec
2021-01-03 9:26 ` [PATCH 14/17] arm: sunxi: add initial H616 DTSI and headers Jernej Skrabec
2021-01-03 9:26 ` [PATCH 15/17] sunxi: gpio: introduce compatible for H616 Jernej Skrabec
2021-01-11 0:36 ` André Przywara
2021-01-03 9:26 ` [PATCH 16/17] clk: sunxi: Add support for H616 clocks Jernej Skrabec
2021-01-11 0:44 ` André Przywara
2021-01-03 9:26 ` [PATCH 17/17] sunxi: Add support for OrangePi Zero2 Jernej Skrabec
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=4107316.5SLNN0qdvM@jernej-laptop \
--to=jernej.skrabec@siol.net \
--cc=u-boot@lists.denx.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