[PATCH V2 1/4] board: rockchip: Refactor panel auto-detect code

Chris Morgan macroalpha82 at gmail.com
Sun Nov 19 06:00:57 CET 2023


On Sat, Nov 18, 2023 at 10:10:04AM -0700, Simon Glass wrote:
> Hi Chris,
> 
> On Fri, 17 Nov 2023 at 14:15, Chris Morgan <macroalpha82 at gmail.com> wrote:
> >
> > From: Chris Morgan <macromorgan at hotmail.com>
> >
> > Make the inability to detect a panel using the auto detection code not
> > fail the entire boot process. This means that if the panel ID cannot
> > be read we don't set an environment variable for the panel, and if an
> > environment variable for the panel is not set we don't attempt to
> > update the compatible string. Changes to the code also ensure that
> > when there are multiple compatible strings required for the panel
> > we use them both, which solves some issues that will pop up soon
> > for the Linux driver.
> >
> > Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
> > ---
> >  board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c | 115 +++++++++++++--------
> >  1 file changed, 74 insertions(+), 41 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> This seems similar to the extension_board command in some ways.
> 
> Raspberry Pi has some vaguely similar logic.
> 
> I wonder if we could figure out a generic way of handling this?

I was thinking about that. Given I need it to run so early and with as
few dependencies as possible, for my specific use case I think this way
makes the most sense. However, a quick way to get into recovery mode
for other devices would be desirable, and I think the best way to
accomplish that would be to have a way to set the ADC channel for the
rockchip_dnl_key_pressed() routine via a config option or a board
specific define of some kind instead of setting it permanently at
channel 1 (for all but one of the rk3566 boards I've messed with so far
it would be ADC channel 0 for such a button; ADC channel 1 is used for
board identification).

Thank you,
Chris

> 
> Regards,
> Simon


More information about the U-Boot mailing list