arm: tegra: tamonten: Make the display support optional

Allow disabling the display support from Kconfig and move the display
API to its own header.

Change-Id: I8dbc84b3e31b828db126e54c736e5ceb1adaf30a
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/511
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Abstract the PMU GPIOs definitions

To allow having a generic macro to access the board GPIOs a generic
PMU abstraction is needed. This allow supporting new Tamonten module
that use another PMU.

Change-Id: I80f2fdb6bf199c5155b17d505fdd3573ee4695d4
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/513
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Remove the unused PANEL_ENABLE GPIO

This GPIO isn't connected to anything, so all code using it can be
just removed.

Change-Id: I7292a996ddf24c601121b88401fff78862d66e39
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/514
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Add the required headers to com-tamonten.h

Allow this header to be used without having to include a bunch of
other headers first.

Change-Id: Ie0ddd5e21c1091fd6815f706a6dbb84f197e656a
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/515
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
asoc: tegra: Fix the CPU DAI binding on Tamonten COM

The binding from the codec to the CPU DAI is in fact hardcoded for the
T20 platforms. The T30 platforms would just patch the table according
to the machine type. However on Tamonten boards the machine type
doesn't imply the COM module type.

To fix this use some ifdef mechanism to directly populate the table
with the correct data.

Change-Id: Ibdfa3e68f9fbb7f1b2d1428f7f32a9f94576834b
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/519
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten-wm8903: Remove the unused BT audio DAI

The BT audio interface is a left over from Harmony, no hardware ever
had it.

Change-Id: I640797c0554b6207a51d6b28dcc59542527ab14c
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/520
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Abstract the machine boot params address

The boot params address is not the same on T20 and T30, use a macro to
ease portability.

Change-Id: I267131423591f84b8300d35e0aa0abd7ccdae3cc
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/522
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Add a DT compat entry to the Tamonten boards

Change-Id: I42c8dd5fb93cce2099d055ff15808377b3300ec5
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/528
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten-wm8903: Use the proper macro to resolve COM IRQ

To convert COM GPIOs to IRQ the COM_GPIO_TO_IRQ() macro should be used.

Change-Id: Ia7f55c953de4e99b2d6d1368267a669d3eddb77b
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/521
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Use ARRAY_SIZE() to count the regulator consumers

The regulator definitions are harcoding the number of consumers
instead of just computing the consumers array size.

Change-Id: I347de1fed99ba4f8e2afee20ecbcb2bd72f0dba1
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/676
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Remove the broken PCIe pinmux/regulator init

The PCI init for the Tamonten COM include some pinmux and regulator
setup. However such code shouldn't be needed here, the general pinmux
and power code should be fixed instead.

As PCIe never worked with L4T kernels, we just remove this code.

Change-Id: Id33a906a28566ba764d0ee06da1e373142e9ac6d
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/518
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Create the TamontenNG COM from the TEC-NG board

Move the Tamonten NG COM specific code to its own files to ease reuse.
This implementation should be compatible with the Tamonten COM,
allowing Tamonten base boards to run with both.

While transitioning from hardcoded IDs to symbolic names, the I2C bus
were re-numbered to match the original Tamonten COM. Although this is
not strictly needed, it should make compatibility with userspace tools
simpler.

Change-Id: I650f20cec1d8aaa8cb92b5bf8a9c1c2083ba6b53
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/523
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Remove the unused BACKLIGHT VDD GPIO

The BACKLIGHT_VDD signal was only present on some early prototype, it
was never connected on the final hardware. Remove all the code that
used this signal.

Change-Id: I874058477033fbce29ce31328e0394ee3cea5f37
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/525
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>
arm: tegra: tamonten: Allow all Tamoten COM / base board combination

Allow using the Tamonten NG COM or Tamonten COM with all Tamonten base
baords.

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

The pin for the backlight PWM was configured as GPIO, configure it for
PWM usage instead.

Change-Id: I40afc10696202eadf487732513e635f40a05e7a6
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/526
Reviewed-by: Hendrik Lippek <hendrik.lippek@avionic-design.de>
Reviewed-by: Soeren Grunewald <soeren.grunewald@avionic-design.de>