mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
Merge pull request #43 from chmcax/essential
board: introduce support for Nokia 3 (essential)
This commit is contained in:
@@ -28,6 +28,13 @@ menu "Device Support"
|
||||
help
|
||||
Say Y if you want to include support for CMF Phone 1
|
||||
|
||||
config NOKIA_ESSENTIAL
|
||||
bool "Support for Nokia 3"
|
||||
default n
|
||||
depends on MT6735
|
||||
help
|
||||
Say Y if you want to include support for Nokia 3
|
||||
|
||||
config NOTHING_TETRIS_DISABLE_WDT
|
||||
bool "Disable the watchdog timer on startup"
|
||||
default y
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
lib-$(CONFIG_APPLE_N61AP) += apple/board-n61ap.o
|
||||
lib-$(CONFIG_AMAZON_PW3) += amazon/board-pw3.o
|
||||
lib-$(CONFIG_GOOGLE_TAIMEN) += google/board-taimen.o
|
||||
lib-$(CONFIG_NOKIA_ESSENTIAL) += nokia/board-essential.o
|
||||
lib-$(CONFIG_NOTHING_TETRIS) += nothing/board-tetris.o
|
||||
lib-$(CONFIG_QEMU_BOARD_VIRT) += qemu/board-virt.o
|
||||
lib-$(CONFIG_SAMSUNG_A105F) += samsung/board-a105f.o
|
||||
|
||||
60
board/nokia/board-essential.c
Normal file
60
board/nokia/board-essential.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2025, Alexandru Chimac <alex@chimac.ro>
|
||||
*/
|
||||
#include <board.h>
|
||||
#include <string.h>
|
||||
#include <drivers/framework.h>
|
||||
#include <lib/simplefb.h>
|
||||
|
||||
#define TOPRGU_BASE 0x10212000
|
||||
#define WDT_MODE_KEY 0x22000000
|
||||
#define WDT_MODE_EN (1 << 0)
|
||||
|
||||
// Early initialization
|
||||
int essential_init(void)
|
||||
{
|
||||
unsigned long wdg_reg;
|
||||
|
||||
// Disable watchdog
|
||||
wdg_reg = readl((volatile unsigned int *) TOPRGU_BASE);
|
||||
wdg_reg &= ~WDT_MODE_EN;
|
||||
wdg_reg |= WDT_MODE_KEY;
|
||||
writel(wdg_reg, (void *) TOPRGU_BASE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SIMPLE_FB
|
||||
static struct video_info essential_fb = {
|
||||
.format = FB_FORMAT_ARGB8888,
|
||||
.width = 736,
|
||||
.height = 1280,
|
||||
.stride = 4,
|
||||
.address = (void *)0xbf370000
|
||||
};
|
||||
#endif
|
||||
|
||||
int essential_drv(void)
|
||||
{
|
||||
#ifdef CONFIG_SIMPLE_FB
|
||||
REGISTER_DRIVER("simplefb", simplefb_probe, &essential_fb);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Late initialization
|
||||
int essential_late_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct board_data board_ops = {
|
||||
.name = "nokia-essential",
|
||||
.ops = {
|
||||
.early_init = essential_init,
|
||||
.drivers_init = essential_drv,
|
||||
.late_init = essential_late_init,
|
||||
},
|
||||
.quirks = 0
|
||||
};
|
||||
5
configs/essential_defconfig
Normal file
5
configs/essential_defconfig
Normal file
@@ -0,0 +1,5 @@
|
||||
CONFIG_MT6735=y
|
||||
CONFIG_NOKIA_ESSENTIAL=y
|
||||
CONFIG_TEXT_BASE=0x40080000
|
||||
CONFIG_PAYLOAD_ENTRY=0x50000000
|
||||
CONFIG_RAMDISK_ENTRY=0x44000000
|
||||
@@ -123,6 +123,13 @@ config QUALCOMM
|
||||
help
|
||||
Say Y if your device uses Samsung Exynos990 SoC
|
||||
|
||||
config MT6735
|
||||
bool "Support for Mediatek MT6735"
|
||||
default n
|
||||
select MEDIATEK
|
||||
help
|
||||
Say Y if your device uses Mediatek MT6735 SoC
|
||||
|
||||
config MT6877
|
||||
bool "Support for Mediatek MT6877"
|
||||
default n
|
||||
|
||||
Reference in New Issue
Block a user