mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-30 18:05:48 +01:00 
			
		
		
		
	board: lenovo: ideapad-yoga-11: add Lenovo Ideapad Yoga 11 support
The Lenovo IdeaPad Yoga 11 is a hybrid laptop/tablet Windows RT-based computer released in late 2012. The device uses a 1.3 GHz quad-core Nvidia Tegra 3 chipset with 2 GB of RAM, features a 11.6 inch 1366x768 screen and 32/64 GB of internal memory that can be supplemented with a microSDXC card slot, full size SD card slot and 2 full size USB 2.0 ports. Tested-by: Jethro Bull <jethrob@hotmail.com> Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Svyatoslav Ryhel
						Svyatoslav Ryhel
					
				
			
			
				
	
			
			
			
						parent
						
							3486fd0739
						
					
				
				
					commit
					f6fb6b2608
				
			| @@ -122,6 +122,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \ | ||||
| 	tegra30-cardhu.dtb \ | ||||
| 	tegra30-colibri.dtb \ | ||||
| 	tegra30-htc-endeavoru.dtb \ | ||||
| 	tegra30-lenovo-ideapad-yoga-11.dtb \ | ||||
| 	tegra30-lg-p880.dtb \ | ||||
| 	tegra30-lg-p895.dtb \ | ||||
| 	tegra30-microsoft-surface-rt.dtb \ | ||||
|   | ||||
							
								
								
									
										1266
									
								
								arch/arm/dts/tegra30-lenovo-ideapad-yoga-11.dts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1266
									
								
								arch/arm/dts/tegra30-lenovo-ideapad-yoga-11.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_IDEAPAD_YOGA_11 | ||||
| 	bool "Lenovo Ideapad Yoga 11 board" | ||||
| 	select BOARD_LATE_INIT | ||||
|  | ||||
| config TARGET_QC750 | ||||
| 	bool "Wexler QC750 board" | ||||
| 	select BOARD_LATE_INIT | ||||
| @@ -59,6 +63,7 @@ source "board/nvidia/cardhu/Kconfig" | ||||
| source "board/toradex/colibri_t30/Kconfig" | ||||
| source "board/htc/endeavoru/Kconfig" | ||||
| source "board/asus/grouper/Kconfig" | ||||
| source "board/lenovo/ideapad-yoga-11/Kconfig" | ||||
| source "board/wexler/qc750/Kconfig" | ||||
| source "board/microsoft/surface-rt/Kconfig" | ||||
| source "board/avionic-design/tec-ng/Kconfig" | ||||
|   | ||||
							
								
								
									
										12
									
								
								board/lenovo/ideapad-yoga-11/Kconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								board/lenovo/ideapad-yoga-11/Kconfig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| if TARGET_IDEAPAD_YOGA_11 | ||||
|  | ||||
| config SYS_BOARD | ||||
| 	default "ideapad-yoga-11" | ||||
|  | ||||
| config SYS_VENDOR | ||||
| 	default "lenovo" | ||||
|  | ||||
| config SYS_CONFIG_NAME | ||||
| 	default "ideapad-yoga-11" | ||||
|  | ||||
| endif | ||||
							
								
								
									
										7
									
								
								board/lenovo/ideapad-yoga-11/MAINTAINERS
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								board/lenovo/ideapad-yoga-11/MAINTAINERS
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| Lenovo Ideapad Yoga 11 | ||||
| M:	Jonas Schwöbel <jonasschwoebel@yahoo.de> | ||||
| S:	Maintained | ||||
| F:	board/lenovo/ideapad-yoga-11/ | ||||
| F:	configs/ideapad-yoga-11_defconfig | ||||
| F:	doc/board/lenovo/ideapad-yoga-11.rst | ||||
| F:	include/configs/ideapad-yoga-11.h | ||||
							
								
								
									
										6
									
								
								board/lenovo/ideapad-yoga-11/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								board/lenovo/ideapad-yoga-11/Makefile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| # SPDX-License-Identifier: GPL-2.0+ | ||||
| # | ||||
| #  (C) Copyright 2022 | ||||
| #  Open Surface RT | ||||
|  | ||||
| obj-$(CONFIG_SPL_BUILD) += ideapad-yoga-11-spl.o | ||||
							
								
								
									
										41
									
								
								board/lenovo/ideapad-yoga-11/ideapad-yoga-11-spl.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								board/lenovo/ideapad-yoga-11/ideapad-yoga-11-spl.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| // SPDX-License-Identifier: GPL-2.0+ | ||||
