Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/arm/allwinner



On Mon, 5 Oct 2015, Manuel Bouyer wrote:
BTW, I'm looking at this because I need to make the LVDS interface to work
(and turn the display on/off via GPIOs, to save power). Do you have ideas
on how this should work ?
We won't have EDID source in this case; for the omap controller I did
hardcode a video mode in sources, which is quite ugly.

If you pass a compiled version of the fex for your board
(https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a20/a20-olinuxino_lime2.fex), you can parse the lcd parameters and extract the video mode and GPIOs from there using the awin_sysconfig APIs. For video mode, something like:

  const int lcd_used = awin_sysconfig_get_int("lcd0_para", "lcd_used");
  if (lcd_used == 1) {
    const int lcd_x = awin_sysconfig_get_int("lcd0_para", "lcd_x");
    const int lcd_y = awin_sysconfig_get_int("lcd0_para", "lcd_y");
    if (lcd_x != -1 && lcd_y != -1) {
      // do stuff
    }
  }

For GPIOs, add to the gpios[] array in awin_gpio_sysconfig (http://nxr.netbsd.org/xref/src/sys/arch/evbarm/awin/awin_machdep.c#866) and access it from your driver with awin_gpio_pin_reserve / awin_gpio_pindata_{read,write}.

Home | Main Index | Thread Index | Old Index