Porting U-Boot to a QCA9531 board?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting U-Boot to a QCA9531 board?

Wambui Karuga
Hi

I'm trying to port the latest version of U-Boot (master branch) to a QCA9531
board, based on the QCA ap147 reference design which itself is OS image
compatible with the ap143 target of mainline U-Boot. The board comes with the
closed-source BREED bootloader from the manufacturer but it also fully works
with the open source U-Boot-mod by Pepe2k.

The board comes with a Chaos Calmer ar71xx mach based OpenWRT image which we
have upgraded to a fully working ath79 dts based image running the 5.4 Linux
kernel.

For U-Boot, initially we have modified the existing ap143 target and found the
following results which are consistent across U-Boot releases 2016-07, 2019-10,
2020-04 and latest master:
- Ethernet support is not working within U-Boot. Detection of the ethernet
  device fails with:  "Net: No ethernet found". The troubleshooting tip found
  here https://www.denx.de/wiki/view/DULG/NetNoEthernetFound doesn't resolve the
  problem
- With OpenWrt 18.06 (Kernel 4.4 - ar71xx mach target) and 19.07 (kernel 4.14 -
  ath79 dts target) the boot process doesn't complete and stalls at [link]. With
  OpenWrt Master (5.4) the boot process completes but the system displays the
  following issues: -- Within OpenWrt the watchdog timer (usually on GPIO 2)
  does not respond to writes on sysfs and therefore the device reboots every 4
  minutes -- The second USB hub on the board is not detected by OpenWrt during
  boot and therefore some devices do not come up on the operating system such as
  the modem.

My working config file is here[1], my device tree is here[2], the board file
here[3]  and my defconfig can be found here[4].

Am I running into an obvious oversight? What are the next steps I need to take
to get my port working?

Thanks,
wambui karuga
[1] https://github.com/wambu-i/u-boot/blob/getbox/include/configs/get-box.h
[2] https://github.com/wambu-i/u-boot/blob/getbox/arch/mips/dts/jangala,get-box.dts
[3] https://github.com/wambu-i/u-boot/blob/getbox/board/jangala/get-box/get-box.c
[4] https://github.com/wambu-i/u-boot/blob/getbox/configs/get-box_defconfig
Reply | Threaded
Open this post in threaded view
|

Re: Porting U-Boot to a QCA9531 board?

Heinrich Schuchardt-2
On 18.11.20 11:34, Wambui Karuga wrote:

> Hi
>
> I'm trying to port the latest version of U-Boot (master branch) to a QCA9531
> board, based on the QCA ap147 reference design which itself is OS image
> compatible with the ap143 target of mainline U-Boot. The board comes with the
> closed-source BREED bootloader from the manufacturer but it also fully works
> with the open source U-Boot-mod by Pepe2k.
>
> The board comes with a Chaos Calmer ar71xx mach based OpenWRT image which we
> have upgraded to a fully working ath79 dts based image running the 5.4 Linux
> kernel.
>
> For U-Boot, initially we have modified the existing ap143 target and found the
> following results which are consistent across U-Boot releases 2016-07, 2019-10,
> 2020-04 and latest master:
> - Ethernet support is not working within U-Boot. Detection of the ethernet
>   device fails with:  "Net: No ethernet found". The troubleshooting tip found
>   here https://www.denx.de/wiki/view/DULG/NetNoEthernetFound doesn't resolve the
>   problem

Your dts has this line: #include "qca953x.dtsi"

arch/mips/dts/qca953x.dtsi has

                        gmac1: eth1@0x1a000000 {
                                compatible = "qca,ag953x-mac";
                                reg = <0x1a000000 0x200>;
                                phy = <&phy0>;
                                phy-mode = "rgmii";


The driver with the same compatible string is drivers/net/ag7xxx.c.

The Makefile has:

drivers/net/Makefile:7:obj-$(CONFIG_AG7XXX) += ag7xxx.o

The driver will not be compiled because your config does not select
CONFIG_AG7XXX.

> - With OpenWrt 18.06 (Kernel 4.4 - ar71xx mach target) and 19.07 (kernel 4.14 -
>   ath79 dts target) the boot process doesn't complete and stalls at [link]. With
>   OpenWrt Master (5.4) the boot process completes but the system displays the
>   following issues: -- Within OpenWrt the watchdog timer (usually on GPIO 2)
>   does not respond to writes on sysfs and therefore the device reboots every 4
>   minutes -- The second USB hub on the board is not detected by OpenWrt during
>   boot and therefore some devices do not come up on the operating system such as
>   the modem.

These seem to be questions about Linux configuration, not U-Boot.

Cc: Daniel Schwierzeck <[hidden email]> (maintainer:MIPS)

Best regards

Heinrich

>
> My working config file is here[1], my device tree is here[2], the board file
> here[3]  and my defconfig can be found here[4].
>
> Am I running into an obvious oversight? What are the next steps I need to take
> to get my port working?
>
> Thanks,
> wambui karuga
> [1] https://github.com/wambu-i/u-boot/blob/getbox/include/configs/get-box.h
> [2] https://github.com/wambu-i/u-boot/blob/getbox/arch/mips/dts/jangala,get-box.dts
> [3] https://github.com/wambu-i/u-boot/blob/getbox/board/jangala/get-box/get-box.c
> [4] https://github.com/wambu-i/u-boot/blob/getbox/configs/get-box_defconfig
>

Reply | Threaded
Open this post in threaded view
|

Re: Porting U-Boot to a QCA9531 board?

Richard Thanki
Hi Heinrich

> On 18 Nov 2020, at 17:27, Heinrich Schuchardt <[hidden email]> wrote:
>
>
> The driver will not be compiled because your config does not select
> CONFIG_AG7XXX.

So clear when you point it out. I’ll modify this, and retest, thank you.

>
>> - With OpenWrt 18.06 (Kernel 4.4 - ar71xx mach target) and 19.07 (kernel 4.14 -
>>  ath79 dts target) the boot process doesn't complete and stalls at [link]. With
>>  OpenWrt Master (5.4) the boot process completes but the system displays the
>>  following issues: -- Within OpenWrt the watchdog timer (usually on GPIO 2)
>>  does not respond to writes on sysfs and therefore the device reboots every 4
>>  minutes -- The second USB hub on the board is not detected by OpenWrt during
>>  boot and therefore some devices do not come up on the operating system such as
>>  the modem.
>
> These seem to be questions about Linux configuration, not U-Boot.

Sorry, I think we phrased this badly. We only get these issues when using mainline U-Boot
and not a) the manufacturer default bootloader or b) the Pepe2K mod - both of which work
perfectly with our test images. In each case we’re using the same OpenWrt OS images
we’ve built ourselves between the tests with these different botloaders.

