[PATCH v1] rockchip: phycore_rk3288: remove phycore_init() function

Wadim Egorov W.Egorov at phytec.de
Wed Oct 19 12:45:11 CEST 2022


Am 19.10.22 um 00:35 schrieb Johan Jonker:
>
> On 10/18/22 13:43, Wadim Egorov wrote:
>> Hi Johan,
>>
>> thanks for this Patch. You were faster with the patch.
>>
>> I hope the size reduction is enough to make it buildable with Kevers patch.
> This patch only reduces the SPL size a few hundred bytes.
> U-boot tend to grow over time.

Yes, I noticed. This discussion is coming up often.

> To be future proof your SPL > TPL size must be significantly reduced (>kB) below this limit.

In other words this sounds like you are forcing RK3288 towards TPL. Is that the 
case?

But if I take a look at other RK3288 based boards, I can see that most boards do 
not select TPL.

As the "special" phyCORE-RK3288 SPL setup code is gone with this patch, our 
board now looks very similar to others from an SPL perspective.
With this fact, other non TPL RK3288 boards should have exactly the same size 
issue. How is this handled for them?

> Only someone with hardware can check that.
> People with a recent DT are unable to sync from Linux, because of inactive board maintainers.
> Could you indicate if Phytec is interested to take up that task?

At the moment the RK3288 board is not in my focus a lot. I am not able to run 
u-boot/master tests regularly.
But I would like to keep the phyCORE-RK3288 in u-boot.

So it would be very helpful if you could clarify the future plan for SPLs on 
RK3288 SoCs.
After that I can take action to make the board more future proof (Switch to TPL 
or other things to reduce size).

Regards,
Wadim

>
> Johan
>
>
>>
>> Am 18.10.22 um 13:25 schrieb Johan Jonker:
>>> The phycore_rk3288 board has a SPL size problem,
>>> so remove phycore_init() function to stay within the limits.
>>>
>>> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
>> Reviewed-by: Wadim Egorov <w.egorov at phytec.de>
>>
>>
>>> ---
>>>    arch/arm/mach-rockchip/rk3288/Kconfig        |  1 -
>>>    board/phytec/phycore_rk3288/phycore-rk3288.c | 46 --------------------
>>>    2 files changed, 47 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig
>>> index e8c57843..1be2b585 100644
>>> --- a/arch/arm/mach-rockchip/rk3288/Kconfig
>>> +++ b/arch/arm/mach-rockchip/rk3288/Kconfig
>>> @@ -89,7 +89,6 @@ config TARGET_MIQI_RK3288
>>>    config TARGET_PHYCORE_RK3288
>>>    	bool "phyCORE-RK3288"
>>>            select BOARD_LATE_INIT
>>> -	select SPL_BOARD_INIT if SPL
>>>    	help
>>>    	  Add basic support for the PCM-947 carrier board, a RK3288 based
>>>    	  development board made by PHYTEC. This board works in a combination
>>> diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
>>> index 17b987f6..3f49f39e 100644
>>> --- a/board/phytec/phycore_rk3288/phycore-rk3288.c
>>> +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
>>> @@ -19,8 +19,6 @@
>>>    #include <netdev.h>
>>>    #include <linux/bitops.h>
>>>    #include "som.h"
>>> -#include <power/regulator.h>
>>> -#include <power/rk8xx_pmic.h>
>>>    
>>>    static int valid_rk3288_som(struct rk3288_som *som)
>>>    {
>>> @@ -77,47 +75,3 @@ int rk3288_board_late_init(void)
>>>    
>>>    	return 0;
>>>    }
>>> -
>>> -#ifdef CONFIG_SPL_BUILD
>>> -#if !defined(CONFIG_SPL_OF_PLATDATA)
>>> -static int phycore_init(void)
>>> -{
>>> -	struct udevice *pmic;
>>> -	int ret;
>>> -
>>> -	ret = uclass_first_device_err(UCLASS_PMIC, &pmic);
>>> -	if (ret)
>>> -		return ret;
>>> -
>>> -#if defined(CONFIG_SPL_POWER)
>>> -	/* Increase USB input current to 2A */
>>> -	ret = rk818_spl_configure_usb_input_current(pmic, 2000);
>>> -	if (ret)
>>> -		return ret;
>>> -
>>> -	/* Close charger when USB lower then 3.26V */
>>> -	ret = rk818_spl_configure_usb_chrg_shutdown(pmic, 3260000);
>>> -	if (ret)
>>> -		return ret;
>>> -#endif
>>> -
>>> -	return 0;
>>> -}
>>> -#endif
>>> -
>>> -void spl_board_init(void)
>>> -{
>>> -#if !defined(CONFIG_SPL_OF_PLATDATA)
>>> -	int ret;
>>> -
>>> -	if (of_machine_is_compatible("phytec,rk3288-phycore-som")) {
>>> -		ret = phycore_init();
>>> -		if (ret) {
>>> -			debug("Failed to set up phycore power settings: %d\n",
>>> -			      ret);
>>> -			return;
>>> -		}
>>> -	}
>>> -#endif
>>> -}
>>> -#endif
>>



More information about the U-Boot mailing list