1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2931a1d2aSAlbert ARIBAUD \(3ADEV\) /* 3931a1d2aSAlbert ARIBAUD \(3ADEV\) * Copyright 2013 Freescale Semiconductor, Inc. 4931a1d2aSAlbert ARIBAUD \(3ADEV\) * 5931a1d2aSAlbert ARIBAUD \(3ADEV\) * Configuration settings for the phytec PCM-052 SoM. 6931a1d2aSAlbert ARIBAUD \(3ADEV\) */ 7931a1d2aSAlbert ARIBAUD \(3ADEV\) 8931a1d2aSAlbert ARIBAUD \(3ADEV\) #ifndef __CONFIG_H 9931a1d2aSAlbert ARIBAUD \(3ADEV\) #define __CONFIG_H 10931a1d2aSAlbert ARIBAUD \(3ADEV\) 11931a1d2aSAlbert ARIBAUD \(3ADEV\) #include <asm/arch/imx-regs.h> 12931a1d2aSAlbert ARIBAUD \(3ADEV\) 13931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SKIP_LOWLEVEL_INIT 14931a1d2aSAlbert ARIBAUD \(3ADEV\) 15931a1d2aSAlbert ARIBAUD \(3ADEV\) /* Enable passing of ATAGs */ 16931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_CMDLINE_TAG 17931a1d2aSAlbert ARIBAUD \(3ADEV\) 18931a1d2aSAlbert ARIBAUD \(3ADEV\) /* Size of malloc() pool */ 19931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) 20931a1d2aSAlbert ARIBAUD \(3ADEV\) 21931a1d2aSAlbert ARIBAUD \(3ADEV\) /* Allow to overwrite serial and ethaddr */ 22931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_ENV_OVERWRITE 23931a1d2aSAlbert ARIBAUD \(3ADEV\) 24931a1d2aSAlbert ARIBAUD \(3ADEV\) /* NAND support */ 25931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_NAND_ONFI_DETECTION 26931a1d2aSAlbert ARIBAUD \(3ADEV\) 27931a1d2aSAlbert ARIBAUD \(3ADEV\) #ifdef CONFIG_CMD_NAND 28931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_MAX_NAND_DEVICE 1 29931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR 30931a1d2aSAlbert ARIBAUD \(3ADEV\) 31931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_JFFS2_NAND 32931a1d2aSAlbert ARIBAUD \(3ADEV\) 33931a1d2aSAlbert ARIBAUD \(3ADEV\) /* Dynamic MTD partition support */ 3427192d16SAlbert ARIBAUD \(3ADEV\) 3527192d16SAlbert ARIBAUD \(3ADEV\) #endif 3627192d16SAlbert ARIBAUD \(3ADEV\) 37931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_FSL_ESDHC_ADDR 0 38931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_FSL_ESDHC_NUM 1 39931a1d2aSAlbert ARIBAUD \(3ADEV\) 40931a1d2aSAlbert ARIBAUD \(3ADEV\) /*#define CONFIG_ESDHC_DETECT_USE_EXTERN_IRQ1*/ 41931a1d2aSAlbert ARIBAUD \(3ADEV\) 42931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_FEC_MXC 43931a1d2aSAlbert ARIBAUD \(3ADEV\) #define IMX_FEC_BASE ENET_BASE_ADDR 44931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_FEC_XCV_TYPE RMII 45931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_FEC_MXC_PHYADDR 0 46931a1d2aSAlbert ARIBAUD \(3ADEV\) 47931a1d2aSAlbert ARIBAUD \(3ADEV\) /* QSPI Configs*/ 48931a1d2aSAlbert ARIBAUD \(3ADEV\) 49931a1d2aSAlbert ARIBAUD \(3ADEV\) #ifdef CONFIG_FSL_QSPI 50931a1d2aSAlbert ARIBAUD \(3ADEV\) #define FSL_QSPI_FLASH_SIZE (1 << 24) 51931a1d2aSAlbert ARIBAUD \(3ADEV\) #define FSL_QSPI_FLASH_NUM 2 52931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_FSL_QSPI_LE 53931a1d2aSAlbert ARIBAUD \(3ADEV\) #endif 54931a1d2aSAlbert ARIBAUD \(3ADEV\) 55931a1d2aSAlbert ARIBAUD \(3ADEV\) /* I2C Configs */ 56931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_I2C 57931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_I2C_MXC_I2C3 58931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_I2C_MXC 59931a1d2aSAlbert ARIBAUD \(3ADEV\) 60931a1d2aSAlbert ARIBAUD \(3ADEV\) /* RTC (actually an RV-4162 but M41T62-compatible) */ 61931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_I2C_RTC_ADDR 0x68 62931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_RTC_BUS_NUM 2 63931a1d2aSAlbert ARIBAUD \(3ADEV\) 64931a1d2aSAlbert ARIBAUD \(3ADEV\) /* EEPROM (24FC256) */ 65931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 66931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 67931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_I2C_EEPROM_BUS 2 68931a1d2aSAlbert ARIBAUD \(3ADEV\) 69931a1d2aSAlbert ARIBAUD \(3ADEV\) 70931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_LOADADDR 0x82000000 71931a1d2aSAlbert ARIBAUD \(3ADEV\) 72931a1d2aSAlbert ARIBAUD \(3ADEV\) /* We boot from the gfxRAM area of the OCRAM. */ 73c0f432c3SStefan Agner #define CONFIG_BOARD_SIZE_LIMIT 520192 74931a1d2aSAlbert ARIBAUD \(3ADEV\) 7527192d16SAlbert ARIBAUD \(3ADEV\) /* if no target-specific extra environment settings were defined by the 7627192d16SAlbert ARIBAUD \(3ADEV\) target, define an empty one */ 7727192d16SAlbert ARIBAUD \(3ADEV\) #ifndef PCM052_EXTRA_ENV_SETTINGS 7827192d16SAlbert ARIBAUD \(3ADEV\) #define PCM052_EXTRA_ENV_SETTINGS 7927192d16SAlbert ARIBAUD \(3ADEV\) #endif 8027192d16SAlbert ARIBAUD \(3ADEV\) 8127192d16SAlbert ARIBAUD \(3ADEV\) /* if no target-specific boot command was defined by the target, 8227192d16SAlbert ARIBAUD \(3ADEV\) define an empty one */ 8327192d16SAlbert ARIBAUD \(3ADEV\) #ifndef PCM052_BOOTCOMMAND 8427192d16SAlbert ARIBAUD \(3ADEV\) #define PCM052_BOOTCOMMAND 8527192d16SAlbert ARIBAUD \(3ADEV\) #endif 8627192d16SAlbert ARIBAUD \(3ADEV\) 8727192d16SAlbert ARIBAUD \(3ADEV\) /* if no target-specific extra environment settings were defined by the 8827192d16SAlbert ARIBAUD \(3ADEV\) target, define an empty one */ 8927192d16SAlbert ARIBAUD \(3ADEV\) #ifndef PCM052_NET_INIT 9027192d16SAlbert ARIBAUD \(3ADEV\) #define PCM052_NET_INIT 9127192d16SAlbert ARIBAUD \(3ADEV\) #endif 9227192d16SAlbert ARIBAUD \(3ADEV\) 9327192d16SAlbert ARIBAUD \(3ADEV\) /* boot command, including the target-defined one if any */ 9427192d16SAlbert ARIBAUD \(3ADEV\) #define CONFIG_BOOTCOMMAND PCM052_BOOTCOMMAND "run bootcmd_nand" 9527192d16SAlbert ARIBAUD \(3ADEV\) 9627192d16SAlbert ARIBAUD \(3ADEV\) /* Extra env settings (including the target-defined ones if any) */ 97931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_EXTRA_ENV_SETTINGS \ 9827192d16SAlbert ARIBAUD \(3ADEV\) PCM052_EXTRA_ENV_SETTINGS \ 9927192d16SAlbert ARIBAUD \(3ADEV\) "autoload=no\0" \ 100040ef8f5SAlbert ARIBAUD (3ADEV) "fdt_high=0xffffffff\0" \ 101040ef8f5SAlbert ARIBAUD (3ADEV) "initrd_high=0xffffffff\0" \ 102ed0c2c0aSAlbert ARIBAUD \(3ADEV\) "blimg_file=u-boot.vyb\0" \ 103ed0c2c0aSAlbert ARIBAUD \(3ADEV\) "blimg_addr=0x81000000\0" \ 104040ef8f5SAlbert ARIBAUD (3ADEV) "kernel_file=zImage\0" \ 105040ef8f5SAlbert ARIBAUD (3ADEV) "kernel_addr=0x82000000\0" \ 106083e4fd4SAlbert ARIBAUD \(3ADEV\) "fdt_file=zImage.dtb\0" \ 107040ef8f5SAlbert ARIBAUD (3ADEV) "fdt_addr=0x81000000\0" \ 108040ef8f5SAlbert ARIBAUD (3ADEV) "ram_file=uRamdisk\0" \ 109040ef8f5SAlbert ARIBAUD (3ADEV) "ram_addr=0x83000000\0" \ 110040ef8f5SAlbert ARIBAUD (3ADEV) "filesys=rootfs.ubifs\0" \ 111040ef8f5SAlbert ARIBAUD (3ADEV) "sys_addr=0x81000000\0" \ 112040ef8f5SAlbert ARIBAUD (3ADEV) "tftploc=/path/to/tftp/directory/\0" \ 113040ef8f5SAlbert ARIBAUD (3ADEV) "nfs_root=/path/to/nfs/root\0" \ 114040ef8f5SAlbert ARIBAUD (3ADEV) "tftptimeout=1000\0" \ 115040ef8f5SAlbert ARIBAUD (3ADEV) "tftptimeoutcountmax=1000000\0" \ 11643ede0bcSTom Rini "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ 117a7e5f7f3SAlbert ARIBAUD \(3ADEV\) "bootargs_base=setenv bootargs rw " \ 118a7e5f7f3SAlbert ARIBAUD \(3ADEV\) " mem=" __stringify(CONFIG_PCM052_DDR_SIZE) "M " \ 119040ef8f5SAlbert ARIBAUD (3ADEV) "console=ttyLP1,115200n8\0" \ 120931a1d2aSAlbert ARIBAUD \(3ADEV\) "bootargs_sd=setenv bootargs ${bootargs} " \ 121931a1d2aSAlbert ARIBAUD \(3ADEV\) "root=/dev/mmcblk0p2 rootwait\0" \ 122931a1d2aSAlbert ARIBAUD \(3ADEV\) "bootargs_net=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp " \ 123931a1d2aSAlbert ARIBAUD \(3ADEV\) "nfsroot=${serverip}:${nfs_root},v3,tcp\0" \ 124931a1d2aSAlbert ARIBAUD \(3ADEV\) "bootargs_nand=setenv bootargs ${bootargs} " \ 12527f7d4f5SAlbert ARIBAUD \(3ADEV\) "ubi.mtd=5 rootfstype=ubifs root=ubi0:rootfs\0" \ 126040ef8f5SAlbert ARIBAUD (3ADEV) "bootargs_ram=setenv bootargs ${bootargs} " \ 127040ef8f5SAlbert ARIBAUD (3ADEV) "root=/dev/ram rw initrd=${ram_addr}\0" \ 128931a1d2aSAlbert ARIBAUD \(3ADEV\) "bootargs_mtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ 129040ef8f5SAlbert ARIBAUD (3ADEV) "bootcmd_sd=run bootargs_base bootargs_sd bootargs_mtd; " \ 130040ef8f5SAlbert ARIBAUD (3ADEV) "fatload mmc 0:1 ${kernel_addr} ${kernel_file}; " \ 131040ef8f5SAlbert ARIBAUD (3ADEV) "fatload mmc 0:1 ${fdt_addr} ${fdt_file}; " \ 132040ef8f5SAlbert ARIBAUD (3ADEV) "bootz ${kernel_addr} - ${fdt_addr}\0" \ 133931a1d2aSAlbert ARIBAUD \(3ADEV\) "bootcmd_net=run bootargs_base bootargs_net bootargs_mtd; " \ 134040ef8f5SAlbert ARIBAUD (3ADEV) "tftpboot ${kernel_addr} ${tftpdir}${kernel_file}; " \ 135040ef8f5SAlbert ARIBAUD (3ADEV) "tftpboot ${fdt_addr} ${tftpdir}${fdt_file}; " \ 136040ef8f5SAlbert ARIBAUD (3ADEV) "bootz ${kernel_addr} - ${fdt_addr}\0" \ 137040ef8f5SAlbert ARIBAUD (3ADEV) "bootcmd_nand=run bootargs_base bootargs_nand bootargs_mtd; " \ 138040ef8f5SAlbert ARIBAUD (3ADEV) "nand read ${fdt_addr} dtb; " \ 139040ef8f5SAlbert ARIBAUD (3ADEV) "nand read ${kernel_addr} kernel; " \ 140040ef8f5SAlbert ARIBAUD (3ADEV) "bootz ${kernel_addr} - ${fdt_addr}\0" \ 141040ef8f5SAlbert ARIBAUD (3ADEV) "bootcmd_ram=run bootargs_base bootargs_ram bootargs_mtd; " \ 142040ef8f5SAlbert ARIBAUD (3ADEV) "nand read ${fdt_addr} dtb; " \ 143040ef8f5SAlbert ARIBAUD (3ADEV) "nand read ${kernel_addr} kernel; " \ 14427f7d4f5SAlbert ARIBAUD \(3ADEV\) "nand read ${ram_addr} root; " \ 145040ef8f5SAlbert ARIBAUD (3ADEV) "bootz ${kernel_addr} ${ram_addr} ${fdt_addr}\0" \ 14627192d16SAlbert ARIBAUD \(3ADEV\) "update_bootloader_from_tftp=" PCM052_NET_INIT \ 14727192d16SAlbert ARIBAUD \(3ADEV\) "if tftp ${blimg_addr} "\ 148ed0c2c0aSAlbert ARIBAUD \(3ADEV\) "${tftpdir}${blimg_file}; then " \ 149ed0c2c0aSAlbert ARIBAUD \(3ADEV\) "mtdparts default; " \ 150040ef8f5SAlbert ARIBAUD (3ADEV) "nand erase.part bootloader; " \ 151ed0c2c0aSAlbert ARIBAUD \(3ADEV\) "nand write ${blimg_addr} bootloader ${filesize}; fi\0" \ 152040ef8f5SAlbert ARIBAUD (3ADEV) "update_kernel_from_sd=if fatload mmc 0:2 ${kernel_addr} " \ 153040ef8f5SAlbert ARIBAUD (3ADEV) "${kernel_file}; " \ 154040ef8f5SAlbert ARIBAUD (3ADEV) "then mtdparts default; " \ 155040ef8f5SAlbert ARIBAUD (3ADEV) "nand erase.part kernel; " \ 156040ef8f5SAlbert ARIBAUD (3ADEV) "nand write ${kernel_addr} kernel ${filesize}; " \ 157040ef8f5SAlbert ARIBAUD (3ADEV) "if fatload mmc 0:2 ${fdt_addr} ${fdt_file}; then " \ 158040ef8f5SAlbert ARIBAUD (3ADEV) "nand erase.part dtb; " \ 159040ef8f5SAlbert ARIBAUD (3ADEV) "nand write ${fdt_addr} dtb ${filesize}; fi\0" \ 16027192d16SAlbert ARIBAUD \(3ADEV\) "update_kernel_from_tftp=" PCM052_NET_INIT \ 16127192d16SAlbert ARIBAUD \(3ADEV\) "if tftp ${fdt_addr} ${tftpdir}${fdt_file}; " \ 162040ef8f5SAlbert ARIBAUD (3ADEV) "then setenv fdtsize ${filesize}; " \ 163040ef8f5SAlbert ARIBAUD (3ADEV) "if tftp ${kernel_addr} ${tftpdir}${kernel_file}; then " \ 164040ef8f5SAlbert ARIBAUD (3ADEV) "mtdparts default; " \ 165040ef8f5SAlbert ARIBAUD (3ADEV) "nand erase.part dtb; " \ 166040ef8f5SAlbert ARIBAUD (3ADEV) "nand write ${fdt_addr} dtb ${fdtsize}; " \ 167040ef8f5SAlbert ARIBAUD (3ADEV) "nand erase.part kernel; " \ 168040ef8f5SAlbert ARIBAUD (3ADEV) "nand write ${kernel_addr} kernel ${filesize}; fi; fi\0" \ 16927192d16SAlbert ARIBAUD \(3ADEV\) "update_rootfs_from_tftp=" PCM052_NET_INIT \ 17027192d16SAlbert ARIBAUD \(3ADEV\) "if tftp ${sys_addr} ${tftpdir}${filesys}; " \ 171040ef8f5SAlbert ARIBAUD (3ADEV) "then mtdparts default; " \ 172040ef8f5SAlbert ARIBAUD (3ADEV) "nand erase.part root; " \ 173040ef8f5SAlbert ARIBAUD (3ADEV) "ubi part root; " \ 174040ef8f5SAlbert ARIBAUD (3ADEV) "ubi create rootfs; " \ 175040ef8f5SAlbert ARIBAUD (3ADEV) "ubi write ${sys_addr} rootfs ${filesize}; fi\0" \ 17627192d16SAlbert ARIBAUD \(3ADEV\) "update_ramdisk_from_tftp=" PCM052_NET_INIT \ 17727192d16SAlbert ARIBAUD \(3ADEV\) "if tftp ${ram_addr} ${tftpdir}${ram_file}; " \ 178040ef8f5SAlbert ARIBAUD (3ADEV) "then mtdparts default; " \ 17927f7d4f5SAlbert ARIBAUD \(3ADEV\) "nand erase.part root; " \ 18027f7d4f5SAlbert ARIBAUD \(3ADEV\) "nand write ${ram_addr} root ${filesize}; fi\0" 181931a1d2aSAlbert ARIBAUD \(3ADEV\) 182931a1d2aSAlbert ARIBAUD \(3ADEV\) /* Miscellaneous configurable options */ 183931a1d2aSAlbert ARIBAUD \(3ADEV\) 184931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_MEMTEST_START 0x80010000 185931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_MEMTEST_END 0x87C00000 186931a1d2aSAlbert ARIBAUD \(3ADEV\) 187931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 188931a1d2aSAlbert ARIBAUD \(3ADEV\) 189931a1d2aSAlbert ARIBAUD \(3ADEV\) /* Physical memory map */ 190931a1d2aSAlbert ARIBAUD \(3ADEV\) #define PHYS_SDRAM (0x80000000) 191a7e5f7f3SAlbert ARIBAUD \(3ADEV\) #define PHYS_SDRAM_SIZE (CONFIG_PCM052_DDR_SIZE * 1024 * 1024) 192931a1d2aSAlbert ARIBAUD \(3ADEV\) 193931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM 194931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR 195931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE 196931a1d2aSAlbert ARIBAUD \(3ADEV\) 197931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_INIT_SP_OFFSET \ 198931a1d2aSAlbert ARIBAUD \(3ADEV\) (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) 199931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_INIT_SP_ADDR \ 200931a1d2aSAlbert ARIBAUD \(3ADEV\) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) 201931a1d2aSAlbert ARIBAUD \(3ADEV\) 202e856bdcfSMasahiro Yamada /* environment organization */ 203931a1d2aSAlbert ARIBAUD \(3ADEV\) #ifdef CONFIG_ENV_IS_IN_MMC 204931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_ENV_SIZE (8 * 1024) 205931a1d2aSAlbert ARIBAUD \(3ADEV\) 206931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_ENV_OFFSET (12 * 64 * 1024) 207931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_SYS_MMC_ENV_DEV 0 208931a1d2aSAlbert ARIBAUD \(3ADEV\) #endif 209931a1d2aSAlbert ARIBAUD \(3ADEV\) 210931a1d2aSAlbert ARIBAUD \(3ADEV\) #ifdef CONFIG_ENV_IS_IN_NAND 211931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_ENV_SECT_SIZE (128 * 1024) 212931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_ENV_SIZE (8 * 1024) 213040ef8f5SAlbert ARIBAUD (3ADEV) #define CONFIG_ENV_OFFSET 0xA0000 214931a1d2aSAlbert ARIBAUD \(3ADEV\) #define CONFIG_ENV_SIZE_REDUND (8 * 1024) 215040ef8f5SAlbert ARIBAUD (3ADEV) #define CONFIG_ENV_OFFSET_REDUND 0xC0000 216931a1d2aSAlbert ARIBAUD \(3ADEV\) #endif 217931a1d2aSAlbert ARIBAUD \(3ADEV\) 218931a1d2aSAlbert ARIBAUD \(3ADEV\) #endif 219