From a59969f984472f7a201aaa169facdb7cbcf1499f Mon Sep 17 00:00:00 2001 From: predefine Date: Thu, 2 Oct 2025 07:08:30 +0700 Subject: [PATCH] board: introduce support for Xiaomi Redmi Note 8 Pro Signed-off-by: predefine --- board/Kconfig | 9 ++++++++ board/Makefile | 1 + board/xiaomi/board-begonia.c | 41 ++++++++++++++++++++++++++++++++++++ soc/Kconfig | 7 ++++++ 4 files changed, 58 insertions(+) create mode 100644 board/xiaomi/board-begonia.c diff --git a/board/Kconfig b/board/Kconfig index f4b0893..d388880 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -178,6 +178,13 @@ menu "Device Support" depends on MT6877 help Say Y if you want to include support for Volla Phone Quintus + + config XIAOMI_BEGONIA + bool "Support for Redmi Note 8 Pro" + default n + depends on MT6785 + help + Say Y if you want to include support for Redmi Note 8 Pro endmenu menu "Device Specific Addresses" @@ -192,9 +199,11 @@ menu "Device Specific Addresses" default 0x050000000 if SAMSUNG_J4LTE default 0x090000000 if SAMSUNG_J5LTE default 0x60000000 if VOLLA_ALGIZ + default 0x50000000 if XIAOMI_BEGONIA config RAMDISK_ENTRY hex "Ramdisk Entry Address" default 0x40000000 if NOTHING_TETRIS default 0x51100000 if VOLLA_ALGIZ + default 0x48000000 if XIAOMI_BEGONIA endmenu diff --git a/board/Makefile b/board/Makefile index b967d3b..f8fea0c 100644 --- a/board/Makefile +++ b/board/Makefile @@ -21,3 +21,4 @@ lib-$(CONFIG_SAMSUNG_J4LTE) += samsung/board-j4lte.o lib-$(CONFIG_SAMSUNG_GTA4XL) += samsung/board-gta4xl.o lib-$(CONFIG_SAMSUNG_R8S) += samsung/board-r8s.o lib-$(CONFIG_VOLLA_ALGIZ) += volla/board-algiz.o +lib-$(CONFIG_XIAOMI_BEGONIA) += xiaomi/board-begonia.o diff --git a/board/xiaomi/board-begonia.c b/board/xiaomi/board-begonia.c new file mode 100644 index 0000000..791c9a8 --- /dev/null +++ b/board/xiaomi/board-begonia.c @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2025, predefine + */ + +#include +#include +#include + +int begonia_init(void) +{ + return 0; +} + +#ifdef CONFIG_SIMPLE_FB +// Used on miui 12.5.8.0 firmware +static struct video_info begonia_r_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1088, + .height = 2340, + .stride = 4, + .address = (void *)0x7d9b0000 +}; +#endif + +int begonia_drv(void) +{ + #ifdef CONFIG_SIMPLE_FB + REGISTER_DRIVER("simplefb", simplefb_probe, &begonia_r_fb); + #endif + return 0; +} + +struct board_data board_ops = { + .name = "xiaomi-begonia", + .ops = { + .early_init = begonia_init, + .drivers_init = begonia_drv, + }, + .quirks = 0 +}; diff --git a/soc/Kconfig b/soc/Kconfig index a5b3303..87b5793 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -115,6 +115,13 @@ config QUALCOMM help Say Y if your device uses Mediatek MT6735 SoC + config MT6785 + bool "Support for Mediatek MT6785" + default n + select MEDIATEK + help + Say Y if your device uses Mediatek MT6785 SoC + config MT6877 bool "Support for Mediatek MT6877" select MEDIATEK