[PATCH 00/11] Add support for SUNIV and F1C100s.

Jesse Taube mr.bossman075 at gmail.com
Thu Jan 20 19:34:49 CET 2022



On 1/20/22 13:12, Chris Morgan wrote:
> On Sat, Jan 15, 2022 at 04:02:05PM -0500, Jesse Taube wrote:
>>
>>
>> On 1/10/22 00:13, Tnze Jdao wrote:
>>> I tested this patch and tried to run it on my LicheePi Nano. It works, but I found there is WARNINGs when compile the code:
>>> -------
>>> include/configs/sunxi-common.h:128:0: warning: "CONFIG_ENV_SECT_SIZE" redefined
>>>    #define CONFIG_ENV_SECT_SIZE 0x1000
>> Ah I will move this it should be moved to defconfig thx for pointing this
>> out.
>>>
>>> In file included from ././include/linux/kconfig.h:4:0,
>>>                    from <command-line>:0:
>>> include/generated/autoconf.h:296:0: note: this is the location of the previous definition
>>>    #define CONFIG_ENV_SECT_SIZE 0x1
>> Not entirely sure how it got defined here, it doesn't get defined in my
>> generated config.
>>>
>>> In file included from include/configs/suniv.h:12:0,
>>>                    from include/config.h:4,
>>>                    from include/common.h:16,
>>>                    from lib/slre.c:24:
>>> --------
>>> And I think the problem is the CONFIG_ENV_SECT_SIZE should be (and required to) defined in the config file rather than at include/configs/sunxi-common.h:128
>>
>> Im sorry for the late reply the email got lost.
> 
> I have tested the patch on master (pulled 2022-01-20).
> licheepi_nano_defconfig compiles and builds just fine for me, and I am
> able to run it on the device without incident via FEL mode.
> 
> licheepi_nano_spiflash_defconfig however gives me multiple warnings,
> and when the warnings are addressed it boots but gives me errors
> regarding the SPI controller in U-Boot.
> 
> "make licheepi_nano_spiflash_defconfig" warning:
> WARNING: unmet direct dependencies detected for SPI_MEM
>    Depends on [n]: SPI [=n]
>    Selected by [y]:
>    - SPI_FLASH [=y]
> 
> When I specify CONFIG_SPI=y I get the following when I try to compile:
> Environment Sector-Size (ENV_SECT_SIZE) [] (NEW)
> When I provide a value of 0x1000 which corresponds to the block size
> of the SPI chip I use I then get the following warnings repeated and it
> fails to compile:
> include/configs/sunxi-common.h:60: warning: "CONFIG_SYS_LOAD_ADDR" redefined
> 
> When I work through the remaining errors and get it to compile, I get
> this error in U-Boot when attempting to use the SPI controller:
> sun4i_spi spi at 1c05000: failed to get ahb clock
> 
> I presume the issue is that the defconfig is both incomplete for the
> SPI booting method and the SUN6I_SPI which is specified in the SPI
> defconfig is not in mainline yet.
It has under a different name i have yet to make it work though.
> 
> Until the SPI driver is present it's probably best to just drop the
> licheepi_nano_spiflash_defconfig.
> 
> Tested-By: Chris Morgan <macromorgan at hotmail.com>
Thank you for testing!!

I will be fixing the issues brought up thx for the input.
The issues are DRAM using the device tree.
Clocks in the device tree.
Pinmuxing doesn't work for device tree.
And SPI boot.

Most of the issues im encountering stem from SUNXI being a mix of DT and 
non-DT code. which is frustrating to work with.

Thanks,
	Jesse Taube.



More information about the U-Boot mailing list