I guess the deeper understanding we’re trying to get to is the proper relationship between
bootloader and Linux:

- Why would the very same OpenWrt image be able to find and use the USB hub or make
use of GPIO 2 using these other two U-Boot variants but not mainline?
- Does this point to us not performing important set-up steps in U-Boot or does our problem
  lie in our OpenWrt setup? (If the latter, why do these other U-Boots work properly?)
- Are we stumbling into a common beginners’ problem?

All the best

Rich


>
> Cc: Daniel Schwierzeck <[hidden email]> (maintainer:MIPS)
>
> Best regards
>
> Heinrich
>
>>
>> My working config file is here[1], my device tree is here[2], the board file
>> here[3]  and my defconfig can be found here[4].
>>
>> Am I running into an obvious oversight? What are the next steps I need to take
>> to get my port working?
>>
>> Thanks,
>> wambui karuga
>> [1] https://github.com/wambu-i/u-boot/blob/getbox/include/configs/get-box.h
>> [2] https://github.com/wambu-i/u-boot/blob/getbox/arch/mips/dts/jangala,get-box.dts
>> [3] https://github.com/wambu-i/u-boot/blob/getbox/board/jangala/get-box/get-box.c
>> [4] https://github.com/wambu-i/u-boot/blob/getbox/configs/get-box_defconfig
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Porting U-Boot to a QCA9531 board?

Richard Thanki
In reply to this post by Heinrich Schuchardt-2
Hi Heinrich

> On 18 Nov 2020, at 17:27, Heinrich Schuchardt <[hidden email] <mailto:[hidden email]>> wrote:
>
>
> The driver will not be compiled because your config does not select
> CONFIG_AG7XXX.

So clear when you point it out. I’ll modify this, and retest, thank you.

>
>> - With OpenWrt 18.06 (Kernel 4.4 - ar71xx mach target) and 19.07 (kernel 4.14 -
>> ath79 dts target) the boot process doesn't complete and stalls at [link]. With
>> OpenWrt Master (5.4) the boot process completes but the system displays the
>> following issues: -- Within OpenWrt the watchdog timer (usually on GPIO 2)
>> does not respond to writes on sysfs and therefore the device reboots every 4
>> minutes -- The second USB hub on the board is not detected by OpenWrt during
>> boot and therefore some devices do not come up on the operating system such as
>> the modem.
>
> These seem to be questions about Linux configuration, not U-Boot.

Sorry, I think we phrased this badly. We only get these issues when using mainline U-Boot
and not a) the manufacturer default bootloader or b) the Pepe2K mod - both of which work
perfectly with our test images. In each case we’re using the same OpenWrt OS images
we’ve built ourselves between the tests with these different botloaders.

I guess the deeper understanding we’re trying to get to is the proper relationship between
bootloader and Linux:

- Why would the very same OpenWrt image be able to find and use the USB hub or make
use of GPIO 2 using these other two U-Boot variants but not mainline?
- Does this point to us not performing important set-up steps in U-Boot or does our problem
 lie in our OpenWrt setup? (If the latter, why do these other U-Boots work properly?)
- Are we stumbling into a common beginners’ problem?

Thanks again

Rich


>
> Cc: Daniel Schwierzeck <[hidden email] <mailto:[hidden email]>> (maintainer:MIPS)
>
> Best regards
>
> Heinrich
>
>>
>> My working config file is here[1], my device tree is here[2], the board file
>> here[3]  and my defconfig can be found here[4].
>>
>> Am I running into an obvious oversight? What are the next steps I need to take
>> to get my port working?
>>
>> Thanks,
>> wambui karuga
>> [1] https://github.com/wambu-i/u-boot/blob/getbox/include/configs/get-box.h
>> [2] https://github.com/wambu-i/u-boot/blob/getbox/arch/mips/dts/jangala,get-box.dts
>> [3] https://github.com/wambu-i/u-boot/blob/getbox/board/jangala/get-box/get-box.c
>> [4] https://github.com/wambu-i/u-boot/blob/getbox/configs/get-box_defconfig