;-------------------------------------------------------------------------- ; ; ; PEEDI target configuration file for Freescale T4240 processor ; ; Ronetix GmbH ; ; Supported devices : Freescale T4240 ; ; Board : T4240RDB ; Revision : 1.0 ; Date : September 15, 2020 ; ; The INIT section 'INIT_T4240' is used when programing NOR, NAND and SPI Flash. ; Without INIT section and CORE_RCW_* the board can be booted with: ; go 0xFFFFFFFC ; start from reset vector, J1 on 1-2 ; ; SW3(3:1) - virtual banks in the NOR flash ; SW3(3:1) = 111 - boot from 0xE8000000 - boot image ; SW3(3:1) = 110 - boot from 0xE9000000 - empty NOR Flash ; ; SW3.4 = OFF - RCW source from EEPROM ; SW3.4 = ON - RCW source from SD card ; ; mem read 0FE0E0000 ; DCFG_CCSR_PORSR1, RCW_SRC [31:23] (9 bits) ; ; The file is delivered "AS IS" without warranty or condition of any ; kind, either express, implied or statutory. This includes without ; limitation any warranty or condition with respect to merchantability or ; fitness for any particular purpose, or against the infringements of ; intellectual property rights of others. ; ;-------------------------------------------------------------------------- ;-------------------------------------------------------------------------- ; The following section contains licenses that are required for PEEDI to ; operate. These licenses must be filled before using this file. ; The [LICENSE] section may contain license keys for one or more PEEDIs. ; ; Example: ; [LICENSE] ; KEY = UPDATE_24MAY2020, 1111-1111-1111-1 ; KEY = XXXXX, 2222-2222-2222-2 ; ; The [LICENSE] section may point to an external file which contains ; license keys for one or more PEEDIs. The external file must include ; the text [LICENSE] followed by all keys. ; ; Example: ; [LICENSE] ; FILE = tftp://192.168.3.1/license.txt ; or ; FILE=eep:license.txt ; or ; FILE = ftp://user:password@192.168.3.1/license.txt ; ; ; PEEDI is shipped with license keys stored in "eep:license.txt" and ; printed on a label on the bottom side of PEEDI. ; [LICENSE] FILE = eep:license.txt ;-------------------------------------------------------------------------- [DEBUGGER] PROTOCOL = gdb_remote REMOTE_PORT = 2000 ; TCP/IP port [TARGET] PLATFORM = QorIQ_P ; platform is QorIQ P series [PLATFORM_QorIQ_P] JTAG_CHAIN = 8 ; list of IR lenght of all TAP controller in JTAG chain JTAG_CLOCK = 8000 ; JTAG Clock in [kHz] - 8MHz DBGREQ_OUTPUT = HIGH TRST_TYPE = PUSHPULL ; type of TRST output: OPENDRAIN or PUSHPULL RESET_TIME = 20 ; lenght of RESET pulse in ms; 0 means no RESET TIME_AFTER_RESET = 200 CORE0 = T4240 CORE0_INIT = INIT_T4240 ; used to program code into FLASH ;CORE0_INIT = INIT_LINUX CORE0_STARTUP_MODE = reset CORE0_BREAKMODE = soft CORE0_ENDIAN = big CORE0_FLASH0 = NOR_FLASH CORE0_FLASH1 = NOR_FLASH_DIRECT CORE0_FLASH2 = NAND_FLASH CORE0_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer CORE0_FILE = "myfile.bin", BIN, 0x80000000 ; default file CORE0_PATH = "tftp://192.168.3.60" ; default path CORE0_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE0_MEMACCESS = SAP ; use SAP for faster FLASH programming ;CORE0_RCW_SRC = 0x09A ; 0_1001_1110 : hard coded RCW. SYSCLK=66MHz, DDRCLK=100MHz ;CORE0_RCW_SRC = 0x48 ; boot from NOR Flash ;CORE0_RCW6 = 0xFC027000 ; PBI_SRC disabled ;CORE0_MEMMAP = 0x80000000 0x80080000 ; SRAM ;CORE0_MEMMAP = 0xfe000000 0xfeffffff ; Memory map for Internal Register ;CORE0_MEMMAP = 0xff000000 0xffffffff ;Boot space ;CORE0_MEMMAP = 0xE8000000 0xEFFFFFFF ; NOR Flash [] CORE1 = T4240-1 CORE1_ENDIAN = big CORE1_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE1_STARTUP_MODE = reset CORE1_BREAKMODE = soft ; breakpoint mode: CORE1_FLASH0 = NOR_FLASH CORE1_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer CORE2 = T4240-2 CORE2_ENDIAN = big CORE2_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE2_STARTUP_MODE = reset CORE2_BREAKMODE = soft ; breakpoint mode: CORE2_FLASH0 = NOR_FLASH CORE2_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer CORE3 = T4240-3 CORE3_ENDIAN = big CORE3_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE3_STARTUP_MODE = reset CORE3_BREAKMODE = soft ; breakpoint mode: CORE3_FLASH0 = NOR_FLASH CORE3_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer CORE4 = T4240-4 CORE4_ENDIAN = big CORE4_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE4_STARTUP_MODE = reset CORE4_BREAKMODE = soft ; breakpoint mode: CORE4_FLASH0 = NOR_FLASH CORE4_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer CORE5 = T4240-5 CORE5_ENDIAN = big CORE5_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE5_STARTUP_MODE = reset CORE5_BREAKMODE = soft ; breakpoint mode: CORE5_FLASH0 = NOR_FLASH CORE5_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer CORE6 = T4240-6 CORE6_ENDIAN = big CORE6_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE6_STARTUP_MODE = reset CORE6_BREAKMODE = soft ; breakpoint mode: CORE6_FLASH0 = NOR_FLASH CORE6_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer CORE7 = T4240-7 CORE7_ENDIAN = big CORE7_REGLIST = 64BIT ; use 64BIT if core is used in 64-bit mode CORE7_STARTUP_MODE = reset CORE7_BREAKMODE = soft ; breakpoint mode: CORE7_FLASH0 = NOR_FLASH CORE7_WORKSPACE = 0x80000000, 0x4000 ; workspace for flash programmer [INIT_LINUX] break add hard 0xc08714ac go wait 30000 stop break del all beep 100 100 [INIT_T4240] ; Release cores for booting mem write 0xfe0E00E4 0x00000FFF ; BRR: release all cores set tens 3 ; enable second thread memory management tlbc 0 0 127 memory management tlbc 1 0 127 ; Setup MMU ;TLB1/0: ff000000->0_ff000000 16MB -I-G- RWXRWX ; MAS1 MAS2 MAS3 MAS7 memory management tlbw 1 0 0x80000700 0xff00000a 0xff00003f 0x00000000 ;TLB1/1: fe000000->0_fe000000 16MB -I-G- RWXRWX memory management tlbw 1 1 0x80000700 0xfe00000a 0xfe00003f 0x00000000 ;TLB1/2: e0000000->0_e0000000 256MB -I-G- RWXRWX memory management tlbw 1 2 0x80000900 0xe000000a 0xe000003f 0x00000000 ;TLB1/3: 00000000->0_00000000 1GB ----- RWXRWX memory management tlbw 1 3 0x80000a00 0x00000000 0x0000003f 0x00000000 ;TLB1/4: 40000000->0_40000000 1GB ----- RWXRWX memory management tlbw 1 4 0x80000a00 0x40000000 0x4000003f 0x00000000 ;TLB1/5: 80000000->0_80000000 256kB ----- RWXRWX memory management tlbw 1 5 0x80000400 0x80000000 0x8000003f 0x00000000 ; Initialize LAWBAR's mem write 0xfe000c00 0x00000000 ;LAWBAR0 : Flash @0_e0000000 mem write 0xfe000c04 0xe0000000 mem write 0xfe000c08 0x81f0001b ;LAWAR0 : eLBC 256MB mem write 0xfe000c10 0x00000000 ;LAWBAR1 : CPC1/SRAM @0_80000000 mem write 0xfe000c14 0x80000000 mem write 0xfe000c18 0x81000011 ;LAWAR1 : DDR1/CPC1 1MB mem write 0xfe000df0 0x00000000 ;LAWBAR31: SDRAM @0_00000000 mem write 0xfe000df4 0x00000000 mem write 0xfe000df8 0x8100001e ;LAWAR31 : DDR1/CPC1 2GB ; Integrated Flash Controller (IFC) ; NOR chip select mem write 0xfe12400C 0x00000000 ;Map 128 MByte of NOR Flash to 0xe8000000 mem write 0xfe124010 0xe8000101 mem write 0xfe1240A0 0xf8000000 ; NAND chip select mem write 0xfe1240ac 0xffff0000 ; IFC_AMASK1 - address mask mem write 0xfe12413c 0x85082100 ; IFC_CSOR1_GPCM mem write 0xfe1241f0 0x0E18070A ; IFC_FTIM0_CS1_NOR mem write 0xfe1241f4 0x32390E18 ; IFC_FTIM1_CS1_NOR mem write 0xfe1241f8 0x01E0501E ; IFC_FTIM2_CS1_NOR mem write 0xfe1241fc 0x00000000 ; IFC_FTIM3_CS1_NOR mem write 0xfe12401c 0xFF800083 ; Base address of CS1 (0xFF800000) ; Use L3 cache (CPC1) as SRAM at 0x80000000 mem write 0xfe010100 0x00000000 ;CPC1_SRCR1 high address mem write 0xfe010104 0x8000000b ;CPC1_SRCR0 all 32 ways as SRAM mem write 0xfe010000 0x80000000 ;CPC1_CSR0 CPC enable mem write 0xfe010f00 0x08000000 ;CPC1_HDBCR0 Speculation disable ; set default vector set ivpr 0x80000000 set pc 0x80000100 ; write DNH instruction to default vector mem write 0x80000000 0x4c00018c ;catch default vector ; write a loop to CPC1/SRAM (for test only) mem write 0x80000100 0x3c6005f6 ;lis r3,1526 (100'000'000) mem write 0x80000104 0x38800000 ;li r4,0 mem write 0x80000108 0x38a00000 ;li r5,0 mem write 0x8000010c 0x38a50008 ;addi r5,r5,8 mem write 0x80000110 0x38840008 ;addi r4,r4,8 mem write 0x80000114 0x3463ffff ;addic. r3,r3,-1 mem write 0x80000118 0x4082fff4 ;bne bc mem write 0x8000011c 0x4bffffe4 ;b b0 mem write 0x80000120 0x60000000 ;nop mem write 0x80000124 0x60000000 ;nop ; Release cores for booting mem write 0xfe0E00E4 0x00000FFF ; BRR: release all cores set tens 3 ; enable second thread set r1 0x80001000 ; set SP set r31 0x12345678 set msr 0x80001002 ; 64-bit mode [NOR_FLASH] CHIP = CFI_FLASH CHIP_COUNT = 1 CHIP_WIDTH = 16 BASE_ADDR = 0xE8000000 ACCESS_METHOD = AGENT FILE = "test32k.bin", BIN, 0xe8a00000 [NOR_FLASH_DIRECT] CHIP = CFI_FLASH CHIP_COUNT = 1 CHIP_WIDTH = 16 BASE_ADDR = 0xE8000000 ACCESS_METHOD = DIRECT FILE = "test32k.bin", BIN, 0xe8a00000 ; currently not suported [NAND_FLASH] CHIP = NAND_FLASH CPU = P101X CMD_BASE = 0xFE124000 ; IFC address DATA_BASE = 0xFF800000 ; FCM address ADDR_BASE = 1 ; NAND chip select OOB_INFO = FF FILE = "test.bin", 0x0 ERASE_BAD_BLOCKS = NO [SERIAL] ; serial port configuration BAUD = 115200 STOP_BITS = 1 PARITY = NONE TCP_PORT = 0 [TELNET] PROMPT = "T4240> " ; telnet prompt [DISPLAY] BRIGHTNESS = 20 ; LED indicator brightness VOLUME = 25 ; beeper volume [ACTIONS] ; user defined scripts 1 = erase 2 = prog [erase] ; erase flash flash erase [prog] ; program flash flash program