arm: tegra: tamonten: Move the Tamonten Kconfig entries in a sub-menu

As the number of options for Tamonten system is increasing grouping
them in a sub-menu starts to make sense.

Change-Id: I7268dcac5a6a6ff027115ef7959f6d6855df5d78
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/695
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Use a choice to select the COM module

A choice is better as only one should be selected. Also change the
select ARCH_TEGRA_Xx_SOC to a depends because the select doesn't work
properly with the choice.

Change-Id: Ie5dfb49dbfe2bd50048ae6e11f546341859f6aa0
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/696
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Make the tamonten board module optional

Add dummy implementation of the board module init function to allow
building without these modules.

Change-Id: Ib18497b264bc3773cde038730643a0571b7839f0
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/700
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Make the TSC and WM8903 support option visible

Allow the user to select these options manually.

Change-Id: Ie3be0b2c7d1444eddc6922cdbeda2d746e1c7ae7
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/697
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Fix the number of PMU IRQ on Tamonten (non-NG)

The number of IRQ used by the PMU must be properly defined, otherwise
board peripherals will try to use IRQ that are already in use.

The number of IRQ from the PMU wasn't clearly defines in the old code.
The base for the board device IRQ simply used an hard coded offset of
32, which worked because the PMU has less than 32 IRQs.

Change-Id: If40f3815bf3d72925346237630ae2601f605f0a5
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/698
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Rework the allocation of board GPIOs and IRQs

The board GPIOs and IRQs are allocated sequentially after the COM
GPIOs and IRQs. The allocation must be static as the GPIOs and IRQs
are used in device declarations. This is a problem for our generic
board modules as the allocation can change with the config.

To solve this problem we add a new header, tamonten-board.h, that
list all the generic GPIOs and IRQs sources. In case one module is not
enable its count is just set to zero.

Change-Id: Ic46448252ba296ff970aa48af357a903f110ceac
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/699
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tec-ng: Add support for ADNP GPIO expander

The Tamonten NG Carrier board feature a CPLD with an ADNP
which is used for various devices on the base board.

Change-Id: I975113980fafd13320a85f855f39f23332ee07cc
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/702
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tec-ng: Add support for the TSC2007 touchscreen controller

The Tamonten NG Eval Carrier feature a TSC2007 to support resistive
touchscreens.

Change-Id: I91d0e9a43c279c789a035fe93fba7e3827cf66f0
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/703
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Split the ADNP support out of the medcom wide

Add a generic implementation for tamonten boards using the ADNP
device.

Change-Id: I2068feff17e1ac4f9f792305dfc65fe08b705954
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/701
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten ng: Fix the backlight PWM pinmux

The function of the pin used for the backlight PWM used the wrong
name, it should be PWM0 and not PWM. Fix an ugly boot warning.

Change-Id: Iad471c426b4bab2a9b238c34a9e078b7f502a30f
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/713
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Fix the pinmux for UARTA and UARTB

Both UART were configured on the wrong pins and the pins for UARTB
were tri-stated.

Change-Id: Ic75f247601e8310dad9c8e422538393f9a588291
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/705
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Add the UART1 device for completeness

Change-Id: Ibaca7ec2709ca559203cdba96400ad05c6c513c7
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/706
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Enable all the UART clocks

The UART clocks must be explicitly enabled to allow using the UART.

Change-Id: I0980f76557b04b2eee7f9561a6e0d2e684ae8757
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/707
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Make the UART mapping configurable

For backward compatibility with older kernels we need a different
UART <-> tty mapping for each board. Add some Kconfig entries to
choose which UART must be enabled, as well as the which ID they should
get.

Change-Id: I511e202e255e3751a68a923f923a3e673409a2b3
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/708
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Add the UART config for all boards

Change-Id: I0b4dd8da0bc35a2d1569fc67946ae1d35131216a
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/709
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Fix the I2C GEN2 bus

The I2C GEN2 bus and DDC bus share the same host controller but use
different balls. The driver take care to apply the proper pinmux
changes between each transfer. However if both are mux enabled at
the same time the DDC balls take precedence. As the DDC balls were
configured for I2C by default, the GEN2 bus wouldn't work until at
least one transfer was run on the DDC bus.

Fix this bug by setting up the mux of both pin group to RSVD, in this
way it doesn't matter which bus is used first.

Change-Id: I95be57cff62e48a21bacd8bd4930c7a6d75fc160
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/723
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Fix the buggy pinmux entries

A few entries in the pinmux table used the wrong function define.
All RSVD2 should now be RSVD, IRDA should used instead of UARTB.

Change-Id: I6e1d61546c4523ed66cc834494948fa80a3cbe1c
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/724
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>