mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-25 23:06:15 +00:00
board: wexler: qc750: add WEXLER Tab 7t support
WEXLER Tab 7t is a mini tablet computer developed by WEXLER that runs the Android operating system. The device features a 7.0-inch (180 mm) HD display, an Nvidia Tegra 3 quad-core chip, 1 GB of RAM, 8, 16 or 32 GB of storage that can be supplemented with a microSDXC card giving up to 64 GB of additional storage and a full size USB port. Tested-by: Maksim Kurnosenko <asusx2@mail.ru> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
This commit is contained in:
parent
28144ba8d0
commit
2c4a399682
13 changed files with 1489 additions and 0 deletions
|
@ -125,6 +125,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
|
|||
tegra30-lg-p880.dtb \
|
||||
tegra30-lg-p895.dtb \
|
||||
tegra30-tec-ng.dtb \
|
||||
tegra30-wexler-qc750.dtb \
|
||||
tegra114-dalmore.dtb \
|
||||
tegra124-apalis.dtb \
|
||||
tegra124-jetson-tk1.dtb \
|
||||
|
|
1106
arch/arm/dts/tegra30-wexler-qc750.dts
Normal file
1106
arch/arm/dts/tegra30-wexler-qc750.dts
Normal file
File diff suppressed because it is too large
Load diff
|
@ -28,6 +28,10 @@ config TARGET_GROUPER
|
|||
bool "Asus and Google Grouper board"
|
||||
select BOARD_LATE_INIT
|
||||
|
||||
config TARGET_QC750
|
||||
bool "Wexler QC750 board"
|
||||
select BOARD_LATE_INIT
|
||||
|
||||
config TARGET_TEC_NG
|
||||
bool "Avionic Design TEC-NG board"
|
||||
select BOARD_LATE_INIT
|
||||
|
@ -51,6 +55,7 @@ source "board/nvidia/cardhu/Kconfig"
|
|||
source "board/toradex/colibri_t30/Kconfig"
|
||||
source "board/htc/endeavoru/Kconfig"
|
||||
source "board/asus/grouper/Kconfig"
|
||||
source "board/wexler/qc750/Kconfig"
|
||||
source "board/avionic-design/tec-ng/Kconfig"
|
||||
source "board/asus/transformer-t30/Kconfig"
|
||||
source "board/lg/x3-t30/Kconfig"
|
||||
|
|
12
board/wexler/qc750/Kconfig
Normal file
12
board/wexler/qc750/Kconfig
Normal file
|
@ -0,0 +1,12 @@
|
|||
if TARGET_QC750
|
||||
|
||||
config SYS_BOARD
|
||||
default "qc750"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "wexler"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "qc750"
|
||||
|
||||
endif
|
7
board/wexler/qc750/MAINTAINERS
Normal file
7
board/wexler/qc750/MAINTAINERS
Normal file
|
@ -0,0 +1,7 @@
|
|||
QC750 BOARD
|
||||
M: Svyatoslav Ryhel <clamor95@gmail.com>
|
||||
S: Maintained
|
||||
F: board/wexler/qc750/
|
||||
F: configs/qc750_defconfig
|
||||
F: doc/board/wexler/qc750.rst
|
||||
F: include/configs/qc750.h
|
11
board/wexler/qc750/Makefile
Normal file
11
board/wexler/qc750/Makefile
Normal file
|
@ -0,0 +1,11 @@
|
|||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# (C) Copyright 2010-2012
|
||||
# NVIDIA Corporation <www.nvidia.com>
|
||||
#
|
||||
# (C) Copyright 2023
|
||||
# Svyatoslav Ryhel <clamor95@gmail.com>
|
||||
|
||||
obj-$(CONFIG_SPL_BUILD) += qc750-spl.o
|
||||
|
||||
obj-y += qc750.o
|
45
board/wexler/qc750/qc750-spl.c
Normal file
45
board/wexler/qc750/qc750-spl.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* T30 QC750 SPL stage configuration
|
||||
*
|
||||
* (C) Copyright 2010-2013
|
||||
* NVIDIA Corporation <www.nvidia.com>
|
||||
*
|
||||
* (C) Copyright 2023
|
||||
* 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);
|
||||
}
|
21
board/wexler/qc750/qc750.c
Normal file
21
board/wexler/qc750/qc750.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2010-2013
|
||||
* NVIDIA Corporation <www.nvidia.com>
|
||||
*
|
||||
* (C) Copyright 2023
|
||||
* Svyatoslav Ryhel <clamor95@gmail.com>
|
||||
*/
|
||||
|
||||
#include <fdt_support.h>
|
||||
|
||||
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
|
||||
int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
{
|
||||
/* Remove TrustZone nodes */
|
||||
fdt_del_node_and_alias(blob, "/firmware");
|
||||
fdt_del_node_and_alias(blob, "/reserved-memory/trustzone@bfe00000");
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
81
configs/qc750_defconfig
Normal file
81
configs/qc750_defconfig
Normal file
|
@ -0,0 +1,81 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_SUPPORT_PASSING_ATAGS=y
|
||||
CONFIG_CMDLINE_TAG=y
|
||||
CONFIG_INITRD_TAG=y
|
||||
CONFIG_TEXT_BASE=0x80110000
|
||||
CONFIG_NR_DRAM_BANKS=2
|
||||
CONFIG_ENV_SIZE=0x3000
|
||||
CONFIG_ENV_OFFSET=0xFFFFD000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="tegra30-wexler-qc750"
|
||||
CONFIG_SPL_TEXT_BASE=0x80108000
|
||||
CONFIG_SPL_STACK=0x800ffffc
|
||||
CONFIG_TEGRA30=y
|
||||
CONFIG_TARGET_QC750=y
|
||||
CONFIG_TEGRA_ENABLE_UARTD=y
|
||||
CONFIG_CMD_EBTUPDATE=y
|
||||
CONFIG_SYS_LOAD_ADDR=0x82000000
|
||||
CONFIG_BUTTON_CMD=y
|
||||
CONFIG_BOOTDELAY=0
|
||||
CONFIG_AUTOBOOT_KEYED=y
|
||||
CONFIG_AUTOBOOT_KEYED_CTRLC=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_OF_SYSTEM_SETUP=y
|
||||
CONFIG_BOOTCOMMAND="bootflow scan; poweroff"
|
||||
CONFIG_SYS_PBSIZE=2084
|
||||
CONFIG_SPL_FOOTPRINT_LIMIT=y
|
||||
CONFIG_SPL_MAX_FOOTPRINT=0x8000
|
||||
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
CONFIG_SPL_SYS_MALLOC=y
|
||||
CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
|
||||
CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80090000
|
||||
CONFIG_SPL_SYS_MALLOC_SIZE=0x10000
|
||||
CONFIG_SYS_PROMPT="Tegra30 (QC750) # "
|
||||
# CONFIG_CMD_BOOTEFI_BOOTMGR is not set
|
||||
CONFIG_CMD_BOOTMENU=y
|
||||
# CONFIG_CMD_IMI is not set
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_GPT_RENAME=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_POWEROFF=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
CONFIG_CMD_UMS_ABORT_KEYED=y
|
||||
# CONFIG_CMD_SETEXPR is not set
|
||||
CONFIG_CMD_PAUSE=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
# CONFIG_SPL_EFI_PARTITION is not set
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_SYS_MMC_ENV_PART=2
|
||||
CONFIG_BUTTON=y
|
||||
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||
CONFIG_FASTBOOT_BUF_ADDR=0x91000000
|
||||
CONFIG_FASTBOOT_BUF_SIZE=0x10000000
|
||||
CONFIG_FASTBOOT_FLASH=y
|
||||
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
||||
CONFIG_MAX77663_GPIO=y
|
||||
CONFIG_SYS_I2C_TEGRA=y
|
||||
CONFIG_BUTTON_KEYBOARD=y
|
||||
CONFIG_DM_PMIC=y
|
||||
CONFIG_DM_PMIC_MAX77663=y
|
||||
CONFIG_DM_REGULATOR=y
|
||||
CONFIG_DM_REGULATOR_MAX77663=y
|
||||
CONFIG_DM_REGULATOR_FIXED=y
|
||||
CONFIG_PWM_TEGRA=y
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_SYSRESET_MAX77663=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_TEGRA=y
|
||||
CONFIG_USB_KEYBOARD=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_CI_UDC=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_LOGO is not set
|
||||
CONFIG_VIDEO_TEGRA20=y
|
|
@ -58,5 +58,6 @@ Board-specific doc
|
|||
ti/index
|
||||
toradex/index
|
||||
variscite/index
|
||||
wexler/index
|
||||
xen/index
|
||||
xilinx/index
|
||||
|
|
9
doc/board/wexler/index.rst
Normal file
9
doc/board/wexler/index.rst
Normal file
|
@ -0,0 +1,9 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
WEXLER
|
||||
======
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
qc750
|
125
doc/board/wexler/qc750.rst
Normal file
125
doc/board/wexler/qc750.rst
Normal file
|
@ -0,0 +1,125 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
U-Boot for the WEXLER QC750 tablet
|
||||
==================================
|
||||
|
||||
``DISCLAMER!`` Moving your WEXLER QC750 to use U-Boot assumes replacement
|
||||
of the vendor bootloader. Vendor Android firmwares will no longer be able
|
||||
to run on the device. This replacement IS reversible.
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
|
||||
- Build U-Boot
|
||||
- Process U-Boot
|
||||
- Flashing U-Boot into the eMMC
|
||||
- Boot
|
||||
- Self Upgrading
|
||||
|
||||
Build U-Boot
|
||||
------------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ export CROSS_COMPILE=arm-linux-gnueabi-
|
||||
$ make qc750_defconfig
|
||||
$ make
|
||||
|
||||
After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin``
|
||||
image, ready for further processing.
|
||||
|
||||
Process U-Boot
|
||||
--------------
|
||||
|
||||
``DISCLAMER!`` All questions related to the re-crypt work should be asked
|
||||
in re-crypt repo issues. NOT HERE!
|
||||
|
||||
re-crypt is a tool that processes the ``u-boot-dtb-tegra.bin`` binary into form
|
||||
usable by device. This process is required only on the first installation or
|
||||
to recover the device in case of a failed update.
|
||||
|
||||
Permanent installation can be performed either by using the tegrarcm or by
|
||||
pre-loading just built U-Boot into RAM.
|
||||
|
||||
Processing for the NV3P protocol
|
||||
********************************
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone https://gitlab.com/grate-driver/re-crypt.git
|
||||
$ cd re-crypt # place your u-boot-dtb-tegra.bin here
|
||||
$ ./re-crypt.py --dev qc750
|
||||
|
||||
The script will produce a ``repart-block.bin`` ready to flash.
|
||||
|
||||
Processing for pre-loaded U-Boot
|
||||
********************************
|
||||
|
||||
The procedure is the same, but the ``--split`` argument is used with the
|
||||
``re-crypt.py``. The script will produce ``bct.img`` and ``ebt.img`` ready
|
||||
to flash.
|
||||
|
||||
Flashing U-Boot into the eMMC
|
||||
-----------------------------
|
||||
|
||||
``DISCLAMER!`` All questions related to tegrarcm should be asked in the proper
|
||||
place. NOT HERE! Flashing U-Boot will erase all eMMC, so make a backup before!
|
||||
|
||||
Permanent installation can be performed either by using the nv3p protocol or by
|
||||
pre-loading just built U-Boot into RAM.
|
||||
|
||||
Flashing with the NV3P protocol
|
||||
*******************************
|
||||
|
||||
Nv3p is a custom Nvidia protocol used to recover bricked devices. Devices can
|
||||
enter it either by using ``wheelie`` with the correct ``blob.bin`` file or by
|
||||
pre-loading vendor bootloader with the Fusée Gelée.
|
||||
|
||||
With nv3p, ``repart-block.bin`` is used. It contains BCT and a bootloader in
|
||||
encrypted state in form, which can just be written RAW at the start of eMMC.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ wheelie --bct qc750.bct --bl bootloader.bin
|
||||
$ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin
|
||||
|
||||
When flashing is done, reboot the device.
|
||||
|
||||
Flashing with a pre-loaded U-Boot
|
||||
*********************************
|
||||
|
||||
U-Boot pre-loaded into RAM acts the same as when it was booted "cold". Currently
|
||||
U-Boot supports bootmenu entry fastboot, which allows to write a processed copy
|
||||
of U-Boot permanently into eMMC.
|
||||
|
||||
While pre-loading U-Boot, hold the ``volume down`` button which will trigger
|
||||
the bootmenu. There, select ``fastboot`` using the volume and power buttons.
|
||||
After, on host PC, do:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ fastboot flash 0.1 bct.img
|
||||
$ fastboot flash 0.2 ebt.img
|
||||
$ fastboot reboot
|
||||
|
||||
Device will reboot.
|
||||
|
||||
Boot
|
||||
----
|
||||
|
||||
To boot Linux, U-Boot will look for an ``extlinux.conf`` on MicroSD and then on
|
||||
eMMC. Additionally, if the Volume Down button is pressed while booting, the
|
||||
device will enter bootmenu. Bootmenu contains entries to mount MicroSD and eMMC
|
||||
as mass storage, fastboot, reboot, reboot RCM, poweroff, enter U-Boot console
|
||||
and update bootloader (check the next chapter).
|
||||
|
||||
Flashing ``repart-block.bin`` eliminates vendor restrictions on eMMC and allows
|
||||
the user to use/partition it in any way the user desires.
|
||||
|
||||
Self Upgrading
|
||||
--------------
|
||||
|
||||
Place your ``u-boot-dtb-tegra.bin`` on the first partition of the MicroSD card
|
||||
and insert it into the tablet. Enter bootmenu, choose update the bootloader
|
||||
option with the Power button and U-Boot should update itself. Once the process
|
||||
is completed, U-Boot will ask to press any button to reboot.
|
65
include/configs/qc750.h
Normal file
65
include/configs/qc750.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* (C) Copyright 2010,2012
|
||||
* NVIDIA Corporation <www.nvidia.com>
|
||||
*
|
||||
* (C) Copyright 2023
|
||||
* Svyatoslav Ryhel <clamor95@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
#include "tegra30-common.h"
|
||||
|
||||
/* High-level configuration options */
|
||||
#define CFG_TEGRA_BOARD_STRING "Wexler QC750"
|
||||
|
||||
#define QC750_FLASH_UBOOT \
|
||||
"flash_uboot=echo Preparing RAM;" \
|
||||
"mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
|
||||
"mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
|
||||
"echo Reading BCT;" \
|
||||
"mmc dev 0 1;" \
|
||||
"mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
|
||||
"echo Reading bootloader;" \
|
||||
"if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
|
||||
"then echo Calculating bootloader size;" \
|
||||
"size mmc 1:1 ${bootloader_file};" \
|
||||
"ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
|
||||
"echo Writing bootloader to eMMC;" \
|
||||
"mmc dev 0 1;" \
|
||||
"mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
|
||||
"mmc dev 0 2;" \
|
||||
"mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
|
||||
"echo Bootloader written successfully;" \
|
||||
"pause 'Press ANY key to reboot device...'; reset;" \
|
||||
"else echo Reading bootloader failed;" \
|
||||
"pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
|
||||
|
||||
#define QC750_BOOTMENU \
|
||||
QC750_FLASH_UBOOT \
|
||||
"bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
|
||||
"bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
|
||||
"bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
|
||||
"bootmenu_3=update bootloader=run flash_uboot\0" \
|
||||
"bootmenu_4=reboot RCM=enterrcm\0" \
|
||||
"bootmenu_5=reboot=reset\0" \
|
||||
"bootmenu_6=power off=poweroff\0" \
|
||||
"bootmenu_delay=-1\0"
|
||||
|
||||
#define BOARD_EXTRA_ENV_SETTINGS \
|
||||
"boot_block_size_r=0x200000\0" \
|
||||
"boot_block_size=0x1000\0" \
|
||||
"bootloader_file=u-boot-dtb-tegra.bin\0" \
|
||||
"button_cmd_0_name=Volume Down\0" \
|
||||
"button_cmd_0=bootmenu\0" \
|
||||
"partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
|
||||
QC750_BOOTMENU
|
||||
|
||||
/* Board-specific serial config */
|
||||
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
|
||||
|
||||
#include "tegra-common-post.h"
|
||||
|
||||
#endif /* __CONFIG_H */
|
Loading…
Add table
Reference in a new issue