Re: Issues with bcm2835-host: let firmware manage the clock divisor

2023-05-28 Thread Nuno Gonçalves
On Tue, May 23, 2023 at 1:16 PM Stefan Wahren 
wrote:

> Because we stuck in this discussion, can you please provide more
> information to reproduce this issue?
>
> What is the exact behavior based on debug UART and LED when Linux fails
> to start from eMMC (timeout, SoC lockup, ...)?
>

Kernel says:

sdhost-bcm2835 3f202000.mmc: loaded - DMA enabled (>1)
Waiting for root device /dev/mmcblk0p3...
sdhost-bcm2835 3f202000.mmc: sdhost_busy_irq: intmask 0410

Other boot messages continue, but the rootfs is never found so eventually
it hangs.


>
> Does your boot setup (U-Boot) based on Device tree (Mainline or RPF) or
> EFI?
>
>
DT mainline with some aliases and __overrides__ for the firmware to set up
uart and watchdog.


> Which Raspberry firmware version are you using?
>

Buildroot default, 3f20b832b27cd730deb6419b570f31a98167eef6 (Jan 17, 2022)


> What settings of config.txt do you use?
>

arm_64bit=1
gpu_freq=250
gpu_mem=16
device_tree=bcm2837-rpi-cm3-io3.dtb
dtoverlay=uart1,txd1_pin=32,rxd1_pin=33
dtparam=uart0=off
dtparam=watchdog
kernel=u-boot.bin


>
> Are you able to reproduce this issue on other RPi variants?
>

I found the issue on the CM3 and CM3+.

In addition I tested the RPi 1 Model A and it is NOT affected.

Thanks


Re: Issues with bcm2835-host: let firmware manage the clock divisor

2023-05-15 Thread Nuno Gonçalves
On Sun, May 14, 2023 at 7:54 PM Stefan Wahren 
wrote:

> Yes, this is very likely. But how can U-Boot assume that at least Linux
> is booting afterwards. How about the other OSes with devicetree support?
>

I don't know what other OSes the patch author have tested it and if there
was any good argument for breaking Linux Mainline.

Thanks,
Nuno


Issues with bcm2835-host: let firmware manage the clock divisor

2023-05-14 Thread Nuno Gonçalves
Hi, after 85bdd28d2bb0827f311913e00e4e338f8e4e6565 (bcm2835-host: let
firmware manage the clock divisor), Linux fails to start the eMMC memory on
a CM3 most times (but it sometimes also works).

I am using Linux mainline and I wonder if this assumes the change in which
this was based also needs to be used in Linux?

In that case I would think it's fair to revert until it comes to mainline.

Thanks,
Nuno


SYS_MMC_ENV_DEV wrong depend?

2022-01-09 Thread Nuno Gonçalves
Hi Tom,

With 7d080773347c1f6e0e896d9284134a2a411155d6 you committed that
config SYS_MMC_ENV_DEV depends on ENV_IS_IN_FAT (in addition to
others). I don't see how they are related. Maybe this was a bad copy
and paste?

When ENV_IS_IN_FAT then ENV_FAT_INTERFACE and ENV_FAT_DEVICE_AND_PART
are used instead.

Thanks,
Nuno


Re: regression with sunxi: psci: avoid error address-of-packed-member

2020-03-12 Thread Nuno Gonçalves
Hi,

I found that the commit was not reverted yet. Am I missing something?
Is this code working in any sunxi H2+/H3?

Thanks,
Nuno

On Fri, Jan 10, 2020 at 6:54 PM Nuno Gonçalves  wrote:
>
> On Fri, Jan 10, 2020 at 6:51 PM Heinrich Schuchardt  
> wrote:
> > On 1/10/20 4:30 PM, Nuno Gonçalves wrote:
> > > While this commit changed the order of clamp_set fixing it did not
> > > solve the problem for me.
> >
> > Do you mean that both with and without the patch your system does not start?
>
> Affirm. Even after restoring the clamp_set order it did not work for me.
>
> Thanks


Re: regression with sunxi: psci: avoid error address-of-packed-member

