Jianchao Wang | 8782122 | 2019-07-19 00:30:01 +0300 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | LS1021A-TSN Board Overview |
| 4 | ========================== |
| 5 | |
| 6 | - 1GB DDR3 at 800 MHz |
| 7 | - Spansion/Cypress 64 MB (Rev. A) / 32 MB (Rev. B and C) QSPI NOR flash |
| 8 | - Ethernet |
| 9 | - 2 SGMII 10/100/1G Ethernet ports (Atheros AR8031) |
| 10 | - One SJA1105T switch with 4 Ethernet ports (Broadcom BCM5464R) |
| 11 | - One internal RGMII port connected to the switch |
| 12 | - SDHC |
| 13 | - microSDHC/SDXC connector |
| 14 | - Other I/O |
| 15 | - One Serial port |
| 16 | - Arduino and expansion headers |
| 17 | - mPCIE slot |
| 18 | - SATA port |
| 19 | - USB3.0 port |
| 20 | |
| 21 | LS1021A Memory map |
| 22 | ================== |
| 23 | |
| 24 | The addresses in brackets are physical addresses. |
| 25 | |
| 26 | ============== ============== ============================== ======= |
| 27 | Start Address End Address Description Size |
| 28 | ============== ============== ============================== ======= |
| 29 | 0x00_0000_0000 0x00_000F_FFFF Secure Boot ROM 1MB |
| 30 | 0x00_0100_0000 0x00_0FFF_FFFF CCSRBAR 240MB |
| 31 | 0x00_1000_0000 0x00_1000_FFFF OCRAM0 64KB |
| 32 | 0x00_1001_0000 0x00_1001_FFFF OCRAM1 64KB |
| 33 | 0x00_2000_0000 0x00_20FF_FFFF DCSR 16MB |
| 34 | 0x00_4000_0000 0x00_5FFF_FFFF QSPI 512MB |
| 35 | 0x00_6000_0000 0x00_67FF_FFFF IFC - NOR Flash 128MB |
| 36 | 0x00_8000_0000 0x00_FFFF_FFFF DRAM1 2GB |
| 37 | ============== ============== ============================== ======= |
| 38 | |
| 39 | Compiling and flashing |
| 40 | ====================== |
| 41 | |
| 42 | The LS1021A-TSN board comes along with a microSD card with OpenIL U-Boot that |
| 43 | can be used to update its internal QSPI flash (which is empty out of the |
| 44 | factory). |
| 45 | |
| 46 | To compile and flash an SD card image:: |
| 47 | |
| 48 | make ls1021atsn_sdcard_defconfig && make -j 8 && sudo cp u-boot-with-spl-pbl.bin /srv/tftpboot/ |
| 49 | => tftp 0x82000000 u-boot-with-spl-pbl.bin && mmc rescan && mmc erase 8 0x1100 && mmc write 0x82000000 8 0x1100 |
| 50 | |
| 51 | For the QSPI flash, first obtain the Reset Configuration Word binary for |
| 52 | bootimg from the QSPI flash from the rcw project |
| 53 | (https://source.codeaurora.org/external/qoriq/qoriq-components/rcw):: |
| 54 | |
| 55 | make -j 8 && sudo cp ls1021atsn/SSR_PNS_30/rcw_1200_qspiboot.bin.swapped /srv/tftpboot/ |
| 56 | |
| 57 | The above RCW binary takes care of swapping the QSPI AMBA memory, so that the |
| 58 | U-Boot binary does not need to be swapped when flashing it. |
| 59 | |
| 60 | To compile and flash a U-Boot image for QSPI:: |
| 61 | |
| 62 | make ls1021atsn_qspi_defconfig && make -j 8 && sudo cp u-boot.bin /srv/tftpboot/ |
| 63 | |
| 64 | Then optionally create a custom uboot-env.txt file (although the default |
| 65 | environment already supports distro boot) and convert it to binary format:: |
| 66 | |
| 67 | mkenvimage -s 2M -o /srv/tftpboot/uboot-env.bin uboot-env.txt |
| 68 | |
| 69 | To program the QSPI flash with the images:: |
| 70 | |
| 71 | => tftp 0x82000000 rcw_1200_qspiboot.bin.swapped && sf probe && sf erase 0x0 +${filesize} && sf write 0x82000000 0x0 ${filesize} |
| 72 | => tftp 0x82000000 u-boot.bin && sf probe && sf erase 0x100000 +${filesize} && sf write 0x82000000 0x100000 ${filesize} |
| 73 | => tftp 0x82000000 uboot-env.bin && sf probe && sf erase 0x400000 +${filesize} && sf write 0x82000000 0x400000 ${filesize} |
| 74 | |
| 75 | The boards contain an AT24 I2C EEPROM that is supposed to hold the MAC |
| 76 | addresses of the Ethernet interfaces, however the EEPROM comes blank out of |
| 77 | the factory, and the MAC addresses are printed on a label on the bottom of |
| 78 | the boards. |
| 79 | |
| 80 | To write the MAC addresses to the EEPROM, the following needs to be done once:: |
| 81 | |
| 82 | => mac id |
| 83 | => mac 0 00:1F:7B:xx:xx:xx |
| 84 | => mac 1 00:1F:7B:xx:xx:xx |
| 85 | => mac 2 00:1F:7B:xx:xx:xx |
| 86 | => mac save |
| 87 | |
| 88 | The switch ports do not have their own MAC address - they inherit it from the |
| 89 | master enet2 port. |
| 90 | |
| 91 | Known issues and limitations |
| 92 | ============================ |
| 93 | |
| 94 | - The 4 SJA1105 switch ports are not functional in U-Boot for now. |
| 95 | - Since the IFC pins are multiplexed with QSPI on LS1021A, currently there is |
| 96 | no way to talk to the CPLD for e.g. running the "qixis_reset" command, or |
| 97 | turning the fan on, etc. |