pia335x: add initial board revision support

- don't setup hw devices on E2 rev 0.02 that aren't present anymore
- make TMP421 the default option as TMP422 is only on prototype boards
- disable LS7366, USB1, SYS_CLKOUT2 on E2 rev 0.02+

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: update GPIOs for E2 rev 0.02 boards

- add support for new and changed GPIOs on rev 0.02
- move special GPIO pinmuxing to general gpio mux table
- disable support for MMC0 CD/WP GPIOs as they are not used
  on newer revision boards
- make GPIO configuration dependent on board revision

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: don't use revision parameter for mmc0_init

- use the global variable instead

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: update spi setup for revision 0.02

- Rev 0.02 only uses spidev devices that are connected to expansion
  headers. Initialize device structs individually to avoid duplication
  for rev 0.01 and 0.02+ devices.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: rename i2c2 to i2c1 to avoid confusion

- we have 2 I2C busses 0 and 1, use this numbering scheme everywhere

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

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: disable first CPSW slave port

- is E2 only using MII2, the second slave port
- disable MII1 interface completely to avoid creation of an unusable
  eth device

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
leds: pca9633: add spin_lock for brightness changes

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: fix musb-otg initialization for Host port

- musb board struct must be initialized before the musb-hdrc driver is
  loaded.
- Also, fix USB0 to host port for now. This should be changed for
  production systems where ID pin is wired reliably.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: reenable slave 0 id for cpsw

- otherwise the driver won't do anything. slave 2 port becomes eth0, but
  data doesn't arive at eth0.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: copy clock aliases from evm

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: make FF_CLK pull-down by default

- we need to avoid toggling the FF_CLK pin during boot, because this
  would reset the PB/WD_RESET flags.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
usb: musb: allow software control of OTG mode for AM335x

- OTG mode switch via board file was only supported on TI816x. This adds
  support for AM335x based boards as well.
- Generally this is only useful for boards, that don't handle the USB-ID
  pin according to the OTG standard.

Signed-off-by: Björn Krombholz <b.krombholz@pironex.de>
pia335x: try to avoid toggling of FF_CLK during boot

- a low-high transitition of FF_CLK causes the flipflops that store the
  previous reset state to reinitialize themselves to 1
- we want the user to manually perform this after the evaluation of the
  reset state.

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