2020-01-11 Thread Nuno Gonçalves
On Fri, Jan 10, 2020 at 6:51 PM Heinrich Schuchardt  wrote:
> On 1/10/20 4:30 PM, Nuno Gonçalves wrote:
> > While this commit changed the order of clamp_set fixing it did not
> > solve the problem for me.
>
> Do you mean that both with and without the patch your system does not start?

Affirm. Even after restoring the clamp_set order it did not work for me.

Thanks


regression with sunxi: psci: avoid error address-of-packed-member

2020-01-11 Thread Nuno Gonçalves
After [1] on a Orange Pi Zero I hang on Starting kernel.

While this commit changed the order of clamp_set fixing it did not
solve the problem for me. It appears that the problem is simply that a
memcpy to sunxi_prcm_reg.cpu_pwroff does not have the same behaviour
as writing a single bit.

Thanks,
Nuno

[1] 
https://github.com/u-boot/u-boot/commit/9bd34a69a453d409792e08c00953ce8862145e65


[U-Boot] Regression after "distro: not taint environment variables if possible"

2019-07-10 Thread Nuno Gonçalves
Hi,

I found out that my Beaglebone didn't boot after:

https://github.com/u-boot/u-boot/commit/13dd6665ed18f72380ca596931d609bc108d4b82

I digged out the reason that this patch makes devnum a local variable,
and it ends up shadowed by other code that sets devnum as a env
variable.

For example to boot on the beaglebone I had to remove the setenv as in
the patch below.

This only fixes for my board. Many other will likely have regressions.

Fixing it for all boards in a reliable way I think is very complex,
unless the strategy is to wait for board maintainers to fix it as they
need it, but I wonder how many latent bugs this will create for corner
boot cases.

Maybe this change is not worth it?

Thanks,
Nuno

diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h
index 785fc15345..bb4af0a3d5 100644
--- a/include/environment/ti/mmc.h
+++ b/include/environment/ti/mmc.h
@@ -56,7 +56,7 @@
"bootz; " \
"fi;\0" \
"mmcboot=mmc dev ${mmcdev}; " \
-   "setenv devnum ${mmcdev}; " \
+   "devnum=${mmcdev}; " \
"setenv devtype mmc; " \
"if mmc rescan; then " \
"echo SD/MMC found on device ${mmcdev};" \
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sunxi: USB gadget does not work on H2+ after 92a30692b2b18f45aae6fdaae38d67ed03dd2d11

2018-08-20 Thread Nuno Gonçalves
On Sat, Aug 18, 2018 at 8:08 PM Jagan Teki  wrote:
>
> On Sat, Aug 18, 2018 at 11:35 PM, Nuno Gonçalves  wrote:
> > With the basic defconfig + CMD_USB_MASS_STORAGE, I don't get the driver to 
> > load:
> >
> > Controller uninitialized
> > g_dnl_register: failed!, error: -6
> > g_dnl_register failed

This error appears when CONFIG_USB_ETHER is not set. For some reason I
can't enable UMS without USB_ETHER (probably because UMS is not DM
aware).

Regarding the bug reported, it happens because after your commit
USB_EHCI_HCD and USB_KEYBOARD are required to be set.

So, with USB_ETHER, USB_KEYBOARD and USB_EHCI_HCD, it works. Except
for the last not sure if this is as expected.

Thanks,
Nuno
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sunxi: USB gadget does not work on H2+ after 92a30692b2b18f45aae6fdaae38d67ed03dd2d11

2018-08-19 Thread Nuno Gonçalves
With the basic defconfig + CMD_USB_MASS_STORAGE, I don't get the driver to load:

Controller uninitialized
g_dnl_register: failed!, error: -6
g_dnl_register failed

I just would like to confirm you have nothing else added...

