Skip to content
Snippets Groups Projects
Commit 0deba29c authored by Simon Glass's avatar Simon Glass Committed by Tom Warren
Browse files

tegra: nyan-big: Add LCD PMIC init and board ID


Add required setup for the LCD display, and a function to provide the
board ID. This requires GPIOs to be available prior to relocation.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
parent 346451b5
No related branches found
No related tags found
No related merge requests found
......@@ -310,6 +310,10 @@
};
};
gpio@6000d000 {
u-boot,dm-pre-reloc;
};
gpio-keys {
compatible = "gpio-keys";
......
......@@ -6,8 +6,11 @@
*/
#include <common.h>
#include <asm/arch/gpio.h>
#include <errno.h>
#include <asm/gpio.h>
#include <asm/arch/pinmux.h>
#include <power/as3722.h>
#include <power/pmic.h>
#include "pinmux-config-nyan-big.h"
/*
......@@ -25,3 +28,32 @@ void pinmux_init(void)
pinmux_config_drvgrp_table(nyan_big_drvgrps,
ARRAY_SIZE(nyan_big_drvgrps));
}
int tegra_board_id(void)
{
static const int vector[] = {GPIO_PQ3, GPIO_PT1, GPIO_PX1,
GPIO_PX4, -1};
gpio_claim_vector(vector, "board_id%d");
return gpio_get_values_as_int(vector);
}
int tegra_lcd_pmic_init(int board_id)
{
struct udevice *pmic;
int ret;
ret = as3722_get(&pmic);
if (ret)
return -ENOENT;
if (board_id == 0)
as3722_write(pmic, 0x00, 0x3c);
else
as3722_write(pmic, 0x00, 0x50);
as3722_write(pmic, 0x12, 0x10);
as3722_write(pmic, 0x0c, 0x07);
as3722_write(pmic, 0x20, 0x10);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment