ARM: pia335x: fixed pinmux issue
Signed-off-by: Marian Lüder <m.lueder@pironex.de>
Merge remote-tracking branch 'github/pia-am335x-mmi-dev' into pia-am335x-mmi-ml
Merge remote-tracking branch 'github/pia-am335x-mmi-dev' into pia-am335x-mmi-ml
ARM: pia335x: uboot: removed debug info

Signed-off-by: Marian Lüder <m.lueder@pironex.de>
ARM: pia335x: uboot: removed NAND-configuration for board KM_MMI

Signed-off-by: Marian Lüder <m.lueder@pironex.de>
Revert "ARM: pia335x: fixed pinmux issue"

This reverts commit 9d3019d3b298aa37e3a3e7665b572fe70e86720a.
Merge remote-tracking branch 'github/pia-am335x-mmi-ml' into pia-am335x-mmi-dev

* github/pia-am335x-mmi-ml:
  Revert "ARM: pia335x: fixed pinmux issue"
  ARM: pia335x: uboot: removed NAND-configuration for board KM_MMI
  ARM: pia335x: uboot: removed debug info
  ARM: pia335x: fixed pinmux issue Signed-off-by: Marian Lüder <m.lueder@pironex.de>
pia335x: add configuration for first start configuration

- allows programming of EEPROM
- should be exanded to include some essential HW tests

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

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: rework Ethernet PHY initialization for E2

- the Ethernet switch did show strange behaviour when reset the old way
- remove some initialization settings
- set hostportnum for E2 to 1

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: e2: revert ethernet init for MII2

- we are connected to MII2 interface which is _slave_ 2 not host
  port 2.
- init both slave ports, as there seems to be no obvious way to
  setup slave 2 only

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
omap24xx_i2c: Handle OMAP5 like OMAP2,3,4

OMAP5 has 8b i2c data register field, like OMAP2, 3 and 4. Handle in the same
way. This fixes the following error on OMAP5:

  OMAP5430 EVM # mmc rescan
  timed out in wait_for_bb: I2C_STAT=1410
  twl6035: could not turn on LDO9.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
omap24xx_i2c: Handle wait_for_bb error

We add a return code to wait_for_bb() to be able to report errors to the
callers properly. We in turn handle this new error code in i2c_read, i2c_write
and i2c_probe.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
ARM: OMAP: I2C: New read, write and probe functions

New i2c_read, i2c_write and i2c_probe functions, tested on OMAP4
(4430/60/70), OMAP5 (5430) and AM335X (3359); should work on older
OMAPs and derivatives as well. The only anticipated exception would
be the OMAP2420, which shall require driver modification.
- Rewritten i2c_read to operate correctly with all types of chips
  (old function could not read consistent data from some I2C slaves).
- Optimised i2c_write.
- New i2c_probe, performs write access vs read. The old probe could
  hang the system under certain conditions (e.g. unconfigured pads).
- The read/write/probe functions try to identify unconfigured bus.
- Status functions now read irqstatus_raw as per TRM guidelines
  (except for OMAP243X and OMAP34XX).
- Driver now supports up to I2C5 (OMAP5).

Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
Tested-by: Heiko Schocher <hs@denx.de>
pia335x: update I2C settings

- disable 2 byte address for EEPROM
- disable EEPROM ENV

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
ARM: am33xx: run timer_init before using I2C

- I2C routines use udelay which requires timers to be enabled

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: make EEPROM initialization a fixed configuration

- on first start we need to write the ID EEPROM content, this can't be
  detected reliably automatically, so we create a special configuration,
  that creates an u-boot.spl which initializes the eeprom content.
- make sure we are using the correct header struct
- get the board revision from PIA_FIRSTSTART define
- disable generic AM33xx EVM eeprom initialization for piA-AM33xx boards
- use paged write for EEPROM init
- wait a 10ms between writes to avoid timeout warnings

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: update I2C mux function for FIRSTSTART

- When in FIRSTSTART mode we need to initialize the RTC IC as well.
  It is connected to the second I2C bus, so we need to enable support
  for I2C1 in MLO when running FIRSTSTART version
- make sure the currently selected I2C bus is correct before reading the
  EEPROM

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: add delays between access to different I2C devices

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: E2: implement hw changes between revision 0.01 and 0.02

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