pia-am335x-pm: prepare MLO -> u-boot bootdevice handover

- save the current bootdevice in PMIC NVRAM. Currently there is no simple
  solution to transfer parameters from MLO to u-boot.
- We need it to make sure we boot uImage from the bootdevice used by
  ROM code. This will speed-up the boot process significantly.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: remove unused MMC CD code

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
tps65910: add reg ids for devctrl2 and bck1

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: fix TPS initialization

- merge was not clean, register names and TPS defines have changed
- storring boot device might not be necessary anymore, as boot
  device is stored in gd -> disable code for now

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: allow multiple eeproms to be read

- for the processor module piA-AM335x-PM we are more interested in the
  attached baseboard than the PM itself. We need a way to select if
  baseboard or expansion eeprom is relevant to decide on pinmux and
  peripheral configuration.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-pm: add new init config for rev 0.2

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-pm: more flexible eeprom reading

- make sure the baseboard eeprom data is used when present
- allow pm only configuration (when baseboard is unknown)

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: allow forcing an eeprom rewrite on first start

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: enable i2c pinmux if needed

- make sure we use the correct pinmux for i2c1 when trying to read
  the expansion eeprom

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-sk: add SK board to boards.cfg

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-pm: add some pull-ups to pinmuxing

- low active NOR control lines and PMIC INT

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-sk: add default pinmux for piA-AM335x-SK

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: avoid dupliate code in mmc0 pinmux

- all boards use the same mux set for mmc0

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: rework board defines

- don't add a new define for every similar board
- We only really care about the board type to decide on the pin muxing
  for I2C1. For this it's ok to add a define per different CPU board.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: fix eeprom init for pm

- on PM we want to write both eeproms in FIRSTSTART mode

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-sk: fix board detection for PM baseboards

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: move some defines from boards.cfg to board config.h

- also add more complete check for a PM board in case we use 2 eeproms

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-pm: cleanup emmc reset setup

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x-apc: add support for APC baseboard

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia-am335x: Update EEPROM detection

- be more verbose about which board combination we detected
- hang() if there was an error during detection, we don't want to
  got any further

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>