Thanks!
On Sat, Aug 18, 2018 at 7:42 PM Jagan Teki  wrote:
>
> On Sat, Aug 18, 2018 at 10:05 PM, Nuno Gonçalves  wrote:
> > On Sat, Aug 18, 2018 at 6:29 PM Jagan Teki 
> > wrote:
> >>
> >> See the board I've mentioned, it's Sinovoip_BPI_M2_Plus_defconfig
> >
> >
> > That is the reason I asked, since that defconfig does not have
> > CONFIG_CMD_USB_MASS_STORAGE. Your test is done with something else.
>
> We, sunxi treated this CONFIG as user defined, not giving room to add
> it on defconfig. I enabled via menuconfig.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sunxi: USB gadget does not work on H2+ after 92a30692b2b18f45aae6fdaae38d67ed03dd2d11

2018-08-19 Thread Nuno Gonçalves
On Sat, Aug 18, 2018 at 6:29 PM Jagan Teki 
wrote:

> See the board I've mentioned, it's Sinovoip_BPI_M2_Plus_defconfig
>

That is the reason I asked, since that defconfig does not
have CONFIG_CMD_USB_MASS_STORAGE. Your test is done with something else.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sunxi: USB gadget does not work on H2+ after 92a30692b2b18f45aae6fdaae38d67ed03dd2d11

2018-08-19 Thread Nuno Gonçalves
On Sat, Aug 18, 2018 at 1:41 PM Jagan Teki 
wrote:

> Here is the steps with UMS on BPI-M2+ which is H3 board (USB is similar to
> H2+)
>

What defconfig are you using for this test?

Thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sunxi: USB gadget does not work on H2+ after 92a30692b2b18f45aae6fdaae38d67ed03dd2d11

2018-08-17 Thread Nuno Gonçalves
This can be because UMS is not DM aware?

On Fri, Aug 17, 2018 at 2:02 PM Nuno Gonçalves  wrote:

> This test is on 2018.09-rc2 with UMS enabled.
>
> With your patch, I get this dmesg on the host:
>
> [20121.718226] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
> [20122.578151] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
> [20122.578320] usb 1-4-port4: attempt power cycle
> [20123.750104] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
> [20124.602034] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
> [20124.602190] usb 1-4-port4: unable to enumerate USB device
>
> u-boot console is the same, including loading the gadget:
>
> Allwinner mUSB OTG (Peripheral)
>
> If you tell me how you tested USB Gadget to work, I will reproduce your
> test locally to confirm the issue.
>
> Thanks,
> Nuno
>
>
> On Fri, Aug 17, 2018 at 1:38 PM Jagan Teki 
> wrote:
>
>> On Mon, Aug 13, 2018 at 3:59 PM, Nuno Gonçalves 
>> wrote:
>> > After this commit usb gadget does not work anymore for me on the Orange
>> Pi
>> > Zero (H2+).
>>
>> Please send log or full information?
>>
>> Jagan.
>>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] sunxi: USB gadget does not work on H2+ after 92a30692b2b18f45aae6fdaae38d67ed03dd2d11

2018-08-17 Thread Nuno Gonçalves
This test is on 2018.09-rc2 with UMS enabled.

With your patch, I get this dmesg on the host:

[20121.718226] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
[20122.578151] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
[20122.578320] usb 1-4-port4: attempt power cycle
[20123.750104] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
[20124.602034] usb 1-4-port4: Cannot enable. Maybe the USB cable is bad?
[20124.602190] usb 1-4-port4: unable to enumerate USB device

u-boot console is the same, including loading the gadget:

Allwinner mUSB OTG (Peripheral)

If you tell me how you tested USB Gadget to work, I will reproduce your
test locally to confirm the issue.

Thanks,
Nuno


On Fri, Aug 17, 2018 at 1:38 PM Jagan Teki 
wrote:

> On Mon, Aug 13, 2018 at 3:59 PM, Nuno Gonçalves  wrote:
> > After this commit usb gadget does not work anymore for me on the Orange
> Pi
> > Zero (H2+).
>
> Please send log or full information?
>
> Jagan.
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] sunxi: USB gadget does not work on H2+ after 92a30692b2b18f45aae6fdaae38d67ed03dd2d11

2018-08-13 Thread Nuno Gonçalves
After this commit usb gadget does not work anymore for me on the Orange Pi
Zero (H2+).

