diff --git a/README.md b/README.md index e315454..59f6799 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ environment in case of a forced and buggy bootloader. ### Google - Taimen +### Huawei +- Agassi2 + ### itel - P682LPN diff --git a/board/Kconfig b/board/Kconfig index 708e57a..f15730f 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -21,6 +21,13 @@ menu "Device Support" help Say Y if you want to include support for Pixel 2 XL + config HUAWEI_AGASSI2 + bool "Support for Huawei Mediapad T5" + default n + depends on HI6250 + help + Say Y if you want to include support for Huawei Mediapad T5 + config INFINIX_X6710 bool "Support for Infinix Note 30 VIP" default n diff --git a/board/Makefile b/board/Makefile index 3fc42fb..ac49bda 100644 --- a/board/Makefile +++ b/board/Makefile @@ -1,6 +1,7 @@ lib-$(CONFIG_AMAZON_PW3) += amazon/board-pw3.o lib-$(CONFIG_APPLE_N61AP) += apple/board-n61ap.o lib-$(CONFIG_GOOGLE_TAIMEN) += google/board-taimen.o +lib-$(CONFIG_HUAWEI_AGASSI2) += huawei/board-agassi2.o lib-$(CONFIG_INFINIX_X6710) += infinix/board-x6710.o lib-$(CONFIG_ITEL_P682LPN) += itel/board-p682lpn.o lib-$(CONFIG_NOKIA_ESSENTIAL) += nokia/board-essential.o diff --git a/board/huawei/board-agassi2.c b/board/huawei/board-agassi2.c new file mode 100644 index 0000000..9217cf0 --- /dev/null +++ b/board/huawei/board-agassi2.c @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Board driver for Huawei Mediapad T5 + * + * Copyright (c) 2026, Tildeguy + */ + +#include +#include +#include + +#ifdef CONFIG_SIMPLE_FB +static struct video_info agassi2_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1200, + .height = 1920, + .stride = 4, + .address = (void *)0x5d000000, + .scale = 2 +}; +#endif + +int agassi2_early_init(void) +{ + unsigned long cpacr; + __asm__ volatile ("mrs %0, cpacr_el1" : "=r" (cpacr)); + cpacr |= (3UL << 20); + __asm__ volatile ("msr cpacr_el1, %0" :: "r" (cpacr)); + return 0; +} + +int agassi2_drv(void) +{ +#ifdef CONFIG_SIMPLE_FB + REGISTER_DRIVER("simplefb", simplefb_probe, &agassi2_fb); +#endif + return 0; +} + +struct board_data board_ops = { + .name = "huawei-agassi2", + .ops = { + .early_init = agassi2_early_init, + .drivers_init = agassi2_drv + }, + .quirks = 0 +}; diff --git a/configs/agassi2_defconfig b/configs/agassi2_defconfig new file mode 100644 index 0000000..27824aa --- /dev/null +++ b/configs/agassi2_defconfig @@ -0,0 +1,8 @@ +CONFIG_COMPRESS_GZIP=y +CONFIG_SIMPLE_FB=y +CONFIG_HI6250=y +CONFIG_HUAWEI_AGASSI2=y +CONFIG_TEXT_BASE=0x00480000 +CONFIG_PAYLOAD_ENTRY=0x0e200000 +CONFIG_RAMDISK_ENTRY=0x08000000 +CONFIG_RAMDISK_NO_COPY=y diff --git a/soc/Kconfig b/soc/Kconfig index de1074e..47ed8aa 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -10,6 +10,10 @@ config FREESCALE bool default n +config HISILICON + bool + default n + config MEDIATEK bool default n @@ -115,6 +119,12 @@ config QUALCOMM help Say Y if your device uses Samsung Exynos990 SoC + config HI6250 + bool "Support for HiSilicon Hi6250" + select HISILICON + help + Say Y if your device uses HiSilicon Hi6250 + config MT6735 bool "Support for Mediatek MT6735" select MEDIATEK