Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75f7dd81 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge branch 'tegra/boards' into next/boards

* tegra/boards:
  arm/tegra: remove __initdata annotation from pinmux tables
  arm/tegra: Use bus notifiers to trigger pinmux setup
  arm/tegra: Refactor board-*-pinmux.c to share code
  arm/tegra: Fix mistake in Trimslice's pinmux
  arm/tegra: Rework Seaboard-vs-Ventana pinmux table
  arm/tegra: Remove useless entries from ventana_pinmux[]
  arm/tegra: PCIe: Remove include of mach/pinmux.h
  arm/tegra: Harmony PCIe: Don't touch pinmux
  arm/tegra: Add AUXDATA for tegra-pinmux and tegra-gpio
  arm/tegra: Split Seaboard GPIO table to allow for Ventana
  ARM: tegra: paz00: Fix board pinmux table.
  ARM: tegra: paz00: add support for wakeup gpio key
parents 8df97495 16d93621
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
obj-y                                   += board-pinmux.o
obj-y                                   += common.o
obj-y                                   += devices.o
obj-y                                   += io.o
+9 −7
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@ void seaboard_pinmux_init(void);
void ventana_pinmux_init(void);

struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
	OF_DEV_AUXDATA("nvidia,tegra20-pinmux", TEGRA_APB_MISC_BASE + 0x14, "tegra-pinmux", NULL),
	OF_DEV_AUXDATA("nvidia,tegra20-gpio", TEGRA_GPIO_BASE, "tegra-gpio", NULL),
	OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
	OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL),
	OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC3_BASE, "sdhci-tegra.2", NULL),
@@ -102,13 +104,6 @@ static void __init tegra_dt_init(void)

	tegra_clk_init_from_table(tegra_dt_clk_init_table);

	/*
	 * Finished with the static registrations now; fill in the missing
	 * devices
	 */
	of_platform_populate(NULL, tegra_dt_match_table,
				tegra20_auxdata_lookup, NULL);

	for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
		if (of_machine_is_compatible(pinmux_configs[i].machine)) {
			pinmux_configs[i].init();
@@ -118,6 +113,13 @@ static void __init tegra_dt_init(void)

	WARN(i == ARRAY_SIZE(pinmux_configs),
		"Unknown platform! Pinmuxing not initialized\n");

	/*
	 * Finished with the static registrations now; fill in the missing
	 * devices
	 */
	of_platform_populate(NULL, tegra_dt_match_table,
				tegra20_auxdata_lookup, NULL);
}

static const char * tegra_dt_board_compat[] = {
+0 −9
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@

#include <asm/mach-types.h>

#include <mach/pinmux.h>
#include "board.h"
#include "board-harmony.h"

@@ -48,10 +47,6 @@ static int __init harmony_pcie_init(void)

	regulator_enable(regulator);

	tegra_pinmux_set_tristate(TEGRA_PINGROUP_GPV, TEGRA_TRI_NORMAL);
	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXA, TEGRA_TRI_NORMAL);
	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_NORMAL);

	err = tegra_pcie_init(true, true);
	if (err)
		goto err_pcie;
@@ -59,10 +54,6 @@ static int __init harmony_pcie_init(void)
	return 0;

err_pcie:
	tegra_pinmux_set_tristate(TEGRA_PINGROUP_GPV, TEGRA_TRI_TRISTATE);
	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXA, TEGRA_TRI_TRISTATE);
	tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_TRISTATE);

	regulator_disable(regulator);
	regulator_put(regulator);
err_reg:
+9 −13
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

#include "gpio-names.h"
#include "board-harmony.h"
#include "devices.h"
#include "board-pinmux.h"

