board: add support for Huawei Mediapad T5

Adds the initial support for Huawei Mediapad T5 (agassi2) and Hi6250-based devices.
This commit is contained in:
tildeguy
2026-01-07 22:09:19 +03:00
committed by Igor Bełwon
parent 88cc20b0d6
commit e69eba1d89
6 changed files with 76 additions and 0 deletions

View File

@@ -23,6 +23,9 @@ environment in case of a forced and buggy bootloader.
### Google
- Taimen
### Huawei
- Agassi2
### itel
- P682LPN

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,47 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Board driver for Huawei Mediapad T5
*
* Copyright (c) 2026, Tildeguy <tildeguy@mainlining.org>
*/
#include <board.h>
#include <drivers/framework.h>
#include <lib/simplefb.h>
#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
};

View File

@@ -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

View File

@@ -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