diff options
Diffstat (limited to 'board')
40 files changed, 568 insertions, 183 deletions
diff --git a/board/asus/grouper/MAINTAINERS b/board/asus/grouper/MAINTAINERS index f4068d85623..3c59632451f 100644 --- a/board/asus/grouper/MAINTAINERS +++ b/board/asus/grouper/MAINTAINERS @@ -2,6 +2,6 @@ GROUPER BOARD M: Svyatoslav Ryhel <clamor95@gmail.com> S: Maintained F: board/asus/grouper/ -F: configs/grouper_common_defconfig -F: doc/board/asus/grouper_common.rst +F: configs/grouper_defconfig +F: doc/board/asus/grouper.rst F: include/configs/grouper.h diff --git a/board/asus/grouper/Makefile b/board/asus/grouper/Makefile index 05c6ffb405b..8a8e6530c86 100644 --- a/board/asus/grouper/Makefile +++ b/board/asus/grouper/Makefile @@ -6,9 +6,7 @@ # (C) Copyright 2021 # Svyatoslav Ryhel <clamor95@gmail.com> -ifdef CONFIG_XPL_BUILD -obj-$(CONFIG_DM_PMIC_MAX77663) += grouper-spl-max.o -obj-$(CONFIG_DM_PMIC_TPS65910) += grouper-spl-ti.o -endif +obj-$(CONFIG_SPL_BUILD) += grouper-spl.o +obj-$(CONFIG_MULTI_DTB_FIT) += board-info.o obj-y += grouper.o diff --git a/board/asus/grouper/board-info.c b/board/asus/grouper/board-info.c new file mode 100644 index 00000000000..4892accc523 --- /dev/null +++ b/board/asus/grouper/board-info.c @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2024 + * Svyatoslav Ryhel <clamor95@gmail.com> + */ + +#include <env.h> +#include <spl_gpio.h> + +#include <asm/gpio.h> +#include <asm/arch/pinmux.h> + +/* + * PMIC_ID is GMI_CS2_N_PK3 + * MODEM_ID is GMI_CS4_N_PK2 + * + * Extended Project ID + * ==================================== + * MODEM_ID PMIC_ID project name + * 0 0 grouper-E1565 + * 0 1 grouper-PM269 + * 1 0 tilapia + */ +enum project_rev { + E1565, PM269, TILAPIA, COUNT, +}; + +static const char * const project_id_to_fdt[] = { + [E1565] = "tegra30-asus-nexus7-grouper-E1565", + [PM269] = "tegra30-asus-nexus7-grouper-PM269", + [TILAPIA] = "tegra30-asus-nexus7-tilapia-E1565", +}; + +static int id_gpio_get_value(u32 pingrp, u32 pin) +{ + /* Configure pinmux */ + pinmux_set_func(pingrp, PMUX_FUNC_GMI); + pinmux_set_pullupdown(pingrp, PMUX_PULL_DOWN); + pinmux_tristate_enable(pingrp); + pinmux_set_io(pingrp, PMUX_PIN_INPUT); + + /* + * Since this function may be called + * during DM reload we should use SPL + * GPIO functions which do not depend + * on DM. + */ + spl_gpio_input(NULL, pin); + return spl_gpio_get_value(NULL, pin); +} + +static int get_project_id(void) +{ + u32 pmic_id, modem_id, proj_id; + + modem_id = id_gpio_get_value(PMUX_PINGRP_GMI_CS4_N_PK2, + TEGRA_GPIO(K, 2)); + pmic_id = id_gpio_get_value(PMUX_PINGRP_GMI_CS2_N_PK3, + TEGRA_GPIO(K, 3)); + + proj_id = (modem_id << 1 | pmic_id) & COUNT; + + log_debug("[GROUPER]: project id %d (%s)\n", proj_id, + project_id_to_fdt[proj_id]); + + return proj_id; +} + +int board_fit_config_name_match(const char *name) +{ + if (!strcmp(name, project_id_to_fdt[get_project_id()])) + return 0; + + return -1; +} + +void nvidia_board_late_init(void) +{ + char dt_path[64] = { 0 }; + + snprintf(dt_path, sizeof(dt_path), "%s.dtb", + project_id_to_fdt[get_project_id()]); + env_set("fdtfile", dt_path); +} diff --git a/board/asus/grouper/configs/grouper_E1565.config b/board/asus/grouper/configs/grouper_E1565.config deleted file mode 100644 index 265295c8b3e..00000000000 --- a/board/asus/grouper/configs/grouper_E1565.config +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-nexus7-grouper-E1565" -CONFIG_CMD_POWEROFF=y -# CONFIG_MAX77663_GPIO is not set -CONFIG_DM_PMIC_MAX77663=y -CONFIG_DM_REGULATOR_MAX77663=y -CONFIG_SYSRESET_MAX77663=y diff --git a/board/asus/grouper/configs/grouper_PM269.config b/board/asus/grouper/configs/grouper_PM269.config deleted file mode 100644 index a7ee3587edd..00000000000 --- a/board/asus/grouper/configs/grouper_PM269.config +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-nexus7-grouper-PM269" -CONFIG_CMD_POWEROFF=y -CONFIG_DM_PMIC_TPS65910=y -# CONFIG_DM_REGULATOR_TPS65910 is not set -CONFIG_DM_REGULATOR_TPS65911=y -CONFIG_SYSRESET_TPS65910=y diff --git a/board/asus/grouper/configs/tilapia.config b/board/asus/grouper/configs/tilapia.config deleted file mode 100644 index d461b4752a9..00000000000 --- a/board/asus/grouper/configs/tilapia.config +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-nexus7-tilapia-E1565" -CONFIG_SYS_PROMPT="Tegra30 (Tilapia) # " -CONFIG_CMD_POWEROFF=y -# CONFIG_MAX77663_GPIO is not set -CONFIG_DM_PMIC_MAX77663=y -CONFIG_DM_REGULATOR_MAX77663=y -CONFIG_SYSRESET_MAX77663=y diff --git a/board/asus/grouper/grouper-spl-max.c b/board/asus/grouper/grouper-spl-max.c deleted file mode 100644 index 3e58bf97cc4..00000000000 --- a/board/asus/grouper/grouper-spl-max.c +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * T30 Grouper MAX SPL stage configuration - * - * (C) Copyright 2010-2013 - * NVIDIA Corporation <www.nvidia.com> - * - * (C) Copyright 2022 - * Svyatoslav Ryhel <clamor95@gmail.com> - */ - -#include <asm/arch/tegra.h> -#include <asm/arch-tegra/tegra_i2c.h> -#include <linux/delay.h> - -#define MAX77663_I2C_ADDR (0x3C << 1) - -#define MAX77663_REG_SD0 0x16 -#define MAX77663_REG_SD0_DATA (0x2100 | MAX77663_REG_SD0) -#define MAX77663_REG_SD1 0x17 -#define MAX77663_REG_SD1_DATA (0x3000 | MAX77663_REG_SD1) -#define MAX77663_REG_LDO4 0x2B -#define MAX77663_REG_LDO4_DATA (0xE000 | MAX77663_REG_LDO4) - -#define MAX77663_REG_GPIO4 0x3A -#define MAX77663_REG_GPIO4_DATA (0x0100 | MAX77663_REG_GPIO4) - -void pmic_enable_cpu_vdd(void) -{ - /* Set VDD_CORE to 1.200V. */ - tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_SD1_DATA); - - udelay(1000); - - /* Bring up VDD_CPU to 1.0125V. */ - tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_SD0_DATA); - udelay(1000); - - /* Bring up VDD_RTC to 1.200V. */ - tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_LDO4_DATA); - udelay(10 * 1000); - - /* Set 32k-out gpio state */ - tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_GPIO4_DATA); -} diff --git a/board/asus/grouper/grouper-spl-ti.c b/board/asus/grouper/grouper-spl-ti.c deleted file mode 100644 index 1dcce80b48c..00000000000 --- a/board/asus/grouper/grouper-spl-ti.c +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * T30 Grouper TI SPL stage configuration - * - * (C) Copyright 2010-2013 - * NVIDIA Corporation <www.nvidia.com> - * - * (C) Copyright 2022 - * Svyatoslav Ryhel <clamor95@gmail.com> - */ - -#include <asm/arch/tegra.h> -#include <asm/arch-tegra/tegra_i2c.h> -#include <linux/delay.h> - -#define TPS65911_I2C_ADDR (0x2D << 1) -#define TPS65911_VDDCTRL_OP_REG 0x28 -#define TPS65911_VDDCTRL_SR_REG 0x27 -#define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG) -#define TPS65911_VDDCTRL_SR_DATA (0x0100 | TPS65911_VDDCTRL_SR_REG) - -#define TPS62361B_I2C_ADDR (0x60 << 1) -#define TPS62361B_SET3_REG 0x03 -#define TPS62361B_SET3_DATA (0x4600 | TPS62361B_SET3_REG) - -void pmic_enable_cpu_vdd(void) -{ - /* Set VDD_CORE to 1.200V. */ - tegra_i2c_ll_write(TPS62361B_I2C_ADDR, TPS62361B_SET3_DATA); - - udelay(1000); - - /* - * Bring up CPU VDD via the TPS65911x PMIC on the DVC I2C bus. - * First set VDD to 1.0125V, then enable the VDD regulator. - */ - tegra_i2c_ll_write(TPS65911_I2C_ADDR, TPS65911_VDDCTRL_OP_DATA); - udelay(1000); - tegra_i2c_ll_write(TPS65911_I2C_ADDR, TPS65911_VDDCTRL_SR_DATA); - udelay(10 * 1000); -} diff --git a/board/asus/grouper/grouper-spl.c b/board/asus/grouper/grouper-spl.c new file mode 100644 index 00000000000..a8d4e540ab2 --- /dev/null +++ b/board/asus/grouper/grouper-spl.c @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * T30 Grouper SPL stage configuration + * + * (C) Copyright 2010-2013 + * NVIDIA Corporation <www.nvidia.com> + * + * (C) Copyright 2022 + * Svyatoslav Ryhel <clamor95@gmail.com> + */ + +#include <asm/gpio.h> +#include <asm/arch/pinmux.h> +#include <asm/arch/tegra.h> +#include <asm/arch-tegra/tegra_i2c.h> +#include <spl_gpio.h> +#include <linux/delay.h> + +#define MAX77663_I2C_ADDR (0x3C << 1) + +#define MAX77663_REG_SD0 0x16 +#define MAX77663_REG_SD0_DATA (0x2100 | MAX77663_REG_SD0) +#define MAX77663_REG_SD1 0x17 +#define MAX77663_REG_SD1_DATA (0x3000 | MAX77663_REG_SD1) +#define MAX77663_REG_LDO4 0x2B +#define MAX77663_REG_LDO4_DATA (0xE000 | MAX77663_REG_LDO4) + +#define MAX77663_REG_GPIO4 0x3A +#define MAX77663_REG_GPIO4_DATA (0x0100 | MAX77663_REG_GPIO4) + +#define TPS65911_I2C_ADDR (0x2D << 1) + +#define TPS65911_VDDCTRL_OP_REG 0x28 +#define TPS65911_VDDCTRL_SR_REG 0x27 +#define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG) +#define TPS65911_VDDCTRL_SR_DATA (0x0100 | TPS65911_VDDCTRL_SR_REG) + +#define TPS62361B_I2C_ADDR (0x60 << 1) + +#define TPS62361B_SET3_REG 0x03 +#define TPS62361B_SET3_DATA (0x4600 | TPS62361B_SET3_REG) + +/* + * PCB_ID[8] is GMI_CS2_N_PK3 + * + * PMIC module detection + * ============================== + * PCB_ID[8] 0 1 + * PMIC Maxim TI + */ +static bool ti_pmic_detected(void) +{ + /* Configure pinmux */ + pinmux_set_func(PMUX_PINGRP_GMI_CS2_N_PK3, PMUX_FUNC_GMI); + pinmux_set_pullupdown(PMUX_PINGRP_GMI_CS2_N_PK3, PMUX_PULL_DOWN); + pinmux_tristate_enable(PMUX_PINGRP_GMI_CS2_N_PK3); + pinmux_set_io(PMUX_PINGRP_GMI_CS2_N_PK3, PMUX_PIN_INPUT); + + spl_gpio_input(NULL, TEGRA_GPIO(K, 3)); + return spl_gpio_get_value(NULL, TEGRA_GPIO(K, 3)); +} + +static void max_enable_cpu_vdd(void) +{ + /* Set VDD_CORE to 1.200V. */ + tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_SD1_DATA); + + udelay(1000); + + /* Bring up VDD_CPU to 1.0125V. */ + tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_SD0_DATA); + udelay(1000); + + /* Bring up VDD_RTC to 1.200V. */ + tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_LDO4_DATA); + udelay(10 * 1000); + + /* Set 32k-out gpio state */ + tegra_i2c_ll_write(MAX77663_I2C_ADDR, MAX77663_REG_GPIO4_DATA); +} + +static void ti_enable_cpu_vdd(void) +{ + /* Set VDD_CORE to 1.200V. */ + tegra_i2c_ll_write(TPS62361B_I2C_ADDR, TPS62361B_SET3_DATA); + + udelay(1000); + + /* + * Bring up CPU VDD via the TPS65911x PMIC on the DVC I2C bus. + * First set VDD to 1.0125V, then enable the VDD regulator. + */ + tegra_i2c_ll_write(TPS65911_I2C_ADDR, TPS65911_VDDCTRL_OP_DATA); + udelay(1000); + tegra_i2c_ll_write(TPS65911_I2C_ADDR, TPS65911_VDDCTRL_SR_DATA); + udelay(10 * 1000); +} + +void pmic_enable_cpu_vdd(void) +{ + if (ti_pmic_detected()) + ti_enable_cpu_vdd(); + else + max_enable_cpu_vdd(); +} diff --git a/board/asus/grouper/grouper.env b/board/asus/grouper/grouper.env new file mode 100644 index 00000000000..b1f4aeb5552 --- /dev/null +++ b/board/asus/grouper/grouper.env @@ -0,0 +1,15 @@ +#include <env/nvidia/prod_upd.env> + +button_cmd_0_name=Volume Down +button_cmd_0=bootmenu +button_cmd_1_name=Lid +button_cmd_1=poweroff +partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs} + +bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu +bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu +bootmenu_2=update bootloader=run flash_uboot +bootmenu_3=reboot RCM=enterrcm +bootmenu_4=reboot=reset +bootmenu_5=power off=poweroff +bootmenu_delay=-1 diff --git a/board/asus/transformer-t20/transformer-t20.env b/board/asus/transformer-t20/transformer-t20.env new file mode 100644 index 00000000000..2f7e8206c24 --- /dev/null +++ b/board/asus/transformer-t20/transformer-t20.env @@ -0,0 +1,17 @@ +#include <env/nvidia/prod_upd.env> + +button_cmd_0_name=Volume Down +button_cmd_0=bootmenu +button_cmd_1_name=Lid sensor +button_cmd_1=poweroff +partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs} +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 diff --git a/board/asus/transformer-t30/MAINTAINERS b/board/asus/transformer-t30/MAINTAINERS index 071a9c04b86..869cc5aeb91 100644 --- a/board/asus/transformer-t30/MAINTAINERS +++ b/board/asus/transformer-t30/MAINTAINERS @@ -4,5 +4,4 @@ S: Maintained F: board/asus/transformer-t30/ F: configs/transformer_t30_defconfig F: doc/board/asus/transformer_t30.rst -F: include/configs/transformer-common.h F: include/configs/transformer-t30.h diff --git a/board/asus/transformer-t30/Makefile b/board/asus/transformer-t30/Makefile index ad700786b70..22b6160f757 100644 --- a/board/asus/transformer-t30/Makefile +++ b/board/asus/transformer-t30/Makefile @@ -6,6 +6,7 @@ # (C) Copyright 2021 # Svyatoslav Ryhel <clamor95@gmail.com> -obj-$(CONFIG_XPL_BUILD) += transformer-t30-spl.o +obj-$(CONFIG_SPL_BUILD) += transformer-t30-spl.o +obj-$(CONFIG_MULTI_DTB_FIT) += board-info.o obj-y += transformer-t30.o diff --git a/board/asus/transformer-t30/board-info.c b/board/asus/transformer-t30/board-info.c new file mode 100644 index 00000000000..a2b540c90b6 --- /dev/null +++ b/board/asus/transformer-t30/board-info.c @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2024 + * Svyatoslav Ryhel <clamor95@gmail.com> + */ + +#include <env.h> +#include <spl_gpio.h> + +#include <asm/gpio.h> +#include <asm/arch/pinmux.h> + +/* + * PCB_ID[1] is kb_row5_pr5 + * PCB_ID[3] is kb_col7_pq7 + * PCB_ID[4] is kb_row2_pr2 + * PCB_ID[5] is kb_col5_pq5 + * + * Project ID + * ===================================================== + * PCB_ID[1] PCB_ID[5] PCB_ID[4] PCB_ID[3] Project + * 0 0 0 0 TF201 + * 0 0 0 1 P1801 + * 0 0 1 0 TF300T + * 0 0 1 1 TF300TG + * 0 1 0 0 TF700T + * 0 1 0 1 TF300TL + * 0 1 1 0 Extension + * 0 1 1 1 TF500T + * 1 0 0 0 TF502T/TF600T + * ===================================================== + */ +enum project_rev { + TF201, P1801, TF300T, TF300TG, TF700T, + TF300TL, EXT, TF500T, TF600T +}; + +static const char * const project_id_to_fdt[] = { + [TF201] = "tegra30-asus-tf201", + [P1801] = "tegra30-asus-p1801-t", + [TF300T] = "tegra30-asus-tf300t", + [TF300TG] = "tegra30-asus-tf300tg", + [TF700T] = "tegra30-asus-tf700t", + [TF300TL] = "tegra30-asus-tf300tl", + [TF600T] = "tegra30-asus-tf600t", +}; + +static int id_gpio_get_value(u32 pingrp, u32 pin) +{ + /* Configure pinmux */ + pinmux_set_func(pingrp, PMUX_FUNC_KBC); + pinmux_set_pullupdown(pingrp, PMUX_PULL_DOWN); + pinmux_tristate_enable(pingrp); + pinmux_set_io(pingrp, PMUX_PIN_INPUT); + + /* + * Since this function may be called + * during DM reload we should use SPL + * GPIO functions which do not depend + * on DM. + */ + spl_gpio_input(NULL, pin); + return spl_gpio_get_value(NULL, pin); +} + +static int get_project_id(void) +{ + u32 pcb_id1, pcb_id3, pcb_id4, pcb_id5; + + pcb_id1 = id_gpio_get_value(PMUX_PINGRP_KB_ROW5_PR5, + TEGRA_GPIO(R, 5)); + pcb_id3 = id_gpio_get_value(PMUX_PINGRP_KB_COL7_PQ7, + TEGRA_GPIO(Q, 7)); + pcb_id4 = id_gpio_get_value(PMUX_PINGRP_KB_ROW2_PR2, + TEGRA_GPIO(R, 2)); + pcb_id5 = id_gpio_get_value(PMUX_PINGRP_KB_COL5_PQ5, + TEGRA_GPIO(Q, 5)); + + /* Construct board ID */ + int proj_id = pcb_id1 << 3 | pcb_id5 << 2 | + pcb_id4 << 1 | pcb_id3; + + log_debug("[TRANSFORMER]: project id %d (%s)\n", proj_id, + project_id_to_fdt[proj_id]); + + /* Mark tablet with SPI flash */ + if (proj_id == TF600T) + env_set_hex("spiflash", true); + else + env_set_hex("spiflash", false); + + return proj_id & 0xf; +} + +int board_fit_config_name_match(const char *name) +{ + if (!strcmp(name, project_id_to_fdt[get_project_id()])) + return 0; + + return -1; +} + +void nvidia_board_late_init(void) +{ + char dt_path[64] = { 0 }; + + snprintf(dt_path, sizeof(dt_path), "%s.dtb", + project_id_to_fdt[get_project_id()]); + env_set("fdtfile", dt_path); +} diff --git a/board/asus/transformer-t30/configs/p1801-t.config b/board/asus/transformer-t30/configs/p1801-t.config deleted file mode 100644 index f378f54570d..00000000000 --- a/board/asus/transformer-t30/configs/p1801-t.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-p1801-t" -# CONFIG_I2C_MUX is not set -CONFIG_USB_GADGET_PRODUCT_NUM=0x4cb0 diff --git a/board/asus/transformer-t30/configs/tf201.config b/board/asus/transformer-t30/configs/tf201.config deleted file mode 100644 index e4fd30378a1..00000000000 --- a/board/asus/transformer-t30/configs/tf201.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf201" -# CONFIG_I2C_MUX is not set -CONFIG_USB_GADGET_PRODUCT_NUM=0x4d00 diff --git a/board/asus/transformer-t30/configs/tf300t.config b/board/asus/transformer-t30/configs/tf300t.config deleted file mode 100644 index 9ad2ebd98e8..00000000000 --- a/board/asus/transformer-t30/configs/tf300t.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf300t" -# CONFIG_I2C_MUX is not set -CONFIG_USB_GADGET_PRODUCT_NUM=0x4d00 diff --git a/board/asus/transformer-t30/configs/tf300tg.config b/board/asus/transformer-t30/configs/tf300tg.config deleted file mode 100644 index 7b44a91acc4..00000000000 --- a/board/asus/transformer-t30/configs/tf300tg.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf300tg" -# CONFIG_I2C_MUX is not set -CONFIG_USB_GADGET_PRODUCT_NUM=0x4c80 diff --git a/board/asus/transformer-t30/configs/tf300tl.config b/board/asus/transformer-t30/configs/tf300tl.config deleted file mode 100644 index 81e96d5df6f..00000000000 --- a/board/asus/transformer-t30/configs/tf300tl.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf300tl" -# CONFIG_I2C_MUX is not set -CONFIG_USB_GADGET_PRODUCT_NUM=0x4d00 diff --git a/board/asus/transformer-t30/configs/tf600t.config b/board/asus/transformer-t30/configs/tf600t.config deleted file mode 100644 index b3734869f59..00000000000 --- a/board/asus/transformer-t30/configs/tf600t.config +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf600t" -CONFIG_BOOTCOMMAND="setenv gpio_button 222; if run check_button; then poweroff; fi; setenv gpio_button 132; if run check_button; then echo Starting SPI flash update ...; run update_spi; fi; run bootcmd_usb0; run bootcmd_mmc1; run bootcmd_mmc0; poweroff;" -# CONFIG_I2C_MUX is not set -CONFIG_TEGRA20_SLINK=y -CONFIG_SPI_FLASH_WINBOND=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x4d00 diff --git a/board/asus/transformer-t30/configs/tf700t.config b/board/asus/transformer-t30/configs/tf700t.config deleted file mode 100644 index 887c25fbf22..00000000000 --- a/board/asus/transformer-t30/configs/tf700t.config +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_DEFAULT_DEVICE_TREE="tegra30-asus-tf700t" -CONFIG_CLK_GPIO=y -CONFIG_USB_GADGET_PRODUCT_NUM=0x4c90 -CONFIG_VIDEO_BRIDGE_TOSHIBA_TC358768=y diff --git a/board/asus/transformer-t30/transformer-t30.env b/board/asus/transformer-t30/transformer-t30.env new file mode 100644 index 00000000000..9b6f4079f84 --- /dev/null +++ b/board/asus/transformer-t30/transformer-t30.env @@ -0,0 +1,17 @@ +#include <env/nvidia/prod_upd.env> + +button_cmd_0_name=Volume Down +button_cmd_0=if spiflash; then run update_spi; else bootmenu; fi +button_cmd_1_name=Lid sensor +button_cmd_1=poweroff +partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs} +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 diff --git a/board/dhelectronics/dh_imx6/MAINTAINERS b/board/dhelectronics/dh_imx6/MAINTAINERS index 8f9b5ff2dca..472e908e278 100644 --- a/board/dhelectronics/dh_imx6/MAINTAINERS +++ b/board/dhelectronics/dh_imx6/MAINTAINERS @@ -3,6 +3,5 @@ M: Andreas Geisreiter <ageisreiter@dh-electronics.de> M: Christoph Niedermaier <cniedermaier@dh-electronics.com> L: u-boot@dh-electronics.com S: Maintained -F: board/dhelectronics/dh_imx6/ -F: include/configs/dh_imx6.h -F: configs/dh_imx6_defconfig +N: imx6.*dh[cs]o +N: dh_imx6 diff --git a/board/dhelectronics/dh_imx8mp/MAINTAINERS b/board/dhelectronics/dh_imx8mp/MAINTAINERS index db69781a852..cf9f77252c9 100644 --- a/board/dhelectronics/dh_imx8mp/MAINTAINERS +++ b/board/dhelectronics/dh_imx8mp/MAINTAINERS @@ -2,7 +2,5 @@ DH electronics DHCOM i.MX8M Plus and matching carrier boards M: Marek Vasut <marex@denx.de> L: u-boot@dh-electronics.com S: Maintained -F: arch/arm/dts/imx8mp-dhcom* -F: board/dhelectronics/dh_imx8mp/ -F: configs/imx8mp_dhcom*defconfig -F: include/configs/imx8mp_dhcom* +N: imx8mp.*dh[cs]o +N: dh_imx8mp diff --git a/board/htc/endeavoru/endeavoru-spl.c b/board/htc/endeavoru/endeavoru-spl.c index 3c4caff8069..33ff72be273 100644 --- a/board/htc/endeavoru/endeavoru-spl.c +++ b/board/htc/endeavoru/endeavoru-spl.c @@ -9,13 +9,12 @@ * Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <asm/io.h> #include <asm/gpio.h> #include <asm/arch/pinmux.h> #include <asm/arch/tegra.h> -#include <asm/arch-tegra/board.h> #include <asm/arch-tegra/pmc.h> #include <asm/arch-tegra/tegra_i2c.h> +#include <spl_gpio.h> #include <linux/delay.h> /* @@ -35,24 +34,6 @@ #define TPS80032_SMPS1_CFG_STATE_DATA (0x0100 | TPS80032_SMPS1_CFG_STATE_REG) #define TPS80032_SMPS2_CFG_STATE_DATA (0x0100 | TPS80032_SMPS2_CFG_STATE_REG) -#define TEGRA_GPIO_PS0 144 - -void pmic_enable_cpu_vdd(void) -{ - /* Set VDD_CORE to 1.200V. */ - tegra_i2c_ll_write(TPS80032_DVS_I2C_ADDR, TPS80032_SMPS2_CFG_VOLTAGE_DATA); - udelay(1000); - tegra_i2c_ll_write(TPS80032_CTL1_I2C_ADDR, TPS80032_SMPS2_CFG_STATE_DATA); - - udelay(1000); - - /* Bring up VDD_CPU to 1.0125V. */ - tegra_i2c_ll_write(TPS80032_DVS_I2C_ADDR, TPS80032_SMPS1_CFG_VOLTAGE_DATA); - udelay(1000); - tegra_i2c_ll_write(TPS80032_CTL1_I2C_ADDR, TPS80032_SMPS1_CFG_STATE_DATA); - udelay(10 * 1000); -} - /* * Unlike all other supported Tegra devices and most known Tegra devices, the * HTC One X has no hardware way to enter APX/RCM mode, which may lead to a @@ -65,15 +46,13 @@ void pmic_enable_cpu_vdd(void) * proposed to add the RCM rebooting hook as early into SPL as possible since * SPL is much more robust and has minimal changes that can break bootflow. * - * gpio_early_init_uart() function was chosen as it is the earliest function + * pmic_enable_cpu_vdd() function was chosen as it is the earliest function * exposed for setup by the device. Hook performs a check for volume up * button state and triggers RCM if it is pressed. */ -void gpio_early_init_uart(void) +void apx_hook(void) { - struct gpio_ctlr *ctlr = (struct gpio_ctlr *)NV_PA_GPIO_BASE; - struct gpio_ctlr_bank *bank = &ctlr->gpio_bank[GPIO_BANK(TEGRA_GPIO_PS0)]; - u32 value; + int value; /* Configure pinmux */ pinmux_set_func(PMUX_PINGRP_KB_ROW8_PS0, PMUX_FUNC_KBC); @@ -81,19 +60,8 @@ void gpio_early_init_uart(void) pinmux_tristate_disable(PMUX_PINGRP_KB_ROW8_PS0); pinmux_set_io(PMUX_PINGRP_KB_ROW8_PS0, PMUX_PIN_INPUT); - /* Configure GPIO direction as input. */ - value = readl(&bank->gpio_dir_out[GPIO_PORT(TEGRA_GPIO_PS0)]); - value &= ~(1 << GPIO_BIT(TEGRA_GPIO_PS0)); - writel(value, &bank->gpio_dir_out[GPIO_PORT(TEGRA_GPIO_PS0)]); - - /* Enable the pin as a GPIO */ - value = readl(&bank->gpio_config[GPIO_PORT(TEGRA_GPIO_PS0)]); - value |= 1 << GPIO_BIT(TEGRA_GPIO_PS0); - writel(value, &bank->gpio_config[GPIO_PORT(TEGRA_GPIO_PS0)]); - - /* Get GPIO value */ - value = readl(&bank->gpio_in[GPIO_PORT(TEGRA_GPIO_PS0)]); - value = (value >> GPIO_BIT(TEGRA_GPIO_PS0)) & 1; + spl_gpio_input(NULL, TEGRA_GPIO(S, 0)); + value = spl_gpio_get_value(NULL, TEGRA_GPIO(S, 0)); /* Enter RCM if button is pressed */ if (!value) { @@ -101,3 +69,22 @@ void gpio_early_init_uart(void) tegra_pmc_writel(PMC_CNTRL_MAIN_RST, PMC_CNTRL); } } + +void pmic_enable_cpu_vdd(void) +{ + /* Check if RCM request is active */ + apx_hook(); + + /* Set VDD_CORE to 1.200V. */ + tegra_i2c_ll_write(TPS80032_DVS_I2C_ADDR, TPS80032_SMPS2_CFG_VOLTAGE_DATA); + udelay(1000); + tegra_i2c_ll_write(TPS80032_CTL1_I2C_ADDR, TPS80032_SMPS2_CFG_STATE_DATA); + + udelay(1000); + + /* Bring up VDD_CPU to 1.0125V. */ + tegra_i2c_ll_write(TPS80032_DVS_I2C_ADDR, TPS80032_SMPS1_CFG_VOLTAGE_DATA); + udelay(1000); + tegra_i2c_ll_write(TPS80032_CTL1_I2C_ADDR, TPS80032_SMPS1_CFG_STATE_DATA); + udelay(10 * 1000); +} diff --git a/board/htc/endeavoru/endeavoru.env b/board/htc/endeavoru/endeavoru.env new file mode 100644 index 00000000000..53e9b568454 --- /dev/null +++ b/board/htc/endeavoru/endeavoru.env @@ -0,0 +1,13 @@ +#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} + +bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu +bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu +bootmenu_2=update bootloader=run flash_uboot +bootmenu_3=reboot RCM=enterrcm +bootmenu_4=reboot=reset +bootmenu_5=power off=poweroff +bootmenu_delay=-1 diff --git a/board/lenovo/ideapad-yoga-11/ideapad-yoga-11.env b/board/lenovo/ideapad-yoga-11/ideapad-yoga-11.env new file mode 100644 index 00000000000..7bc2b80c480 --- /dev/null +++ b/board/lenovo/ideapad-yoga-11/ideapad-yoga-11.env @@ -0,0 +1,16 @@ +#include <env/nvidia/prod_upd.env> + +button_cmd_0_name=Volume Down +button_cmd_0=bootmenu +button_cmd_1_name=Lid sensor +button_cmd_1=poweroff +partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs} + +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 update_spi +bootmenu_4=reboot RCM=enterrcm +bootmenu_5=reboot=reset +bootmenu_6=power off=poweroff +bootmenu_delay=-1 diff --git a/board/lg/x3-t30/configs/p880.config b/board/lg/x3-t30/configs/p880.config index 57c2885779b..44e0fa7ef77 100644 --- a/board/lg/x3-t30/configs/p880.config +++ b/board/lg/x3-t30/configs/p880.config @@ -1,3 +1,4 @@ +CONFIG_ENV_SOURCE_FILE="p880" CONFIG_DEFAULT_DEVICE_TREE="tegra30-lg-p880" CONFIG_SYS_PROMPT="Tegra30 (P880) # " CONFIG_VIDEO_LCD_RENESAS_R69328=y diff --git a/board/lg/x3-t30/configs/p895.config b/board/lg/x3-t30/configs/p895.config index 2eba92594b5..267ae3a80d0 100644 --- a/board/lg/x3-t30/configs/p895.config +++ b/board/lg/x3-t30/configs/p895.config @@ -1,3 +1,4 @@ +CONFIG_ENV_SOURCE_FILE="p895" CONFIG_DEFAULT_DEVICE_TREE="tegra30-lg-p895" CONFIG_SYS_PROMPT="Tegra30 (P895) # " CONFIG_VIDEO_LCD_RENESAS_R61307=y diff --git a/board/lg/x3-t30/p880.env b/board/lg/x3-t30/p880.env new file mode 100644 index 00000000000..f2bf298a997 --- /dev/null +++ b/board/lg/x3-t30/p880.env @@ -0,0 +1,15 @@ +#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_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 diff --git a/board/lg/x3-t30/p895.env b/board/lg/x3-t30/p895.env new file mode 100644 index 00000000000..53e9b568454 --- /dev/null +++ b/board/lg/x3-t30/p895.env @@ -0,0 +1,13 @@ +#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} + +bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu +bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu +bootmenu_2=update bootloader=run flash_uboot +bootmenu_3=reboot RCM=enterrcm +bootmenu_4=reboot=reset +bootmenu_5=power off=poweroff +bootmenu_delay=-1 diff --git a/board/microsoft/surface-rt/surface-rt.env b/board/microsoft/surface-rt/surface-rt.env new file mode 100644 index 00000000000..682929096ae --- /dev/null +++ b/board/microsoft/surface-rt/surface-rt.env @@ -0,0 +1,14 @@ +button_cmd_0_name=Volume Down +button_cmd_0=bootmenu +button_cmd_1_name=Hall Sensor +button_cmd_1=poweroff +partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs} + +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=boot from USB=usb reset; usb start; bootflow scan +bootmenu_4=reboot RCM=enterrcm +bootmenu_5=reboot=reset +bootmenu_6=power off=poweroff +bootmenu_delay=-1 diff --git a/board/nvidia/cardhu/cardhu.env b/board/nvidia/cardhu/cardhu.env new file mode 100644 index 00000000000..9d1e3e1da2d --- /dev/null +++ b/board/nvidia/cardhu/cardhu.env @@ -0,0 +1,2 @@ +board_name=cardhu-a04 +fdtfile=tegra30-cardhu-a04.dtb diff --git a/board/nvidia/p2771-0000/p2771-0000.env b/board/nvidia/p2771-0000/p2771-0000.env new file mode 100644 index 00000000000..6789cc1cc63 --- /dev/null +++ b/board/nvidia/p2771-0000/p2771-0000.env @@ -0,0 +1,22 @@ +calculated_vars=kernel_addr_r fdt_addr_r scriptaddr pxefile_addr_r ramdisk_addr_r + +kernel_addr_r_align=00200000 +kernel_addr_r_offset=00080000 +kernel_addr_r_size=02000000 +kernel_addr_r_aliases=loadaddr + +fdt_addr_r_align=00200000 +fdt_addr_r_offset=00000000 +fdt_addr_r_size=00200000 + +scriptaddr_align=00200000 +scriptaddr_offset=00000000 +scriptaddr_size=00200000 + +pxefile_addr_r_align=00200000 +pxefile_addr_r_offset=00000000 +pxefile_addr_r_size=00200000 + +ramdisk_addr_r_align=00200000 +ramdisk_addr_r_offset=00000000 +ramdisk_addr_r_size=02000000 diff --git a/board/nvidia/p3450-0000/p3450-0000.env b/board/nvidia/p3450-0000/p3450-0000.env new file mode 100644 index 00000000000..f21d2fc463e --- /dev/null +++ b/board/nvidia/p3450-0000/p3450-0000.env @@ -0,0 +1,7 @@ +/* Only MMC/PXE/DHCP for now, add USB back in later when supported */ +boot_targets=mmc1 mmc0 pxe dhcp + +preboot=if test -e mmc 1:1 /u-boot-preboot.scr; then + load mmc 1:1 ${scriptaddr} /u-boot-preboot.scr; + source ${scriptaddr}; + fi diff --git a/board/toradex/apalis-tk1/apalis-tk1.env b/board/toradex/apalis-tk1/apalis-tk1.env new file mode 100644 index 00000000000..9c2d9a92f0b --- /dev/null +++ b/board/toradex/apalis-tk1/apalis-tk1.env @@ -0,0 +1,45 @@ +/* + * Custom Boot configuration: + * 1. 8bit SD port (MMC1) + * 2. 4bit SD port (MMC2) + * 3. eMMC (MMC0) + */ +boot_targets=mmc1 mmc2 mmc0 usb pxe dhcp + +boot_file=zImage +boot_script_dhcp=boot.scr +console=ttyS0 +defargs=lp0_vec=2064@0xf46ff000 core_edp_mv=1150 core_edp_ma=4000 + usb_port_owner_info=2 lane_owner_info=6 emc_max_dvfs=0 + user_debug=30 pcie_aspm=off +dfu_alt_info=apalis-tk1.img raw 0x0 0x500 mmcpart 1; + boot part 0 1 mmcpart 0; + rootfs part 0 2 mmcpart 0; + zImage fat 0 1 mmcpart 0; + tegra124-apalis-eval.dtb fat 0 1 mmcpart 0 +fdt_board=eval +fdt_fixup=; +fdt_module=apalis-v1.2 +uboot_hwpart=1 +uboot_blk=0 +set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && + setexpr blkcnt ${blkcnt} / 0x200 +update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && + mmc write ${loadaddr} ${uboot_blk} ${blkcnt} +setethupdate=if env exists ethaddr; then; else setenv ethaddr + 00:14:2d:00:00:00; fi; pci enum && tftpboot ${loadaddr} + flash_eth.img && source ${loadaddr} +setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; + load ${interface} ${drive}:1 ${loadaddr} flash_blk.img + || setenv drive 2; mmc rescan; load ${interface} ${drive}:1 + ${loadaddr} flash_blk.img && + source ${loadaddr} +setup=setenv setupargs igb_mac=${ethaddr} + consoleblank=0 no_console_suspend=1 console=tty1 + console=${console},${baudrate}n8 debug_uartport=lsport,0 + ${memargs} +setupdate=run setsdupdate || run setusbupdate || run setethupdate +setusbupdate=usb start && setenv interface usb; setenv drive 0; + load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && + source ${loadaddr} +vidargs=fbcon=map:1 diff --git a/board/toradex/apalis_t30/apalis_t30.env b/board/toradex/apalis_t30/apalis_t30.env new file mode 100644 index 00000000000..a8f2904bcd7 --- /dev/null +++ b/board/toradex/apalis_t30/apalis_t30.env @@ -0,0 +1,9 @@ +uboot_hwpart=1 +uboot_blk=0 + +set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && + setexpr blkcnt ${blkcnt} / 0x200 +update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && + mmc write ${loadaddr} ${uboot_blk} ${blkcnt} + +boot_script_dhcp=boot.scr diff --git a/board/toradex/colibri_t20/colibri_t20.env b/board/toradex/colibri_t20/colibri_t20.env new file mode 100644 index 00000000000..5e9f0630b27 --- /dev/null +++ b/board/toradex/colibri_t20/colibri_t20.env @@ -0,0 +1,3 @@ +/* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */ +boot_script_dhcp=boot.scr +update_uboot=nand erase.part u-boot && nand write ${loadaddr} u-boot ${filesize} diff --git a/board/toradex/colibri_t30/colibri_t30.env b/board/toradex/colibri_t30/colibri_t30.env new file mode 100644 index 00000000000..a8f2904bcd7 --- /dev/null +++ b/board/toradex/colibri_t30/colibri_t30.env @@ -0,0 +1,9 @@ +uboot_hwpart=1 +uboot_blk=0 + +set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && + setexpr blkcnt ${blkcnt} / 0x200 +update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && + mmc write ${loadaddr} ${uboot_blk} ${blkcnt} + +boot_script_dhcp=boot.scr diff --git a/board/wexler/qc750/qc750.env b/board/wexler/qc750/qc750.env new file mode 100644 index 00000000000..f2bf298a997 --- /dev/null +++ b/board/wexler/qc750/qc750.env @@ -0,0 +1,15 @@ +#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_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 |