Skip to content

Commit

Permalink
arm/tegra: device tree support for ventana board
Browse files Browse the repository at this point in the history
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Peter De Schrijver authored and Olof Johansson committed Oct 13, 2011
1 parent 21fb1cc commit add29e6
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 5 deletions.
32 changes: 32 additions & 0 deletions arch/arm/boot/dts/tegra-ventana.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/dts-v1/;

/memreserve/ 0x1c000000 0x04000000;
/include/ "tegra20.dtsi"

/ {
model = "NVIDIA Tegra2 Ventana evaluation board";
compatible = "nvidia,ventana", "nvidia,tegra20";

chosen {
bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/ram rdinit=/sbin/init";
};

memory {
reg = < 0x00000000 0x40000000 >;
};

serial@70006300 {
clock-frequency = < 216000000 >;
};

sdhci@c8000400 {
cd-gpios = <&gpio 69 0>; /* gpio PI5 */
wp-gpios = <&gpio 57 0>; /* gpio PH1 */
power-gpios = <&gpio 155 0>; /* gpio PT3 */
};

sdhci@c8000600 {
power-gpios = <&gpio 70 0>; /* gpio PI6 */
support-8bit;
};
};
6 changes: 6 additions & 0 deletions arch/arm/mach-tegra/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ config MACH_WARIO
help
Support for the Wario version of Seaboard

config MACH_VENTANA
bool "Ventana board"
select MACH_TEGRA_DT
help
Support for the nVidia Ventana development platform

choice
prompt "Low-level debug console UART"
default TEGRA_DEBUG_UART_NONE
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-tegra/Makefile.boot
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000

dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb
dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb
dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb
26 changes: 21 additions & 5 deletions arch/arm/mach-tegra/board-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

void harmony_pinmux_init(void);
void seaboard_pinmux_init(void);

void ventana_pinmux_init(void);

struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
Expand Down Expand Up @@ -80,9 +80,19 @@ static struct of_device_id tegra_dt_gic_match[] __initdata = {
{}
};

static struct {
char *machine;
void (*init)(void);
} pinmux_configs[] = {
{ "nvidia,harmony", harmony_pinmux_init },
{ "nvidia,seaboard", seaboard_pinmux_init },
{ "nvidia,ventana", ventana_pinmux_init },
};

static void __init tegra_dt_init(void)
{
struct device_node *node;
int i;

node = of_find_matching_node_by_address(NULL, tegra_dt_gic_match,
TEGRA_ARM_INT_DIST_BASE);
Expand All @@ -91,10 +101,15 @@ static void __init tegra_dt_init(void)

tegra_clk_init_from_table(tegra_dt_clk_init_table);

if (of_machine_is_compatible("nvidia,harmony"))
harmony_pinmux_init();
else if (of_machine_is_compatible("nvidia,seaboard"))
seaboard_pinmux_init();
for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
if (of_machine_is_compatible(pinmux_configs[i].machine)) {
pinmux_configs[i].init();
break;
}
}

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

/*
* Finished with the static registrations now; fill in the missing
Expand All @@ -106,6 +121,7 @@ static void __init tegra_dt_init(void)
static const char * tegra_dt_board_compat[] = {
"nvidia,harmony",
"nvidia,seaboard",
"nvidia,ventana",
NULL
};

Expand Down

0 comments on commit add29e6

Please sign in to comment.