On Fri, Sep 03, 2021 at 10:09:02AM -0700, Tomasz Bielecki wrote: > Please consider including this patch, it seems common across other > OSes supporting Pinebook Pro and fixes the display issues on warm > reset. > > $OpenBSD$ > > Fix Pinebook Pro display on warm reset. > > By Arnaud Patard > http://people.hupstream.com/~rtp/pbp/20200706/patches/hack-reset.patch
I don't think we should have a patch labelled "HACK NOTFORMERGE". Talk to the people working on rk3399 video support upstream. Perhaps they have something better already merged or sent to the U-Boot list. > > Index: board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c > --- board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c.orig > +++ board/pine64/pinebook-pro-rk3399/pinebook-pro-rk3399.c > @@ -7,9 +7,12 @@ > #include <common.h> > #include <dm.h> > #include <syscon.h> > +#include <linux/delay.h> > +#include <asm/gpio.h> > #include <asm/io.h> > #include <asm/arch-rockchip/clock.h> > #include <asm/arch-rockchip/grf_rk3399.h> > +#include <asm/arch-rockchip/gpio.h> > #include <asm/arch-rockchip/hardware.h> > #include <asm/arch-rockchip/misc.h> > #include <power/regulator.h> > @@ -59,6 +62,7 @@ int misc_init_r(void) > const u32 cpuid_length = 0x10; > u8 cpuid[cpuid_length]; > int ret; > + unsigned int gpio; > > setup_iodomain(); > > @@ -69,6 +73,11 @@ int misc_init_r(void) > ret = rockchip_cpuid_set(cpuid, cpuid_length); > if (ret) > return ret; > + > + gpio_lookup_name("B22", NULL, NULL, &gpio); > + gpio_direction_output(gpio, 0); > + udelay(500000); > + gpio_direction_output(gpio, 1); > > return ret; > } > >