T124/210 requires some specific configuration (VPR setup) to
be performed by the bootloader before the GPU can be used.
For this reason, the GPU node in the device tree is disabled
by default. This patch enables the node if U-boot has performed
VPR configuration.
Boards enabled by this patch are T124's Jetson TK1 and Venice2
and T210's P2571.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
}
#endif /* CONFIG_TEGRA_GPU */
}
#endif /* CONFIG_TEGRA_GPU */
+
+#if defined(CONFIG_OF_LIBFDT)
+
+int gpu_enable_node(void *blob, const char *gpupath);
+
+#else /* CONFIG_OF_LIBFDT */
+
+static inline int gpu_enable_node(void *blob, const char *gpupath)
+{
+ return 0;
+}
+
+#endif /* CONFIG_OF_LIBFDT */
+
+#endif /* __ASM_ARCH_TEGRA_GPU_H */
+
+#if defined(CONFIG_OF_LIBFDT)
+
+int gpu_enable_node(void *blob, const char *gpupath)
+{
+ int offset;
+
+ if (vpr_configured()) {
+ offset = fdt_path_offset(blob, gpupath);
+ if (offset > 0) {
+ fdt_status_okay(blob, offset);
+ debug("enabled GPU node %s\n", gpupath);
+ }
+ }
+
+ return 0;
+}
+
+#endif
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
+#include <asm/arch-tegra/gpu.h>
#include "pinmux-config-jetson-tk1.h"
#include "pinmux-config-jetson-tk1.h"
return pci_eth_init(bis);
}
#endif /* PCI */
return pci_eth_init(bis);
}
#endif /* PCI */
+
+int ft_board_setup(void *blob, bd_t *bd)
+{
+ gpu_enable_node(blob, "/gpu@0,57000000");
+
+ return 0;
+}
#include <asm/arch/pinmux.h>
#include <asm/gpio.h>
#include "max77620_init.h"
#include <asm/arch/pinmux.h>
#include <asm/gpio.h>
#include "max77620_init.h"
+#include <asm/arch-tegra/gpu.h>
#include "pinmux-config-p2571.h"
void pin_mux_mmc(void)
#include "pinmux-config-p2571.h"
void pin_mux_mmc(void)
gpio_request(GPIO_PE4, "FAN_VDD");
gpio_direction_output(GPIO_PE4, 1);
}
gpio_request(GPIO_PE4, "FAN_VDD");
gpio_direction_output(GPIO_PE4, 1);
}
+
+int ft_board_setup(void *blob, bd_t *bd)
+{
+ gpu_enable_node(blob, "/gpu@0,57000000");
+ return 0;
+}
#include <common.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
#include <common.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
+#include <asm/arch-tegra/gpu.h>
#include "pinmux-config-venice2.h"
/*
#include "pinmux-config-venice2.h"
/*
pinmux_config_drvgrp_table(venice2_drvgrps,
ARRAY_SIZE(venice2_drvgrps));
}
pinmux_config_drvgrp_table(venice2_drvgrps,
ARRAY_SIZE(venice2_drvgrps));
}
+
+int ft_board_setup(void *blob, bd_t *bd)
+{
+ gpu_enable_node(blob, "/gpu@0,57000000");
+
+ return 0;
+}
#define CONFIG_ARMV7_SECURE_BASE 0xfff00000
#define CONFIG_ARMV7_SECURE_RESERVE_SIZE 0x00100000
#define CONFIG_ARMV7_SECURE_BASE 0xfff00000
#define CONFIG_ARMV7_SECURE_RESERVE_SIZE 0x00100000
+#define CONFIG_OF_BOARD_SETUP
+
#include "tegra-common-post.h"
#define COUNTER_FREQUENCY 38400000
#include "tegra-common-post.h"
#define COUNTER_FREQUENCY 38400000
+#define CONFIG_OF_BOARD_SETUP
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"
+#define CONFIG_OF_BOARD_SETUP
+