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