[U-Boot] [PATCHv5 1/4] Revert "tegra: Add support for setting up a as3722 PMIC"

Julian Scheel julian at jusst.de
Mon Sep 12 19:10:00 CEST 2016


On 12.09.16 19:02, Stephen Warren wrote:
> On 09/12/2016 01:33 AM, Julian Scheel wrote:
>> On 06.09.2016 20:49, Stephen Warren wrote:
>>> On 09/06/2016 12:04 PM, Julian Scheel wrote:
>>>> On 06.09.16 18:50, Stephen Warren wrote:
>>>>> On 09/05/2016 07:29 AM, Julian Scheel wrote:
>>>>>> This reverts commit 346451b5888c4663bccef4c5203357319aa41f99.
>>>>>> The pmic shall be initialised in board specific code, as it is done
>>>>>> for
>>>>>> jetson-tk1 and meerkat. It can't be assumed that all boards have the
>>>>>> pmic on
>>>>>> the same i2c bus.
>>>>>
>>>>> You can't just revert this, since boards such as nyan-big and venice2
>>>>> rely on this function being called. Admittedly jetson-tk1 does call
>>>>> this
>>>>> a second time right now, but none of the other boards appear to.
>>
>> I checked this again and in fact the only other board besides jetson-tk1
>> having CONFIG_AS3722_POWER set is nyan big. All the other tegra boards
>> do only call what is in
>> board/nvidia/venice2/as3722_init.c:pmic_enable_cpu_vdd(void).
>
> cei-tk1-som has been recently added too; it's very similar to Jetson TK1.
>
>>>> Sorry, I missed to adapt the other boards. I don't see another way than
>>>> having this in each of the boards, as parameters might change, do you?
>>>
>>> You can also parametrize the common code; either make it use #defines
>>> for the bus/device/... number and set those defines in a board-specific
>>> location, or call functions to retrieve that data which boards need to
>>> implement in a board-specific location.
>>
>> Taking into account that currently 2 out of 26 tegra boards use this I
>> would prefer not to do this in board2.c, but simply move it to the
>> boards nvidia_board_init. Would you be ok with this?
>
> It's fine to move the call to as3722_init() into board files rather than
> common files. However, note that this needs to be done atomically in a
> single commit; each commit in the series needs to compile and operate
> correctly on all boards.

Sure I'll replace the revert patch with a dedicated move to board patch.

> As such, simply reverting "tegra: Add support
> for setting up a as3722 PMIC" won't work, since that'll temporarily
> prevent at least venice2's tegra_lcd_pmic_init() from working, since it
> appears to relie on the call to as3722_init().

Actually I don't see as3722_init being called on venice2 at all. 
CONFIG_AS3722_POWER is not set in include/configs/venice2.h or anywhere 
else, which would affect venice2. Am I missing something?

-Julian


More information about the U-Boot mailing list