xref: /openbmc/u-boot/doc/README.uniphier (revision 28f40d4a4db2b6c701d349fd4fac286d21369de2)
17168da16SMasahiro YamadaU-Boot for UniPhier SoC family
27168da16SMasahiro Yamada==============================
37168da16SMasahiro Yamada
47168da16SMasahiro Yamada
57168da16SMasahiro YamadaTested toolchains
67168da16SMasahiro Yamada-----------------
77168da16SMasahiro Yamada
87168da16SMasahiro Yamada (a) Ubuntu packages  (CROSS_COMPILE=arm-linux-gnueabi-)
97168da16SMasahiro Yamada
107168da16SMasahiro Yamada  If you are building U-Boot on Ubuntu, its standard package is recommended.
117168da16SMasahiro Yamada  You can install it as follows:
127168da16SMasahiro Yamada
137168da16SMasahiro Yamada    $ sudo apt-get install gcc-arm-linux-gnueabi-
147168da16SMasahiro Yamada
157168da16SMasahiro Yamada (b) Linaro compilers  (CROSS_COMPILE=arm-linux-gnueabihf-)
167168da16SMasahiro Yamada
177168da16SMasahiro Yamada  You can download pre-built toolchains from:
187168da16SMasahiro Yamada
197168da16SMasahiro Yamada    http://www.linaro.org/downloads/
207168da16SMasahiro Yamada
217168da16SMasahiro Yamada (c) kernel.org compilers  (CROSS_COMPILE=arm-unknown-linux-gnueabi-)
227168da16SMasahiro Yamada
237168da16SMasahiro Yamada  You can download pre-built toolchains from:
247168da16SMasahiro Yamada
257168da16SMasahiro Yamada    ftp://www.kernel.org/pub/tools/crosstool/files/bin/
267168da16SMasahiro Yamada
277168da16SMasahiro Yamada
287168da16SMasahiro YamadaCompile the source
297168da16SMasahiro Yamada------------------
307168da16SMasahiro Yamada
313365b4ebSMasahiro YamadaPH1-sLD3:
323365b4ebSMasahiro Yamada    $ make ph1_sld3_defconfig
337168da16SMasahiro Yamada    $ make CROSS_COMPILE=arm-linux-gnueabi-
347168da16SMasahiro Yamada
357168da16SMasahiro YamadaPH1-LD4:
367168da16SMasahiro Yamada    $ make ph1_ld4_defconfig
377168da16SMasahiro Yamada    $ make CROSS_COMPILE=arm-linux-gnueabi-
387168da16SMasahiro Yamada
393365b4ebSMasahiro YamadaPH1-Pro4:
403365b4ebSMasahiro Yamada    $ make ph1_pro4_defconfig
413365b4ebSMasahiro Yamada    $ make CROSS_COMPILE=arm-linux-gnueabi-
423365b4ebSMasahiro Yamada
437168da16SMasahiro YamadaPH1-sLD8:
447168da16SMasahiro Yamada    $ make ph1_sld8_defconfig
457168da16SMasahiro Yamada    $ make CROSS_COMPILE=arm-linux-gnueabi-
467168da16SMasahiro Yamada
47*28f40d4aSMasahiro YamadaPH1-Pro5:
48*28f40d4aSMasahiro Yamada    $ make ph1_pro5_defconfig
49*28f40d4aSMasahiro Yamada    $ make CROSS_COMPILE=arm-linux-gnueabi-
50*28f40d4aSMasahiro Yamada
517168da16SMasahiro YamadaYou may wish to change the "CROSS_COMPILE=arm-linux-gnueabi-"
527168da16SMasahiro Yamadato use your favorite compiler.
537168da16SMasahiro Yamada
547168da16SMasahiro Yamada
557168da16SMasahiro YamadaBurn U-Boot images to NAND
567168da16SMasahiro Yamada--------------------------
577168da16SMasahiro Yamada
587168da16SMasahiro YamadaWrite two files to the NAND device as follows:
59f4e190e3SMasahiro Yamada - spl/u-boot-spl-dtb.bin at the offset address 0x00000000
607168da16SMasahiro Yamada - u-boot-dtb.img         at the offset address 0x00010000
617168da16SMasahiro Yamada
627168da16SMasahiro YamadaIf a TFTP server is available, the images can be easily updated.
63f4e190e3SMasahiro YamadaJust copy the u-boot-spl-dtb.bin and u-boot-dtb.img to the TFTP public
64f4e190e3SMasahiro Yamadadirectory, and then run the following command at the U-Boot command line:
657168da16SMasahiro Yamada
667168da16SMasahiro Yamada  => run nandupdate
677168da16SMasahiro Yamada
687168da16SMasahiro Yamada
697168da16SMasahiro YamadaUniPhier specific commands
707168da16SMasahiro Yamada--------------------------
717168da16SMasahiro Yamada
727168da16SMasahiro Yamada - pinmon (enabled by CONFIG_CMD_PINMON)
737168da16SMasahiro Yamada     shows the boot mode pins that has been latched at the power-on reset
747168da16SMasahiro Yamada
757168da16SMasahiro Yamada - ddrphy (enabled by CONFIG_CMD_DDRPHY_DUMP)
767168da16SMasahiro Yamada     shows the DDR PHY parameters set by the PHY training
777168da16SMasahiro Yamada
787168da16SMasahiro Yamada
797168da16SMasahiro YamadaSupported devices
807168da16SMasahiro Yamada-----------------
817168da16SMasahiro Yamada
827168da16SMasahiro Yamada - UART (on-chip)
837168da16SMasahiro Yamada - NAND
841e7df7c4SMasahiro Yamada - USB 2.0 (EHCI)
851e7df7c4SMasahiro Yamada - USB 3.0 (xHCI)
867168da16SMasahiro Yamada - LAN (on-board SMSC9118)
877168da16SMasahiro Yamada - I2C
887168da16SMasahiro Yamada - EEPROM (connected to the on-board I2C bus)
897168da16SMasahiro Yamada - Support card (SRAM, NOR flash, some peripherals)
907168da16SMasahiro Yamada
917168da16SMasahiro Yamada
9262102beeSMasahiro YamadaMicro Support Card
9362102beeSMasahiro Yamada------------------
9462102beeSMasahiro Yamada
9562102beeSMasahiro YamadaThe recommended bit switch settings are as follows:
9662102beeSMasahiro Yamada
9762102beeSMasahiro Yamada SW2    OFF(1)/ON(0)   Description
9862102beeSMasahiro Yamada ------------------------------------------
9962102beeSMasahiro Yamada bit 1   <----         BKSZ[0]
10062102beeSMasahiro Yamada bit 2   ---->         BKSZ[1]
10162102beeSMasahiro Yamada bit 3   <----         SoC Bus Width 16/32
10262102beeSMasahiro Yamada bit 4   <----         SERIAL_SEL[0]
10362102beeSMasahiro Yamada bit 5   ---->         SERIAL_SEL[1]
10462102beeSMasahiro Yamada bit 6   ---->         BOOTSWAP_EN
10562102beeSMasahiro Yamada bit 7   <----         CS1/CS5
10662102beeSMasahiro Yamada bit 8   <----         SOC_SERIAL_DISABLE
10762102beeSMasahiro Yamada
10862102beeSMasahiro Yamada SW8    OFF(1)/ON(0)   Description
10962102beeSMasahiro Yamada ------------------------------------------
11062102beeSMasahiro Yamada bit 1    ---->        CS1_SPLIT
11162102beeSMasahiro Yamada bit 2    <----        CASE9_ON
11262102beeSMasahiro Yamada bit 3    <----        CASE10_ON
11362102beeSMasahiro Yamada bit 4  Don't Care     Reserve
11462102beeSMasahiro Yamada bit 5  Don't Care     Reserve
11562102beeSMasahiro Yamada bit 6  Don't Care     Reserve
11662102beeSMasahiro Yamada bit 7    ---->        BURST_EN
11762102beeSMasahiro Yamada bit 8    ---->        FLASHBUS32_16
11862102beeSMasahiro Yamada
11962102beeSMasahiro YamadaThe BKSZ[1:0] specifies the address range of memory slot and peripherals
12062102beeSMasahiro Yamadaas follows:
12162102beeSMasahiro Yamada
12262102beeSMasahiro Yamada BKSZ    Description              RAM slot            Peripherals
12362102beeSMasahiro Yamada --------------------------------------------------------------------
12462102beeSMasahiro Yamada 0b00   15MB RAM / 1MB Peri    00000000-0effffff    0f000000-0fffffff
12562102beeSMasahiro Yamada 0b01   31MB RAM / 1MB Peri    00000000-1effffff    1f000000-1fffffff
12662102beeSMasahiro Yamada 0b10   64MB RAM / 1MB Peri    00000000-3effffff    3f000000-3fffffff
12762102beeSMasahiro Yamada 0b11  127MB RAM / 1MB Peri    00000000-7effffff    7f000000-7fffffff
12862102beeSMasahiro Yamada
12962102beeSMasahiro YamadaSet BSKZ[1:0] to 0b01 for U-Boot.
13062102beeSMasahiro YamadaThis mode is the most handy because EA[24] is always supported by the save pin
13162102beeSMasahiro Yamadamode of the system bus.  On the other hand, EA[25] is not supported for some
13262102beeSMasahiro Yamadanewer SoCs.  Even if it is, EA[25] is not connected on most of the boards.
13362102beeSMasahiro Yamada
1347168da16SMasahiro Yamada--
13562102beeSMasahiro YamadaMasahiro Yamada <yamada.masahiro@socionext.com>
136f4e190e3SMasahiro YamadaAug. 2015
137