Thanks,
Nuno

commit 92a30692b2b18f45aae6fdaae38d67ed03dd2d11
Author: Jagan Teki 
Date:   Fri Jul 20 12:34:20 2018 +0530

phy: sun4i-usb: Call phy_passby even for PHY#0

On newer Allwinner SoC, there is a pair of EHCI/OHCI USB hosts
for OTG host mode. USB PHY passby must be configured for its
corresponding PHY. so we can call for PHY#0. on the other hand
in past usb-phy code the same thing can be restricted for
Lower SoC's, other than H3/H5/A64.

Now there is no need to restrict usb passby since the phy driver
is DT enabled, and the respective phy calls will trigger based
DT information initiated by the drivers.

Signed-off-by: Jagan Teki 
Tested-by: Jagan Teki 

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c
b/drivers/phy/allwinner/phy-sun4i-usb.c
index 2b3cf48025..01f585a283 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -300,8 +300,7 @@ static int sun4i_usb_phy_init(struct phy *phy)
data->cfg->disc_thresh,
PHY_DISCON_TH_LEN);
}

-   if (usb_phy->id != 0)
-   sun4i_usb_phy_passby(phy, true);
+   sun4i_usb_phy_passby(phy, true);

sun4i_usb_phy0_reroute(data, true);
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] sunxi: add I2C nodes present on Orange Pi >ero

2018-01-24 Thread Nuno Gonçalves
On Wed, Jan 24, 2018 at 11:58 AM, Maxime Ripard
 wrote:
> In particular, you should describe what these i2c buses are used for.

They are available on the pins exclusively. I could add the pinout for
this board for sure. But maybe it doesn't make sense in this case to
activate them, as without external hardware they have no use.

Thanks,
Nuno
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] sunxi: add DM I2C support for H3/H5

2018-01-24 Thread Nuno Gonçalves
On Wed, Jan 24, 2018 at 11:57 AM, Maxime Ripard
 wrote:
> Why don't you just synchronize the DT with Linux?

Didn't know that was the usual approach. But in Linux the files have a
different structure, for example there is sunxi-h3-h5.dtsi.

Thanks,
Nuno
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] sunxi: fix i2c support for sunxi H3/H5

2018-01-22 Thread Nuno Gonçalves
I have tried for a while to make it work with DM_I2C but so far nothing.