| /* | ||||
|  *  Ideapad Yoga 11 SPL stage configuration | ||||
|  * | ||||
|  *  (C) Copyright 2010-2013 | ||||
|  *  NVIDIA Corporation <www.nvidia.com> | ||||
|  * | ||||
|  *  (C) Copyright 2021 | ||||
|  *  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_SET2_REG		0x02 | ||||
| #define TPS62361B_SET2_DATA		(0x4600 | TPS62361B_SET2_REG) | ||||
|  | ||||
| void pmic_enable_cpu_vdd(void) | ||||
| { | ||||
| 	/* Set VDD_CORE to 1.200V. */ | ||||
| 	tegra_i2c_ll_write(TPS62361B_I2C_ADDR, TPS62361B_SET2_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); | ||||
| } | ||||
							
								
								
									
										84
									
								
								configs/ideapad-yoga-11_defconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								configs/ideapad-yoga-11_defconfig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,84 @@ | ||||
| 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-lenovo-ideapad-yoga-11" | ||||
| CONFIG_SPL_TEXT_BASE=0x80108000 | ||||
| CONFIG_SPL_STACK=0x800ffffc | ||||
| CONFIG_TEGRA30=y | ||||
| CONFIG_TARGET_IDEAPAD_YOGA_11=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_SYSTEM_SETUP=y | ||||
| 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 (Ideapad Yoga 11) # " | ||||
| # 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_SPI=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_SYS_I2C_TEGRA=y | ||||
| CONFIG_BUTTON_KEYBOARD=y | ||||
| CONFIG_TEGRA_KEYBOARD=y | ||||
| CONFIG_LED=y | ||||
| CONFIG_LED_GPIO=y | ||||
| CONFIG_SPI_FLASH_WINBOND=y | ||||
| CONFIG_DM_PMIC=y | ||||
| CONFIG_DM_PMIC_TPS65910=y | ||||
| CONFIG_DM_REGULATOR=y | ||||
| CONFIG_DM_REGULATOR_FIXED=y | ||||
| CONFIG_DM_REGULATOR_TPS65911=y | ||||
| CONFIG_PWM_TEGRA=y | ||||
| CONFIG_SYS_NS16550=y | ||||
| CONFIG_TEGRA20_SLINK=y | ||||
| CONFIG_SYSRESET_TPS65910=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_BRIDGE_PARADE_DP501=y | ||||
| CONFIG_VIDEO_TEGRA20=y | ||||
| @@ -31,6 +31,7 @@ Board-specific doc | ||||
|    htc/index | ||||
|    intel/index | ||||
|    kontron/index | ||||
|    lenovo/index | ||||
|    lg/index | ||||
|    mediatek/index | ||||
|    microchip/index | ||||
|   | ||||
							
								
								
									
										41
									
								
								doc/board/lenovo/ideapad-yoga-11.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								doc/board/lenovo/ideapad-yoga-11.rst
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| .. SPDX-License-Identifier: GPL-2.0+ | ||||
|  | ||||
| U-Boot for the Lenovo Ideapad Yoga 11 tablet | ||||
| ============================================ | ||||
|  | ||||
| Quick Start | ||||
| ----------- | ||||
|  | ||||
| - Build U-Boot | ||||
| - Boot | ||||
|  | ||||
| Build U-Boot | ||||
| ------------ | ||||
|  | ||||
| .. code-block:: bash | ||||
|  | ||||
|     $ export CROSS_COMPILE=arm-linux-gnueabi- | ||||
|     $ make ideapad-yoga-11_defconfig | ||||
|     $ make | ||||
|  | ||||
| After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin`` | ||||
| image, ready for loading. | ||||
|  | ||||
| Boot | ||||
| ---- | ||||
|  | ||||
| Currently, U-Boot can be preloaded into RAM via the Fusée Gelée. To enter | ||||
| RCM protocol use ``power`` and ``volume up`` key combination from powered | ||||
| off device. The host PC should recognize an APX device. | ||||
|  | ||||
| Built U-Boot ``u-boot-dtb-tegra.bin`` can be loaded from fusee-tools | ||||
| directory with | ||||
|  | ||||
| .. code-block:: bash | ||||
|  | ||||
|     $ ./run_bootloader.sh -s T30 -t ./bct/ideapad-yoga-11.bct | ||||
|  | ||||
| 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 loading, the | ||||
| device will enter bootmenu. Bootmenu contains entries to mount MicroSD and eMMC | ||||
| as mass storage, fastboot, reboot, reboot RCM, poweroffand enter U-Boot console. | ||||
							
								
								
									
										9
									
								
								doc/board/lenovo/index.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								doc/board/lenovo/index.rst
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| .. SPDX-License-Identifier: GPL-2.0+ | ||||
|  | ||||
| Lenovo | ||||
| ========= | ||||
|  | ||||
| .. toctree:: | ||||
|    :maxdepth: 2 | ||||
|  | ||||
|    ideapad-yoga-11 | ||||
							
								
								
									
										77
									
								
								include/configs/ideapad-yoga-11.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								include/configs/ideapad-yoga-11.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,77 @@ | ||||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||||