static struct tegra_pingroup_config harmony_pinmux[] = {
	{TEGRA_PINGROUP_ATA,   TEGRA_MUX_IDE,           TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
@@ -143,11 +143,6 @@ static struct tegra_pingroup_config harmony_pinmux[] = {
	{TEGRA_PINGROUP_XM2D,  TEGRA_MUX_NONE,          TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
};

static struct platform_device *pinmux_devices[] = {
	&tegra_gpio_device,
	&tegra_pinmux_device,
};

static struct tegra_gpio_table gpio_table[] = {
	{ .gpio = TEGRA_GPIO_SD2_CD,		.enable = true	},
	{ .gpio = TEGRA_GPIO_SD2_WP,		.enable = true	},
@@ -161,13 +156,14 @@ static struct tegra_gpio_table gpio_table[] = {
	{ .gpio = TEGRA_GPIO_EXT_MIC_EN,	.enable = true	},
};

static struct tegra_board_pinmux_conf conf = {
	.pgs = harmony_pinmux,
	.pg_count = ARRAY_SIZE(harmony_pinmux),
	.gpios = gpio_table,
	.gpio_count = ARRAY_SIZE(gpio_table),
};

void harmony_pinmux_init(void)
{
	if (!of_machine_is_compatible("nvidia,tegra20"))
		platform_add_devices(pinmux_devices,
					ARRAY_SIZE(pinmux_devices));

	tegra_pinmux_config_table(harmony_pinmux, ARRAY_SIZE(harmony_pinmux));

	tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table));
	tegra_board_pinmux_init(&conf, NULL);
}
+10 −14
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

#include "gpio-names.h"
#include "board-paz00.h"
#include "devices.h"
#include "board-pinmux.h"

static struct tegra_pingroup_config paz00_pinmux[] = {
	{TEGRA_PINGROUP_ATA,   TEGRA_MUX_GMI,           TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
@@ -30,7 +30,7 @@ static struct tegra_pingroup_config paz00_pinmux[] = {
	{TEGRA_PINGROUP_ATC,   TEGRA_MUX_GMI,           TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
	{TEGRA_PINGROUP_ATD,   TEGRA_MUX_GMI,           TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
	{TEGRA_PINGROUP_ATE,   TEGRA_MUX_GMI,           TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
	{TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT,      TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
	{TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT,      TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
	{TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4,     TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL},
	{TEGRA_PINGROUP_CRTP,  TEGRA_MUX_CRT,           TEGRA_PUPD_NORMAL,    TEGRA_TRI_TRISTATE},
	{TEGRA_PINGROUP_CSUS,  TEGRA_MUX_PLLC_OUT1,     TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
@@ -143,11 +143,6 @@ static struct tegra_pingroup_config paz00_pinmux[] = {
	{TEGRA_PINGROUP_XM2D,  TEGRA_MUX_NONE,          TEGRA_PUPD_NORMAL,    TEGRA_TRI_NORMAL},
};

static struct platform_device *pinmux_devices[] = {
	&tegra_gpio_device,
	&tegra_pinmux_device,
};

static struct tegra_gpio_table gpio_table[] = {
	{ .gpio = TEGRA_GPIO_SD1_CD,	.enable = true },
	{ .gpio = TEGRA_GPIO_SD1_WP,	.enable = true },
@@ -158,13 +153,14 @@ static struct tegra_gpio_table gpio_table[] = {
	{ .gpio = TEGRA_WIFI_LED,	.enable = true },
};

static struct tegra_board_pinmux_conf conf = {
	.pgs = paz00_pinmux,
	.pg_count = ARRAY_SIZE(paz00_pinmux),
	.gpios = gpio_table,
	.gpio_count = ARRAY_SIZE(gpio_table),
};

void paz00_pinmux_init(void)
{
	if (!of_machine_is_compatible("nvidia,tegra20"))
		platform_add_devices(pinmux_devices,
					ARRAY_SIZE(pinmux_devices));

	tegra_pinmux_config_table(paz00_pinmux, ARRAY_SIZE(paz00_pinmux));

	tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table));
	tegra_board_pinmux_init(&conf, NULL);
}
Loading