]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - README
Add support for multiple I2C buses
[people/ms/u-boot.git] / README
diff --git a/README b/README
index 6f610082224e54fc0a31246cdea7ad688df1e6d1..6b94f8482c5c55816a9d878c006d1d64f641aa0b 100644 (file)
--- a/README
+++ b/README
@@ -132,6 +132,7 @@ Directory Hierarchy:
   - arm925t    Files specific to ARM 925 CPUs
   - arm926ejs  Files specific to ARM 926 CPUs
   - arm1136    Files specific to ARM 1136 CPUs
+  - at32ap     Files specific to Atmel AVR32 AP CPUs
   - i386       Files specific to i386 CPUs
   - ixp                Files specific to Intel XScale IXP CPUs
   - mcf52x2    Files specific to Freescale ColdFire MCF52x2 CPUs
@@ -156,6 +157,7 @@ Directory Hierarchy:
 - examples     Example code for standalone applications, etc.
 - include      Header Files
 - lib_arm      Files generic to ARM     architecture
+- lib_avr32    Files generic to AVR32   architecture
 - lib_generic  Files generic to all     architectures
 - lib_i386     Files generic to i386    architecture
 - lib_m68k     Files generic to m68k    architecture
@@ -246,6 +248,7 @@ The following options need to be configured:
                CONFIG_SA1110
                CONFIG_ARM7
                CONFIG_PXA250
+               CONFIG_CPU_MONAHANS
 
                MicroBlaze based CPUs:
                ----------------------
@@ -255,62 +258,66 @@ The following options need to be configured:
                ----------------------
                CONFIG_NIOS2
 
+               AVR32 based CPUs:
+               ----------------------
+               CONFIG_AT32AP
 
 - Board Type:  Define exactly one of
 
                PowerPC based boards:
                ---------------------
 
-               CONFIG_ADCIOP           CONFIG_GEN860T          CONFIG_PCIPPC2
-               CONFIG_ADS860           CONFIG_GENIETV          CONFIG_PCIPPC6
-               CONFIG_AMX860           CONFIG_GTH              CONFIG_pcu_e
-               CONFIG_AP1000           CONFIG_gw8260           CONFIG_PIP405
-               CONFIG_AR405            CONFIG_hermes           CONFIG_PM826
-               CONFIG_BAB7xx           CONFIG_hymod            CONFIG_ppmc8260
-               CONFIG_c2mon            CONFIG_IAD210           CONFIG_QS823
-               CONFIG_CANBT            CONFIG_ICU862           CONFIG_QS850
-               CONFIG_CCM              CONFIG_IP860            CONFIG_QS860T
-               CONFIG_CMI              CONFIG_IPHASE4539       CONFIG_RBC823
-               CONFIG_cogent_mpc8260   CONFIG_IVML24           CONFIG_RPXClassic
-               CONFIG_cogent_mpc8xx    CONFIG_IVML24_128       CONFIG_RPXlite
-               CONFIG_CPCI405          CONFIG_IVML24_256       CONFIG_RPXsuper
-               CONFIG_CPCI4052         CONFIG_IVMS8            CONFIG_rsdproto
-               CONFIG_CPCIISER4        CONFIG_IVMS8_128        CONFIG_sacsng
-               CONFIG_CPU86            CONFIG_IVMS8_256        CONFIG_Sandpoint8240
-               CONFIG_CRAYL1           CONFIG_JSE              CONFIG_Sandpoint8245
-               CONFIG_CSB272           CONFIG_LANTEC           CONFIG_sbc8260
-               CONFIG_CU824            CONFIG_lwmon            CONFIG_sbc8560
-               CONFIG_DASA_SIM         CONFIG_MBX              CONFIG_SM850
-               CONFIG_DB64360          CONFIG_MBX860T          CONFIG_SPD823TS
-               CONFIG_DB64460          CONFIG_MHPC             CONFIG_STXGP3
-               CONFIG_DU405            CONFIG_MIP405           CONFIG_SXNI855T
-               CONFIG_DUET_ADS         CONFIG_MOUSSE           CONFIG_TQM823L
-               CONFIG_EBONY            CONFIG_MPC8260ADS       CONFIG_TQM8260
-               CONFIG_ELPPC            CONFIG_MPC8540ADS       CONFIG_TQM850L
-               CONFIG_ELPT860          CONFIG_MPC8540EVAL      CONFIG_TQM855L
-               CONFIG_ep8260           CONFIG_MPC8560ADS       CONFIG_TQM860L
-               CONFIG_ERIC             CONFIG_MUSENKI          CONFIG_TTTech
-               CONFIG_ESTEEM192E       CONFIG_MVS1             CONFIG_UTX8245
-               CONFIG_ETX094           CONFIG_NETPHONE         CONFIG_V37
-               CONFIG_EVB64260         CONFIG_NETTA            CONFIG_W7OLMC
-               CONFIG_FADS823          CONFIG_NETVIA           CONFIG_W7OLMG
-               CONFIG_FADS850SAR       CONFIG_NX823            CONFIG_WALNUT
-               CONFIG_FADS860T         CONFIG_OCRTC            CONFIG_ZPC1900
-               CONFIG_FLAGADM          CONFIG_ORSG             CONFIG_ZUMA
-               CONFIG_FPS850L          CONFIG_OXC
-               CONFIG_FPS860L          CONFIG_PCI405
+               CONFIG_ADCIOP           CONFIG_FPS860L          CONFIG_OXC
+               CONFIG_ADS860           CONFIG_GEN860T          CONFIG_PCI405
+               CONFIG_AMX860           CONFIG_GENIETV          CONFIG_PCIPPC2
+               CONFIG_AP1000           CONFIG_GTH              CONFIG_PCIPPC6
+               CONFIG_AR405            CONFIG_gw8260           CONFIG_pcu_e
+               CONFIG_BAB7xx           CONFIG_hermes           CONFIG_PIP405
+               CONFIG_BC3450           CONFIG_hymod            CONFIG_PM826
+               CONFIG_c2mon            CONFIG_IAD210           CONFIG_ppmc8260
+               CONFIG_CANBT            CONFIG_ICU862           CONFIG_QS823
+               CONFIG_CCM              CONFIG_IP860            CONFIG_QS850
+               CONFIG_CMI              CONFIG_IPHASE4539       CONFIG_QS860T
+               CONFIG_cogent_mpc8260   CONFIG_IVML24           CONFIG_RBC823
+               CONFIG_cogent_mpc8xx    CONFIG_IVML24_128       CONFIG_RPXClassic
+               CONFIG_CPCI405          CONFIG_IVML24_256       CONFIG_RPXlite
+               CONFIG_CPCI4052         CONFIG_IVMS8            CONFIG_RPXsuper
+               CONFIG_CPCIISER4        CONFIG_IVMS8_128        CONFIG_rsdproto
+               CONFIG_CPU86            CONFIG_IVMS8_256        CONFIG_sacsng
+               CONFIG_CRAYL1           CONFIG_JSE              CONFIG_Sandpoint8240
+               CONFIG_CSB272           CONFIG_LANTEC           CONFIG_Sandpoint8245
+               CONFIG_CU824            CONFIG_LITE5200B        CONFIG_sbc8260
+               CONFIG_DASA_SIM         CONFIG_lwmon            CONFIG_sbc8560
+               CONFIG_DB64360          CONFIG_MBX              CONFIG_SM850
+               CONFIG_DB64460          CONFIG_MBX860T          CONFIG_SPD823TS
+               CONFIG_DU405            CONFIG_MHPC             CONFIG_STXGP3
+               CONFIG_DUET_ADS         CONFIG_MIP405           CONFIG_SXNI855T
+               CONFIG_EBONY            CONFIG_MOUSSE           CONFIG_TQM823L
+               CONFIG_ELPPC            CONFIG_MPC8260ADS       CONFIG_TQM8260
+               CONFIG_ELPT860          CONFIG_MPC8540ADS       CONFIG_TQM850L
+               CONFIG_ep8260           CONFIG_MPC8540EVAL      CONFIG_TQM855L
+               CONFIG_ERIC             CONFIG_MPC8560ADS       CONFIG_TQM860L
+               CONFIG_ESTEEM192E       CONFIG_MUSENKI          CONFIG_TTTech
+               CONFIG_ETX094           CONFIG_MVS1             CONFIG_UTX8245
+               CONFIG_EVB64260         CONFIG_NETPHONE         CONFIG_V37
+               CONFIG_FADS823          CONFIG_NETTA            CONFIG_W7OLMC
+               CONFIG_FADS850SAR       CONFIG_NETVIA           CONFIG_W7OLMG
+               CONFIG_FADS860T         CONFIG_NX823            CONFIG_WALNUT
+               CONFIG_FLAGADM          CONFIG_OCRTC            CONFIG_ZPC1900
+               CONFIG_FPS850L          CONFIG_ORSG             CONFIG_ZUMA
 
                ARM based boards:
                -----------------
 
                CONFIG_ARMADILLO,       CONFIG_AT91RM9200DK,    CONFIG_CERF250,
-               CONFIG_CSB637,          CONFIG_DNP1110,         CONFIG_EP7312,
-               CONFIG_H2_OMAP1610,     CONFIG_HHP_CRADLE,      CONFIG_IMPA7,
-               CONFIG_INNOVATOROMAP1510, CONFIG_INNOVATOROMAP1610, CONFIG_KB9202,
-               CONFIG_LART,            CONFIG_LPD7A400,        CONFIG_LUBBOCK,
-               CONFIG_OSK_OMAP5912,    CONFIG_OMAP2420H4,      CONFIG_SHANNON,
-               CONFIG_P2_OMAP730,      CONFIG_SMDK2400,        CONFIG_SMDK2410,
-               CONFIG_TRAB,            CONFIG_VCMA9
+               CONFIG_CSB637,          CONFIG_DELTA,           CONFIG_DNP1110,
+               CONFIG_EP7312,          CONFIG_H2_OMAP1610,     CONFIG_HHP_CRADLE,
+               CONFIG_IMPA7,       CONFIG_INNOVATOROMAP1510,   CONFIG_INNOVATOROMAP1610,
+               CONFIG_KB9202,          CONFIG_LART,            CONFIG_LPD7A400,
+               CONFIG_LUBBOCK,         CONFIG_OSK_OMAP5912,    CONFIG_OMAP2420H4,
+               CONFIG_PLEB2,           CONFIG_SHANNON,         CONFIG_P2_OMAP730,
+               CONFIG_SMDK2400,        CONFIG_SMDK2410,        CONFIG_TRAB,
+               CONFIG_VCMA9
 
                MicroBlaze based boards:
                ------------------------
@@ -321,6 +328,16 @@ The following options need to be configured:
                ------------------------
 
                CONFIG_PCI5441 CONFIG_PK1C20
+               CONFIG_EP1C20 CONFIG_EP1S10 CONFIG_EP1S40
+
+               AVR32 based boards:
+               -------------------
+
+               CONFIG_ATSTK1000
+
+- CPU Daughterboard Type: (if CONFIG_ATSTK1000 is defined)
+               Define exactly one of
+               CONFIG_ATSTK1002
 
 
 - CPU Module Type: (if CONFIG_COGENT is defined)
@@ -379,6 +396,20 @@ The following options need to be configured:
                that this requires a (stable) reference clock (32 kHz
                RTC clock or CFG_8XX_XIN)
 
+- Intel Monahans options:
+               CFG_MONAHANS_RUN_MODE_OSC_RATIO
+
+               Defines the Monahans run mode to oscillator
+               ratio. Valid values are 8, 16, 24, 31. The core
+               frequency is this value multiplied by 13 MHz.
+
+               CFG_MONAHANS_TURBO_RUN_MODE_RATIO
+
+               Defines the Monahans turbo mode to oscillator
+               ratio. Valid values are 1 (default if undefined) and
+               2. The core frequency as calculated above is multiplied
+               by this value.
+
 - Linux Kernel Interface:
                CONFIG_CLOCKS_IN_MHZ
 
@@ -411,7 +442,29 @@ The following options need to be configured:
                The maximum size of the constructed OF tree.
 
                OF_CPU - The proper name of the cpus node.
+               OF_SOC - The proper name of the soc node.
                OF_TBCLK - The timebase frequency.
+               OF_STDOUT_PATH - The path to the console device
+
+               CONFIG_OF_HAS_BD_T
+
+               The resulting flat device tree will have a copy of the bd_t.
+               Space should be pre-allocated in the dts for the bd_t.
+
+               CONFIG_OF_HAS_UBOOT_ENV
+
+               The resulting flat device tree will have a copy of u-boot's
+               environment variables
+
+               CONFIG_OF_BOARD_SETUP
+
+               Board code has addition modification that it wants to make
+               to the flat device tree before handing it off to the kernel
+
+               CONFIG_OF_BOOT_CPU
+
+               This define fills in the correct boot cpu in the boot
+               param header, the default value is zero if undefined.
 
 - Serial Ports:
                CFG_PL010_SERIAL
@@ -606,7 +659,7 @@ The following options need to be configured:
                CFG_CMD_DIAG    * Diagnostics
                CFG_CMD_DOC     * Disk-On-Chip Support
                CFG_CMD_DTT     * Digital Therm and Thermostat
-               CFG_CMD_ECHO    * echo arguments
+               CFG_CMD_ECHO      echo arguments
                CFG_CMD_EEPROM  * EEPROM read/write support
                CFG_CMD_ELF     * bootelf, bootvx
                CFG_CMD_ENV       saveenv
@@ -1154,7 +1207,12 @@ The following options need to be configured:
                clock chips. See common/cmd_i2c.c for a description of the
                command line interface.
 
-               CONFIG_HARD_I2C selects the CPM hardware driver for I2C.
+               CONFIG_I2C_CMD_TREE is a recommended option that places
+               all I2C commands under a single 'i2c' root command.  The
+               older 'imm', 'imd', 'iprobe' etc. commands are considered
+               deprecated and may disappear in the future.
+
+               CONFIG_HARD_I2C selects a hardware I2C controller.
 
                CONFIG_SOFT_I2C configures u-boot to use a software (aka
                bit-banging) driver instead of CPM or similar hardware
@@ -1259,6 +1317,31 @@ The following options need to be configured:
                in u-boot bd_info structure based on u-boot environment
                variable "i2cfast". (see also i2cfast)
 
