From 11f29d443622070c9423ed5fda74b9564570aac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sun, 13 Feb 2022 01:09:46 +0100 Subject: [PATCH 1/5] tools: mkimage/dumpimage: Allow to use -l with -T MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently -l option for mkimage and dumpimage ignores option -T and always tries to autodetect image type. With this change it is possible to tell mkimage and dumpimage to parse image file as specific type (and not random autodetected type). This allows to use mkimage -l or dumpimage -l as tool for validating image. params.type for -l option is now by default initialized to zero (IH_TYPE_INVALID) instead of IH_TYPE_KERNEL. imagetool_get_type() for IH_TYPE_INVALID returns NULL, which is assigned to tparams. mkimage and dumpimage code is extended to handle tparams with NULL for -l option. And imagetool_verify_print_header() is extended to do validation via tparams if is not NULL. Signed-off-by: Pali Rohár Reviewed-by: Simon Glass --- doc/mkimage.1 | 10 ++++++++-- tools/dumpimage.c | 17 ++++++++--------- tools/imagetool.c | 11 ++++++++++- tools/imagetool.h | 22 ++++------------------ tools/mkimage.c | 36 ++++++++++++++---------------------- 5 files changed, 44 insertions(+), 52 deletions(-) diff --git a/doc/mkimage.1 b/doc/mkimage.1 index fc84cca066..287006279f 100644 --- a/doc/mkimage.1 +++ b/doc/mkimage.1 @@ -1,10 +1,10 @@ -.TH MKIMAGE 1 "2010-05-16" +.TH MKIMAGE 1 "2022-02-07" .SH NAME mkimage \- Generate image for U-Boot .SH SYNOPSIS .B mkimage -.RB "\-l [" "uimage file name" "]" +.RB [ \-T " \fItype\fP] " \-l " [\fIuimage file name\fP]" .B mkimage .RB [\fIoptions\fP] " \-f [" "image tree source file" "]" " [" "uimage file name" "]" @@ -47,6 +47,12 @@ supports verified boot. .BI "\-l [" "uimage file name" "]" mkimage lists the information contained in the header of an existing U-Boot image. +.TP +.BI "\-T [" "image type" "]" +Parse image file as type. +Pass \-h as the image to see the list of supported image type. +Without this option image type is autodetected. + .P .B Create old legacy image: diff --git a/tools/dumpimage.c b/tools/dumpimage.c index e5481435a7..4791dd0dfe 100644 --- a/tools/dumpimage.c +++ b/tools/dumpimage.c @@ -12,9 +12,7 @@ static void usage(void); /* parameters initialized by core will be used by the image type code */ -static struct image_tool_params params = { - .type = IH_TYPE_KERNEL, -}; +static struct image_tool_params params; /* * dumpimage_extract_subimage - @@ -110,7 +108,7 @@ int main(int argc, char **argv) } } - if (argc < 2) + if (argc < 2 || (params.iflag && params.lflag)) usage(); if (optind >= argc) { @@ -122,7 +120,7 @@ int main(int argc, char **argv) /* set tparams as per input type_id */ tparams = imagetool_get_type(params.type); - if (tparams == NULL) { + if (!params.lflag && tparams == NULL) { fprintf(stderr, "%s: unsupported type: %s\n", params.cmdname, genimg_get_type_name(params.type)); exit(EXIT_FAILURE); @@ -132,7 +130,7 @@ int main(int argc, char **argv) * check the passed arguments parameters meets the requirements * as per image type to be generated/listed */ - if (tparams->check_params) { + if (tparams && tparams->check_params) { if (tparams->check_params(¶ms)) { fprintf(stderr, "%s: Parameter check failed\n", params.cmdname); @@ -159,7 +157,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } - if ((uint32_t)sbuf.st_size < tparams->header_size) { + if (tparams && (uint32_t)sbuf.st_size < tparams->header_size) { fprintf(stderr, "%s: Bad size: \"%s\" is not valid image\n", params.cmdname, params.imagefile); exit(EXIT_FAILURE); @@ -203,8 +201,9 @@ int main(int argc, char **argv) static void usage(void) { - fprintf(stderr, "Usage: %s -l image\n" - " -l ==> list image header information\n", + fprintf(stderr, "Usage: %s [-T type] -l image\n" + " -l ==> list image header information\n" + " -T ==> parse image file as 'type'\n", params.cmdname); fprintf(stderr, " %s [-T type] [-p position] [-o outfile] image\n" diff --git a/tools/imagetool.c b/tools/imagetool.c index ba1f64aa37..5ad6d7413f 100644 --- a/tools/imagetool.c +++ b/tools/imagetool.c @@ -26,6 +26,12 @@ struct image_type_params *imagetool_get_type(int type) return NULL; } +static int imagetool_verify_print_header_by_type( + void *ptr, + struct stat *sbuf, + struct image_type_params *tparams, + struct image_tool_params *params); + int imagetool_verify_print_header( void *ptr, struct stat *sbuf, @@ -39,6 +45,9 @@ int imagetool_verify_print_header( struct image_type_params **start = __start_image_type; struct image_type_params **end = __stop_image_type; + if (tparams) + return imagetool_verify_print_header_by_type(ptr, sbuf, tparams, params); + for (curr = start; curr != end; curr++) { if ((*curr)->verify_header) { retval = (*curr)->verify_header((unsigned char *)ptr, @@ -65,7 +74,7 @@ int imagetool_verify_print_header( return retval; } -int imagetool_verify_print_header_by_type( +static int imagetool_verify_print_header_by_type( void *ptr, struct stat *sbuf, struct image_type_params *tparams, diff --git a/tools/imagetool.h b/tools/imagetool.h index c3f80fc64e..5169b0245d 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -178,33 +178,19 @@ struct image_type_params *imagetool_get_type(int type); /* * imagetool_verify_print_header() - verifies the image header * - * Scan registered image types and verify the image_header for each - * supported image type. If verification is successful, this prints - * the respective header. - * - * Return: 0 on success, negative if input image format does not match with - * any of supported image types - */ -int imagetool_verify_print_header( - void *ptr, - struct stat *sbuf, - struct image_type_params *tparams, - struct image_tool_params *params); - -/* - * imagetool_verify_print_header_by_type() - verifies the image header - * * Verify the image_header for the image type given by tparams. + * If tparams is NULL then scan registered image types and verify the + * image_header for each supported image type. * If verification is successful, this prints the respective header. * @ptr: pointer the the image header * @sbuf: stat information about the file pointed to by ptr - * @tparams: image type parameters + * @tparams: image type parameters or NULL * @params: mkimage parameters * * Return: 0 on success, negative if input image format does not match with * the given image type */ -int imagetool_verify_print_header_by_type( +int imagetool_verify_print_header( void *ptr, struct stat *sbuf, struct image_type_params *tparams, diff --git a/tools/mkimage.c b/tools/mkimage.c index c8f4ecd473..760145119d 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -82,8 +82,9 @@ static int show_valid_options(enum ih_category category) static void usage(const char *msg) { fprintf(stderr, "Error: %s\n", msg); - fprintf(stderr, "Usage: %s -l image\n" - " -l ==> list image header information\n", + fprintf(stderr, "Usage: %s [-T type] -l image\n" + " -l ==> list image header information\n" + " -T ==> parse image file as 'type'\n", params.cmdname); fprintf(stderr, " %s [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image\n" @@ -329,7 +330,7 @@ static void process_args(int argc, char **argv) params.datafile = datafile; else if (!params.datafile) usage("Missing data file for auto-FIT (use -d)"); - } else if (type != IH_TYPE_INVALID) { + } else if (params.lflag || type != IH_TYPE_INVALID) { if (type == IH_TYPE_SCRIPT && !params.datafile) usage("Missing data file for script (use -d)"); params.type = type; @@ -358,7 +359,7 @@ int main(int argc, char **argv) /* set tparams as per input type_id */ tparams = imagetool_get_type(params.type); - if (tparams == NULL) { + if (tparams == NULL && !params.lflag) { fprintf (stderr, "%s: unsupported type %s\n", params.cmdname, genimg_get_type_name(params.type)); exit (EXIT_FAILURE); @@ -368,14 +369,14 @@ int main(int argc, char **argv) * check the passed arguments parameters meets the requirements * as per image type to be generated/listed */ - if (tparams->check_params) + if (tparams && tparams->check_params) if (tparams->check_params (¶ms)) usage("Bad parameters for image type"); if (!params.eflag) { params.ep = params.addr; /* If XIP, entry point must be after the U-Boot header */ - if (params.xflag) + if (params.xflag && tparams) params.ep += tparams->header_size; } @@ -436,7 +437,7 @@ int main(int argc, char **argv) params.cmdname, params.imagefile); exit (EXIT_FAILURE); #endif - } else if (sbuf.st_size < (off_t)tparams->header_size) { + } else if (tparams && sbuf.st_size < (off_t)tparams->header_size) { fprintf (stderr, "%s: Bad size: \"%s\" is not valid image: size %llu < %u\n", params.cmdname, params.imagefile, @@ -455,21 +456,12 @@ int main(int argc, char **argv) exit (EXIT_FAILURE); } - if (params.fflag) { - /* - * Verifies the header format based on the expected header for image - * type in tparams - */ - retval = imagetool_verify_print_header_by_type(ptr, &sbuf, - tparams, ¶ms); - } else { - /** - * When listing the image, we are not given the image type. Simply check all - * image types to find one that matches our header - */ - retval = imagetool_verify_print_header(ptr, &sbuf, - tparams, ¶ms); - } + /* + * Verifies the header format based on the expected header for image + * type in tparams. If tparams is NULL simply check all image types + * to find one that matches our header. + */ + retval = imagetool_verify_print_header(ptr, &sbuf, tparams, ¶ms); (void) munmap((void *)ptr, sbuf.st_size); (void) close (ifd); From 286f94803ee446a3ef730626f2219a0a28a82b8e Mon Sep 17 00:00:00 2001 From: Felix Brack Date: Tue, 15 Feb 2022 15:27:23 +0100 Subject: [PATCH 2/5] arm: pdu001: Fix early debugging UART The changes from commit 0dba45864b2a ("arm: Init the debug UART") prevent the early debug UART from being initialized correctly. To fix this we not just configure the pin multiplexer but add setting up early clocks. Signed-off-by: Felix Brack Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- board/eets/pdu001/Makefile | 6 +----- board/eets/pdu001/board.c | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/board/eets/pdu001/Makefile b/board/eets/pdu001/Makefile index a5990ce3ad..35ea3978fe 100644 --- a/board/eets/pdu001/Makefile +++ b/board/eets/pdu001/Makefile @@ -6,8 +6,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifeq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),) -obj-y := mux.o -endif - -obj-y += board.o +obj-y := board.o mux.o diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index 9f3cfd4f84..8612c09d40 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -240,6 +240,8 @@ void sdram_init(void) #ifdef CONFIG_DEBUG_UART void board_debug_uart_init(void) { + setup_early_clocks(); + /* done by pin controller driver if not debugging */ enable_uart_pin_mux(CONFIG_DEBUG_UART_BASE); } From 551f426011e31fad37fe66108ffdf05eb48e3176 Mon Sep 17 00:00:00 2001 From: Felix Brack Date: Mon, 21 Feb 2022 14:26:05 +0100 Subject: [PATCH 3/5] arm: pdu001: Setup pinmux for console UART as early as possible To make sure we get a working console as soon as possible in the SPL the UART pins require to be configured earlier. This is especially true for the pins of UART3, since the PDU001 board uses this UART for the console by default. Signed-off-by: Felix Brack --- board/eets/pdu001/board.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index 8612c09d40..2b483dab8e 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -216,6 +216,36 @@ const struct dpll_params *get_dpll_ddr_params(void) return &dpll_ddr; } +void set_uart_mux_conf(void) +{ + switch (CONFIG_CONS_INDEX) { + case 1: { + enable_uart0_pin_mux(); + break; + } + case 2: { + enable_uart1_pin_mux(); + break; + } + case 3: { + enable_uart2_pin_mux(); + break; + } + case 4: { + enable_uart3_pin_mux(); + break; + } + case 5: { + enable_uart4_pin_mux(); + break; + } + case 6: { + enable_uart5_pin_mux(); + break; + } + } +} + void set_mux_conf_regs(void) { /* done first by the ROM and afterwards by the pin controller driver */ From 6fb4f7387e17664e2e6cea1217fe9e95cc0a1170 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 19 Feb 2022 14:05:19 +0100 Subject: [PATCH 4/5] arm: apple: Switch to fully dynamic mem layout Support for Apple M1 Pro and Max will allow using a single binary for all M1 SoCs. The M1 Pro/Max have a different memory layout. The RAM start address is 0x100_0000_0000 instead of 0x8_0000_0000. Replace the hardcoded memory layout with dynamic initialized environment variables in board_late_init(). Tested on Mac Mini (2020) and Macbook Pro 14-inch (2021). Signed-off-by: Janne Grunau Reviewed-by: Mark Kettenis --- arch/arm/mach-apple/board.c | 33 +++++++++++++++++++++++++++++++++ configs/apple_m1_defconfig | 3 ++- include/configs/apple.h | 5 ----- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-apple/board.c b/arch/arm/mach-apple/board.c index f9f8a2f278..54005f3adf 100644 --- a/arch/arm/mach-apple/board.c +++ b/arch/arm/mach-apple/board.c @@ -265,3 +265,36 @@ u64 get_page_table_size(void) { return SZ_256K; } + +int board_late_init(void) +{ + unsigned long base; + unsigned long top; + u32 status = 0; + + /* Reserve 4M each for scriptaddr and pxefile_addr_r at the top of RAM + * at least 1M below the stack. + */ + top = gd->start_addr_sp - CONFIG_STACK_SIZE - SZ_8M - SZ_1M; + top = ALIGN_DOWN(top, SZ_8M); + + status |= env_set_hex("scriptaddr", top + SZ_4M); + status |= env_set_hex("pxefile_addr_r", top); + + /* somewhat based on the Linux Kernel boot requirements: + * align by 2M and maximal FDT size 2M + */ + base = ALIGN(gd->ram_base, SZ_2M); + + status |= env_set_hex("fdt_addr_r", base); + status |= env_set_hex("kernel_addr_r", base + SZ_2M); + status |= env_set_hex("ramdisk_addr_r", base + SZ_128M); + status |= env_set_hex("loadaddr", base + SZ_2G); + status |= env_set_hex("kernel_comp_addr_r", base + SZ_2G - SZ_128M); + status |= env_set_hex("kernel_comp_size", SZ_128M); + + if (status) + log_warning("late_init: Failed to set run time variables\n"); + + return 0; +} diff --git a/configs/apple_m1_defconfig b/configs/apple_m1_defconfig index 9254e24699..360ec3f5e0 100644 --- a/configs/apple_m1_defconfig +++ b/configs/apple_m1_defconfig @@ -3,10 +3,11 @@ CONFIG_ARCH_APPLE=y CONFIG_DEFAULT_DEVICE_TREE="t8103-j274" CONFIG_DEBUG_UART_BASE=0x235200000 CONFIG_DEBUG_UART_CLOCK=24000000 -CONFIG_SYS_LOAD_ADDR=0x880000000 +CONFIG_SYS_LOAD_ADDR=0x0 CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_BOARD_LATE_INIT=y # CONFIG_NET is not set CONFIG_APPLE_SPI_KEYB=y # CONFIG_MMC is not set diff --git a/include/configs/apple.h b/include/configs/apple.h index f12e9bdef5..b06660add4 100644 --- a/include/configs/apple.h +++ b/include/configs/apple.h @@ -9,10 +9,6 @@ "stdout=serial,vidconsole\0" \ "stderr=serial,vidconsole\0" -#define ENV_MEM_LAYOUT_SETTINGS \ - "fdt_addr_r=0x960100000\0" \ - "kernel_addr_r=0x960200000\0" - #if CONFIG_IS_ENABLED(CMD_NVME) #define BOOT_TARGET_NVME(func) func(NVME, nvme, 0) #else @@ -33,7 +29,6 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ ENV_DEVICE_SETTINGS \ - ENV_MEM_LAYOUT_SETTINGS \ BOOTENV #endif From c2aed9cfb9fdeafec27e3999453bfe4e67ffdd53 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Sun, 20 Feb 2022 23:47:01 +0100 Subject: [PATCH 5/5] board: stemmy: Detect board variants and patch DTB This patch scans the cmdline from the Samsung SBL (second stage bootloader) and stores the parameters board_id=N and lcdtype=N in order to augment the DTB for different board and LCD types. We then add a custom ft_board_setup() callback that will inspect the DTB and patch it using the stored LCD type. At this point we know which product we are dealing with, so using the passed board_id we can also print the board variant for diagnostics. We patch the Codina, Skomer and Kyle DTBs to use the right LCD type as passed in lcdtype from the SBL. This also creates an infrastructure for handling any other Samsung U8500 board variants that may need a slightly augmented DTB. Cc: Markuss Broks Cc: Stephan Gerhold Signed-off-by: Linus Walleij --- board/ste/stemmy/stemmy.c | 315 ++++++++++++++++++++++++++++++++++++++ configs/stemmy_defconfig | 2 + 2 files changed, 317 insertions(+) diff --git a/board/ste/stemmy/stemmy.c b/board/ste/stemmy/stemmy.c index 5f1150c0c7..060d562cbc 100644 --- a/board/ste/stemmy/stemmy.c +++ b/board/ste/stemmy/stemmy.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include @@ -95,6 +96,33 @@ static void parse_serial(const struct tag_serialnr *serialnr) env_set("serial#", serial); } +#define SBL_BOARD "board_id=" +#define SBL_LCDTYPE "lcdtype=" +static ulong board_id = 0; +static ulong lcdtype = 0; + +static void parse_cmdline(const struct tag_cmdline *cmdline) +{ + char *buf; + + /* Export this to sbl_cmdline (secondary boot loader command line) */ + env_set("sbl_cmdline", cmdline->cmdline); + + buf = strstr(cmdline->cmdline, SBL_BOARD); + if (!buf) + return; + buf += strlen(SBL_BOARD); + + board_id = simple_strtoul(buf, NULL, 10); + + buf = strstr(cmdline->cmdline, SBL_LCDTYPE); + if (!buf) + return; + buf += strlen(SBL_LCDTYPE); + + lcdtype = simple_strtoul(buf, NULL, 10); +} + /* * The downstream/vendor kernel (provided by Samsung) uses ATAGS for booting. * It also requires an extremely long cmdline provided by the primary bootloader @@ -126,6 +154,9 @@ static void copy_atags(const struct tag *tags) if (t->hdr.tag == ATAG_SERIAL) parse_serial(&t->u.serialnr); + if (t->hdr.tag == ATAG_CMDLINE) + parse_cmdline(&t->u.cmdline); + fw_atags_size += t->hdr.size * sizeof(u32); } @@ -165,3 +196,287 @@ void setup_board_tags(struct tag **in_params) memcpy(*in_params, fw_atags_copy, fw_atags_size); *(u8 **)in_params += fw_atags_size; } + +/* These numbers are unique per product but not across all products */ +#define SAMSUNG_CODINA_LCD_LMS380KF01 4 +#define SAMSUNG_CODINA_LCD_S6D27A1 13 +#define SAMSUNG_SKOMER_LCD_HVA40WV1 10 +#define SAMSUNG_SKOMER_LCD_NT35512 12 + +static void codina_patch_display(void *fdt) +{ + int node; + int ret; + + node = fdt_path_offset(fdt, "/spi-gpio-0/panel"); + if (node < 0) { + printf("cannot find Codina panel node\n"); + return; + } + if (lcdtype == SAMSUNG_CODINA_LCD_LMS380KF01) { + ret = fdt_setprop_string(fdt, node, "compatible", "samsung,lms380kf01"); + if (ret < 0) + printf("could not set LCD compatible\n"); + else + printf("updated LCD compatible to LMS380KF01\n"); + } else if (lcdtype == SAMSUNG_CODINA_LCD_S6D27A1) { + ret = fdt_setprop_string(fdt, node, "compatible", "samsung,s6d27a1"); + if (ret < 0) + printf("could not set LCD compatible\n"); + else + printf("updated LCD compatible to S6D27A1\n"); + } else { + printf("unknown LCD type\n"); + } +} + +static void skomer_kyle_patch_display(void *fdt) +{ + int node; + int ret; + + node = fdt_path_offset(fdt, "/soc/mcde/dsi/panel"); + if (node < 0) { + printf("cannot find Skomer/Kyle panel node\n"); + return; + } + if (lcdtype == SAMSUNG_SKOMER_LCD_HVA40WV1) { + ret = fdt_setprop_string(fdt, node, "compatible", "hydis,hva40wv1"); + if (ret < 0) + printf("could not set LCD compatible\n"); + else + printf("updated LCD compatible to Hydis HVA40WV1\n"); + } else if (lcdtype == SAMSUNG_SKOMER_LCD_NT35512) { + /* + * FIXME: This panel is actually a BOE product, but we don't know + * the exact product name, so the compatible for the NT35512 + * is used for the time being. The vendor drivers also call it NT35512. + */ + ret = fdt_setprop_string(fdt, node, "compatible", "novatek,nt35512"); + if (ret < 0) + printf("could not set LCD compatible\n"); + else + printf("updated LCD compatible to Novatek NT35512\n"); + } else { + printf("unknown LCD type\n"); + } +} + +int ft_board_setup(void *fdt, struct bd_info *bd) +{ + const char *str; + int node; + int ret; + + printf("stemmy patch: DTB at 0x%08lx\n", (ulong)fdt); + + /* Inspect FDT to see what we've got here */ + ret = fdt_check_header(fdt); + if (ret < 0) { + printf("invalid DTB\n"); + return ret; + } + node = fdt_path_offset(fdt, "/"); + if (node < 0) { + printf("cannot find root node\n"); + return node; + } + str = fdt_stringlist_get(fdt, node, "compatible", 0, NULL); + if (!str) { + printf("could not find board compatible\n"); + return -1; + } + + if (!strcmp(str, "samsung,janice")) { + switch(board_id) { + case 7: + printf("Janice GT-I9070 Board Rev 0.0\n"); + break; + case 8: + printf("Janice GT-I9070 Board Rev 0.1\n"); + break; + case 9: + printf("Janice GT-I9070 Board Rev 0.2\n"); + break; + case 10: + printf("Janice GT-I9070 Board Rev 0.3\n"); + break; + case 11: + printf("Janice GT-I9070 Board Rev 0.4\n"); + break; + case 12: + printf("Janice GT-I9070 Board Rev 0.5\n"); + break; + case 13: + printf("Janice GT-I9070 Board Rev 0.6\n"); + break; + default: + break; + } + } else if (!strcmp(str, "samsung,gavini")) { + switch(board_id) { + case 7: + printf("Gavini GT-I8530 Board Rev 0.0\n"); + break; + case 8: + printf("Gavini GT-I8530 Board Rev 0.0A\n"); + break; + case 9: + printf("Gavini GT-I8530 Board Rev 0.0B\n"); + break; + case 10: + printf("Gavini GT-I8530 Board Rev 0.0A_EMUL\n"); + break; + case 11: + printf("Gavini GT-I8530 Board Rev 0.0C\n"); + break; + case 12: + printf("Gavini GT-I8530 Board Rev 0.0D\n"); + break; + case 13: + printf("Gavini GT-I8530 Board Rev 0.1\n"); + break; + case 14: + printf("Gavini GT-I8530 Board Rev 0.3\n"); + break; + default: + break; + } + } else if (!strcmp(str, "samsung,codina")) { + switch(board_id) { + case 7: + printf("Codina GT-I8160 Board Rev 0.0\n"); + break; + case 8: + printf("Codina GT-I8160 Board Rev 0.1\n"); + break; + case 9: + printf("Codina GT-I8160 Board Rev 0.2\n"); + break; + case 10: + printf("Codina GT-I8160 Board Rev 0.3\n"); + break; + case 11: + printf("Codina GT-I8160 Board Rev 0.4\n"); + break; + case 12: + printf("Codina GT-I8160 Board Rev 0.5\n"); + break; + default: + break; + } + codina_patch_display(fdt); + } else if (!strcmp(str, "samsung,codina-tmo")) { + switch(board_id) { + case 0x101: + printf("Codina SGH-T599 Board pre-Rev 0.0\n"); + break; + case 0x102: + printf("Codina SGH-T599 Board Rev 0.0\n"); + break; + case 0x103: + printf("Codina SGH-T599 Board Rev 0.1\n"); + break; + case 0x104: + printf("Codina SGH-T599 Board Rev 0.2\n"); + break; + case 0x105: + printf("Codina SGH-T599 Board Rev 0.4\n"); + break; + case 0x106: + printf("Codina SGH-T599 Board Rev 0.6\n"); + break; + case 0x107: + printf("Codina SGH-T599 Board Rev 0.7\n"); + break; + default: + break; + } + codina_patch_display(fdt); + } else if (!strcmp(str, "samsung,golden")) { + switch(board_id) { + case 0x102: + printf("Golden GT-I8190 Board SW bringup\n"); + break; + case 0x103: + printf("Golden GT-I8190 Board Rev 0.2\n"); + break; + case 0x104: + printf("Golden GT-I8190 Board Rev 0.3\n"); + break; + case 0x105: + printf("Golden GT-I8190 Board Rev 0.4\n"); + break; + case 0x106: + printf("Golden GT-I8190 Board Rev 0.5\n"); + break; + case 0x107: + printf("Golden GT-I8190 Board Rev 0.6\n"); + break; + default: + break; + } + } else if (!strcmp(str, "samsung,skomer")) { + switch(board_id) { + case 0x101: + printf("Skomer GT-S7710 Board Rev 0.0\n"); + break; + case 0x102: + printf("Skomer GT-S7710 Board Rev 0.1\n"); + break; + case 0x103: + printf("Skomer GT-S7710 Board Rev 0.2\n"); + break; + case 0x104: + printf("Skomer GT-S7710 Board Rev 0.3\n"); + break; + case 0x105: + printf("Skomer GT-S7710 Board Rev 0.4\n"); + break; + case 0x106: + printf("Skomer GT-S7710 Board Rev 0.5\n"); + break; + case 0x107: + printf("Skomer GT-S7710 Board Rev 0.6\n"); + break; + case 0x108: + printf("Skomer GT-S7710 Board Rev 0.7\n"); + break; + case 0x109: + printf("Skomer GT-S7710 Board Rev 0.8\n"); + break; + default: + break; + } + skomer_kyle_patch_display(fdt); + } else if (!strcmp(str, "samsung,kyle")) { + switch(board_id) { + case 0x101: + printf("Kyle SGH-I407 Board Rev 0.0\n"); + break; + case 0x102: + printf("Kyle SGH-I407 Board Rev 0.1\n"); + break; + case 0x103: + printf("Kyle SGH-I407 Board Rev 0.2\n"); + break; + case 0x104: + printf("Kyle SGH-I407 Board Rev 0.3\n"); + break; + case 0x105: + printf("Kyle SGH-I407 Board Rev 0.4\n"); + break; + case 0x106: + printf("Kyle SGH-I407 Board Rev 0.5\n"); + break; + case 0x107: + printf("Kyle SGH-I407 Board Rev 0.6\n"); + break; + default: + break; + } + skomer_kyle_patch_display(fdt); + } + + return 0; +} diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig index ea43cb6633..c02db998aa 100644 --- a/configs/stemmy_defconfig +++ b/configs/stemmy_defconfig @@ -36,3 +36,5 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MCDE_SIMPLE=y # CONFIG_EFI_LOADER is not set +CONFIG_OF_BOARD_SETUP=y +CONFIG_OF_LIBFDT=y