arm/tegra: device tree support for ventana board
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
parent
21fb1ccc92
commit
add29e61d4
4 changed files with 60 additions and 5 deletions
32
arch/arm/boot/dts/tegra-ventana.dts
Normal file
32
arch/arm/boot/dts/tegra-ventana.dts
Normal file
|
@ -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;
|
||||||
|
};
|
||||||
|
};
|
|
@ -69,6 +69,12 @@ config MACH_WARIO
|
||||||
help
|
help
|
||||||
Support for the Wario version of Seaboard
|
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
|
choice
|
||||||
prompt "Low-level debug console UART"
|
prompt "Low-level debug console UART"
|
||||||
default TEGRA_DEBUG_UART_NONE
|
default TEGRA_DEBUG_UART_NONE
|
||||||
|
|
|
@ -4,3 +4,4 @@ initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000
|
||||||
|
|
||||||
dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb
|
dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb
|
||||||
dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb
|
dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb
|
||||||
|
dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
void harmony_pinmux_init(void);
|
void harmony_pinmux_init(void);
|
||||||
void seaboard_pinmux_init(void);
|
void seaboard_pinmux_init(void);
|
||||||
|
void ventana_pinmux_init(void);
|
||||||
|
|
||||||
struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
|
struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
|
||||||
OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
|
OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
|
||||||
|
@ -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)
|
static void __init tegra_dt_init(void)
|
||||||
{
|
{
|
||||||
struct device_node *node;
|
struct device_node *node;
|
||||||
|
int i;
|
||||||
|
|
||||||
node = of_find_matching_node_by_address(NULL, tegra_dt_gic_match,
|
node = of_find_matching_node_by_address(NULL, tegra_dt_gic_match,
|
||||||
TEGRA_ARM_INT_DIST_BASE);
|
TEGRA_ARM_INT_DIST_BASE);
|
||||||
|
@ -91,10 +101,15 @@ static void __init tegra_dt_init(void)
|
||||||
|
|
||||||
tegra_clk_init_from_table(tegra_dt_clk_init_table);
|
tegra_clk_init_from_table(tegra_dt_clk_init_table);
|
||||||
|
|
||||||
if (of_machine_is_compatible("nvidia,harmony"))
|
for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
|
||||||
harmony_pinmux_init();
|
if (of_machine_is_compatible(pinmux_configs[i].machine)) {
|
||||||
else if (of_machine_is_compatible("nvidia,seaboard"))
|
pinmux_configs[i].init();
|
||||||
seaboard_pinmux_init();
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WARN(i == ARRAY_SIZE(pinmux_configs),
|
||||||
|
"Unknown platform! Pinmuxing not initialized\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finished with the static registrations now; fill in the missing
|
* Finished with the static registrations now; fill in the missing
|
||||||
|
@ -106,6 +121,7 @@ static void __init tegra_dt_init(void)
|
||||||
static const char * tegra_dt_board_compat[] = {
|
static const char * tegra_dt_board_compat[] = {
|
||||||
"nvidia,harmony",
|
"nvidia,harmony",
|
||||||
"nvidia,seaboard",
|
"nvidia,seaboard",
|
||||||
|
"nvidia,ventana",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue