u-boot/board/freescale/p2041rdb
Tom Rini 2f8a6db5d8 Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig
In order to finish moving this symbol to Kconfig for all platforms, we
need to do a few more things.  First, for all platforms that define this
to a function, introduce CONFIG_DYNAMIC_SYS_CLK_FREQ, similar to
CONFIG_DYNAMIC_DDR_CLK_FREQ and populate clock_legacy.h.  This entails
also switching all users from CONFIG_SYS_CLK_FREQ to get_board_sys_clk()
and updating a few preprocessor tests.

With that done, all platforms that define a value here can be converted
to Kconfig, and a fall-back of zero is sufficiently safe to use (and
what is used today in cases where code may or may not have this
available).  Make sure that code which calls this function includes
<clock_legacy.h> to get the prototype.

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-27 16:20:18 -05:00
..
cpld.c global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
cpld.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
eth.c board: freescale: powerpc: add support for all RGMII modes 2020-12-10 13:56:39 +05:30
Kconfig NXP: Introduce board/freescale/common/Kconfig and migrate CHAIN_OF_TRUST 2017-01-24 10:33:59 -05:00
MAINTAINERS board: freescale: p2041rdb: Add MAINTAINER 2021-06-17 11:46:11 +05:30
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p2041rdb.c Finish conversion of CONFIG_SYS_CLK_FREQ to Kconfig 2021-12-27 16:20:18 -05:00
README powerpc: Enable device tree support for P2041RDB 2019-08-26 21:25:23 +05:30

Overview
=========
The P2041 Processor combines four Power Architecture processor cores
with high-performance datapath acceleration architecture(DPAA), CoreNet
fabric infrastructure, as well as network and peripheral bus interfaces
required for networking, telecom/datacom, wireless infrastructure, and
military/aerospace applications.

P2041RDB board is a quad core platform supporting the P2041 processor
of QorIQ DPAA series.

Boot from NOR flash
===================
1. Build image
	make P2041RDB_config
	make all

2. Program image
	=> tftp 1000000 u-boot.bin
	=> protect off all
	=> erase eff40000 efffffff
	=> cp.b 1000000 eff40000 c0000

3. Program RCW
	=> tftp 1000000 rcw.bin
	=> protect off all
	=> erase e8000000 e801ffff
	=> cp.b 1000000 e8000000 50

4. Program FMAN Firmware ucode
	=> tftp 1000000 ucode.bin
	=> protect off all
	=> erase eff00000 eff3ffff
	=> cp.b 1000000 eff00000 2000

5. Change DIP-switch
	SW1[1-5] = 10110
	Note: 1 stands for 'on', 0 stands for 'off'

Boot from SDCard
===================
1. Build image
	make P2041RDB_SDCARD_config
	make all

2. Generate PBL imge
   Use PE tool to produce a image used to be programed to
   SDCard which contains RCW and U-Boot image.

3. Program the PBL image to SDCard
	=> tftp 1000000 pbl_sd.bin
	=> mmcinfo
	=> mmc write 1000000 8 672

4. Program FMAN Firmware ucode
	=> tftp 1000000 ucode.bin
	=> mmc write 1000000 690 10

5. Change DIP-switch
	SW1[1-5] = 01100
	Note: 1 stands for 'on', 0 stands for 'off'

Boot from SPI flash
===================
1. Build image
	make P2041RDB_SPIFLASH_config
	make all

2. Generate PBL imge
   Use PE tool to produce a image used to be programed to
   SPI flash which contains RCW and U-Boot image.

3. Program the PBL image to SPI flash
	=> tftp 1000000 pbl_spi.bin
	=> spi probe 0
	=> sf erase 0 100000
	=> sf write 1000000 0 $filesize

4. Program FMAN Firmware ucode
	=> tftp 1000000 ucode.bin
	=> sf erase 110000 10000
	=> sf write 1000000 110000 $filesize

5. Change DIP-switch
	SW1[1-5] = 10100
	Note: 1 stands for 'on', 0 stands for 'off'

Device tree support and how to enable it for different configs
--------------------------------------------------------------
Device tree support is available for p2041rdb for below mentioned boot,
1. NOR Boot
2. NAND Boot
3. SD Boot
4. SPIFLASH Boot

To enable device tree support for other boot, below configs need to be
enabled in relative defconfig file,
1. CONFIG_DEFAULT_DEVICE_TREE="p2041rdb" (Change default device tree name if required)
2. CONFIG_OF_CONTROL
3. CONFIG_MPC85XX_HAVE_RESET_VECTOR if reset vector is located at
   CONFIG_RESET_VECTOR_ADDRESS - 0xffc

If device tree support is enabled in defconfig, use 'u-boot-with-dtb.bin'
instead of u-boot.bin for all boot.

CPLD command
============
The CPLD is used to control the power sequence and some serdes lane
mux function.

cpld reset			 - hard reset to default bank
cpld reset altbank		 - reset to alternate bank
cpld lane_mux <lane> <mux_value> - set multiplexed lane pin
		lane 6: 0 -> slot1 (Default)
			1 -> SGMII
		lane a: 0 -> slot2 (Default)
			1 -> AURORA
		lane c: 0 -> slot2 (Default)
			1 -> SATA0
		lane d: 0 -> slot2 (Default)
			1 -> SATA1

Using the Device Tree Source File
=================================
To create the DTB (Device Tree Binary) image file, use a command
similar to this:
	dtc -O dtb -b 0 -p 1024 p2041rdb.dts > p2041rdb.dtb

Or use the following command:
	{linux-2.6}/make p2041rdb.dtb ARCH=powerpc

then the dtb file will be generated under the following directory:
	{linux-2.6}/arch/powerpc/boot/p2041rdb.dtb

Booting Linux
=============
Place a linux uImage in the TFTP disk area.
	tftp 1000000 uImage
	tftp 2000000 rootfs.ext2.gz.uboot
	tftp 3000000 p2041rdb.dtb
	bootm 1000000 2000000 3000000