Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 1 | /* |
| 2 | * siemens pxm2 |
| 3 | * (C) Copyright 2013 Siemens Schweiz AG |
| 4 | * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de. |
| 5 | * |
| 6 | * Based on: |
| 7 | * U-Boot file:/include/configs/am335x_evm.h |
| 8 | * |
| 9 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ |
| 10 | * |
| 11 | * SPDX-License-Identifier: GPL-2.0+ |
| 12 | */ |
| 13 | |
| 14 | #ifndef __CONFIG_PXM2_H |
| 15 | #define __CONFIG_PXM2_H |
| 16 | |
| 17 | #define CONFIG_SIEMENS_PXM2 |
| 18 | #define MACH_TYPE_PXM2 4309 |
| 19 | #define CONFIG_SIEMENS_MACH_TYPE MACH_TYPE_PXM2 |
| 20 | |
| 21 | #include "siemens-am33x-common.h" |
| 22 | |
| 23 | #define CONFIG_SYS_MPUCLK 720 |
Egli, Samuel | 121636f | 2014-04-24 17:57:52 +0200 | [diff] [blame] | 24 | #define DDR_IOCTRL_VAL 0x18b |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 25 | #define DDR_PLL_FREQ 266 |
| 26 | |
| 27 | #define BOARD_DFU_BUTTON_GPIO 59 |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 28 | #define BOARD_LCD_POWER 111 |
| 29 | #define BOARD_BACK_LIGHT 112 |
| 30 | #define BOARD_TOUCH_POWER 57 |
| 31 | |
Heiko Schocher | d17c3fc | 2015-06-16 14:59:34 +0200 | [diff] [blame] | 32 | #define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \ |
| 33 | "button_dfu0=59\0" \ |
| 34 | "led0=117,0,1\0" \ |
| 35 | |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 36 | /* Physical Memory Map */ |
| 37 | #define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* 1GB */ |
| 38 | |
| 39 | /* I2C Configuration */ |
| 40 | #define CONFIG_SYS_I2C_SPEED 400000 |
| 41 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 42 | |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 43 | #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300 |
| 44 | |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 45 | #define CONFIG_PHY_ATHEROS |
| 46 | |
| 47 | #define CONFIG_FACTORYSET |
| 48 | |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 49 | /* Watchdog */ |
| 50 | #define CONFIG_OMAP_WATCHDOG |
| 51 | |
| 52 | #ifndef CONFIG_SPL_BUILD |
| 53 | |
Heiko Schocher | d17c3fc | 2015-06-16 14:59:34 +0200 | [diff] [blame] | 54 | /* Use common default */ |
| 55 | #define MTDPARTS_DEFAULT MTDPARTS_DEFAULT_V1 |
| 56 | |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 57 | /* Default env settings */ |
| 58 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 59 | "hostname=pxm2\0" \ |
Heiko Schocher | cbec11a | 2016-06-07 08:55:45 +0200 | [diff] [blame] | 60 | "ubi_off=2048\0"\ |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 61 | "nand_img_size=0x500000\0" \ |
| 62 | "optargs=\0" \ |
Heiko Schocher | d17c3fc | 2015-06-16 14:59:34 +0200 | [diff] [blame] | 63 | "preboot=draco_led 0\0" \ |
| 64 | CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \ |
Samuel Egli | 8069bfe | 2013-11-04 14:05:03 +0100 | [diff] [blame] | 65 | "splashpos=m,m\0" \ |
Heiko Schocher | d17c3fc | 2015-06-16 14:59:34 +0200 | [diff] [blame] | 66 | CONFIG_ENV_SETTINGS_V1 \ |
| 67 | CONFIG_ENV_SETTINGS_NAND_V1 \ |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 68 | "mmc_dev=0\0" \ |
| 69 | "mmc_root=/dev/mmcblk0p2 rw\0" \ |
| 70 | "mmc_root_fs_type=ext4 rootwait\0" \ |
| 71 | "mmc_load_uimage=" \ |
| 72 | "mmc rescan; " \ |
| 73 | "setenv bootfile uImage;" \ |
| 74 | "fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \ |
| 75 | "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \ |
| 76 | "importbootenv=echo Importing environment from mmc ...; " \ |
| 77 | "env import -t $loadaddr $filesize\0" \ |
| 78 | "mmc_args=run bootargs_defaults;" \ |
| 79 | "mtdparts default;" \ |
| 80 | "setenv bootargs ${bootargs} " \ |
| 81 | "root=${mmc_root} ${mtdparts}" \ |
| 82 | "rootfstype=${mmc_root_fs_type} ip=${ip_method} " \ |
| 83 | "eth=${ethaddr} " \ |
| 84 | "\0" \ |
| 85 | "mmc_boot=run mmc_args; " \ |
| 86 | "run mmc_load_uimage; " \ |
| 87 | "bootm ${kloadaddr}\0" \ |
| 88 | "" |
| 89 | |
| 90 | #ifndef CONFIG_RESTORE_FLASH |
| 91 | /* set to negative value for no autoboot */ |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 92 | |
| 93 | #define CONFIG_BOOTCOMMAND \ |
| 94 | "if dfubutton; then " \ |
| 95 | "run dfu_start; " \ |
| 96 | "reset; " \ |
| 97 | "fi; " \ |
| 98 | "if mmc rescan; then " \ |
| 99 | "echo SD/MMC found on device ${mmc_dev};" \ |
| 100 | "if run loadbootenv; then " \ |
| 101 | "echo Loaded environment from ${bootenv};" \ |
| 102 | "run importbootenv;" \ |
| 103 | "fi;" \ |
| 104 | "if test -n $uenvcmd; then " \ |
| 105 | "echo Running uenvcmd ...;" \ |
| 106 | "run uenvcmd;" \ |
| 107 | "fi;" \ |
| 108 | "if run mmc_load_uimage; then " \ |
| 109 | "run mmc_args;" \ |
| 110 | "bootm ${kloadaddr};" \ |
| 111 | "fi;" \ |
| 112 | "fi;" \ |
| 113 | "run nand_boot;" \ |
Samuel Egli | 8069bfe | 2013-11-04 14:05:03 +0100 | [diff] [blame] | 114 | "reset;" |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 115 | |
| 116 | #else |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 117 | |
| 118 | #define CONFIG_BOOTCOMMAND \ |
| 119 | "setenv autoload no; " \ |
| 120 | "dhcp; " \ |
| 121 | "if tftp 80000000 debrick.scr; then " \ |
| 122 | "source 80000000; " \ |
| 123 | "fi" |
| 124 | #endif |
| 125 | #endif /* CONFIG_SPL_BUILD */ |
| 126 | |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 127 | #if defined(CONFIG_VIDEO) |
| 128 | #define CONFIG_VIDEO_DA8XX |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 129 | #define CONFIG_SPLASH_SCREEN |
| 130 | #define CONFIG_SPLASH_SCREEN_ALIGN |
| 131 | #define CONFIG_VIDEO_LOGO |
| 132 | #define CONFIG_VIDEO_BMP_RLE8 |
| 133 | #define CONFIG_VIDEO_BMP_LOGO |
| 134 | #define CONFIG_CMD_BMP |
| 135 | #define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE |
| 136 | #define PWM_TICKS 0x1388 |
| 137 | #define PWM_DUTY 0x200 |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 138 | #endif |
| 139 | |
Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame] | 140 | #endif /* ! __CONFIG_PXM2_H */ |