| /* | ||||
|  * Copyright (c) 2010-2012, NVIDIA CORPORATION.  All rights reserved. | ||||
|  */ | ||||
|  | ||||
| #ifndef __CONFIG_H | ||||
| #define __CONFIG_H | ||||
|  | ||||
| #include "tegra30-common.h" | ||||
|  | ||||
| /* High-level configuration options */ | ||||
| #define CFG_TEGRA_BOARD_STRING		"Lenovo Ideapad Yoga 11" | ||||
|  | ||||
| #define IDEAPAD_FLASH_UBOOT \ | ||||
| 	"flash_uboot=sf probe 0:1;" \ | ||||
| 		"echo Dumping current SPI flash content ...;" \ | ||||
| 		"sf read ${kernel_addr_r} 0x0 ${spi_size};" \ | ||||
| 		"if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};" \ | ||||
| 		"then echo SPI flash content was successfully written into spi-flash-backup.bin;" \ | ||||
| 			"echo Reading SPI flash binary;" \ | ||||
| 			"if load mmc 1:1 ${kernel_addr_r} repart-block.bin;" \ | ||||
| 			"then echo Writing bootloader into SPI flash;" \ | ||||
| 				"sf probe 0:1;" \ | ||||
| 				"sf update ${kernel_addr_r} 0x0 ${spi_size};" \ | ||||
| 				"echo Bootloader SUCCESSFULLY written into SPI flash;" \ | ||||
| 				"pause 'Press ANY key to reboot...'; reset;" \ | ||||
| 			"else echo Preparing RAM;" \ | ||||
| 				"mw ${kernel_addr_r} 0 ${boot_block_size_r};" \ | ||||
| 				"mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \ | ||||
| 				"echo Reading BCT;" \ | ||||
| 				"sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};" \ | ||||
| 				"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 into SPI flash;" \ | ||||
| 					"sf probe 0:1;" \ | ||||
| 					"sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};" \ | ||||
| 					"sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};" \ | ||||
| 					"echo Bootloader written SUCCESSFULLY;" \ | ||||
| 					"pause 'Press ANY key to reboot...'; reset;" \ | ||||
| 				"else echo Reading bootloader failed;" \ | ||||
| 					"pause 'Press ANY key to reboot...'; reset; fi;" \ | ||||
| 			"fi;" \ | ||||
| 		"else echo SPI flash backup FAILED! Aborting ...;" \ | ||||
| 			"pause 'Press ANY key to reboot...'; reset; fi\0" | ||||
|  | ||||
| #define IDEAPAD_BOOTMENU \ | ||||
| 	IDEAPAD_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 \ | ||||
| 	"spi_size=0x400000\0" \ | ||||
| 	"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" \ | ||||
| 	"button_cmd_1_name=Lid sensor\0" \ | ||||
| 	"button_cmd_1=poweroff\0" \ | ||||
| 	"partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \ | ||||
| 	IDEAPAD_BOOTMENU | ||||
|  | ||||
| /* Board-specific serial config */ | ||||
| #define CFG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE | ||||
|  | ||||
| #include "tegra-common-post.h" | ||||
|  | ||||
| #endif /* __CONFIG_H */ | ||||
		Reference in New Issue
	
	Block a user