sunxi-disp: Allow build without axp

I wrote this patch while working on A10s support, then when I tried to
get my Olinuxino A13_Micro running using commits from
https://github.com/hehopmajieh/linux-sunxi/

I noticed a similar patch there:
https://github.com/hehopmajieh/linux-sunxi/commit/e7c1fc23a723bdf799c0aef02920b55650c06e12

But I believe this fix is better because:
1) It properly checks for CONFIG_AXP rather then CONFIG_POWER, as the former
can still be unset when the latter is set
2) Rather then just ignoring axp gpio calls when not build with axp support
it complains loudly when other code tries to use axp gpio-s when built without

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-disp: Don't crash on sun5i when screen0_output_type == vga

I was (wrongly) trying to set screen0_output_type to vga for the
Olinuxino A13_Micro (the Olinuxino A13 * uses LCD output + some external
logic for VGA-out).

This leads to a NULL ref due to the sunxi-disp-vga code containing some
special handling for composite out which tries to set up dac parameters
on the 2nd tv-encoder. *But* the sun5i only has 1 tv-encoder.

Even though this was mainly caused by a wrong fex file I'm still submitting
this patch, because the A10s does have a fully functional display block,
which likely does support VGA out.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add AXP 15 power module for A10s Chips

HdG: Note as usual with code imported from the sunxi SDK there are severe
style issues :|

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
axp15: Hookup the axp152 code

HdG: Fixed some checkpatch warnings

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
axp15: Adjust code for 3.4 branch

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
mach-sun5i: Remove bogus debug-uart device

I encountered this while testing my A10s TV-stick, which uses uart0 for
its uart test-pads.

Having this device always registered + uart0_used set in the fex file,
caused 2 uart driver to get registered for uart0, both the regular
serial8250 as well as the 8250-sunxi driver, then when the first uart0
interrupt happens things go boom.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_defconfig: build disp, hdmi and lcd into the kernel

- The majority of end-users wants to use the framebuffer, and all other options are aimed at that (e.g. G2D, Cedar,
  framebuffer memory reservation are all enabled by default)
- Previous problems that required building these options as modules instead of into the kernel no longer exist
  (since this commit: https://github.com/linux-sunxi/linux-sunxi/commit/199825c44a742fa0abd274948c5f66535b614fb7 )
sunxi-disp: Fix page alignment issues with UMP buffers

UMP buffers must be page aligned, otherwise we get a problem:

[   80.520000] UMP: ERR: drivers/gpu/mali/ump/common/ump_kernel_ref_drv.c
[   80.530000]            ump_dd_handle_create_from_phys_blocks()  50
[   80.530000] Trying to create UMP memory with unaligned size. Size: 5760000
[   80.540000]
[   80.540000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[   80.550000] pgd = ee09c000
[   80.560000] [00000000] *pgd=00000000
[   80.560000] Internal error: Oops: 5 [#1] PREEMPT ARM
[   80.560000] Modules linked in: disp_ump mali_drm drm mali ump 8192cu hdmi lcd disp cfbcopyarea cfbimgblt cfbfillrect
[   80.560000] CPU: 0    Not tainted  (3.4.24+ #30)
[   80.560000] PC is at ump_dd_secure_id_get+0xc/0x14 [ump]
[   80.560000] LR is at _disp_get_ump_secure_id+0x5c/0xec [disp_ump]
[   80.560000] pc : [<bf116c4c>]    lr : [<bf19905c>]    psr: 600f0013
[   80.560000] sp : ee4efd78  ip : ee4efd88  fp : ee4efd84
[   80.560000] r10: be8f9c4c  r9 : 00000000  r8 : bf03a4c4
[   80.560000] r7 : 00000001  r6 : bf03a4c4  r5 : 5a001000  r4 : eeb81000
[   80.560000] r3 : 00000000  r2 : 200f0093  r1 : 00000001  r0 : 00000000
[   80.560000] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   80.560000] Control: 10c5387d  Table: 6e09c019  DAC: 00000015

The code, which tries to split the framebuffer into two parts of equal
sizes for GET_UMP_SECURE_ID_BUF1 and GET_UMP_SECURE_ID_BUF2, may break
this assumption for certain screen resolutions (800x600 is particularly
poorly divisible by 4096). The user visible symptoms look like the X
server gets stuck and fails to start.

This patch addresses the problem in the following way:
1. Make sure that fix.smem_len is page aligned (like many of the
   other framebuffer drivers do).
2. If the splitting of framebuffer into two parts would result in
   unaligned second part, just disable double buffering.
3. Avoid wrapping the physical memory beyond the framebuffer
   for GET_UMP_SECURE_ID_BUF2 in the case if double buffering
   is not used by setting the size of UMP buffer to 0.

The problem has been reported at:
  https://groups.google.com/d/msg/linux-sunxi/kZNl9bFdE-g/4k8z2_i4nJgJ

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
sunxi-hdmi: Refactor EDID parsing

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-hdmi: Add pixelclock override table to edid code

Unfortunately some monitors need pixelclocks which we cannot generate,
often we can workaround this by selecting a pixelclock which is near the
requested pixelclock. This patch adds a table with modes + overriding /
corrected pixelclock, and adds a first entry for the 1680x1050 mode of
Samsung 225bw monitors.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
input:touchscreen:ft5x_ts: Change MT events per Android 4.0 requirements
Platform code function rename to resolve gpiolib conflict

Signed-off-by: Alexandr V. Shutko <alex@shutko.ru>