+               CONFIG_I2C_MULTI_BUS
+
+               This option allows the use of multiple I2C buses, each of which
+               must have a controller.  At any point in time, only one bus is
+               active.  To switch to a different bus, use the 'i2c dev' command.
+               Note that bus numbering is zero-based.
+
+               CFG_I2C_NOPROBES
+
+               This option specifies a list of I2C devices that will be skipped
+               when the 'i2c probe' command is issued (or 'iprobe' using the legacy
+               command).  If CONFIG_I2C_MULTI_BUS is set, specify a list of bus-device
+               pairs.  Otherwise, specify a 1D array of device addresses
+
+               e.g.
+                       #undef  CONFIG_I2C_MULTI_BUS
+                       #define CFG_I2C_NOPROBES        {0x50,0x68}
+
+               will skip addresses 0x50 and 0x68 on a board with one I2C bus
+
+                       #define CONFIG_I2C_MULTI_BUS
+                       #define CFG_I2C_MULTI_NOPROBES  {{0,0x50},{0,0x68},{1,0x54}}
+
+               will skip addresses 0x50 and 0x68 on bus 0 and address 0x54 on bus 1
+
 - SPI Support: CONFIG_SPI
 
                Enables SPI driver (so far only tested with
@@ -1413,10 +1496,14 @@ The following options need to be configured:
                default value of 5 is used.
 
 - Command Interpreter:
-               CFG_AUTO_COMPLETE
+               CONFIG_AUTO_COMPLETE
 
                Enable auto completion of commands using TAB.
 
+                Note that this feature has NOT been implemented yet
+                for the "hush" shell.
+
+
                CFG_HUSH_PARSER
 
                Define this variable to enable the "hush" shell (from
@@ -1456,6 +1543,12 @@ The following options need to be configured:
                of the backslashes before semicolons and special
                symbols.
 
+- Commandline Editing and History:
+               CONFIG_CMDLINE_EDITING
+
+               Enable editiong and History functions for interactive
+               commandline input operations
+
 - Default Environment:
                CONFIG_EXTRA_ENV_SETTINGS
 
@@ -1717,6 +1810,12 @@ Configuration Settings:
 - CFG_MALLOC_LEN:
                Size of DRAM reserved for malloc() use.
 
+- CFG_BOOTM_LEN:
+               Normally compressed uImages are limited to an
+               uncompressed size of 8 MBytes. If this is not enough,
+               you can define CFG_BOOTM_LEN in your board config file
+               to adjust this setting to your needs.
+
 - CFG_BOOTMAPSZ:
                Maximum size of memory mapped by the startup code of
                the Linux kernel; all data that must be processed by
@@ -1946,6 +2045,17 @@ to save the current settings.
          These two #defines specify the offset and size of the environment
          area within the first NAND device.
 
+       - CFG_ENV_OFFSET_REDUND
+
+         This setting describes a second storage area of CFG_ENV_SIZE
+         size used to hold a redundant copy of the environment data,
+         so that there is a valid backup copy in case there is a
+         power failure during a "saveenv" operation.
+
+       Note: CFG_ENV_OFFSET and CFG_ENV_OFFSET_REDUND must be aligned
+       to a block boundary, and CFG_ENV_SIZE must be a multiple of
+       the NAND devices block size.
+
 - CFG_SPI_INIT_OFFSET
 
        Defines offset to the initial SPI buffer area in DPRAM. The
@@ -2129,6 +2239,16 @@ Low Level (hardware related) configuration options:
   CFG_POCMR2_MASK_ATTRIB: (MPC826x only)
                Overrides the default PCI memory map in cpu/mpc8260/pci.c if set.
 
+- CONFIG_SPD_EEPROM
+               Get DDR timing information from an I2C EEPROM.  Common with pluggable
+               memory modules such as SODIMMs
+  SPD_EEPROM_ADDRESS
+               I2C address of the SPD EEPROM
+
+- CFG_SPD_BUS_NUM
+               If SPD EEPROM is on an I2C bus other than the first one, specify here.
+               Note that the value must resolve to something your driver can deal with.
+
 - CONFIG_ETHER_ON_FEC[12]
                Define to enable FEC[12] on a 8xx series processor.
 
@@ -2266,6 +2386,26 @@ images ready for download to / installation on your system:
 - "u-boot" is an image in ELF binary format
 - "u-boot.srec" is in Motorola S-Record format
 
+By default the build is performed locally and the objects are saved
+in the source directory. One of the two methods can be used to change
+this behavior and build U-Boot to some external directory:
+
+1. Add O= to the make command line invocations:
+
+       make O=/tmp/build distclean
+       make O=/tmp/build NAME_config
+       make O=/tmp/build all
+
+2. Set environment variable BUILD_DIR to point to the desired location:
+
+       export BUILD_DIR=/tmp/build
+       make distclean
+       make NAME_config
+       make all
+
+Note that the command line "O=" setting overrides the BUILD_DIR environment
+variable.
+
 
 Please be aware that the Makefiles assume you are using GNU make, so
 for instance on NetBSD you might need to use "gmake" instead of
@@ -2319,6 +2459,22 @@ or to build on a native PowerPC system you can type
 
        CROSS_COMPILE=' ' MAKEALL
 
+When using the MAKEALL script, the default behaviour is to build U-Boot
+in the source directory. This location can be changed by setting the
+BUILD_DIR environment variable. Also, for each target built, the MAKEALL
+script saves two log files (<target>.ERR and <target>.MAKEALL) in the
+<source dir>/LOG directory. This default location can be changed by
+setting the MAKEALL_LOGDIR environment variable. For example:
+
+       export BUILD_DIR=/tmp/build
+       export MAKEALL_LOGDIR=/tmp/log
+       CROSS_COMPILE=ppc_8xx- MAKEALL
+
+With the above settings build objects are saved in the /tmp/build, log
+files are saved in the /tmp/log and the source tree remains clean during
+the whole build process.
+
+
 See also "U-Boot Porting Guide" below.
 
 
@@ -2629,9 +2785,9 @@ defines the following image properties:
   4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
   LynxOS, pSOS, QNX, RTEMS, ARTOS;
   Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, ARTOS, LynxOS).
-* Target CPU Architecture (Provisions for Alpha, ARM, Intel x86,
+* Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86,
   IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
-  Currently supported: ARM, Intel x86, MIPS, NIOS, PowerPC).
+  Currently supported: ARM, AVR32, Intel x86, MIPS, NIOS, PowerPC).
 * Compression Type (uncompressed, gzip, bzip2)
 * Load Address
 * Entry Point