=> i2c bus
Bus -1: i2c@01c2ac00
Bus -1: i2c@01c2b000
=> dm tree
 Class  Probed  Driver  Name

 root   [ + ]   root_drive  root_driver
 simple_bus [ + ]   generic_si  `-- soc
 usb[ + ]   ehci_sunxi  |-- usb@01c1b000
 usb_hub[ + ]   usb_hub |   `-- usb_hub
 usb[ + ]   ohci_sunxi  |-- usb@01c1b400
 gpio   [ + ]   gpio_sunxi  |-- pinctrl@01c20800
 gpio   [ + ]   gpio_sunxi  |   |-- PA
 gpio   [ + ]   gpio_sunxi  |   |-- PB
 gpio   [ + ]   gpio_sunxi  |   |-- PC
 gpio   [ + ]   gpio_sunxi  |   |-- PD
 gpio   [ + ]   gpio_sunxi  |   |-- PE
 gpio   [ + ]   gpio_sunxi  |   |-- PF
 gpio   [ + ]   gpio_sunxi  |   |-- PG
 gpio   [ + ]   gpio_sunxi  |   |-- PH
 gpio   [ + ]   gpio_sunxi  |   `-- PI
 serial [ + ]   ns16550_se  |-- serial@01c28000
 i2c[   ]   i2c_mvtwsi  |-- i2c@01c2ac00
 i2c[   ]   i2c_mvtwsi  |-- i2c@01c2b000
 eth[ + ]   eth_sun8i_  |-- ethernet@1c3
 gpio   [ + ]   gpio_sunxi  `-- pinctrl@01f02c00
 gpio   [ + ]   gpio_sunxi  `-- PL

Is there any typical cause for this driver not to be probed?

Thanks

On Mon, Jan 22, 2018 at 10:18 AM, Nuno Gonçalves  wrote:
> On Fri, Jan 19, 2018 at 9:35 PM, Jernej Škrabec  
> wrote:
>> Hi,
>>
>> Dne petek, 19. januar 2018 ob 19:38:52 CET je Nuno Gonçalves napisal(a):
>>> Sorry, there is only 1 patch in this series.
>>>
>>> I would like comments regarding removing DM_I2C for MACH_SUNXI_H3_H5,
>>> as I didn't found a reason for it to be defined.
>>
>> there is good reason to be there. When H3/H5 board has DE2/HDMI enabled,
>> warning is shown when configuring, if DM_I2C is not selected. Since there
>> should be no warning, DM_I2C has to stay.
>>
>> This means that whatever you want to have attached to I2C, you have to have 
>> an
>> entry in DT for it. Since there is no DM pinctrl driver, you have to put code
>> somewhere, like you already done.
>>
>> Besides, U-Boot wants to migrate towards DM drivers, no other way around. 
>> Last
>> time I checked, DM I2C driver for H3/H5 should work, although it wasn't
>> thoroughly tested from my side. So if there are issues with DM I2C driver, 
>> you
>> have to fix it.
>>
>> Best regards,
>> Jernej
>>
>
> Thanks Jernej. In fact I didn't manage to get it working with DM_I2C,
> even after adding the devices to the DT.
>
> Maybe you can give me some hints to bring it to work, as I am a uboot ousider.
>
> Is DM_I2C_COMPAT supposed to be defined?
>
> The i2c device should be in the DT but since there is no pinctrl
> driver I must also include the  "sunxi_gpio_set_cfgpin()" already in
> my patch?
>
> Thanks,
> Nuno
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] sunxi: fix i2c support for sunxi H3/H5

2018-01-22 Thread Nuno Gonçalves
On Fri, Jan 19, 2018 at 9:35 PM, Jernej Škrabec  wrote:
> Hi,
>
> Dne petek, 19. januar 2018 ob 19:38:52 CET je Nuno Gonçalves napisal(a):
>> Sorry, there is only 1 patch in this series.
>>
>> I would like comments regarding removing DM_I2C for MACH_SUNXI_H3_H5,
>> as I didn't found a reason for it to be defined.
>
> there is good reason to be there. When H3/H5 board has DE2/HDMI enabled,
> warning is shown when configuring, if DM_I2C is not selected. Since there
> should be no warning, DM_I2C has to stay.
>
> This means that whatever you want to have attached to I2C, you have to have an
> entry in DT for it. Since there is no DM pinctrl driver, you have to put code
> somewhere, like you already done.
>
> Besides, U-Boot wants to migrate towards DM drivers, no other way around. Last
> time I checked, DM I2C driver for H3/H5 should work, although it wasn't
> thoroughly tested from my side. So if there are issues with DM I2C driver, you
> have to fix it.
>
> Best regards,
> Jernej
>

Thanks Jernej. In fact I didn't manage to get it working with DM_I2C,
even after adding the devices to the DT.

Maybe you can give me some hints to bring it to work, as I am a uboot ousider.

Is DM_I2C_COMPAT supposed to be defined?

The i2c device should be in the DT but since there is no pinctrl
driver I must also include the  "sunxi_gpio_set_cfgpin()" already in
my patch?

Thanks,
Nuno
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] sunxi: fix i2c support for sunxi H3/H5

2018-01-19 Thread Nuno Gonçalves
Sorry, there is only 1 patch in this series.

I would like comments regarding removing DM_I2C for MACH_SUNXI_H3_H5,
as I didn't found a reason for it to be defined.

Thanks,
Nuno

On Fri, Jan 19, 2018 at 7:35 PM, Nuno Goncalves  wrote:
> Tested to work in a Orange Pi Zero (H2+/H3), and checked against H5 datasheet.
>
> Signed-off-by: Nuno Goncalves 
> ---
>  arch/arm/include/asm/arch-sunxi/gpio.h |  2 ++
>  arch/arm/mach-sunxi/Kconfig|  1 -
>  board/sunxi/board.c| 10 +-
>  3 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h 
> b/arch/arm/include/asm/arch-sunxi/gpio.h
> index 24f85206c8..52884886d7 100644
> --- a/arch/arm/include/asm/arch-sunxi/gpio.h
> +++ b/arch/arm/include/asm/arch-sunxi/gpio.h
> @@ -149,6 +149,8 @@ enum sunxi_gpio_number {
>  #define SUN6I_GPA_SDC2 5
>  #define SUN6I_GPA_SDC3 4
>  #define SUN8I_H3_GPA_UART0 2
> +#define SUN8I_H3_H5_GPA_TWI0   2
> +#define SUN8I_H3_H5_GPA_TWI1   3
>
>  #define SUN4I_GPB_PWM  2
>  #define SUN4I_GPB_TWI0 2
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index 1fededd0a3..a2a8599165 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -56,7 +56,6 @@ endif
>
>  config MACH_SUNXI_H3_H5
> bool
> -   select DM_I2C
> select SUNXI_DE2
> select SUNXI_DRAM_DW
> select SUNXI_DRAM_DW_32BIT
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index dcacdf3e62..6b55aef202 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -93,6 +93,10 @@ void i2c_init_board(void)
> sunxi_gpio_set_cfgpin(SUNXI_GPH(14), SUN6I_GPH_TWI0);
> sunxi_gpio_set_cfgpin(SUNXI_GPH(15), SUN6I_GPH_TWI0);
> clock_twi_onoff(0, 1);
> +#elif defined(CONFIG_MACH_SUNXI_H3_H5)
> +   sunxi_gpio_set_cfgpin(SUNXI_GPA(11), SUN8I_H3_H5_GPA_TWI0);
> +   sunxi_gpio_set_cfgpin(SUNXI_GPA(12), SUN8I_H3_H5_GPA_TWI0);
> +   clock_twi_onoff(0, 1);
>  #elif defined(CONFIG_MACH_SUN8I)
> sunxi_gpio_set_cfgpin(SUNXI_GPH(2), SUN8I_GPH_TWI0);
> sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN8I_GPH_TWI0);
> @@ -115,6 +119,10 @@ void i2c_init_board(void)
> sunxi_gpio_set_cfgpin(SUNXI_GPH(16), SUN6I_GPH_TWI1);
> sunxi_gpio_set_cfgpin(SUNXI_GPH(17), SUN6I_GPH_TWI1);
> clock_twi_onoff(1, 1);
> +#elif defined(CONFIG_MACH_SUNXI_H3_H5)
> +   sunxi_gpio_set_cfgpin(SUNXI_GPA(18), SUN8I_H3_H5_GPA_TWI1);
> +   sunxi_gpio_set_cfgpin(SUNXI_GPA(19), SUN8I_H3_H5_GPA_TWI1);
> +   clock_twi_onoff(1, 1);
>  #elif defined(CONFIG_MACH_SUN8I)
> sunxi_gpio_set_cfgpin(SUNXI_GPH(4), SUN8I_GPH_TWI1);
> sunxi_gpio_set_cfgpin(SUNXI_GPH(5), SUN8I_GPH_TWI1);
> @@ -137,7 +145,7 @@ void i2c_init_board(void)
> sunxi_gpio_set_cfgpin(SUNXI_GPH(18), SUN6I_GPH_TWI2);
> sunxi_gpio_set_cfgpin(SUNXI_GPH(19), SUN6I_GPH_TWI2);
> clock_twi_onoff(2, 1);
> -#elif defined(CONFIG_MACH_SUN8I)
> +#elif defined(CONFIG_MACH_SUN8I) /* same for CONFIG_MACH_SUNXI_H3_H5 */
> sunxi_gpio_set_cfgpin(SUNXI_GPE(12), SUN8I_GPE_TWI2);
> sunxi_gpio_set_cfgpin(SUNXI_GPE(13), SUN8I_GPE_TWI2);
> clock_twi_onoff(2, 1);
> --
> 2.11.0
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot