diff options
| author | Tom Rini <[email protected]> | 2025-02-22 08:42:01 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-02-22 08:42:01 -0600 |
| commit | 5061eab96acd60d28149e080f3a37fbe7220ca54 (patch) | |
| tree | 01f3a1d82dc1bc1b52cc7cc35076e08697dc629b /board | |
| parent | 313b9856f95419b01df7cc6b9a16f7b07d9fe13c (diff) | |
| parent | ad3ec11b393b7d89d1df353324df4600b219a647 (diff) | |
Merge branch 'picasso' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Branch contains bringup of Acer Iconia Tab A500 (codename picasso), a
Tegra 2 Android device with decent Linux kernel support. Ondevice tests
and U-Boot test suit all passed.
Diffstat (limited to 'board')
| -rw-r--r-- | board/acer/picasso/Kconfig | 12 | ||||
| -rw-r--r-- | board/acer/picasso/MAINTAINERS | 7 | ||||
| -rw-r--r-- | board/acer/picasso/Makefile | 9 | ||||
| -rw-r--r-- | board/acer/picasso/picasso.c | 57 | ||||
| -rw-r--r-- | board/acer/picasso/picasso.env | 18 |
5 files changed, 103 insertions, 0 deletions
diff --git a/board/acer/picasso/Kconfig b/board/acer/picasso/Kconfig new file mode 100644 index 00000000000..73c0aa08508 --- /dev/null +++ b/board/acer/picasso/Kconfig @@ -0,0 +1,12 @@ +if TARGET_PICASSO + +config SYS_BOARD + default "picasso" + +config SYS_VENDOR + default "acer" + +config SYS_CONFIG_NAME + default "picasso" + +endif diff --git a/board/acer/picasso/MAINTAINERS b/board/acer/picasso/MAINTAINERS new file mode 100644 index 00000000000..99f8c0b6d7f --- /dev/null +++ b/board/acer/picasso/MAINTAINERS @@ -0,0 +1,7 @@ +PICASSO BOARD +M: Svyatoslav Ryhel <[email protected]> +S: Maintained +F: board/acer/picasso/ +F: configs/picasso_defconfig +F: doc/board/acer/picasso.rst +F: include/configs/picasso.h diff --git a/board/acer/picasso/Makefile b/board/acer/picasso/Makefile new file mode 100644 index 00000000000..675059c112d --- /dev/null +++ b/board/acer/picasso/Makefile @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2010,2011 +# NVIDIA Corporation <www.nvidia.com> +# +# (C) Copyright 2024 +# Svyatoslav Ryhel <[email protected]> + +obj-y += picasso.o diff --git a/board/acer/picasso/picasso.c b/board/acer/picasso/picasso.c new file mode 100644 index 00000000000..d3e600cad52 --- /dev/null +++ b/board/acer/picasso/picasso.c @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation <www.nvidia.com> + * + * (C) Copyright 2024 + * Svyatoslav Ryhel <[email protected]> + */ + +/* Picasso derives from Ventana board */ + +#include <dm.h> +#include <i2c.h> +#include <log.h> +#include <linux/delay.h> + +#define TPS6586X_I2C_ADDRESS 0x34 +#define TPS6586X_SUPPLYENE 0x14 +#define EXITSLREQ_BIT BIT(1) +#define SLEEP_MODE_BIT BIT(3) + +#ifdef CONFIG_CMD_POWEROFF +int do_poweroff(struct cmd_tbl *cmdtp, + int flag, int argc, char *const argv[]) +{ + struct udevice *dev; + uchar data_buffer[1]; + int ret; + + ret = i2c_get_chip_for_busnum(0, TPS6586X_I2C_ADDRESS, 1, &dev); + if (ret) { + log_debug("cannot find PMIC I2C chip\n"); + return 0; + } + + ret = dm_i2c_read(dev, TPS6586X_SUPPLYENE, data_buffer, 1); + if (ret) + return ret; + + data_buffer[0] &= ~EXITSLREQ_BIT; + + ret = dm_i2c_write(dev, TPS6586X_SUPPLYENE, data_buffer, 1); + if (ret) + return ret; + + data_buffer[0] |= SLEEP_MODE_BIT; + + ret = dm_i2c_write(dev, TPS6586X_SUPPLYENE, data_buffer, 1); + if (ret) + return ret; + + // wait some time and then print error + mdelay(5000); + printf("Failed to power off!!!\n"); + return 1; +} +#endif diff --git a/board/acer/picasso/picasso.env b/board/acer/picasso/picasso.env new file mode 100644 index 00000000000..d9409b07d98 --- /dev/null +++ b/board/acer/picasso/picasso.env @@ -0,0 +1,18 @@ +#include <env/nvidia/prod_upd.env> + +button_cmd_0_name=Volume Down +button_cmd_0=bootmenu +partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs} + +boot_block_size_r=0x100000 +boot_block_size=0x800 +boot_dev=1 + +bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu +bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu +bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu +bootmenu_3=update bootloader=run flash_uboot +bootmenu_4=reboot RCM=enterrcm +bootmenu_5=reboot=reset +bootmenu_6=power off=poweroff +bootmenu_delay=-1 |