@@ -2962,6 +3118,55 @@ format!) to the "bootm" command:
 
        bash#
 
+Boot Linux and pass a flat device tree:
+-----------
+
+First, U-Boot must be compiled with the appropriate defines. See the section
+titled "Linux Kernel Interface" above for a more in depth explanation. The
+following is an example of how to start a kernel and pass an updated
+flat device tree:
+
+=> print oftaddr
+oftaddr=0x300000
+=> print oft
+oft=oftrees/mpc8540ads.dtb
+=> tftp $oftaddr $oft
+Speed: 1000, full duplex
+Using TSEC0 device
+TFTP from server 192.168.1.1; our IP address is 192.168.1.101
+Filename 'oftrees/mpc8540ads.dtb'.
+Load address: 0x300000
+Loading: #
+done
+Bytes transferred = 4106 (100a hex)
+=> tftp $loadaddr $bootfile
+Speed: 1000, full duplex
+Using TSEC0 device
+TFTP from server 192.168.1.1; our IP address is 192.168.1.2
+Filename 'uImage'.
+Load address: 0x200000
+Loading:############
+done
+Bytes transferred = 1029407 (fb51f hex)
+=> print loadaddr
+loadaddr=200000
+=> print oftaddr
+oftaddr=0x300000
+=> bootm $loadaddr - $oftaddr
+## Booting image at 00200000 ...
+   Image Name:   Linux-2.6.17-dirty
+   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
+   Data Size:    1029343 Bytes = 1005.2 kB
+   Load Address: 00000000
+   Entry Point:  00000000
+   Verifying Checksum ... OK
+   Uncompressing Kernel Image ... OK
+Booting using flat device tree at 0x300000
+Using MPC85xx ADS machine description
+Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
+[snip]
+
+
 More About U-Boot Image Types:
 ------------------------------
 
@@ -3260,6 +3465,8 @@ On ARM, the following registers are used:
 
     ==> U-Boot will use R8 to hold a pointer to the global data
 
+NOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope,
+or current versions of GCC may "optimize" the code too much.
 
 Memory Management:
 ------------------
@@ -3410,12 +3617,19 @@ Coding Standards:
 -----------------
 
 All contributions to U-Boot should conform to the Linux kernel
-coding style; see the file "Documentation/CodingStyle" in your Linux
-kernel source directory.
-
-Please note that U-Boot is implemented in C (and to some small parts
-in Assembler); no C++ is used, so please do not use C++ style
-comments (//) in your code.
+coding style; see the file "Documentation/CodingStyle" and the script
+"scripts/Lindent" in your Linux kernel source directory.  In sources
+originating from U-Boot a style corresponding to "Lindent -pcs" (adding
+spaces before parameters to function calls) is actually used.
+
+Source files originating from a different project (for example the
+MTD subsystem) are generally exempt from these guidelines and are not
+reformated to ease subsequent migration to newer versions of those
+sources.
+
+Please note that U-Boot is implemented in C (and to some small parts in
+Assembler); no C++ is used, so please do not use C++ style comments (//)
+in your code.
 
 Please also stick to the following formatting rules:
 - remove any trailing white space