axp152: New power/regulator driver for axp152 chips

This patch adds a driver for the axp152 pmic typically found on boards which
use the Allwinner A10s soc.

This driver has been written from scratch, since the driver from the
Allwinner Android kernels is unnecessary complicated and in general it makes
your eyes bleed. As an added bonus this can now be built into a single kernel
together with the axp20 driver, allowing the use of one kernel for boards
with both type of regulator.

It adds support for the dcdc1-4 regulators, the dldo2 regulator, as well as
pm_power_off functionality.

dcdc1 is hardcoded at 3.3V, dcdc2 is controller through cpu-freq (it offers
a Vcore supply the cpu-freq code will use), dcdc3 and dcdc4 values are taken
from the Allwinner specific fex file (custom dtb alike file). dldo2 is
hardcoded at 3.0V. This mimicks the behavior of the driver from the Allwinner
Android kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: cpu-freq-table remove duplicate dvfs table entries

There were 2 entries for 1250 volt and 2 for 1400 volt, this patch combines
their frequency ranges, removing the duplicate entries.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: cpu-freq-table add sun5i dvfs table

The table as added can be found in various forms in various places, which
all agree on the freq <-> volt mapping, so this definitely seems the right
table for sun5i, places where this can be found are the onik.de A13
(arch/arm/mach-sun5i/cpu-freq/cpu-freq.c) sources, onik.de A10s
(arch/arm/mach-sun5i/cpu-freq-pmu/cpu_freq_dvfs.c) sources, and various
script.bin-s from newer boards, which have a dvfs_table section in their
fex files.

Also remove the TODO from the sunxi_cpufreq_table() and sunxi_div_order_table()
functions, I compared the tables in the onik.de A10 and A13 sources and
they are identical.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-hdmi: Try harder to get EDID

Sometimes a bit can flip on the ddc bus, so if we get an io error, or
a bad checksum, try again (up to 3 times).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Fix scheduling from atomic context oops on tx timeout

On my wobo-i5 the phy is hooked-up to port D rather then port A (to be fixed
in the next patch in this series), this causes things to not work, and thus
the tx timeout watchdog to trigger.

The tx timeout callback may not sleep, but before this patch it called
wemac_init_wemac, which in turns uses wemac_phy_read / wemac_phy_write,
which use mutexes and thus can sleep. This makes the kernel very unhappy!

This patch fixes this by doing the emac reset on tx timeout from a workqueue.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Add support for the mii-phy being connected to PortD

This is possible with the A10s (and used on the wobo-i5), and indicated
by emac_used being 2 rather then 1.

While working on this I noticed that the port related defines in
sun4i_wemac.h are wrong. The port registers are 0x24 bytes apart, not 0x20,
correct the define for PD_CFG0, which this patch uses, and remove all the
others as they are unused anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Fix get_link() function

Things are hardcoded to use the mii interface everywhere, and the flags
get_link checks are never set, so hardcode it to the mii like elsewhere in
the driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Give the phy some time to settle after powering it on

This is necessary to avoid ending up with 10 Mbit half-duplex on
100 Mbit networks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Use random parts of SID for MAC (if none is specified)

So that the emac gets a unique *and* stable MAC address.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Add wemac_set_mac_addr() helper function

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl8188eu: Silence debug spew

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl8189es: Silence debug spew

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
rtl8192cu: Silence debug spew

Signed-off-by: Hans de Goede <hdegoede@redhat.com>