From 385c9ef5a7215b2b0c22836fee6c692dfc8559d7 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 16 Jan 2012 21:12:23 +0000 Subject: i2c: add i2c_core and prepare for new multibus support This Patch introduce the new i2c_core file, which holds the I2C core functions, for the rework of the multibus/ multiadapter support. Also adds changes in i2c.h for the new I2C multibus/multiadapter support. This new support can be activated with the CONFIG_SYS_I2C define. Signed-off-by: Heiko Schocher Signed-off-by: Simon Glass Cc: Mike Frysinger Cc: Stephen Warren --- include/asm-generic/global_data.h | 3 + include/i2c.h | 215 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 209 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 8cfc3fa..e08da90 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -85,6 +85,9 @@ typedef struct global_data { #ifdef CONFIG_TRACE void *trace_buff; /* The trace buffer */ #endif +#if defined(CONFIG_SYS_I2C) + int cur_i2c_bus; /* current used i2c bus */ +#endif struct arch_global_data arch; /* architecture-specific data */ } gd_t; #endif diff --git a/include/i2c.h b/include/i2c.h index c60d075..457fd7d 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -1,4 +1,8 @@ /* + * Copyright (C) 2009 Sergey Kubushyn + * Copyright (C) 2009 - 2013 Heiko Schocher + * Changes for multibus/multiadapter I2C support. + * * (C) Copyright 2001 * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com. * @@ -46,16 +50,14 @@ */ #define I2C_RXTX_LEN 128 /* maximum tx/rx buffer length */ -#ifdef CONFIG_I2C_MULTI_BUS -#define MAX_I2C_BUS 2 -#define I2C_MULTI_BUS 1 +#if !defined(CONFIG_SYS_I2C_MAX_HOPS) +/* no muxes used bus = i2c adapters */ +#define CONFIG_SYS_I2C_DIRECT_BUS 1 +#define CONFIG_SYS_I2C_MAX_HOPS 0 +#define CONFIG_SYS_NUM_I2C_BUSES ll_entry_count(struct i2c_adapter, i2c) #else -#define MAX_I2C_BUS 1 -#define I2C_MULTI_BUS 0 -#endif - -#if !defined(CONFIG_SYS_MAX_I2C_BUS) -#define CONFIG_SYS_MAX_I2C_BUS MAX_I2C_BUS +/* we use i2c muxes */ +#undef CONFIG_SYS_I2C_DIRECT_BUS #endif /* define the I2C bus number for RTC and DTT if not already done */ @@ -69,6 +71,88 @@ #define CONFIG_SYS_SPD_BUS_NUM 0 #endif +struct i2c_adapter { + void (*init)(struct i2c_adapter *adap, int speed, + int slaveaddr); + int (*probe)(struct i2c_adapter *adap, uint8_t chip); + int (*read)(struct i2c_adapter *adap, uint8_t chip, + uint addr, int alen, uint8_t *buffer, + int len); + int (*write)(struct i2c_adapter *adap, uint8_t chip, + uint addr, int alen, uint8_t *buffer, + int len); + uint (*set_bus_speed)(struct i2c_adapter *adap, + uint speed); + int speed; + int slaveaddr; + int init_done; + int hwadapnr; + char *name; +}; + +#define U_BOOT_I2C_MKENT_COMPLETE(_init, _probe, _read, _write, \ + _set_speed, _speed, _slaveaddr, _hwadapnr, _name) \ + { \ + .init = _init, \ + .probe = _probe, \ + .read = _read, \ + .write = _write, \ + .set_bus_speed = _set_speed, \ + .speed = _speed, \ + .slaveaddr = _slaveaddr, \ + .init_done = 0, \ + .hwadapnr = _hwadapnr, \ + .name = #_name \ +}; + +#define U_BOOT_I2C_ADAP_COMPLETE(_name, _init, _probe, _read, _write, \ + _set_speed, _speed, _slaveaddr, _hwadapnr) \ + ll_entry_declare(struct i2c_adapter, _name, i2c) = \ + U_BOOT_I2C_MKENT_COMPLETE(_init, _probe, _read, _write, \ + _set_speed, _speed, _slaveaddr, _hwadapnr, _name); + +struct i2c_adapter *i2c_get_adapter(int index); + +#ifndef CONFIG_SYS_I2C_DIRECT_BUS +struct i2c_mux { + int id; + char name[16]; +}; + +struct i2c_next_hop { + struct i2c_mux mux; + uint8_t chip; + uint8_t channel; +}; + +struct i2c_bus_hose { + int adapter; + struct i2c_next_hop next_hop[CONFIG_SYS_I2C_MAX_HOPS]; +}; +#define I2C_NULL_HOP {{-1, ""}, 0, 0} +extern struct i2c_bus_hose i2c_bus[]; + +#define I2C_ADAPTER(bus) i2c_bus[bus].adapter +#else +#define I2C_ADAPTER(bus) bus +#endif +#define I2C_BUS gd->cur_i2c_bus + +#define I2C_ADAP_NR(bus) i2c_get_adapter(I2C_ADAPTER(bus)) +#define I2C_ADAP I2C_ADAP_NR(gd->cur_i2c_bus) +#define I2C_ADAP_HWNR (I2C_ADAP->hwadapnr) + +#ifndef CONFIG_SYS_I2C_DIRECT_BUS +#define I2C_MUX_PCA9540_ID 1 +#define I2C_MUX_PCA9540 {I2C_MUX_PCA9540_ID, "PCA9540B"} +#define I2C_MUX_PCA9542_ID 2 +#define I2C_MUX_PCA9542 {I2C_MUX_PCA9542_ID, "PCA9542A"} +#define I2C_MUX_PCA9544_ID 3 +#define I2C_MUX_PCA9544 {I2C_MUX_PCA9544_ID, "PCA9544A"} +#define I2C_MUX_PCA9547_ID 4 +#define I2C_MUX_PCA9547 {I2C_MUX_PCA9547_ID, "PCA9547A"} +#endif + #ifndef I2C_SOFT_DECLARATIONS # if defined(CONFIG_MPC8260) # define I2C_SOFT_DECLARATIONS volatile ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, I2C_PORT); @@ -134,6 +218,104 @@ int i2x_mux_select_mux(int bus); int i2c_mux_ident_muxstring_f (uchar *buf); #endif +#ifdef CONFIG_SYS_I2C +/* + * Initialization, must be called once on start up, may be called + * repeatedly to change the speed and slave addresses. + */ +void i2c_init(unsigned int speed, int slaveaddr); +#ifdef CONFIG_SYS_I2C_INIT_BOARD +void i2c_init_board(void); +#endif + +/* + * i2c_get_bus_num: + * + * Returns index of currently active I2C bus. Zero-based. + */ +unsigned int i2c_get_bus_num(void); + +/* + * i2c_set_bus_num: + * + * Change the active I2C bus. Subsequent read/write calls will + * go to this one. + * + * bus - bus index, zero based + * + * Returns: 0 on success, not 0 on failure + * + */ +int i2c_set_bus_num(unsigned int bus); + +/* + * i2c_init_all(): + * + * Initializes all I2C adapters in the system. All i2c_adap structures must + * be initialized beforehead with function pointers and data, including + * speed and slaveaddr. Returns 0 on success, non-0 on failure. + */ +void i2c_init_all(void); + +/* + * Probe the given I2C chip address. Returns 0 if a chip responded, + * not 0 on failure. + */ +int i2c_probe(uint8_t chip); + +/* + * Read/Write interface: + * chip: I2C chip address, range 0..127 + * addr: Memory (register) address within the chip + * alen: Number of bytes to use for addr (typically 1, 2 for larger + * memories, 0 for register type devices with only one + * register) + * buffer: Where to read/write the data + * len: How many bytes to read/write + * + * Returns: 0 on success, not 0 on failure + */ +int i2c_read(uint8_t chip, unsigned int addr, int alen, + uint8_t *buffer, int len); + +int i2c_write(uint8_t chip, unsigned int addr, int alen, + uint8_t *buffer, int len); + +/* + * Utility routines to read/write registers. + */ +uint8_t i2c_reg_read(uint8_t addr, uint8_t reg); + +void i2c_reg_write(uint8_t addr, uint8_t reg, uint8_t val); + +/* + * i2c_set_bus_speed: + * + * Change the speed of the active I2C bus + * + * speed - bus speed in Hz + * + * Returns: new bus speed + * + */ +unsigned int i2c_set_bus_speed(unsigned int speed); + +/* + * i2c_get_bus_speed: + * + * Returns speed of currently active I2C bus in Hz + */ + +unsigned int i2c_get_bus_speed(void); + +/* + * i2c_reloc_fixup: + * + * Adjusts I2C pointers after U-Boot is relocated to DRAM + */ +void i2c_reloc_fixup(void); +#else + /* * Probe the given I2C chip address. Returns 0 if a chip responded, * not 0 on failure. @@ -235,6 +417,21 @@ int i2c_set_bus_speed(unsigned int); */ unsigned int i2c_get_bus_speed(void); +#endif /* CONFIG_SYS_I2C */ + +/* + * only for backwardcompatibility, should go away if we switched + * completely to new multibus support. + */ +#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS) +# if !defined(CONFIG_SYS_MAX_I2C_BUS) +# define CONFIG_SYS_MAX_I2C_BUS 2 +# endif +# define I2C_MULTI_BUS 0 +#else +# define CONFIG_SYS_MAX_I2C_BUS 1 +# define I2C_MULTI_BUS 0 +#endif /* NOTE: These two functions MUST be always_inline to avoid code growth! */ static inline unsigned int I2C_GET_BUS(void) __attribute__((always_inline)); -- cgit v1.1 From 3f4978c713255c8406875fbdf23ffed1129bc44b Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 16 Jan 2012 21:12:24 +0000 Subject: i2c: common changes for multibus/multiadapter support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Heiko Schocher Signed-off-by: Simon Glass Cc: Henrik Nordström --- include/i2c.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/i2c.h b/include/i2c.h index 457fd7d..3e09af9 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -220,15 +220,6 @@ int i2c_mux_ident_muxstring_f (uchar *buf); #ifdef CONFIG_SYS_I2C /* - * Initialization, must be called once on start up, may be called - * repeatedly to change the speed and slave addresses. - */ -void i2c_init(unsigned int speed, int slaveaddr); -#ifdef CONFIG_SYS_I2C_INIT_BOARD -void i2c_init_board(void); -#endif - -/* * i2c_get_bus_num: * * Returns index of currently active I2C bus. Zero-based. -- cgit v1.1 From ea818dbbcd59300b56014ac2d67798a54994eb9b Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 29 Jan 2013 08:53:15 +0100 Subject: i2c, soft-i2c: switch to new multibus/multiadapter support - added to soft_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Heiko Schocher Cc: Simon Glass Cc: Stephen Warren --- include/configs/A3000.h | 4 ++-- include/configs/BSC9131RDB.h | 1 - include/configs/CANBT.h | 1 + include/configs/CPU86.h | 7 +++--- include/configs/CPU87.h | 7 +++--- include/configs/DU440.h | 1 - include/configs/GEN860T.h | 39 +++++++++++++++++------------- include/configs/HIDDEN_DRAGON.h | 9 ++++--- include/configs/ICU862.h | 13 +++++----- include/configs/IDS8247.h | 9 ++++--- include/configs/IP860.h | 9 ++++--- include/configs/IPHASE4539.h | 11 ++++----- include/configs/JSE.h | 1 - include/configs/KAREF.h | 1 - include/configs/KUP4K.h | 11 ++++----- include/configs/KUP4X.h | 12 +++++----- include/configs/M5208EVBE.h | 1 - include/configs/M52277EVB.h | 1 - include/configs/M5235EVB.h | 1 - include/configs/M5271EVB.h | 1 - include/configs/M5275EVB.h | 1 - include/configs/M53017EVB.h | 1 - include/configs/M5329EVB.h | 1 - include/configs/M5373EVB.h | 1 - include/configs/M54418TWR.h | 2 +- include/configs/M54451EVB.h | 1 - include/configs/M54455EVB.h | 1 - include/configs/M5475EVB.h | 1 - include/configs/M5485EVB.h | 1 - include/configs/METROBOX.h | 1 - include/configs/MHPC.h | 8 +++---- include/configs/MPC8323ERDB.h | 1 - include/configs/MPC832XEMDS.h | 1 - include/configs/MPC8349EMDS.h | 1 - include/configs/MPC8349ITX.h | 2 -- include/configs/MPC8360EMDS.h | 1 - include/configs/MPC8360ERDK.h | 1 - include/configs/MPC837XEMDS.h | 1 - include/configs/MPC837XERDB.h | 1 - include/configs/MPC8536DS.h | 1 - include/configs/MPC8540ADS.h | 1 - include/configs/MPC8541CDS.h | 1 - include/configs/MPC8544DS.h | 1 - include/configs/MPC8548CDS.h | 3 +-- include/configs/MPC8555CDS.h | 1 - include/configs/MPC8560ADS.h | 1 - include/configs/MPC8568MDS.h | 1 - include/configs/MPC8569MDS.h | 1 - include/configs/MPC8572DS.h | 1 - include/configs/MPC8610HPCD.h | 1 - include/configs/MPC8641HPCN.h | 1 - include/configs/P1010RDB.h | 1 - include/configs/P1023RDS.h | 1 - include/configs/P1_P2_RDB.h | 1 - include/configs/P2020COME.h | 1 - include/configs/PM826.h | 8 +++---- include/configs/PM828.h | 8 +++---- include/configs/PMC440.h | 1 - include/configs/R360MPI.h | 6 ++++- include/configs/RPXClassic.h | 16 ++++++++----- include/configs/RPXlite.h | 30 +++++++++++++++++++++++ include/configs/RRvision.h | 12 ++++------ include/configs/SXNI855T.h | 7 +++--- include/configs/Sandpoint8240.h | 15 +++++++----- include/configs/Sandpoint8245.h | 15 +++++++----- include/configs/TASREG.h | 28 ++++++++++++---------- include/configs/TK885D.h | 12 ++++------ include/configs/TOP5200.h | 12 ++++++---- include/configs/TOP860.h | 10 ++++---- include/configs/TQM8260.h | 8 +++---- include/configs/TQM8272.h | 12 +++++----- include/configs/TQM834x.h | 1 - include/configs/TQM855M.h | 12 ++++------ include/configs/TQM866M.h | 11 ++++----- include/configs/TQM885D.h | 12 ++++------ include/configs/alpr.h | 1 - include/configs/aria.h | 1 - include/configs/astro_mcf5373l.h | 1 - include/configs/bf533-ezkit.h | 9 +++++-- include/configs/bf533-stamp.h | 48 +++++++++++++++++++++++++++++++++---- include/configs/bf561-ezkit.h | 8 +++++-- include/configs/bfin_adi_common.h | 4 ++-- include/configs/blackstamp.h | 9 ++++--- include/configs/blackvme.h | 2 +- include/configs/cpuat91.h | 3 +-- include/configs/debris.h | 9 ++++--- include/configs/eXalion.h | 2 +- include/configs/eb_cpux9k2.h | 13 ++++------ include/configs/ep8260.h | 13 ++++++---- include/configs/ethernut5.h | 8 ++++--- include/configs/ibf-dsp561.h | 4 ++-- include/configs/iocon.h | 10 ++++---- include/configs/km/keymile-common.h | 3 --- include/configs/km/km83xx-common.h | 3 +++ include/configs/km/km_arm.h | 24 +++++++++++++++---- include/configs/km82xx.h | 18 +++++++++----- include/configs/km_kirkwood.h | 16 ++++++------- include/configs/korat.h | 1 - include/configs/lwmon.h | 12 ++++------ include/configs/lwmon5.h | 1 - include/configs/mecp5123.h | 1 - include/configs/mpc5121ads.h | 1 - include/configs/nhk8815.h | 7 ++++-- include/configs/otc570.h | 17 +++++++------ include/configs/p1_p2_rdb_pc.h | 1 - include/configs/p3p440.h | 1 - include/configs/pcs440ep.h | 1 - include/configs/pdnb3.h | 10 ++++---- include/configs/quad100hd.h | 1 - include/configs/s5p_goni.h | 6 +++-- include/configs/s5pc210_universal.h | 6 +++-- include/configs/sacsng.h | 11 ++++----- include/configs/sbc405.h | 1 - include/configs/sbc8349.h | 1 - include/configs/sbc8548.h | 1 - include/configs/sbc8641d.h | 1 - include/configs/sc3.h | 1 - include/configs/snapper9260.h | 8 +++---- include/configs/socrates.h | 1 - include/configs/spc1920.h | 12 ++++------ include/configs/stxgp3.h | 1 - include/configs/stxssa.h | 1 - include/configs/top9000.h | 9 +++---- include/configs/trats.h | 6 +++-- include/configs/u8500_href.h | 1 - include/configs/uc100.h | 12 ++++------ include/configs/utx8245.h | 3 +-- include/configs/vct.h | 11 ++++----- include/configs/vl_ma2sc.h | 6 +++-- include/configs/vme8349.h | 1 - include/configs/zeus.h | 1 - include/i2c.h | 9 +++++++ 132 files changed, 419 insertions(+), 376 deletions(-) (limited to 'include') diff --git a/include/configs/A3000.h b/include/configs/A3000.h index d506a55..340c685 100644 --- a/include/configs/A3000.h +++ b/include/configs/A3000.h @@ -86,8 +86,8 @@ * PCI stuff *----------------------------------------------------------------------- */ -#define CONFIG_HARD_I2C 1 /* To enable I2C support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ +#define CONFIG_HARD_I2C 1 /* To enable I2C support */ +#undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h index b5911c6..a3f6440 100644 --- a/include/configs/BSC9131RDB.h +++ b/include/configs/BSC9131RDB.h @@ -277,7 +277,6 @@ extern unsigned long get_sdram_size(void); #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_I2C_CMD_TREE #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ diff --git a/include/configs/CANBT.h b/include/configs/CANBT.h index be9238e..fd3eff0 100644 --- a/include/configs/CANBT.h +++ b/include/configs/CANBT.h @@ -180,6 +180,7 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ #define CONFIG_HARD_I2C /* I2C with hardware support */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ diff --git a/include/configs/CPU86.h b/include/configs/CPU86.h index 7ac182f..43b07cf 100644 --- a/include/configs/CPU86.h +++ b/include/configs/CPU86.h @@ -129,10 +129,11 @@ /*----------------------------------------------------------------------- * I2C/EEPROM/RTC configuration */ -#define CONFIG_SOFT_I2C /* Software I2C support enabled */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ diff --git a/include/configs/CPU87.h b/include/configs/CPU87.h index 3e9c21c..9c3b3d5 100644 --- a/include/configs/CPU87.h +++ b/include/configs/CPU87.h @@ -133,10 +133,11 @@ /*----------------------------------------------------------------------- * I2C/EEPROM/RTC configuration */ -#define CONFIG_SOFT_I2C /* Software I2C support enabled */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ diff --git a/include/configs/DU440.h b/include/configs/DU440.h index 4970ea6..152821f 100644 --- a/include/configs/DU440.h +++ b/include/configs/DU440.h @@ -171,7 +171,6 @@ * I2C */ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/GEN860T.h b/include/configs/GEN860T.h index 9a649ca..cc03d39 100644 --- a/include/configs/GEN860T.h +++ b/include/configs/GEN860T.h @@ -158,26 +158,33 @@ /* * Enable I2C and select the hardware/software driver */ -#define CONFIG_HARD_I2C 1 /* CPM based I2C */ -#undef CONFIG_SOFT_I2C /* Bit-banged I2C */ +#define CONFIG_HARD_I2C 1 /* CPM based I2C */ +#undef CONFIG_SYS_I2C_SOFT /* Bit-banged I2C */ #ifdef CONFIG_HARD_I2C -#define CONFIG_SYS_I2C_SPEED 100000 /* clock speed in Hz */ -#define CONFIG_SYS_I2C_SLAVE 0xFE /* I2C slave address */ +#define CONFIG_SYS_I2C_SPEED 100000 /* clock speed in Hz */ +#define CONFIG_SYS_I2C_SLAVE 0xFE /* I2C slave address */ #endif -#ifdef CONFIG_SOFT_I2C -#define PB_SCL 0x00000020 /* PB 26 */ -#define PB_SDA 0x00000010 /* PB 27 */ -#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) -#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) -#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) -#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) -#define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \ - else immr->im_cpm.cp_pbdat &= ~PB_SDA -#define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ - else immr->im_cpm.cp_pbdat &= ~PB_SCL -#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ +#ifdef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE +#define PB_SCL 0x00000020 /* PB 26 */ +#define PB_SDA 0x00000010 /* PB 27 */ +#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) +#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) +#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) +#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) +#define I2C_SDA(bit) if (bit) \ + immr->im_cpm.cp_pbdat |= PB_SDA; \ + else \ + immr->im_cpm.cp_pbdat &= ~PB_SDA +#define I2C_SCL(bit) if (bit) \ + immr->im_cpm.cp_pbdat |= PB_SCL; \ + else \ + immr->im_cpm.cp_pbdat &= ~PB_SCL +#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ #endif /* diff --git a/include/configs/HIDDEN_DRAGON.h b/include/configs/HIDDEN_DRAGON.h index dbad1fd..071b4be 100644 --- a/include/configs/HIDDEN_DRAGON.h +++ b/include/configs/HIDDEN_DRAGON.h @@ -169,12 +169,15 @@ * configuration items that the driver uses to drive the port pins. */ #define CONFIG_HARD_I2C 1 /* To enable I2C support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ +#undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT #error "Soft I2C is not configured properly. Please review!" +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ #define I2C_ACTIVE (iop->pdir |= 0x00010000) #define I2C_TRISTATE (iop->pdir &= ~0x00010000) @@ -184,7 +187,7 @@ #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ else iop->pdat &= ~0x00020000 #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ +#endif /* CONFIG_SYS_I2C_SOFT */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 /* EEPROM IS24C02 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/ICU862.h b/include/configs/ICU862.h index b58b6f6..ca8138b 100644 --- a/include/configs/ICU862.h +++ b/include/configs/ICU862.h @@ -106,12 +106,10 @@ #define CONFIG_DOS_PARTITION /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0xFE -# define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 -# define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -133,6 +131,9 @@ #define CONFIG_RTC_MPC8xx /* use internal RTC of MPC8xx */ +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ + /* * Command line configuration. diff --git a/include/configs/IDS8247.h b/include/configs/IDS8247.h index 6d0937f..b5a8d37 100644 --- a/include/configs/IDS8247.h +++ b/include/configs/IDS8247.h @@ -73,11 +73,10 @@ #define CONFIG_MISC_INIT_R 1 /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F /* * Software (bit-bang) I2C driver configuration */ diff --git a/include/configs/IP860.h b/include/configs/IP860.h index 2379718..e5cc4e3 100644 --- a/include/configs/IP860.h +++ b/include/configs/IP860.h @@ -62,8 +62,10 @@ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -80,9 +82,6 @@ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ - -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0xFE # define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM X24C16 */ # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* bytes of address */ /* mask of address bits that overflow into the "EEPROM chip address" */ diff --git a/include/configs/IPHASE4539.h b/include/configs/IPHASE4539.h index 6dd9812..b1fec10 100644 --- a/include/configs/IPHASE4539.h +++ b/include/configs/IPHASE4539.h @@ -110,15 +110,13 @@ * If the software driver is chosen, there are some additional * configuration items that the driver uses to drive the port pins. */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F /* * Software (bit-bang) I2C driver configuration */ -#ifdef CONFIG_SOFT_I2C #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ #define I2C_ACTIVE (iop->pdir |= 0x00010000) #define I2C_TRISTATE (iop->pdir &= ~0x00010000) @@ -128,7 +126,6 @@ #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ else iop->pdat &= ~0x00020000 #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ /* diff --git a/include/configs/JSE.h b/include/configs/JSE.h index 6ce789d..76509be 100644 --- a/include/configs/JSE.h +++ b/include/configs/JSE.h @@ -211,7 +211,6 @@ #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/KAREF.h b/include/configs/KAREF.h index 8d5e8ff..5736fcf 100644 --- a/include/configs/KAREF.h +++ b/include/configs/KAREF.h @@ -134,7 +134,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C hardware support */ -#undef CONFIG_SOFT_I2C /* I2C !bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed 400kHz */ #define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */ diff --git a/include/configs/KUP4K.h b/include/configs/KUP4K.h index dae9b8c..d6f3a62 100644 --- a/include/configs/KUP4K.h +++ b/include/configs/KUP4K.h @@ -106,13 +106,11 @@ /* * enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C /* I2C bit-banged */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C /* * Software (bit-bang) I2C driver configuration */ @@ -128,7 +126,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ /*----------------------------------------------------------------------- * I2C Configuration diff --git a/include/configs/KUP4X.h b/include/configs/KUP4X.h index cceee96..2473749 100644 --- a/include/configs/KUP4X.h +++ b/include/configs/KUP4X.h @@ -114,13 +114,13 @@ /* * enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE +#ifdef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE -#ifdef CONFIG_SOFT_I2C /* * Software (bit-bang) I2C driver configuration */ @@ -136,7 +136,7 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ +#endif /* CONFIG_SYS_I2C_SOFT */ /*----------------------------------------------------------------------- diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h index a1eaeff..209c122 100644 --- a/include/configs/M5208EVBE.h +++ b/include/configs/M5208EVBE.h @@ -84,7 +84,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h index e4dea05..b1bdac2 100644 --- a/include/configs/M52277EVB.h +++ b/include/configs/M52277EVB.h @@ -147,7 +147,6 @@ /* I2c */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h index 733aece..dfc2ddf 100644 --- a/include/configs/M5235EVB.h +++ b/include/configs/M5235EVB.h @@ -101,7 +101,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x00000300 diff --git a/include/configs/M5271EVB.h b/include/configs/M5271EVB.h index a5913df..e8a8998 100644 --- a/include/configs/M5271EVB.h +++ b/include/configs/M5271EVB.h @@ -111,7 +111,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x00000300 diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h index 9c2a3bb..fbf0c9d 100644 --- a/include/configs/M5275EVB.h +++ b/include/configs/M5275EVB.h @@ -111,7 +111,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x00000300 diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h index 896d0d8..bedba2b 100644 --- a/include/configs/M53017EVB.h +++ b/include/configs/M53017EVB.h @@ -103,7 +103,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index 64f8302..06fa57c 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -97,7 +97,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index 4437bba..faa4f86 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -97,7 +97,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h index 3be2f8e..627c1ae 100644 --- a/include/configs/M54418TWR.h +++ b/include/configs/M54418TWR.h @@ -215,7 +215,7 @@ /* I2c */ #undef CONFIG_FSL_I2C #undef CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ +#undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h index 6552f69..5dbe0b4 100644 --- a/include/configs/M54451EVB.h +++ b/include/configs/M54451EVB.h @@ -158,7 +158,6 @@ /* I2c */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h index 536b755..8246e68 100644 --- a/include/configs/M54455EVB.h +++ b/include/configs/M54455EVB.h @@ -191,7 +191,6 @@ /* I2c */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h index 3bdb867..6e9cba0 100644 --- a/include/configs/M5475EVB.h +++ b/include/configs/M5475EVB.h @@ -122,7 +122,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x00008F00 diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h index 3487e49..24f28e0 100644 --- a/include/configs/M5485EVB.h +++ b/include/configs/M5485EVB.h @@ -119,7 +119,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x00008F00 diff --git a/include/configs/METROBOX.h b/include/configs/METROBOX.h index d1ef559..66c4798 100644 --- a/include/configs/METROBOX.h +++ b/include/configs/METROBOX.h @@ -196,7 +196,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C hardware support */ -#undef CONFIG_SOFT_I2C /* I2C !bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed 400kHz */ #define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */ diff --git a/include/configs/MHPC.h b/include/configs/MHPC.h index 3ff36ad..fdd811d 100644 --- a/include/configs/MHPC.h +++ b/include/configs/MHPC.h @@ -73,8 +73,10 @@ #undef CONFIG_UCODE_PATCH /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -91,8 +93,6 @@ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -#define CONFIG_SYS_I2C_SPEED 50000 -#define CONFIG_SYS_I2C_SLAVE 0xFE #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM X24C04 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* bytes of address */ /* mask of address bits that overflow into the "EEPROM chip address" */ diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h index ac4c253..d32b14a 100644 --- a/include/configs/MPC8323ERDB.h +++ b/include/configs/MPC8323ERDB.h @@ -234,7 +234,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h index 7c31f47..a35c6b6 100644 --- a/include/configs/MPC832XEMDS.h +++ b/include/configs/MPC832XEMDS.h @@ -327,7 +327,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h index 212089c..7c3f35c 100644 --- a/include/configs/MPC8349EMDS.h +++ b/include/configs/MPC8349EMDS.h @@ -355,7 +355,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h index 1130b59..c67ffdb 100644 --- a/include/configs/MPC8349ITX.h +++ b/include/configs/MPC8349ITX.h @@ -131,8 +131,6 @@ #define I2C_8574_PCI66 0x20 /* 0=33MHz PCI, 1=66MHz PCI */ #define I2C_8574_FLASHSIDE 0x40 /* 0=Reset vector from U4, 1=from U7*/ -#undef CONFIG_SOFT_I2C - #endif /* Compact Flash */ diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h index a71ac2b..4d6486b 100644 --- a/include/configs/MPC8360EMDS.h +++ b/include/configs/MPC8360EMDS.h @@ -424,7 +424,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC8360ERDK.h b/include/configs/MPC8360ERDK.h index fcca542..29e7719 100644 --- a/include/configs/MPC8360ERDK.h +++ b/include/configs/MPC8360ERDK.h @@ -288,7 +288,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h index 480468f..91c8a34 100644 --- a/include/configs/MPC837XEMDS.h +++ b/include/configs/MPC837XEMDS.h @@ -342,7 +342,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h index d5c9d05..3279e3c 100644 --- a/include/configs/MPC837XERDB.h +++ b/include/configs/MPC837XERDB.h @@ -368,7 +368,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h index cc2b7c3..f560b56 100644 --- a/include/configs/MPC8536DS.h +++ b/include/configs/MPC8536DS.h @@ -436,7 +436,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h index 6cb00ee..a42dec4 100644 --- a/include/configs/MPC8540ADS.h +++ b/include/configs/MPC8540ADS.h @@ -262,7 +262,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h index d0e6ca6..13011b5 100644 --- a/include/configs/MPC8541CDS.h +++ b/include/configs/MPC8541CDS.h @@ -285,7 +285,6 @@ extern unsigned long get_clock_freq(void); */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index 09d0835..b00468e 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -234,7 +234,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); /* I2C */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index d070f6a..50e318c 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -360,8 +360,7 @@ extern unsigned long get_clock_freq(void); */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_SPEED 400000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ #define CONFIG_SYS_I2C_OFFSET 0x3000 diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h index 483556b..388ba9b 100644 --- a/include/configs/MPC8555CDS.h +++ b/include/configs/MPC8555CDS.h @@ -283,7 +283,6 @@ extern unsigned long get_clock_freq(void); */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h index 525e88f..04f6a65 100644 --- a/include/configs/MPC8560ADS.h +++ b/include/configs/MPC8560ADS.h @@ -256,7 +256,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h index f1bfdcb..05a69af 100644 --- a/include/configs/MPC8568MDS.h +++ b/include/configs/MPC8568MDS.h @@ -268,7 +268,6 @@ extern unsigned long get_clock_freq(void); */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index c54755f..23bd908 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -304,7 +304,6 @@ extern unsigned long get_clock_freq(void); */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h index 25303c4..45abcf6 100644 --- a/include/configs/MPC8572DS.h +++ b/include/configs/MPC8572DS.h @@ -433,7 +433,6 @@ /* I2C */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index f791e76..0a2e39b 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -254,7 +254,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h index 4a3ca01..3ac5b2b 100644 --- a/include/configs/MPC8641HPCN.h +++ b/include/configs/MPC8641HPCN.h @@ -300,7 +300,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index 7b28a27..ed1a429 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -491,7 +491,6 @@ extern unsigned long get_sdram_size(void); #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_I2C_CMD_TREE #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ diff --git a/include/configs/P1023RDS.h b/include/configs/P1023RDS.h index 4943d7c..f6ee251 100644 --- a/include/configs/P1023RDS.h +++ b/include/configs/P1023RDS.h @@ -315,7 +315,6 @@ extern unsigned long get_clock_freq(void); /* I2C */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x51 diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h index 6ce4cbe..699e9eb 100644 --- a/include/configs/P1_P2_RDB.h +++ b/include/configs/P1_P2_RDB.h @@ -369,7 +369,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); /* I2C */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_I2C_CMD_TREE #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ diff --git a/include/configs/P2020COME.h b/include/configs/P2020COME.h index 05a75d8..c8f5a85 100644 --- a/include/configs/P2020COME.h +++ b/include/configs/P2020COME.h @@ -227,7 +227,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); /* I2C */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_I2C_CMD_TREE #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ diff --git a/include/configs/PM826.h b/include/configs/PM826.h index faadfe4..5508313 100644 --- a/include/configs/PM826.h +++ b/include/configs/PM826.h @@ -57,10 +57,10 @@ "bootm" /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0xFE +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ diff --git a/include/configs/PM828.h b/include/configs/PM828.h index f563fbe..3842f57 100644 --- a/include/configs/PM828.h +++ b/include/configs/PM828.h @@ -57,10 +57,10 @@ "bootm" /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0xFE +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ diff --git a/include/configs/PMC440.h b/include/configs/PMC440.h index 40c1827..4b53182 100644 --- a/include/configs/PMC440.h +++ b/include/configs/PMC440.h @@ -226,7 +226,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/R360MPI.h b/include/configs/R360MPI.h index 60cccff..df16598 100644 --- a/include/configs/R360MPI.h +++ b/include/configs/R360MPI.h @@ -97,10 +97,13 @@ #define CONFIG_RTC_MPC8xx /* use internal RTC of MPC8xx */ #define CONFIG_HARD_I2C 1 /* To I2C with hardware support */ -#undef CONFIG_SORT_I2C /* To I2C with software support */ +#undef CONFIG_SYS_I2C_SOFT /* To I2C with software support */ #define CONFIG_SYS_I2C_SPEED 4700 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F +#if defined(CONFIG_SYS_I2C_SOFT) +#define CONFIG_SYS_SYS_I2C_SOFT_SPEED 4700 /* I2C speed and slave address */ +#define CONFIG_SYS_SYS_I2C_SOFT_SLAVE 0x7F /* * Software (bit-bang) I2C driver configuration */ @@ -116,6 +119,7 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(50) +#endif /* #define(CONFIG_SYS_I2C_SOFT) */ #define CONFIG_SYS_I2C_LCD_ADDR 0x8 /* LCD Control */ #define CONFIG_SYS_I2C_KEY_ADDR 0x9 /* Keyboard coprocessor */ diff --git a/include/configs/RPXClassic.h b/include/configs/RPXClassic.h index 3595200..8130ee6 100644 --- a/include/configs/RPXClassic.h +++ b/include/configs/RPXClassic.h @@ -148,14 +148,16 @@ * I2C Configuration *----------------------------------------------------------------------------- */ -#define CONFIG_I2C 1 -#define CONFIG_SYS_I2C_SPEED 50000 -#define CONFIG_SYS_I2C_SLAVE 0x34 +#define CONFIG_SYS_I2C_SPEED 50000 +#define CONFIG_SYS_I2C_SLAVE 0x34 /* enable I2C and select the hardware/software driver */ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ +#undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ + +#if defined(CONFIG_SYS_I2C_SOFT) +#define CONFIG_SYS_I2C 1 /* * Software (bit-bang) I2C driver configuration */ @@ -170,8 +172,10 @@ #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0x34 +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x34 +#endif + # define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM X24C16 */ # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* bytes of address */ /* mask of address bits that overflow into the "EEPROM chip address" */ diff --git a/include/configs/RPXlite.h b/include/configs/RPXlite.h index 563abea..9a385a4 100644 --- a/include/configs/RPXlite.h +++ b/include/configs/RPXlite.h @@ -62,6 +62,36 @@ #undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */ #define CONFIG_BZIP2 /* Include support for bzip2 compressed images */ + +/* enable I2C and select the hardware/software driver */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 40000 /* 40 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE +/* Software (bit-bang) I2C driver configuration */ +#define PB_SCL 0x00000020 /* PB 26 */ +#define PB_SDA 0x00000010 /* PB 27 */ + +#define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) +#define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) +#define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) +#define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) +#define I2C_SDA(bit) if (bit) \ + immr->im_cpm.cp_pbdat |= PB_SDA; \ + else \ + immr->im_cpm.cp_pbdat &= ~PB_SDA +#define I2C_SCL(bit) if (bit) \ + immr->im_cpm.cp_pbdat |= PB_SCL; \ + else \ + immr->im_cpm.cp_pbdat &= ~PB_SCL +#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ + +/* M41T11 Serial Access Timekeeper(R) SRAM */ +#define CONFIG_RTC_M41T11 1 +#define CONFIG_SYS_I2C_RTC_ADDR 0x68 +/* play along with the linux driver */ +#define CONFIG_SYS_M41T11_BASE_YEAR 1900 + #undef CONFIG_WATCHDOG /* watchdog disabled */ /* diff --git a/include/configs/RRvision.h b/include/configs/RRvision.h index e2ea016..b14136d 100644 --- a/include/configs/RRvision.h +++ b/include/configs/RRvision.h @@ -122,13 +122,10 @@ #endif /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C /* I2C bit-banged */ - -# define CONFIG_SYS_I2C_SPEED 50000 /* 50 kHz is supposed to work */ -# define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -144,7 +141,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(1) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ /* diff --git a/include/configs/SXNI855T.h b/include/configs/SXNI855T.h index b7fbe5e..f0ce282 100644 --- a/include/configs/SXNI855T.h +++ b/include/configs/SXNI855T.h @@ -121,7 +121,10 @@ #define CONFIG_RTC_DS1306 /* Dallas 1306 real time clock */ -#define CONFIG_SOFT_I2C /* I2C bit-banged */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -138,8 +141,6 @@ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -# define CONFIG_SYS_I2C_SPEED 50000 -# define CONFIG_SYS_I2C_SLAVE 0xFE # define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Atmel 24C64 */ # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* two byte address */ diff --git a/include/configs/Sandpoint8240.h b/include/configs/Sandpoint8240.h index fa456ed..65ca425 100644 --- a/include/configs/Sandpoint8240.h +++ b/include/configs/Sandpoint8240.h @@ -202,13 +202,16 @@ * If the software driver is chosen, there are some additional * configuration items that the driver uses to drive the port pins. */ -#define CONFIG_HARD_I2C 1 /* To enable I2C support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_HARD_I2C 1 /* To enable I2C support */ +#undef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C_SPEED 400000 -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT #error "Soft I2C is not configured properly. Please review!" +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ #define I2C_ACTIVE (iop->pdir |= 0x00010000) #define I2C_TRISTATE (iop->pdir &= ~0x00010000) @@ -218,7 +221,7 @@ #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ else iop->pdat &= ~0x00020000 #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ +#endif /* CONFIG_SYS_I2C_SOFT */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 /* EEPROM IS24C02 */ diff --git a/include/configs/Sandpoint8245.h b/include/configs/Sandpoint8245.h index cdc51a5..9a69374 100644 --- a/include/configs/Sandpoint8245.h +++ b/include/configs/Sandpoint8245.h @@ -172,13 +172,16 @@ * If the software driver is chosen, there are some additional * configuration items that the driver uses to drive the port pins. */ -#define CONFIG_HARD_I2C 1 /* To enable I2C support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_HARD_I2C 1 /* To enable I2C support */ +#undef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C_SPEED 400000 +#define CONFIG_SYS_I2C_SLAVE 0x7F -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT #error "Soft I2C is not configured properly. Please review!" +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ #define I2C_ACTIVE (iop->pdir |= 0x00010000) #define I2C_TRISTATE (iop->pdir &= ~0x00010000) @@ -188,7 +191,7 @@ #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ else iop->pdat &= ~0x00020000 #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ +#endif /* CONFIG_SYS_I2C_SOFT */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 /* EEPROM IS24C02 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/TASREG.h b/include/configs/TASREG.h index d95a226..059fb36 100644 --- a/include/configs/TASREG.h +++ b/include/configs/TASREG.h @@ -136,19 +136,11 @@ /*----------------------------------------------------------------------- * I2C */ -#define CONFIG_SOFT_I2C -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC32 */ -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ -/* mask of address bits that overflow into the "EEPROM chip address" */ -#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x01 -#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 /* The Catalyst CAT24WC32 has */ - /* 32 byte page write mode using*/ - /* last 5 bits of the address */ -#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 100000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F -#if defined (CONFIG_SOFT_I2C) #if 0 /* push-pull */ #define SDA 0x00800000 #define SCL 0x00000008 @@ -182,7 +174,17 @@ #define I2C_ACTIVE {DIR1|=SDA;} #define I2C_TRISTATE {DIR1&=~SDA;} #endif -#endif + +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC32 */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ +/* mask of address bits that overflow into the "EEPROM chip address" */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x01 +/* + * The Catalyst CAT24WC32 has 32 byte page write mode using + * last 5 bits of the address + */ +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */ /*----------------------------------------------------------------------- * Definitions for initial stack pointer and data area (in DPRAM) diff --git a/include/configs/TK885D.h b/include/configs/TK885D.h index 623cb66..af88773 100644 --- a/include/configs/TK885D.h +++ b/include/configs/TK885D.h @@ -104,13 +104,10 @@ #undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -126,7 +123,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C?? */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* two byte address */ diff --git a/include/configs/TOP5200.h b/include/configs/TOP5200.h index 2267d59..e9dcefc 100644 --- a/include/configs/TOP5200.h +++ b/include/configs/TOP5200.h @@ -200,10 +200,13 @@ #define CONFIG_ENV_OVERWRITE #define CONFIG_MISC_INIT_R -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C with softwate support */ +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ -#if defined (CONFIG_SOFT_I2C) +#if defined(CONFIG_SYS_I2C_SOFT) +# define CONFIG_SYS_I2C +# define CONFIG_SYS_I2C_SOFT_SPEED 100000 +# define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F +/**/ # define SDA0 0x40 # define SCL0 0x80 # define GPIOE0 *((volatile uchar*)(CONFIG_SYS_MBAR+0x0c00)) @@ -218,8 +221,7 @@ # define I2C_DELAY {udelay(5);} # define I2C_ACTIVE {DDR0|=SDA0;} # define I2C_TRISTATE {DDR0&=~SDA0;} -# define CONFIG_SYS_I2C_SPEED 100000 -# define CONFIG_SYS_I2C_SLAVE 0x7F + #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 #define CONFIG_SYS_I2C_FACT_ADDR 0x57 #endif diff --git a/include/configs/TOP860.h b/include/configs/TOP860.h index 4849f94..1f728e3 100644 --- a/include/configs/TOP860.h +++ b/include/configs/TOP860.h @@ -159,7 +159,6 @@ * Environment handler * only the first 6k in EEPROM are available for user. Of that we use 256b */ -#define CONFIG_SOFT_I2C #define CONFIG_ENV_IS_IN_EEPROM 1 /* turn on EEPROM env feature */ #define CONFIG_ENV_OFFSET 0x1000 #define CONFIG_ENV_SIZE 0x0700 @@ -170,13 +169,15 @@ #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 #define CONFIG_SYS_EEPROM_SIZE 0x2000 -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_SYS_I2C_SLAVE 0xFE #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 12 #define CONFIG_ENV_OVERWRITE #define CONFIG_MISC_INIT_R -#if defined (CONFIG_SOFT_I2C) +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 100000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE +/**/ #define SDA 0x00010 #define SCL 0x00020 #define __I2C_DIR immr->im_cpm.cp_pbdir @@ -193,7 +194,6 @@ #define I2C_DELAY { udelay(5); } #define I2C_ACTIVE { __I2C_DIR |= SDA; } #define I2C_TRISTATE { __I2C_DIR &= ~SDA; } -#endif #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } diff --git a/include/configs/TQM8260.h b/include/configs/TQM8260.h index 7e24131..5fbfd1c9 100644 --- a/include/configs/TQM8260.h +++ b/include/configs/TQM8260.h @@ -89,10 +89,10 @@ #define CONFIG_BOOTCOMMAND "run flash_self" /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F /* * Software (bit-bang) I2C driver configuration diff --git a/include/configs/TQM8272.h b/include/configs/TQM8272.h index 3b3f9e6..c27e4ef 100644 --- a/include/configs/TQM8272.h +++ b/include/configs/TQM8272.h @@ -97,11 +97,10 @@ #if CONFIG_I2C /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F /* * Software (bit-bang) I2C driver configuration */ @@ -135,8 +134,9 @@ #define CONFIG_SYS_DTT_HYSTERESIS 3 #else +#undef CONFIG_SYS_I2C #undef CONFIG_HARD_I2C -#undef CONFIG_SOFT_I2C +#undef CONFIG_SYS_I2C_SOFT #endif /* diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h index 966a6e3..f22eb35 100644 --- a/include/configs/TQM834x.h +++ b/include/configs/TQM834x.h @@ -188,7 +188,6 @@ * I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed: 400KHz */ #define CONFIG_SYS_I2C_SLAVE 0x7F /* slave address */ diff --git a/include/configs/TQM855M.h b/include/configs/TQM855M.h index e7fd2db..1b558fc 100644 --- a/include/configs/TQM855M.h +++ b/include/configs/TQM855M.h @@ -93,13 +93,10 @@ #undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -115,7 +112,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* two byte address */ diff --git a/include/configs/TQM866M.h b/include/configs/TQM866M.h index 7d0ae99..9104971 100644 --- a/include/configs/TQM866M.h +++ b/include/configs/TQM866M.h @@ -107,13 +107,11 @@ #undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C /* * Software (bit-bang) I2C driver configuration */ @@ -129,7 +127,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C256 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* two byte address */ diff --git a/include/configs/TQM885D.h b/include/configs/TQM885D.h index 7941631..65d7c58 100644 --- a/include/configs/TQM885D.h +++ b/include/configs/TQM885D.h @@ -101,13 +101,10 @@ #undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -123,7 +120,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C?? */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* two byte address */ diff --git a/include/configs/alpr.h b/include/configs/alpr.h index d93d5e2..9f32a60 100644 --- a/include/configs/alpr.h +++ b/include/configs/alpr.h @@ -122,7 +122,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/aria.h b/include/configs/aria.h index bd81053..261dc69 100644 --- a/include/configs/aria.h +++ b/include/configs/aria.h @@ -371,7 +371,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* so disable bit-banged I2C */ #define CONFIG_I2C_MULTI_BUS /* I2C speed and slave address */ diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h index a0ed8f1..6dabe57 100644 --- a/include/configs/astro_mcf5373l.h +++ b/include/configs/astro_mcf5373l.h @@ -118,7 +118,6 @@ /* I2C */ #define CONFIG_FSL_I2C #define CONFIG_HARD_I2C /* I2C with hw support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 80000 #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x58000 diff --git a/include/configs/bf533-ezkit.h b/include/configs/bf533-ezkit.h index c1a5ecd..beab127 100644 --- a/include/configs/bf533-ezkit.h +++ b/include/configs/bf533-ezkit.h @@ -94,10 +94,15 @@ /* * I2C Settings */ -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C_SOFT +#ifdef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF0 #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF1 - +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0 +#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ +#endif /* * Misc Settings diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h index e3344e9..7144c63 100644 --- a/include/configs/bf533-stamp.h +++ b/include/configs/bf533-stamp.h @@ -14,7 +14,6 @@ #define CONFIG_BFIN_CPU bf533-0.3 #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_BYPASS - /* * Clock Settings * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV @@ -38,7 +37,6 @@ /* Values can range from 1-15 */ #define CONFIG_SCLK_DIV 6 /* note: 1.2 boards can go faster */ - /* * Memory Settings */ @@ -74,6 +72,42 @@ /* #define CONFIG_ETHADDR 02:80:ad:20:31:b8 */ +/* I2C */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0 +/* + * Software (bit-bang) I2C driver configuration + */ +#define PF_SCL PF3 +#define PF_SDA PF2 +#define I2C_INIT (*pFIO_DIR |= PF_SCL); asm("ssync;") +#define I2C_ACTIVE (*pFIO_DIR |= PF_SDA); \ + *pFIO_INEN &= ~PF_SDA; asm("ssync;") +#define I2C_TRISTATE (*pFIO_DIR &= ~PF_SDA); \ + *pFIO_INEN |= PF_SDA; asm("ssync;") +#define I2C_READ ((volatile)(*pFIO_FLAG_D & PF_SDA) != 0); \ + asm("ssync;") +#define I2C_SDA(bit) if (bit) { \ + *pFIO_FLAG_S = PF_SDA; \ + asm("ssync;"); \ + } \ + else { \ + *pFIO_FLAG_C = PF_SDA; \ + asm("ssync;"); \ + } +#define I2C_SCL(bit) if (bit) { \ + *pFIO_FLAG_S = PF_SCL; \ + asm("ssync;"); \ + } \ + else { \ + *pFIO_FLAG_C = PF_SCL; \ + asm("ssync;"); \ + } +#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ + + /* * Flash Settings */ @@ -84,7 +118,6 @@ #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 67 - /* * SPI Settings */ @@ -132,10 +165,15 @@ /* * I2C Settings */ -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C_SOFT +#ifdef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF3 #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF2 - +#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0 +#endif /* * Compact Flash / IDE / ATA Settings diff --git a/include/configs/bf561-ezkit.h b/include/configs/bf561-ezkit.h index 6ee1e4c..404039a 100644 --- a/include/configs/bf561-ezkit.h +++ b/include/configs/bf561-ezkit.h @@ -88,10 +88,14 @@ /* * I2C Settings */ -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C_SOFT +#ifdef CONFIG_SYS_I2C_SOFT #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF0 #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF1 - +#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0 +#endif /* * Misc Settings diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index e1a6fe3..08ccce0 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -71,7 +71,7 @@ # ifdef CONFIG_SPI_FLASH # define CONFIG_CMD_SF # endif -# if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) +# if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C_SOFT) # define CONFIG_CMD_I2C # define CONFIG_SOFT_I2C_READ_REPEATED_START # endif @@ -299,7 +299,7 @@ /* * I2C Settings */ -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C_SOFT) # ifndef CONFIG_SYS_I2C_SPEED # define CONFIG_SYS_I2C_SPEED 50000 # endif diff --git a/include/configs/blackstamp.h b/include/configs/blackstamp.h index 83ad659..7d82275 100644 --- a/include/configs/blackstamp.h +++ b/include/configs/blackstamp.h @@ -40,7 +40,6 @@ #define SHARED_RESOURCES 1 /* Is I2C bit-banged? */ -#undef CONFIG_SOFT_I2 /* * Clock Settings @@ -115,7 +114,7 @@ # undef CONFIG_CMD_NET #endif -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT # define CONFIG_CMD_I2C #endif @@ -204,11 +203,11 @@ * Note these pins are arbitrarily chosen because we aren't using * them yet. You can (and probably should) change these values! */ -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF9 #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF8 -#define CONFIG_SYS_I2C_SPEED 50000 -#define CONFIG_SYS_I2C_SLAVE 0xFE +#define CONFIG_SYS_SOFT_I2C_SPEED 50000 +#define CONFIG_SYS_SOFT_I2C_SLAVE 0xFE #endif /* diff --git a/include/configs/blackvme.h b/include/configs/blackvme.h index 523c4e4..cd37f9a 100644 --- a/include/configs/blackvme.h +++ b/include/configs/blackvme.h @@ -224,7 +224,7 @@ * Soft I2C settings (BF561 does not have hard I2C) * PF12,13 on SPI connector 0. */ -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT # define CONFIG_CMD_I2C # define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF12 # define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF13 diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h index 15d56c3..d9b006a 100644 --- a/include/configs/cpuat91.h +++ b/include/configs/cpuat91.h @@ -92,7 +92,6 @@ #define CONFIG_USART_ID 0/* ignored in arm */ #undef CONFIG_HARD_I2C -#undef CONFIG_SOFT_I2C #define AT91_PIN_SDA (1<<25) #define AT91_PIN_SCL (1<<26) @@ -139,7 +138,7 @@ #undef CONFIG_CMD_NFS #undef CONFIG_CMD_DHCP -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT #define CONFIG_CMD_EEPROM #define CONFIG_CMD_I2C #endif diff --git a/include/configs/debris.h b/include/configs/debris.h index c40fbd9..0d3a4fa 100644 --- a/include/configs/debris.h +++ b/include/configs/debris.h @@ -273,12 +273,15 @@ * configuration items that the driver uses to drive the port pins. */ #define CONFIG_HARD_I2C 1 /* To enable I2C support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ +#undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT #error "Soft I2C is not configured properly. Please review!" +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ #define I2C_ACTIVE (iop->pdir |= 0x00010000) #define I2C_TRISTATE (iop->pdir &= ~0x00010000) @@ -288,7 +291,7 @@ #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ else iop->pdat &= ~0x00020000 #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ +#endif /* CONFIG_SYS_I2C_SOFT */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 /* EEPROM IS24C02 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/eXalion.h b/include/configs/eXalion.h index a6a0f8b..b80ab3f 100644 --- a/include/configs/eXalion.h +++ b/include/configs/eXalion.h @@ -224,7 +224,7 @@ * configuration items that the driver uses to drive the port pins. */ #define CONFIG_HARD_I2C 1 /* To enable I2C support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ +#undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h index 3be4929..efb50e3 100644 --- a/include/configs/eb_cpux9k2.h +++ b/include/configs/eb_cpux9k2.h @@ -223,11 +223,10 @@ * I2C-Bus */ -#define CONFIG_SYS_I2C_SPEED 50000 -#define CONFIG_SYS_I2C_SLAVE 0 /* not used */ - -#ifndef CONFIG_HARD_I2C -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0 /* Software I2C driver configuration */ @@ -251,9 +250,7 @@ else \ writel(ATMEL_PMX_AA_TWCK, &pio->pioa.codr); -#define I2C_DELAY udelay(2500000/CONFIG_SYS_I2C_SPEED) - -#endif /* CONFIG_HARD_I2C */ +#define I2C_DELAY udelay(2500000/CONFIG_SYS_I2C_SOFT_SPEED) /* I2C-RTC */ diff --git a/include/configs/ep8260.h b/include/configs/ep8260.h index 5a87cc5..2e675bc 100644 --- a/include/configs/ep8260.h +++ b/include/configs/ep8260.h @@ -227,15 +227,18 @@ * If the software driver is chosen, there are some additional * configuration items that the driver uses to drive the port pins. */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ + #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C_SLAVE 0x7F /* This is for HARD, must go */ /* * Software (bit-bang) I2C driver configuration */ -#ifdef CONFIG_SOFT_I2C +#ifdef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ #define I2C_ACTIVE (iop->pdir |= 0x00010000) #define I2C_TRISTATE (iop->pdir &= ~0x00010000) @@ -245,7 +248,7 @@ #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ else iop->pdat &= ~0x00020000 #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ +#endif /* CONFIG_SYS_I2C_SOFT */ /* #define CONFIG_RTC_DS174x */ diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h index 14a0f02..5bf8c22 100644 --- a/include/configs/ethernut5.h +++ b/include/configs/ethernut5.h @@ -210,10 +210,12 @@ /* I2C */ #define CONFIG_SYS_MAX_I2C_BUS 1 -#define CONFIG_SYS_I2C_SLAVE 0 -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 100000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0 + #define I2C_SOFT_DECLARATIONS #define GPIO_I2C_SCL AT91_PIO_PORTA, 24 diff --git a/include/configs/ibf-dsp561.h b/include/configs/ibf-dsp561.h index 294af73..5291755 100644 --- a/include/configs/ibf-dsp561.h +++ b/include/configs/ibf-dsp561.h @@ -105,11 +105,11 @@ /* * I2C Settings */ -#define CONFIG_SOFT_I2C 1 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ #define CONFIG_SOFT_I2C_GPIO_SCL GPIO_PF0 #define CONFIG_SOFT_I2C_GPIO_SDA GPIO_PF1 - /* * Misc Settings */ diff --git a/include/configs/iocon.h b/include/configs/iocon.h index 7f8825b..695aa5c 100644 --- a/include/configs/iocon.h +++ b/include/configs/iocon.h @@ -110,11 +110,11 @@ /* * I2C stuff */ -#define CONFIG_SYS_I2C_SPEED 400000 - -/* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ +#undef CONFIG_HARD_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 3b15c4e..6182e81 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -78,10 +78,7 @@ #define CONFIG_LOADS_ECHO #define CONFIG_SYS_LOADS_BAUD_CHANGE -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS 1 #define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_I2C_MUX /* Support the IVM EEprom */ #define CONFIG_SYS_IVM_EEPROM_ADR 0x50 diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h index eb0e5b6..5a430ed 100644 --- a/include/configs/km/km83xx-common.h +++ b/include/configs/km/km83xx-common.h @@ -209,6 +209,9 @@ #define CONFIG_SYS_I2C_SPEED 200000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_MAX_I2C_BUS 1 +#define CONFIG_I2C_MUX /* I2C SYSMON (LM75, AD7414 is almost compatible) */ #define CONFIG_DTT_LM75 /* ON Semi's LM75 */ diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index 766d76e..c2c67c1 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -58,7 +58,6 @@ #define CONFIG_CMD_NAND #define CONFIG_CMD_SF -#define CONFIG_SOFT_I2C /* I2C bit-banged */ /* SPI NOR Flash default params, used by sf commands */ #define CONFIG_SF_DEFAULT_SPEED 8100000 @@ -187,8 +186,23 @@ /* * I2C related stuff */ +#undef CONFIG_I2C_MVTWSI +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ + #define CONFIG_KIRKWOOD_GPIO /* Enable GPIO Support */ -#if defined(CONFIG_SOFT_I2C) +#if defined(CONFIG_SYS_I2C_SOFT) + +#define CONFIG_SYS_NUM_I2C_BUSES 6 +#define CONFIG_SYS_I2C_MAX_HOPS 1 +#define CONFIG_SYS_I2C_BUSES { {0, {I2C_NULL_HOP} }, \ + {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \ + {0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \ + {0, {{I2C_MUX_PCA9547, 0x70, 3} } }, \ + {0, {{I2C_MUX_PCA9547, 0x70, 4} } }, \ + {0, {{I2C_MUX_PCA9547, 0x70, 5} } }, \ + } + #ifndef __ASSEMBLY__ #include extern void __set_direction(unsigned pin, int high); @@ -211,6 +225,8 @@ int get_scl(void); #define I2C_DELAY udelay(1) #define I2C_SOFT_DECLARATIONS +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x0 +#define CONFIG_SYS_I2C_SOFT_SPEED 100000 #endif /* EEprom support 24C128, 24C256 valid for environment eeprom */ @@ -240,7 +256,7 @@ int get_scl(void); #define CONFIG_SYS_EEPROM_WREN #define CONFIG_ENV_OFFSET 0x0 /* no bracets! */ #define CONFIG_ENV_SIZE (0x2000 - CONFIG_ENV_OFFSET) -#define CONFIG_I2C_ENV_EEPROM_BUS KM_ENV_BUS "\0" +#define CONFIG_I2C_ENV_EEPROM_BUS KM_ENV_BUS #define CONFIG_ENV_OFFSET_REDUND 0x2000 /* no bracets! */ #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) #endif @@ -293,7 +309,7 @@ int get_scl(void); CONFIG_KM_DEF_ENV \ CONFIG_KM_NEW_ENV \ "arch=arm\0" \ - "EEprom_ivm=" KM_IVM_BUS "\0" \ + "EEprom_ivm=" __stringify(KM_IVM_BUS) "\0" \ "" #if defined(CONFIG_SYS_NO_FLASH) diff --git a/include/configs/km82xx.h b/include/configs/km82xx.h index 3c2117f..54041f3 100644 --- a/include/configs/km82xx.h +++ b/include/configs/km82xx.h @@ -212,7 +212,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_BOARD_EXTRA_ENV \ CONFIG_KM_DEF_ENV \ - "EEprom_ivm=pca9544a:70:4 \0" \ + "EEprom_ivm=1\0" \ "unlock=yes\0" \ "newenv=" \ "prot off 0xFE0C0000 +0x40000 && " \ @@ -242,10 +242,16 @@ #endif /* CONFIG_ENV_IS_IN_FLASH */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 50000 /* I2C speed */ -#define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_NUM_I2C_BUSES 3 +#define CONFIG_SYS_I2C_MAX_HOPS 1 +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SPEED CONFIG_SYS_I2C_SOFT_SPEED +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F +#define CONFIG_SYS_I2C_BUSES {{0, {I2C_NULL_HOP} }, \ + {0, {{I2C_MUX_PCA9542, 0x70, 0} } }, \ + {0, {{I2C_MUX_PCA9542, 0x70, 1} } } } /* * Software (bit-bang) I2C driver configuration @@ -282,7 +288,7 @@ int get_scl(void); #define CONFIG_SYS_DTT_MAX_TEMP 70 #define CONFIG_SYS_DTT_LOW_TEMP -30 #define CONFIG_SYS_DTT_HYSTERESIS 3 -#define CONFIG_SYS_DTT_BUS_NUM (CONFIG_SYS_MAX_I2C_BUS) +#define CONFIG_SYS_DTT_BUS_NUM 2 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h index 83bb7aa..a0ad47e 100644 --- a/include/configs/km_kirkwood.h +++ b/include/configs/km_kirkwood.h @@ -42,18 +42,18 @@ #define CONFIG_IDENT_STRING "\nKeymile Kirkwood" #define CONFIG_HOSTNAME km_kirkwood #define CONFIG_KM_DISABLE_PCIE -#define KM_IVM_BUS "pca9544a:70:9" /* I2C2 (Mux-Port 1)*/ +#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ /* KM_KIRKWOOD_PCI */ #elif defined(CONFIG_KM_KIRKWOOD_PCI) #define CONFIG_IDENT_STRING "\nKeymile Kirkwood PCI" #define CONFIG_HOSTNAME km_kirkwood_pci -#define KM_IVM_BUS "pca9544a:70:9" /* I2C2 (Mux-Port 1)*/ +#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #define CONFIG_KM_FPGA_CONFIG /* KM_NUSA */ #elif defined(CONFIG_KM_NUSA) -#define KM_IVM_BUS "pca9547:70:9" /* I2C2 (Mux-Port 1)*/ +#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #define CONFIG_IDENT_STRING "\nKeymile NUSA" #define CONFIG_HOSTNAME kmnusa #undef CONFIG_SYS_KWD_CONFIG @@ -69,7 +69,7 @@ #elif defined(CONFIG_KM_MGCOGE3UN) #define CONFIG_IDENT_STRING "\nKeymile COGE3UN" #define CONFIG_HOSTNAME mgcoge3un -#define KM_IVM_BUS "pca9547:70:9" /* I2C2 (Mux-Port 1)*/ +#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #undef CONFIG_SYS_KWD_CONFIG #define CONFIG_SYS_KWD_CONFIG \ $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-memphis.cfg @@ -81,7 +81,7 @@ /* KMCOGE5UN */ #elif defined(CONFIG_KM_COGE5UN) #define CONFIG_IDENT_STRING "\nKeymile COGE5UN" -#define KM_IVM_BUS "pca9547:70:9" /* I2C2 (Mux-Port 1)*/ +#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #undef CONFIG_SYS_KWD_CONFIG #define CONFIG_SYS_KWD_CONFIG \ $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage_256M8_1.cfg @@ -95,12 +95,12 @@ #elif defined(CONFIG_KM_PORTL2) #define CONFIG_IDENT_STRING "\nKeymile Port-L2" #define CONFIG_HOSTNAME portl2 -#define KM_IVM_BUS "pca9544a:70:9" /* I2C2 (Mux-Port 1)*/ +#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #define CONFIG_KM_PIGGY4_88E6061 /* KM_SUV31 */ #elif defined(CONFIG_KM_SUV31) -#define KM_IVM_BUS "pca9547:70:9" /* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #define CONFIG_IDENT_STRING "\nKeymile SUV31" #define CONFIG_HOSTNAME kmsuv31 #define CONFIG_KM_ENV_IS_IN_SPI_NOR @@ -114,7 +114,7 @@ #include "km/km_arm.h" #ifndef CONFIG_KM_ENV_IS_IN_SPI_NOR -#define KM_ENV_BUS "pca9544a:70:d" /* I2C2 (Mux-Port 5)*/ +#define KM_ENV_BUS 5 /* I2C2 (Mux-Port 5)*/ #endif #if defined(CONFIG_KM_PIGGY4_88E6352) diff --git a/include/configs/korat.h b/include/configs/korat.h index d7c1f85..eea8c98 100644 --- a/include/configs/korat.h +++ b/include/configs/korat.h @@ -156,7 +156,6 @@ * I2C */ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/lwmon.h b/include/configs/lwmon.h index 3c02b73..dc0bd33 100644 --- a/include/configs/lwmon.h +++ b/include/configs/lwmon.h @@ -146,13 +146,10 @@ #undef CONFIG_STATUS_LED /* Status LED disabled */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -168,7 +165,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ #define CONFIG_RTC_PCF8563 /* use Philips PCF8563 RTC */ diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h index ba613e3..4dcb25a 100644 --- a/include/configs/lwmon5.h +++ b/include/configs/lwmon5.h @@ -299,7 +299,6 @@ * I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/mecp5123.h b/include/configs/mecp5123.h index c4f245b..6f73e5d 100644 --- a/include/configs/mecp5123.h +++ b/include/configs/mecp5123.h @@ -267,7 +267,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* so disable bit-banged I2C */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ #define CONFIG_SYS_I2C_SLAVE 0x7F /* slave address */ diff --git a/include/configs/mpc5121ads.h b/include/configs/mpc5121ads.h index 6f003aa..65ca62f 100644 --- a/include/configs/mpc5121ads.h +++ b/include/configs/mpc5121ads.h @@ -360,7 +360,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* so disable bit-banged I2C */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h index d438efd..09073e9 100644 --- a/include/configs/nhk8815.h +++ b/include/configs/nhk8815.h @@ -109,8 +109,11 @@ #ifndef __ASSEMBLY__ #include #define CONFIG_CMD_I2C -#define CONFIG_SOFT_I2C -#define CONFIG_SYS_I2C_SPEED 400000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT 1 /* I2C bit-banged */ +#define I2C_SOFT_DEFS +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F #define __SDA 63 #define __SCL 62 #define I2C_SDA(x) nmk_gpio_set(__SDA, x) diff --git a/include/configs/otc570.h b/include/configs/otc570.h index fe4f3c0..010e1b9 100644 --- a/include/configs/otc570.h +++ b/include/configs/otc570.h @@ -115,14 +115,13 @@ /* RTC and I2C stuff */ #define CONFIG_RTC_DS1338 #define CONFIG_SYS_I2C_RTC_ADDR 0x68 -#undef CONFIG_HARD_I2C -#define CONFIG_SOFT_I2C -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_SYS_I2C_SLAVE 0x7F - -#ifdef CONFIG_SOFT_I2C -# define CONFIG_I2C_CMD_TREE -# define CONFIG_I2C_MULTI_BUS + +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#ifdef CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C_SOFT_SPEED 100000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F + /* Configure data and clock pins for pio */ # define I2C_INIT { \ at91_set_pio_output(AT91_PIO_PORTB, 4, 0); \ @@ -140,7 +139,7 @@ /* Set clock pin */ # define I2C_SCL(bit) at91_set_pio_value(AT91_PIO_PORTB, 5, bit) # define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ +#endif /* CONFIG_SYS_I2C_SOFT */ /* * BOOTP options diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 2fa5372..d0a6b17 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -536,7 +536,6 @@ /* I2C */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_I2C_CMD_TREE #define CONFIG_SYS_I2C_SPEED 400000 /* I2C spd and slave address */ diff --git a/include/configs/p3p440.h b/include/configs/p3p440.h index a19de07..3c33da7 100644 --- a/include/configs/p3p440.h +++ b/include/configs/p3p440.h @@ -98,7 +98,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/pcs440ep.h b/include/configs/pcs440ep.h index 1897619..6358104 100644 --- a/include/configs/pcs440ep.h +++ b/include/configs/pcs440ep.h @@ -140,7 +140,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h index 1e07317..9aa112a 100644 --- a/include/configs/pdnb3.h +++ b/include/configs/pdnb3.h @@ -281,12 +281,10 @@ */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 83000 /* 83 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 83000 /* 83 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ diff --git a/include/configs/quad100hd.h b/include/configs/quad100hd.h index 5f1bb58..30a8c55 100644 --- a/include/configs/quad100hd.h +++ b/include/configs/quad100hd.h @@ -153,7 +153,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 56e8347..89ae32b 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -226,8 +226,10 @@ #define CONFIG_SOFT_I2C_GPIO_SCL s5pc110_gpio_get_nr(j4, 3) #define CONFIG_SOFT_I2C_GPIO_SDA s5pc110_gpio_get_nr(j4, 0) -#define CONFIG_SOFT_I2C 1 -#define CONFIG_SYS_I2C_SPEED 50000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_MAX_I2C_BUS 7 #define CONFIG_USB_GADGET diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index eb13bb3..f7266aa 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -250,9 +250,11 @@ #define CONFIG_SOFT_I2C_GPIO_SCL exynos4_gpio_part1_get_nr(b, 7) #define CONFIG_SOFT_I2C_GPIO_SDA exynos4_gpio_part1_get_nr(b, 6) -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0 #define CONFIG_SOFT_I2C_READ_REPEATED_START -#define CONFIG_SYS_I2C_SPEED 50000 #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_MAX_I2C_BUS 7 diff --git a/include/configs/sacsng.h b/include/configs/sacsng.h index 54d55a0..efbf6b6 100644 --- a/include/configs/sacsng.h +++ b/include/configs/sacsng.h @@ -296,15 +296,13 @@ * If the software driver is chosen, there are some additional * configuration items that the driver uses to drive the port pins. */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F /* * Software (bit-bang) I2C driver configuration */ -#ifdef CONFIG_SOFT_I2C #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ #define I2C_ACTIVE (iop->pdir |= 0x00010000) #define I2C_TRISTATE (iop->pdir &= ~0x00010000) @@ -314,7 +312,6 @@ #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ else iop->pdat &= ~0x00020000 #define I2C_DELAY udelay(20) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ /* Define this to reserve an entire FLASH sector for * environment variables. Otherwise, the environment will be diff --git a/include/configs/sbc405.h b/include/configs/sbc405.h index 6e53bc2..4120cf4 100644 --- a/include/configs/sbc405.h +++ b/include/configs/sbc405.h @@ -169,7 +169,6 @@ #define CONFIG_SYS_RX_ETH_BUFFER 16 /* use 16 rx buffer on 405 emac */ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/sbc8349.h b/include/configs/sbc8349.h index fdc1b95..7a79e8c 100644 --- a/include/configs/sbc8349.h +++ b/include/configs/sbc8349.h @@ -305,7 +305,6 @@ /* I2C */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h index 148ade3..354691a 100644 --- a/include/configs/sbc8548.h +++ b/include/configs/sbc8548.h @@ -446,7 +446,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h index 0e2d17d..147e0ae 100644 --- a/include/configs/sbc8641d.h +++ b/include/configs/sbc8641d.h @@ -291,7 +291,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ diff --git a/include/configs/sc3.h b/include/configs/sc3.h index 9dec21d..59636f7 100644 --- a/include/configs/sc3.h +++ b/include/configs/sc3.h @@ -247,7 +247,6 @@ *----------------------------------------------------------------------- */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define I2C_INIT diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h index 218ca54..c683fab 100644 --- a/include/configs/snapper9260.h +++ b/include/configs/snapper9260.h @@ -106,11 +106,11 @@ #define CONFIG_SYS_PROMPT "Snapper> " /* I2C - Bit-bashed */ -#define CONFIG_SOFT_I2C -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 100000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F #define CONFIG_SOFT_I2C_READ_REPEATED_START -#define CONFIG_I2C_MULTI_BUS #define I2C_INIT do { \ at91_set_gpio_output(AT91_PIN_PA23, 1); \ at91_set_gpio_output(AT91_PIN_PA24, 1); \ diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 7a0b481..19869e6 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -237,7 +237,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 102124 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #define CONFIG_SYS_I2C_OFFSET 0x3000 diff --git a/include/configs/spc1920.h b/include/configs/spc1920.h index 87878d5..2a9b00c 100644 --- a/include/configs/spc1920.h +++ b/include/configs/spc1920.h @@ -207,13 +207,10 @@ */ #if defined(CONFIG_CMD_I2C) /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -229,7 +226,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ #endif /*----------------------------------------------------------------------- diff --git a/include/configs/stxgp3.h b/include/configs/stxgp3.h index 939a964..b688b45 100644 --- a/include/configs/stxgp3.h +++ b/include/configs/stxgp3.h @@ -180,7 +180,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #if 0 diff --git a/include/configs/stxssa.h b/include/configs/stxssa.h index 96d7128..4c3c086 100644 --- a/include/configs/stxssa.h +++ b/include/configs/stxssa.h @@ -200,7 +200,6 @@ */ #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F #undef CONFIG_SYS_I2C_NOPROBES diff --git a/include/configs/top9000.h b/include/configs/top9000.h index 7cc6577..884670d 100644 --- a/include/configs/top9000.h +++ b/include/configs/top9000.h @@ -201,11 +201,12 @@ #define CONFIG_CMD_USB /* I2C support must always be enabled */ -#define CONFIG_SOFT_I2C #define CONFIG_CMD_I2C -#define CONFIG_SYS_I2C_SPEED 400000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 400000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F + #define I2C0_PORT AT91_PIO_PORTA #define SDA0_PIN 23 #define SCL0_PIN 24 diff --git a/include/configs/trats.h b/include/configs/trats.h index 356d87b..926b209 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -275,10 +275,12 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - GENERATED_GBL_DATA_SIZE) #define CONFIG_SYS_CACHELINE_SIZE 32 -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 50000 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE #define CONFIG_SOFT_I2C_READ_REPEATED_START #define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_SYS_I2C_SPEED 50000 #define CONFIG_I2C_MULTI_BUS #define CONFIG_SOFT_I2C_MULTI_BUS #define CONFIG_SYS_MAX_I2C_BUS 15 diff --git a/include/configs/u8500_href.h b/include/configs/u8500_href.h index 1bb6128..218feeb 100644 --- a/include/configs/u8500_href.h +++ b/include/configs/u8500_href.h @@ -166,7 +166,6 @@ */ #define CONFIG_U8500_I2C #undef CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_I2C_SPEED 100000 #define CONFIG_SYS_I2C_SLAVE 0 /* slave addr of controller */ diff --git a/include/configs/uc100.h b/include/configs/uc100.h index 450c98b..ce122b4 100644 --- a/include/configs/uc100.h +++ b/include/configs/uc100.h @@ -464,13 +464,10 @@ */ /* enable I2C and select the hardware/software driver */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 93000 /* 93 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0xFE - -#ifdef CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 93000 /* 93 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE /* * Software (bit-bang) I2C driver configuration */ @@ -486,7 +483,6 @@ #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ -#endif /* CONFIG_SOFT_I2C */ /*----------------------------------------------------------------------- * I2C EEPROM (24C164) diff --git a/include/configs/utx8245.h b/include/configs/utx8245.h index 60d1503..4815664 100644 --- a/include/configs/utx8245.h +++ b/include/configs/utx8245.h @@ -235,8 +235,7 @@ protect on ${u-boot_startaddr} ${u-boot_endaddr}" *------------------------------------------------------------------*/ #if 1 #define CONFIG_HARD_I2C 1 /* To enable I2C support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_SPEED 400000 #define CONFIG_SYS_I2C_SLAVE 0x7F #endif diff --git a/include/configs/vct.h b/include/configs/vct.h index 7aeb668..fbdb728 100644 --- a/include/configs/vct.h +++ b/include/configs/vct.h @@ -245,11 +245,10 @@ /* * I2C/EEPROM */ -#undef CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SOFT_I2C /* I2C bit-banged */ - -#define CONFIG_SYS_I2C_SPEED 83000 /* 83 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SLAVE 0x7f +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED 83000 /* 83 kHz is supposed to work */ +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7f /* * Software (bit-bang) I2C driver configuration @@ -337,7 +336,7 @@ int vct_gpio_get(int pin); #undef CONFIG_CMD_USB #undef CONFIG_SMC911X -#undef CONFIG_SOFT_I2C +#undef CONFIG_SYS_I2C_SOFT #undef CONFIG_SOURCE #undef CONFIG_SYS_LONGHELP #undef CONFIG_TIMESTAMP diff --git a/include/configs/vl_ma2sc.h b/include/configs/vl_ma2sc.h index e2cf4f0..5c43c1b 100644 --- a/include/configs/vl_ma2sc.h +++ b/include/configs/vl_ma2sc.h @@ -147,10 +147,12 @@ #define CONFIG_SYS_I2C_SLAVE 0 /* not used */ #ifndef CONFIG_HARD_I2C -#define CONFIG_SOFT_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SOFT_SPEED CONFIG_SYS_I2C_SPEED +#define CONFIG_SYS_I2C_SOFT_SLAVE CONFIG_SYS_I2C_SLAVE /* Software I2C driver configuration */ - #define I2C_DELAY udelay(2500000/CONFIG_SYS_I2C_SPEED) #define AT91_PIN_SDA (1<<4) /* AT91C_PIO_PB4 */ diff --git a/include/configs/vme8349.h b/include/configs/vme8349.h index f97de54..54fbe8b 100644 --- a/include/configs/vme8349.h +++ b/include/configs/vme8349.h @@ -239,7 +239,6 @@ /* I2C */ #define CONFIG_I2C_MULTI_BUS #define CONFIG_HARD_I2C /* I2C with hardware support*/ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_FSL_I2C #define CONFIG_I2C_CMD_TREE #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ diff --git a/include/configs/zeus.h b/include/configs/zeus.h index b0c3bd5..75195bc 100644 --- a/include/configs/zeus.h +++ b/include/configs/zeus.h @@ -169,7 +169,6 @@ * I2C *----------------------------------------------------------------------*/ #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ #define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ #define CONFIG_SYS_I2C_SLAVE 0x7F diff --git a/include/i2c.h b/include/i2c.h index 3e09af9..f532a14 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -305,6 +305,15 @@ unsigned int i2c_get_bus_speed(void); * Adjusts I2C pointers after U-Boot is relocated to DRAM */ void i2c_reloc_fixup(void); +#if defined(CONFIG_SYS_I2C_SOFT) +void i2c_soft_init(void); +void i2c_soft_active(void); +void i2c_soft_tristate(void); +int i2c_soft_read(void); +void i2c_soft_sda(int bit); +void i2c_soft_scl(int bit); +void i2c_soft_delay(void); +#endif #else /* -- cgit v1.1 From 00f792e0df9ae942427e44595a0f4379582accee Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Wed, 24 Oct 2012 13:48:22 +0200 Subject: i2c, fsl_i2c: switch to new multibus/multiadapter support - added to fsl_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Heiko Schocher Cc: Simon Glass Cc: Stephen Warren --- include/configs/B4860QDS.h | 16 ++++++++-------- include/configs/BSC9131RDB.h | 11 +++++------ include/configs/BSC9132QDS.h | 17 ++++++++--------- include/configs/HWW1U1A.h | 18 +++++++++--------- include/configs/M5208EVBE.h | 10 +++++----- include/configs/M52277EVB.h | 10 +++++----- include/configs/M5235EVB.h | 10 +++++----- include/configs/M5253DEMO.h | 10 +++++----- include/configs/M5271EVB.h | 10 +++++----- include/configs/M5275EVB.h | 10 +++++----- include/configs/M53017EVB.h | 10 +++++----- include/configs/M5329EVB.h | 10 +++++----- include/configs/M5373EVB.h | 10 +++++----- include/configs/M54418TWR.h | 2 +- include/configs/M54451EVB.h | 10 +++++----- include/configs/M54455EVB.h | 10 +++++----- include/configs/M5475EVB.h | 10 +++++----- include/configs/M5485EVB.h | 10 +++++----- include/configs/MERGERBOX.h | 15 ++++++++------- include/configs/MPC8308RDB.h | 17 +++++++++-------- include/configs/MPC8313ERDB.h | 17 +++++++++-------- include/configs/MPC8315ERDB.h | 13 ++++++------- include/configs/MPC8323ERDB.h | 12 ++++++------ include/configs/MPC832XEMDS.h | 12 ++++++------ include/configs/MPC8349EMDS.h | 17 +++++++++-------- include/configs/MPC8349ITX.h | 22 +++++++++++----------- include/configs/MPC8360EMDS.h | 13 ++++++------- include/configs/MPC8360ERDK.h | 17 +++++++++-------- include/configs/MPC837XEMDS.h | 13 ++++++------- include/configs/MPC837XERDB.h | 13 ++++++------- include/configs/MPC8536DS.h | 17 +++++++++-------- include/configs/MPC8540ADS.h | 12 ++++++------ include/configs/MPC8541CDS.h | 12 ++++++------ include/configs/MPC8544DS.h | 12 ++++++------ include/configs/MPC8548CDS.h | 12 ++++++------ include/configs/MPC8555CDS.h | 12 ++++++------ include/configs/MPC8560ADS.h | 12 ++++++------ include/configs/MPC8568MDS.h | 17 +++++++++-------- include/configs/MPC8569MDS.h | 17 +++++++++-------- include/configs/MPC8572DS.h | 17 +++++++++-------- include/configs/MPC8610HPCD.h | 12 ++++++------ include/configs/MPC8641HPCN.h | 12 ++++++------ include/configs/MVBLM7.h | 16 ++++++++-------- include/configs/P1010RDB.h | 17 +++++++++-------- include/configs/P1022DS.h | 16 ++++++++-------- include/configs/P1023RDB.h | 15 ++++++++------- include/configs/P1023RDS.h | 15 ++++++++------- include/configs/P1_P2_RDB.h | 18 +++++++++--------- include/configs/P2020COME.h | 16 ++++++++-------- include/configs/P2020DS.h | 17 +++++++++-------- include/configs/P2041RDB.h | 16 ++++++++-------- include/configs/SIMPC8313.h | 17 +++++++++-------- include/configs/TQM834x.h | 10 +++++----- include/configs/astro_mcf5373l.h | 10 +++++----- include/configs/controlcenterd.h | 17 ++++++++--------- include/configs/corenet_ds.h | 16 ++++++++-------- include/configs/eb_cpu5282.h | 10 +++++----- include/configs/km/km83xx-common.h | 27 +++++++++++++++++---------- include/configs/mpc8308_p1m.h | 15 ++++++++------- include/configs/mpq101.h | 16 +++++++++------- include/configs/p1_p2_rdb_pc.h | 18 +++++++++--------- include/configs/sbc8349.h | 17 +++++++++-------- include/configs/sbc8548.h | 10 +++++----- include/configs/sbc8641d.h | 12 ++++++------ include/configs/socrates.h | 16 ++++++++-------- include/configs/stxgp3.h | 11 ++++++----- include/configs/stxssa.h | 10 +++++----- include/configs/t4qds.h | 17 +++++++++-------- include/configs/vme8349.h | 19 +++++++++---------- include/configs/xpedite517x.h | 15 ++++++++------- include/configs/xpedite520x.h | 15 ++++++++------- include/configs/xpedite537x.h | 16 +++++++++------- include/configs/xpedite550x.h | 15 ++++++++------- 73 files changed, 519 insertions(+), 495 deletions(-) (limited to 'include') diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h index a823f9f..43d0e7d 100644 --- a/include/configs/B4860QDS.h +++ b/include/configs/B4860QDS.h @@ -459,14 +459,14 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed in Hz */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x118000 -#define CONFIG_SYS_I2C2_OFFSET 0x119000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL /* Use FSL common I2C driver */ +#define CONFIG_SYS_FSL_I2C_SPEED 400000 /* I2C speed in Hz */ +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 /* I2C speed in Hz */ +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x118000 +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x119000 /* * RTC configuration diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h index a3f6440..15ab6d0 100644 --- a/include/configs/BSC9131RDB.h +++ b/include/configs/BSC9131RDB.h @@ -275,12 +275,11 @@ extern unsigned long get_sdram_size(void); #define CONFIG_FIT #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 /* I2C EEPROM */ #define CONFIG_CMD_EEPROM diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h index 3aa4443..7d5a8e6 100644 --- a/include/configs/BSC9132QDS.h +++ b/include/configs/BSC9132QDS.h @@ -451,15 +451,14 @@ combinations. this should be removed later #define CONFIG_FIT #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#undef CONFIG_SOFT_I2C /* I2C bit-banged */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400800 /* I2C speed and slave address*/ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400800 /* I2C speed and slave address*/ +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_SPEED 400800 /* I2C speed and slave address*/ +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* I2C EEPROM */ #define CONFIG_ID_EEPROM diff --git a/include/configs/HWW1U1A.h b/include/configs/HWW1U1A.h index 2b72a33..0284f45 100644 --- a/include/configs/HWW1U1A.h +++ b/include/configs/HWW1U1A.h @@ -218,16 +218,16 @@ /* -------------------------------------------------------------------- */ /* Generic FreeScale hardware I2C support */ -#define CONFIG_HARD_I2C -#define CONFIG_FSL_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } #define CONFIG_CMD_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 - -/* I2C bus configuration */ -#define CONFIG_SYS_I2C_SPEED 400000 -#define CONFIG_SYS_I2C_SLAVE 0x7F /* DDR2 SO-RDIMM SPD EEPROM is at I2C0-0x51 */ #define CONFIG_SYS_SPD_BUS_NUM 0 diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h index 209c122..8410d8b 100644 --- a/include/configs/M5208EVBE.h +++ b/include/configs/M5208EVBE.h @@ -82,11 +82,11 @@ #undef CONFIG_MCFPIT /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_BOOTDELAY 1 /* autoboot after 5 seconds */ diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h index b1bdac2..4275088 100644 --- a/include/configs/M52277EVB.h +++ b/include/configs/M52277EVB.h @@ -145,11 +145,11 @@ #undef CONFIG_MCFPIT /* I2c */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 80000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR /* DSPI and Serial Flash */ diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h index dfc2ddf..3ba4d14 100644 --- a/include/configs/M5235EVB.h +++ b/include/configs/M5235EVB.h @@ -99,11 +99,11 @@ #undef CONFIG_MCFPIT /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x00000300 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_i2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x00000300 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_SYS_I2C_PINMUX_REG (gpio->par_qspi) #define CONFIG_SYS_I2C_PINMUX_CLR ~(GPIO_PAR_FECI2C_SCL_MASK | GPIO_PAR_FECI2C_SDA_MASK) diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h index fe1cca5..eb375f0 100644 --- a/include/configs/M5253DEMO.h +++ b/include/configs/M5253DEMO.h @@ -114,11 +114,11 @@ #define CONFIG_HOSTNAME M5253DEMO /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x00000280 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x00000280 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_SYS_I2C_PINMUX_REG (*(u32 *) (CONFIG_SYS_MBAR+0x19C)) #define CONFIG_SYS_I2C_PINMUX_CLR (0xFFFFE7FF) diff --git a/include/configs/M5271EVB.h b/include/configs/M5271EVB.h index e8a8998..9ca850e 100644 --- a/include/configs/M5271EVB.h +++ b/include/configs/M5271EVB.h @@ -109,11 +109,11 @@ #endif /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x00000300 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x00000300 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_BOOTDELAY 1 /* autoboot after 1 seconds */ diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h index fbf0c9d..9d2dfa0 100644 --- a/include/configs/M5275EVB.h +++ b/include/configs/M5275EVB.h @@ -109,11 +109,11 @@ #endif /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x00000300 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x00000300 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_SYS_I2C_PINMUX_REG (gpio_reg->par_feci2c) #define CONFIG_SYS_I2C_PINMUX_CLR (0xFFF0) diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h index bedba2b..4bb693a 100644 --- a/include/configs/M53017EVB.h +++ b/include/configs/M53017EVB.h @@ -101,11 +101,11 @@ #undef CONFIG_MCFPIT /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_BOOTDELAY 1 /* autoboot after 5 seconds */ diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index 06fa57c..23ee61e 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -95,11 +95,11 @@ #undef CONFIG_MCFPIT /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_BOOTDELAY 1 /* autoboot after 5 seconds */ diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index faa4f86..bbfef90 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -95,11 +95,11 @@ #undef CONFIG_MCFPIT /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR #define CONFIG_BOOTDELAY 1 /* autoboot after 5 seconds */ diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h index 627c1ae..817d79e 100644 --- a/include/configs/M54418TWR.h +++ b/include/configs/M54418TWR.h @@ -213,7 +213,7 @@ #undef CONFIG_MCFPIT /* I2c */ -#undef CONFIG_FSL_I2C +#undef CONFIG_SYS_FSL_I2C #undef CONFIG_HARD_I2C /* I2C with hardware support */ #undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ /* I2C speed and slave address */ diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h index 5dbe0b4..85cd464 100644 --- a/include/configs/M54451EVB.h +++ b/include/configs/M54451EVB.h @@ -156,11 +156,11 @@ #undef CONFIG_MCFPIT /* I2c */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 80000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR /* DSPI and Serial Flash */ diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h index 8246e68..aa7e9f8 100644 --- a/include/configs/M54455EVB.h +++ b/include/configs/M54455EVB.h @@ -189,11 +189,11 @@ #undef CONFIG_MCFPIT /* I2c */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 80000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSLI2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR /* DSPI and Serial Flash */ diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h index 6e9cba0..5377a51 100644 --- a/include/configs/M5475EVB.h +++ b/include/configs/M5475EVB.h @@ -120,11 +120,11 @@ #endif /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x00008F00 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x00008F00 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR /* PCI */ diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h index 24f28e0..316e07c 100644 --- a/include/configs/M5485EVB.h +++ b/include/configs/M5485EVB.h @@ -117,11 +117,11 @@ #endif /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x00008F00 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x00008F00 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR /* PCI */ diff --git a/include/configs/MERGERBOX.h b/include/configs/MERGERBOX.h index 2496639..0f17411 100644 --- a/include/configs/MERGERBOX.h +++ b/include/configs/MERGERBOX.h @@ -224,13 +224,14 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 120000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* * General PCI diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h index f10555c..44caa59 100644 --- a/include/configs/MPC8308RDB.h +++ b/include/configs/MPC8308RDB.h @@ -350,14 +350,15 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } /* * SPI on header J8 diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h index 1d753e7..e6c60b3 100644 --- a/include/configs/MPC8313ERDB.h +++ b/include/configs/MPC8313ERDB.h @@ -403,14 +403,15 @@ #define CONFIG_SYS_HUSH_PARSER /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* * General PCI diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h index ee806c4..2f5addc 100644 --- a/include/configs/MPC8315ERDB.h +++ b/include/configs/MPC8315ERDB.h @@ -347,13 +347,12 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave addr */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x51} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } /* * Board info - revision and where boot from diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h index d32b14a..d5db65d 100644 --- a/include/configs/MPC8323ERDB.h +++ b/include/configs/MPC8323ERDB.h @@ -233,12 +233,12 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x51} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } /* * Config on-board EEPROM diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h index a35c6b6..beee190 100644 --- a/include/configs/MPC832XEMDS.h +++ b/include/configs/MPC832XEMDS.h @@ -326,12 +326,12 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x51} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } /* * Config on-board RTC diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h index 7c3f35c..754a9eb 100644 --- a/include/configs/MPC8349EMDS.h +++ b/include/configs/MPC8349EMDS.h @@ -354,14 +354,15 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* SPI */ #define CONFIG_MPC8XXX_SPI diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h index c67ffdb..0d5a026 100644 --- a/include/configs/MPC8349ITX.h +++ b/include/configs/MPC8349ITX.h @@ -90,7 +90,7 @@ #define CONFIG_PCI #define CONFIG_RTC_DS1337 -#define CONFIG_HARD_I2C +#define CONFIG_SYS_I2C #define CONFIG_TSEC_ENET /* TSEC Ethernet support */ /* @@ -98,12 +98,15 @@ */ /* I2C */ -#ifdef CONFIG_HARD_I2C +#ifdef CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 #define CONFIG_SYS_SPD_BUS_NUM 1 /* The I2C bus for SPD */ #define CONFIG_SYS_RTC_BUS_NUM 1 /* The I2C bus for RTC */ @@ -115,9 +118,6 @@ #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* I2C1, DS1339 RTC*/ #define SPD_EEPROM_ADDRESS 0x51 /* I2C1, DDR */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - /* Don't probe these addresses: */ #define CONFIG_SYS_I2C_NOPROBES { {1, CONFIG_SYS_I2C_8574_ADDR1}, \ {1, CONFIG_SYS_I2C_8574_ADDR2}, \ @@ -197,7 +197,7 @@ #define CONFIG_VERY_BIG_RAM #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)256 << 20) -#ifdef CONFIG_HARD_I2C +#ifdef CONFIG_SYS_I2C #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/ #endif @@ -543,7 +543,7 @@ boards, we say we have two, but don't display a message if we find only one. */ #define CONFIG_CMD_PCI #endif -#ifdef CONFIG_HARD_I2C +#ifdef CONFIG_SYS_I2C #define CONFIG_CMD_I2C #endif diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h index 4d6486b..2b7af86 100644 --- a/include/configs/MPC8360EMDS.h +++ b/include/configs/MPC8360EMDS.h @@ -423,13 +423,12 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x52} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x52} } /* * Config on-board RTC diff --git a/include/configs/MPC8360ERDK.h b/include/configs/MPC8360ERDK.h index 29e7719..f189039 100644 --- a/include/configs/MPC8360ERDK.h +++ b/include/configs/MPC8360ERDK.h @@ -287,14 +287,15 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES { {0, 0x52} } /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x52} } /* * General PCI diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h index 91c8a34..cb0863d 100644 --- a/include/configs/MPC837XEMDS.h +++ b/include/configs/MPC837XEMDS.h @@ -341,13 +341,12 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x51} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } /* * Config on-board RTC diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h index 3279e3c..d014e68 100644 --- a/include/configs/MPC837XERDB.h +++ b/include/configs/MPC837XERDB.h @@ -367,13 +367,12 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x51} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} } /* * Config on-board RTC diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h index f560b56..052fb54 100644 --- a/include/configs/MPC8536DS.h +++ b/include/configs/MPC8536DS.h @@ -434,14 +434,15 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {{0, 0x29}} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } /* * I2C2 EEPROM diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h index a42dec4..25638ac 100644 --- a/include/configs/MPC8540ADS.h +++ b/include/configs/MPC8540ADS.h @@ -260,12 +260,12 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* RapidIO MMU */ #define CONFIG_SYS_RIO_MEM_VIRT 0xc0000000 /* base address */ diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h index 13011b5..a486347 100644 --- a/include/configs/MPC8541CDS.h +++ b/include/configs/MPC8541CDS.h @@ -283,12 +283,12 @@ extern unsigned long get_clock_freq(void); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* EEPROM */ #define CONFIG_ID_EEPROM diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index b00468e..48a3ea1 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -232,13 +232,13 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3100 /* * General PCI diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index 50e318c..2a1de52 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -358,12 +358,12 @@ extern unsigned long get_clock_freq(void); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* EEPROM */ #define CONFIG_ID_EEPROM diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h index 388ba9b..d4a395f 100644 --- a/include/configs/MPC8555CDS.h +++ b/include/configs/MPC8555CDS.h @@ -281,12 +281,12 @@ extern unsigned long get_clock_freq(void); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* EEPROM */ #define CONFIG_ID_EEPROM diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h index 04f6a65..7a62311 100644 --- a/include/configs/MPC8560ADS.h +++ b/include/configs/MPC8560ADS.h @@ -254,12 +254,12 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* RapidIO MMU */ #define CONFIG_SYS_RIO_MEM_VIRT 0xc0000000 /* base address */ diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h index 05a69af..6cda16b 100644 --- a/include/configs/MPC8568MDS.h +++ b/include/configs/MPC8568MDS.h @@ -266,15 +266,16 @@ extern unsigned long get_clock_freq(void); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 /* * General PCI diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index 23bd908..e36aade 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -302,14 +302,15 @@ extern unsigned long get_clock_freq(void); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* * I2C2 EEPROM diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h index 45abcf6..f794fdb 100644 --- a/include/configs/MPC8572DS.h +++ b/include/configs/MPC8572DS.h @@ -431,15 +431,16 @@ #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {{0,0x29}}/* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 /* * I2C2 EEPROM diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index 0a2e39b..1553a74 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -252,12 +252,12 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* * General PCI diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h index 3ac5b2b..6d6058f 100644 --- a/include/configs/MPC8641HPCN.h +++ b/include/configs/MPC8641HPCN.h @@ -298,12 +298,12 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* * RapidIO MMU diff --git a/include/configs/MVBLM7.h b/include/configs/MVBLM7.h index afd4c03..8342a1a 100644 --- a/include/configs/MVBLM7.h +++ b/include/configs/MVBLM7.h @@ -44,7 +44,6 @@ #define CONFIG_PCI #define CONFIG_PCI_INDIRECT_BRIDGE #define CONFIG_PCI_SKIP_HOST_BRIDGE -#define CONFIG_HARD_I2C #define CONFIG_TSEC_ENET #define CONFIG_MPC8XXX_SPI #define CONFIG_HARD_SPI @@ -52,13 +51,14 @@ #define CONFIG_MISC_INIT_R /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 - -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 100000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 100000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* * DDR Setup diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index ed1a429..ba0a396 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -489,14 +489,15 @@ extern unsigned long get_sdram_size(void); #define CONFIG_FIT #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +/* I2C */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* I2C EEPROM */ #undef CONFIG_ID_EEPROM diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index 9c27182..4007647 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -361,15 +361,15 @@ #define CONFIG_FIT_VERBOSE /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 #define CONFIG_SYS_I2C_NOPROBES {{0, 0x29}} -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 /* * I2C2 EEPROM diff --git a/include/configs/P1023RDB.h b/include/configs/P1023RDB.h index fee8040..f21d9e8 100644 --- a/include/configs/P1023RDB.h +++ b/include/configs/P1023RDB.h @@ -204,13 +204,14 @@ extern unsigned long get_clock_freq(void); #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* * I2C2 EEPROM diff --git a/include/configs/P1023RDS.h b/include/configs/P1023RDS.h index f6ee251..7e2679b 100644 --- a/include/configs/P1023RDS.h +++ b/include/configs/P1023RDS.h @@ -313,14 +313,15 @@ extern unsigned long get_clock_freq(void); #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x51 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 /* * I2C2 EEPROM diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h index 699e9eb..b86637c 100644 --- a/include/configs/P1_P2_RDB.h +++ b/include/configs/P1_P2_RDB.h @@ -367,15 +367,15 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {{0,0x29}} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } /* * I2C2 EEPROM diff --git a/include/configs/P2020COME.h b/include/configs/P2020COME.h index c8f5a85..3266e54 100644 --- a/include/configs/P2020COME.h +++ b/include/configs/P2020COME.h @@ -225,15 +225,15 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_FIT_VERBOSE 1 /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 #define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 /* * I2C2 EEPROM diff --git a/include/configs/P2020DS.h b/include/configs/P2020DS.h index 229117c..94b77d1 100644 --- a/include/configs/P2020DS.h +++ b/include/configs/P2020DS.h @@ -387,15 +387,16 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {{0,0x29}}/* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } /* * I2C2 EEPROM diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index 4ea8717..2c2b609 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -367,14 +367,14 @@ unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x118000 -#define CONFIG_SYS_I2C2_OFFSET 0x118100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* * RapidIO diff --git a/include/configs/SIMPC8313.h b/include/configs/SIMPC8313.h index 318c4c5..e127d6f 100644 --- a/include/configs/SIMPC8313.h +++ b/include/configs/SIMPC8313.h @@ -245,14 +245,15 @@ #define CONFIG_SYS_HUSH_PARSER /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* * General PCI diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h index f22eb35..89b6db6 100644 --- a/include/configs/TQM834x.h +++ b/include/configs/TQM834x.h @@ -187,11 +187,11 @@ /* * I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed: 400KHz */ -#define CONFIG_SYS_I2C_SLAVE 0x7F /* slave address */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 /* I2C EEPROM, configuration for onboard EEPROMs 24C256 and 24C32 */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* 1010000x */ diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h index 6dabe57..f641959 100644 --- a/include/configs/astro_mcf5373l.h +++ b/include/configs/astro_mcf5373l.h @@ -116,11 +116,11 @@ #undef CONFIG_MCFPIT /* I2C */ -#define CONFIG_FSL_I2C -#define CONFIG_HARD_I2C /* I2C with hw support */ -#define CONFIG_SYS_I2C_SPEED 80000 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x58000 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 80000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x58000 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR /* diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h index cdd79f0..c6aad01 100644 --- a/include/configs/controlcenterd.h +++ b/include/configs/controlcenterd.h @@ -192,15 +192,14 @@ /* * I2C */ -#define CONFIG_HARD_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_CMD_I2C - -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 -#define CONFIG_SYS_I2C_SPEED 400000 -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* Probing DP501 I2C-Bridge will hang */ #define CONFIG_SYS_I2C_NOPROBES { {0, 0x30}, {0, 0x37}, {0, 0x3a}, \ {0, 0x3b}, {0, 0x50} } diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 66c7b4f..41f33d9 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -362,14 +362,14 @@ #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x118000 -#define CONFIG_SYS_I2C2_OFFSET 0x118100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x118000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x118100 /* * RapidIO diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h index 459f568..6e734df 100644 --- a/include/configs/eb_cpu5282.h +++ b/include/configs/eb_cpu5282.h @@ -262,14 +262,14 @@ * I2C */ -#define CONFIG_HARD_I2C -#define CONFIG_FSL_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL -#define CONFIG_SYS_I2C_OFFSET 0x00000300 +#define CONFIG_SYS_FSL_I2C_OFFSET 0x00000300 #define CONFIG_SYS_IMMR CONFIG_SYS_MBAR -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_SYS_I2C_SLAVE 0 +#define CONFIG_SYS_FSL_I2C_SPEED 100000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0 #ifdef CONFIG_CMD_DATE #define CONFIG_RTC_DS1338 diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h index 5a430ed..a6f8ebd 100644 --- a/include/configs/km/km83xx-common.h +++ b/include/configs/km/km83xx-common.h @@ -204,14 +204,21 @@ #endif /* CFG_SYS_RAMBOOT */ /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 200000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS 1 -#define CONFIG_I2C_MUX +#define CONFIG_SYS_I2C +#define CONFIG_SYS_NUM_I2C_BUSES 4 +#define CONFIG_SYS_I2C_MAX_HOPS 1 +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 200000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 200000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_BUSES {{0, {I2C_NULL_HOP} }, \ + {0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \ + {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \ + {1, {I2C_NULL_HOP} } } /* I2C SYSMON (LM75, AD7414 is almost compatible) */ #define CONFIG_DTT_LM75 /* ON Semi's LM75 */ @@ -219,7 +226,7 @@ #define CONFIG_SYS_DTT_MAX_TEMP 70 #define CONFIG_SYS_DTT_LOW_TEMP -30 #define CONFIG_SYS_DTT_HYSTERESIS 3 -#define CONFIG_SYS_DTT_BUS_NUM (CONFIG_SYS_MAX_I2C_BUS) +#define CONFIG_SYS_DTT_BUS_NUM 1 #if defined(CONFIG_CMD_NAND) #define CONFIG_NAND_KMETER1 @@ -315,7 +322,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ CONFIG_KM_DEF_ARCH \ - "EEprom_ivm=pca9547:70:9\0" \ + "EEprom_ivm=2\0" \ "newenv=" \ "prot off 0xF00C0000 +0x40000 && " \ "era 0xF00C0000 +0x40000\0" \ diff --git a/include/configs/mpc8308_p1m.h b/include/configs/mpc8308_p1m.h index 3c7a85e..517d6f3 100644 --- a/include/configs/mpc8308_p1m.h +++ b/include/configs/mpc8308_p1m.h @@ -327,13 +327,14 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* * General PCI diff --git a/include/configs/mpq101.h b/include/configs/mpq101.h index 339c736..8ca3f76 100644 --- a/include/configs/mpq101.h +++ b/include/configs/mpq101.h @@ -221,13 +221,15 @@ /* * I2C buses and peripherals */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7f -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* I2C RTC - M41T81 */ #define CONFIG_RTC_M41T62 diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index d0a6b17..1d1ad3d 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -534,16 +534,16 @@ #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C spd and slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} } #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {{0, 0x29}} /* Don't probe this addr */ -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 #define CONFIG_SYS_SPD_BUS_NUM 1 /* For rom_loc and flash bank */ /* diff --git a/include/configs/sbc8349.h b/include/configs/sbc8349.h index 7a79e8c..9925d30 100644 --- a/include/configs/sbc8349.h +++ b/include/configs/sbc8349.h @@ -304,14 +304,15 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS 1 /* I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_FSL_I2C -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C1_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 -#define CONFIG_SYS_I2C_OFFSET CONFIG_SYS_I2C2_OFFSET +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69}, {1, 0x69} } /* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SYS_SPD_BUS_NUM... */ /* TSEC */ diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h index 354691a..e700436 100644 --- a/include/configs/sbc8548.h +++ b/include/configs/sbc8548.h @@ -444,12 +444,12 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 /* * General PCI diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h index 147e0ae..b83658d 100644 --- a/include/configs/sbc8641d.h +++ b/include/configs/sbc8641d.h @@ -289,12 +289,12 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* * RapidIO MMU diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 19869e6..f1323ec 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -235,14 +235,14 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 102124 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 - -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 102124 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 102124 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* I2C RTC */ #define CONFIG_RTC_RX8025 /* Use Epson rx8025 rtc via i2c */ diff --git a/include/configs/stxgp3.h b/include/configs/stxgp3.h index b688b45..d7c0797 100644 --- a/include/configs/stxgp3.h +++ b/include/configs/stxgp3.h @@ -178,17 +178,18 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 + #if 0 #define CONFIG_SYS_I2C_NOPROBES {0x00} /* Don't probe these addrs */ #else /* I did the 'if 0' so we could keep the syntax above if ever needed. */ #undef CONFIG_SYS_I2C_NOPROBES #endif -#define CONFIG_SYS_I2C_OFFSET 0x3000 /* RapdIO Map configuration, mapped 1:1. */ diff --git a/include/configs/stxssa.h b/include/configs/stxssa.h index 4c3c086..3e3ede4 100644 --- a/include/configs/stxssa.h +++ b/include/configs/stxssa.h @@ -198,12 +198,12 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 #undef CONFIG_SYS_I2C_NOPROBES -#define CONFIG_SYS_I2C_OFFSET 0x3000 /* I2C RTC */ #define CONFIG_RTC_DS1337 /* This is really a DS1339 RTC */ diff --git a/include/configs/t4qds.h b/include/configs/t4qds.h index 92b2179..f7999fc 100644 --- a/include/configs/t4qds.h +++ b/include/configs/t4qds.h @@ -445,14 +445,15 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */ /* I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x118000 -#define CONFIG_SYS_I2C2_OFFSET 0x118100 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 100000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x118000 +#define CONFIG_SYS_FSL_I2C2_SPEED 100000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x118100 + #define I2C_MUX_PCA_ADDR_PRI 0x77 /* I2C bus multiplexer,primary */ #define I2C_MUX_PCA_ADDR_SEC 0x76 /* I2C bus multiplexer,secondary */ diff --git a/include/configs/vme8349.h b/include/configs/vme8349.h index 54fbe8b..222f4ce 100644 --- a/include/configs/vme8349.h +++ b/include/configs/vme8349.h @@ -237,16 +237,15 @@ #define CONFIG_OF_STDOUT_VIA_ALIAS /* I2C */ -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_HARD_I2C /* I2C with hardware support*/ -#define CONFIG_FSL_I2C -#define CONFIG_I2C_CMD_TREE -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* Don't probe these addrs */ -#define CONFIG_SYS_I2C1_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 -#define CONFIG_SYS_I2C_OFFSET CONFIG_SYS_I2C1_OFFSET +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SYS_SPD_BUS_NUM... */ #define CONFIG_SYS_I2C_8574_ADDR2 0x20 /* I2C1, PCF8574 */ diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h index f28f443..719a490 100644 --- a/include/configs/xpedite517x.h +++ b/include/configs/xpedite517x.h @@ -258,13 +258,14 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 100000 /* M41T00 only supports 100 KHz */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 100000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 100000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* PEX8518 slave I2C interface */ #define CONFIG_SYS_I2C_PEX8518_ADDR 0x70 diff --git a/include/configs/xpedite520x.h b/include/configs/xpedite520x.h index 3034a3c..e55635c 100644 --- a/include/configs/xpedite520x.h +++ b/include/configs/xpedite520x.h @@ -220,13 +220,14 @@ /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* I2C EEPROM */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h index 43359a2..bdfe0ba 100644 --- a/include/configs/xpedite537x.h +++ b/include/configs/xpedite537x.h @@ -258,13 +258,15 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* PEX8518 slave I2C interface */ #define CONFIG_SYS_I2C_PEX8518_ADDR 0x70 diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h index a171085..a8be3f6 100644 --- a/include/configs/xpedite550x.h +++ b/include/configs/xpedite550x.h @@ -249,13 +249,14 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); /* * I2C */ -#define CONFIG_FSL_I2C /* Use FSL common I2C driver */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_OFFSET 0x3000 -#define CONFIG_SYS_I2C2_OFFSET 0x3100 -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_FSL +#define CONFIG_SYS_FSL_I2C_SPEED 400000 +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 +#define CONFIG_SYS_FSL_I2C2_SPEED 400000 +#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F +#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 /* I2C DS7505 temperature sensor */ #define CONFIG_DTT_LM75 -- cgit v1.1 From 9a2accb44f871af9c87c34d1c9ac95010f4e6f09 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Thu, 25 Oct 2012 10:32:14 +0200 Subject: i2c, multibus: get rid of CONFIG_I2C_MUX CONFIG_I2C_MUX is replaced through the new i2c multibus/multiadapter framework, configured through CONFIG_SYS_I2C. As CONFIG_I2C_MUX is only used on the keymile boards, and they are now completely moved to the new framework, remove CONFIG_I2C_MUX. Signed-off-by: Heiko Schocher Cc: Holger Brunck Tested-By: Holger Brunck --- include/i2c.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'include') diff --git a/include/i2c.h b/include/i2c.h index f532a14..a8074ac 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -197,27 +197,6 @@ void i2c_init_board(void); void i2c_board_late_init(void); #endif -#if defined(CONFIG_I2C_MUX) - -typedef struct _mux { - uchar chip; - uchar channel; - char *name; - struct _mux *next; -} I2C_MUX; - -typedef struct _mux_device { - int busid; - I2C_MUX *mux; /* List of muxes, to reach the device */ - struct _mux_device *next; -} I2C_MUX_DEVICE; - -I2C_MUX_DEVICE *i2c_mux_search_device(int id); -I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf); -int i2x_mux_select_mux(int bus); -int i2c_mux_ident_muxstring_f (uchar *buf); -#endif - #ifdef CONFIG_SYS_I2C /* * i2c_get_bus_num: -- cgit v1.1 From f3e9361771af69b12699c8e58b174d72f0bb545e Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Thu, 25 Oct 2012 11:07:00 +0200 Subject: i2c, multibus, keymile: get rid of EEprom_ivm envvariable as the keymile boards use now the new i2c multibus/multiadapter framework, remove the EEprom_ivm Environmentvar, as not longer needed. Signed-off-by: Heiko Schocher Cc: Holger Brunck Tested-By: Holger Brunck --- include/configs/km/km83xx-common.h | 3 ++- include/configs/km/km_arm.h | 1 - include/configs/km82xx.h | 3 ++- include/configs/km_kirkwood.h | 12 ++++++------ 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h index a6f8ebd..8f97f67 100644 --- a/include/configs/km/km83xx-common.h +++ b/include/configs/km/km83xx-common.h @@ -220,6 +220,8 @@ {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \ {1, {I2C_NULL_HOP} } } +#define CONFIG_KM_IVM_BUS 2 /* I2C2 (Mux-Port 1)*/ + /* I2C SYSMON (LM75, AD7414 is almost compatible) */ #define CONFIG_DTT_LM75 /* ON Semi's LM75 */ #define CONFIG_DTT_SENSORS {0, 1, 2, 3} /* Sensor addresses */ @@ -322,7 +324,6 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ CONFIG_KM_DEF_ARCH \ - "EEprom_ivm=2\0" \ "newenv=" \ "prot off 0xF00C0000 +0x40000 && " \ "era 0xF00C0000 +0x40000\0" \ diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index c2c67c1..ebbfa84 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -309,7 +309,6 @@ int get_scl(void); CONFIG_KM_DEF_ENV \ CONFIG_KM_NEW_ENV \ "arch=arm\0" \ - "EEprom_ivm=" __stringify(KM_IVM_BUS) "\0" \ "" #if defined(CONFIG_SYS_NO_FLASH) diff --git a/include/configs/km82xx.h b/include/configs/km82xx.h index 54041f3..4278be2 100644 --- a/include/configs/km82xx.h +++ b/include/configs/km82xx.h @@ -212,7 +212,6 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_BOARD_EXTRA_ENV \ CONFIG_KM_DEF_ENV \ - "EEprom_ivm=1\0" \ "unlock=yes\0" \ "newenv=" \ "prot off 0xFE0C0000 +0x40000 && " \ @@ -253,6 +252,8 @@ {0, {{I2C_MUX_PCA9542, 0x70, 0} } }, \ {0, {{I2C_MUX_PCA9542, 0x70, 1} } } } +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ + /* * Software (bit-bang) I2C driver configuration */ diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h index a0ad47e..5f3e444 100644 --- a/include/configs/km_kirkwood.h +++ b/include/configs/km_kirkwood.h @@ -42,18 +42,18 @@ #define CONFIG_IDENT_STRING "\nKeymile Kirkwood" #define CONFIG_HOSTNAME km_kirkwood #define CONFIG_KM_DISABLE_PCIE -#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ /* KM_KIRKWOOD_PCI */ #elif defined(CONFIG_KM_KIRKWOOD_PCI) #define CONFIG_IDENT_STRING "\nKeymile Kirkwood PCI" #define CONFIG_HOSTNAME km_kirkwood_pci -#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #define CONFIG_KM_FPGA_CONFIG /* KM_NUSA */ #elif defined(CONFIG_KM_NUSA) -#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #define CONFIG_IDENT_STRING "\nKeymile NUSA" #define CONFIG_HOSTNAME kmnusa #undef CONFIG_SYS_KWD_CONFIG @@ -69,7 +69,7 @@ #elif defined(CONFIG_KM_MGCOGE3UN) #define CONFIG_IDENT_STRING "\nKeymile COGE3UN" #define CONFIG_HOSTNAME mgcoge3un -#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #undef CONFIG_SYS_KWD_CONFIG #define CONFIG_SYS_KWD_CONFIG \ $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-memphis.cfg @@ -81,7 +81,7 @@ /* KMCOGE5UN */ #elif defined(CONFIG_KM_COGE5UN) #define CONFIG_IDENT_STRING "\nKeymile COGE5UN" -#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #undef CONFIG_SYS_KWD_CONFIG #define CONFIG_SYS_KWD_CONFIG \ $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage_256M8_1.cfg @@ -95,7 +95,7 @@ #elif defined(CONFIG_KM_PORTL2) #define CONFIG_IDENT_STRING "\nKeymile Port-L2" #define CONFIG_HOSTNAME portl2 -#define KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_IVM_BUS 1 /* I2C2 (Mux-Port 1)*/ #define CONFIG_KM_PIGGY4_88E6061 /* KM_SUV31 */ -- cgit v1.1 From 1f2ba722ac06393d6abe6d4734824d3b98ea9108 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 30 Oct 2012 07:28:53 +0000 Subject: tegra: i2c: Enable new CONFIG_SYS_I2C framework This enables CONFIG_SYS_I2C on Tegra, updating existing boards and the Tegra i2c driver to support this. Signed-off-by: Simon Glass Signed-off-by: Heiko Schocher --- include/configs/beaver.h | 5 ++--- include/configs/cardhu.h | 3 ++- include/configs/dalmore.h | 3 ++- include/configs/seaboard.h | 5 ++--- include/configs/tegra-common-post.h | 4 ++-- include/configs/trimslice.h | 5 ++--- include/configs/whistler.h | 5 ++--- 7 files changed, 14 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/configs/beaver.h b/include/configs/beaver.h index 628d5d3..801caca 100644 --- a/include/configs/beaver.h +++ b/include/configs/beaver.h @@ -41,12 +41,11 @@ #define CONFIG_BOARD_EARLY_INIT_F /* I2C */ -#define CONFIG_TEGRA_I2C +#define CONFIG_SYS_I2C_TEGRA #define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS TEGRA_I2C_NUM_CONTROLLERS #define CONFIG_SYS_I2C_SPEED 100000 #define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C /* SD/MMC */ #define CONFIG_MMC diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h index 142d20b..4abb03e 100644 --- a/include/configs/cardhu.h +++ b/include/configs/cardhu.h @@ -40,12 +40,13 @@ #define CONFIG_BOARD_EARLY_INIT_F /* I2C */ -#define CONFIG_TEGRA_I2C +#define CONFIG_SYS_I2C_TEGRA #define CONFIG_SYS_I2C_INIT_BOARD #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_MAX_I2C_BUS TEGRA_I2C_NUM_CONTROLLERS #define CONFIG_SYS_I2C_SPEED 100000 #define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C /* SD/MMC */ #define CONFIG_MMC diff --git a/include/configs/dalmore.h b/include/configs/dalmore.h index b6e0161..145e7ac 100644 --- a/include/configs/dalmore.h +++ b/include/configs/dalmore.h @@ -43,12 +43,13 @@ #define CONFIG_BOARD_EARLY_INIT_F /* I2C */ -#define CONFIG_TEGRA_I2C +#define CONFIG_SYS_I2C_TEGRA #define CONFIG_SYS_I2C_INIT_BOARD #define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_MAX_I2C_BUS TEGRA_I2C_NUM_CONTROLLERS #define CONFIG_SYS_I2C_SPEED 100000 #define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C /* SD/MMC */ #define CONFIG_MMC diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index f0da1fc..4048b6e 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -57,12 +57,11 @@ #define CONFIG_BOARD_LATE_INIT /* Make sure LCD init is complete */ /* I2C */ -#define CONFIG_TEGRA_I2C +#define CONFIG_SYS_I2C_TEGRA #define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS 4 #define CONFIG_SYS_I2C_SPEED 100000 #define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C /* SD/MMC */ #define CONFIG_MMC diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 6ed2fde..b784263 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -165,8 +165,8 @@ #endif /* remove I2C support */ -#ifdef CONFIG_TEGRA_I2C -#undef CONFIG_TEGRA_I2C +#ifdef CONFIG_SYS_I2C_TEGRA +#undef CONFIG_SYS_I2C_TEGRA #endif #ifdef CONFIG_CMD_I2C #undef CONFIG_CMD_I2C diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h index b925314..209c60e 100644 --- a/include/configs/trimslice.h +++ b/include/configs/trimslice.h @@ -54,12 +54,11 @@ #define CONFIG_CMD_SF /* I2C */ -#define CONFIG_TEGRA_I2C +#define CONFIG_SYS_I2C_TEGRA #define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS 4 #define CONFIG_SYS_I2C_SPEED 100000 #define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C /* SD/MMC */ #define CONFIG_MMC diff --git a/include/configs/whistler.h b/include/configs/whistler.h index 994edec..34e451d 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -46,12 +46,11 @@ #define CONFIG_BOARD_EARLY_INIT_F /* I2C */ -#define CONFIG_TEGRA_I2C +#define CONFIG_SYS_I2C_TEGRA #define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS 4 #define CONFIG_SYS_I2C_SPEED 100000 #define CONFIG_CMD_I2C +#define CONFIG_SYS_I2C /* SD/MMC */ #define CONFIG_MMC -- cgit v1.1 From 880540decfb855e96bc14ac84ac7784669e4b382 Mon Sep 17 00:00:00 2001 From: Dirk Eibach Date: Thu, 25 Apr 2013 02:40:01 +0000 Subject: i2c, ppc4xx_i2c: switch to new multibus/multiadapter support Signed-off-by: Dirk Eibach Cc: Heiko Schocher Cc: Stefan Roese Tested-by: Stefan Roese --- include/configs/APC405.h | 9 +++++---- include/configs/ASH405.h | 9 +++++---- include/configs/CANBT.h | 16 ++++++++-------- include/configs/CATcenter.h | 9 +++++---- include/configs/CMS700.h | 9 +++++---- include/configs/CPCI2DP.h | 9 +++++---- include/configs/CPCI405.h | 9 +++++---- include/configs/CPCI4052.h | 9 +++++---- include/configs/CPCI405AB.h | 9 +++++---- include/configs/CPCI405DT.h | 9 +++++---- include/configs/CPCIISER4.h | 9 +++++---- include/configs/CRAYL1.h | 9 +++++---- include/configs/DP405.h | 9 +++++---- include/configs/DU405.h | 9 +++++---- include/configs/DU440.h | 18 ++++++++++-------- include/configs/G2000.h | 9 +++++---- include/configs/HH405.h | 11 ++++++----- include/configs/HUB405.h | 9 +++++---- include/configs/JSE.h | 9 +++++---- include/configs/KAREF.h | 16 +++++++++------- include/configs/METROBOX.h | 16 +++++++++------- include/configs/MIP405.h | 9 +++++---- include/configs/OCRTC.h | 9 +++++---- include/configs/ORSG.h | 9 +++++---- include/configs/PCI405.h | 9 +++++---- include/configs/PIP405.h | 9 +++++---- include/configs/PLU405.h | 9 +++++---- include/configs/PMC405.h | 9 +++++---- include/configs/PMC405DE.h | 9 +++++---- include/configs/PMC440.h | 14 ++++++++------ include/configs/PPChameleonEVB.h | 9 +++++---- include/configs/VOH405.h | 9 +++++---- include/configs/VOM405.h | 9 +++++---- include/configs/W7OLMC.h | 9 +++++---- include/configs/W7OLMG.h | 9 +++++---- include/configs/WUH405.h | 9 +++++---- include/configs/acadia.h | 2 +- include/configs/alpr.h | 11 ++++++----- include/configs/amcc-common.h | 7 ++++--- include/configs/bamboo.h | 2 +- include/configs/bluestone.h | 2 +- include/configs/bubinga.h | 4 ++-- include/configs/canyonlands.h | 2 +- include/configs/csb272.h | 9 +++++---- include/configs/csb472.h | 9 +++++---- include/configs/dlvision-10g.h | 2 +- include/configs/dlvision.h | 2 +- include/configs/ebony.h | 2 +- include/configs/gdppc440etx.h | 2 +- include/configs/icon.h | 3 +-- include/configs/intip.h | 2 +- include/configs/io.h | 2 +- include/configs/io64.h | 2 +- include/configs/iocon.h | 8 ++++---- include/configs/katmai.h | 3 +-- include/configs/kilauea.h | 2 +- include/configs/korat.h | 9 +++++---- include/configs/luan.h | 2 +- include/configs/lwmon5.h | 9 +++++---- include/configs/makalu.h | 2 +- include/configs/neo.h | 2 +- include/configs/ocotea.h | 2 +- include/configs/p3p440.h | 11 ++++++----- include/configs/pcs440ep.h | 9 +++++---- include/configs/quad100hd.h | 9 +++++---- include/configs/redwood.h | 4 ++-- include/configs/sbc405.h | 9 +++++---- include/configs/sc3.h | 9 +++++---- include/configs/sequoia.h | 2 +- include/configs/t3corp.h | 2 +- include/configs/taihu.h | 4 ++-- include/configs/taishan.h | 2 +- include/configs/walnut.h | 2 +- include/configs/xpedite1000.h | 10 +++++----- include/configs/yosemite.h | 2 +- include/configs/yucca.h | 4 ++-- include/configs/zeus.h | 9 +++++---- 77 files changed, 301 insertions(+), 252 deletions(-) (limited to 'include') diff --git a/include/configs/APC405.h b/include/configs/APC405.h index 1e39229..8ba5d63 100644 --- a/include/configs/APC405.h +++ b/include/configs/APC405.h @@ -306,10 +306,11 @@ /* * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/ASH405.h b/include/configs/ASH405.h index 35c3773..6d40748 100644 --- a/include/configs/ASH405.h +++ b/include/configs/ASH405.h @@ -247,10 +247,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CANBT.h b/include/configs/CANBT.h index fd3eff0..b805fbd 100644 --- a/include/configs/CANBT.h +++ b/include/configs/CANBT.h @@ -180,14 +180,14 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* bytes of address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F + +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* bytes of address */ /* mask of address bits that overflow into the "EEPROM chip address" */ #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07 diff --git a/include/configs/CATcenter.h b/include/configs/CATcenter.h index 7017f8c..e56b247 100644 --- a/include/configs/CATcenter.h +++ b/include/configs/CATcenter.h @@ -402,10 +402,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CMS700.h b/include/configs/CMS700.h index 686d158..ca258e6 100644 --- a/include/configs/CMS700.h +++ b/include/configs/CMS700.h @@ -226,10 +226,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CPCI2DP.h b/include/configs/CPCI2DP.h index bbd93ac..bac51d1 100644 --- a/include/configs/CPCI2DP.h +++ b/include/configs/CPCI2DP.h @@ -211,10 +211,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CPCI405.h b/include/configs/CPCI405.h index 36476e0..bb2e92f 100644 --- a/include/configs/CPCI405.h +++ b/include/configs/CPCI405.h @@ -260,10 +260,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CPCI4052.h b/include/configs/CPCI4052.h index 4c12c85..a442e36 100644 --- a/include/configs/CPCI4052.h +++ b/include/configs/CPCI4052.h @@ -287,10 +287,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CPCI405AB.h b/include/configs/CPCI405AB.h index 96b6c0a..f2422c5 100644 --- a/include/configs/CPCI405AB.h +++ b/include/configs/CPCI405AB.h @@ -263,10 +263,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC32) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC32 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ diff --git a/include/configs/CPCI405DT.h b/include/configs/CPCI405DT.h index c4cc5fd..3f072d3 100644 --- a/include/configs/CPCI405DT.h +++ b/include/configs/CPCI405DT.h @@ -282,10 +282,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CPCIISER4.h b/include/configs/CPCIISER4.h index 78c66c7..9385418 100644 --- a/include/configs/CPCIISER4.h +++ b/include/configs/CPCIISER4.h @@ -196,10 +196,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/CRAYL1.h b/include/configs/CRAYL1.h index 6bceccb..37139ed 100644 --- a/include/configs/CRAYL1.h +++ b/include/configs/CRAYL1.h @@ -76,11 +76,12 @@ #define CONFIG_SERVERIP 10.0.0.1 #define CONFIG_ETHADDR 00:40:a6:80:14:5 */ -#define CONFIG_HARD_I2C 1 /* hardware support for i2c */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 #define CONFIG_SDRAM_BANK0 1 -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 #define CONFIG_IDENT_STRING "Cray L1" diff --git a/include/configs/DP405.h b/include/configs/DP405.h index 6d67d6e..fa09797 100644 --- a/include/configs/DP405.h +++ b/include/configs/DP405.h @@ -178,10 +178,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/DU405.h b/include/configs/DU405.h index 24df85a..26162d1 100644 --- a/include/configs/DU405.h +++ b/include/configs/DU405.h @@ -197,10 +197,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/DU440.h b/include/configs/DU440.h index 152821f..72f6a31 100644 --- a/include/configs/DU440.h +++ b/include/configs/DU440.h @@ -170,18 +170,20 @@ /* * I2C */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_I2C_MULTI_BUS 1 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F +#define CONFIG_SYS_I2C_PPC4XX_CH1 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_1 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_1 0x7F #define CONFIG_SYS_SPD_BUS_NUM 0 #define IIC1_MCP3021_ADDR 0x4d #define IIC1_USB2507_ADDR 0x2c -#ifdef CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_NOPROBES {{1, IIC1_USB2507_ADDR}} -#endif +#define CONFIG_SYS_I2C_NOPROBES { {1, IIC1_USB2507_ADDR} } + #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 diff --git a/include/configs/G2000.h b/include/configs/G2000.h index b6769ae..93be37f 100644 --- a/include/configs/G2000.h +++ b/include/configs/G2000.h @@ -298,10 +298,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT24WC08 */ /* CAT24WC08/16... */ diff --git a/include/configs/HH405.h b/include/configs/HH405.h index d65377f..7ca4212 100644 --- a/include/configs/HH405.h +++ b/include/configs/HH405.h @@ -334,14 +334,15 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 #if 0 /* test-only */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #else -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 #endif -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT24WC08 */ #define CONFIG_SYS_EEPROM_WREN 1 diff --git a/include/configs/HUB405.h b/include/configs/HUB405.h index e90782f..ecfc4aa 100644 --- a/include/configs/HUB405.h +++ b/include/configs/HUB405.h @@ -246,10 +246,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/JSE.h b/include/configs/JSE.h index 76509be..271ebda 100644 --- a/include/configs/JSE.h +++ b/include/configs/JSE.h @@ -210,10 +210,11 @@ #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /*----------------------------------------------------------------------- diff --git a/include/configs/KAREF.h b/include/configs/KAREF.h index 5736fcf..43ecf5d 100644 --- a/include/configs/KAREF.h +++ b/include/configs/KAREF.h @@ -133,13 +133,15 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed 400kHz */ -#define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */ -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_I2C_BUS1 1 /* Include i2c bus 1 supp */ - +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F +#define CONFIG_SYS_I2C_PPC4XX_CH1 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_1 400000 /* I2C speed 400kHz */ +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_1 0x7F +#define CONFIG_SYS_I2C_NOPROBES { { 0, 0x69} } /* Don't probe these addrs */ /*----------------------------------------------------------------------- * Environment diff --git a/include/configs/METROBOX.h b/include/configs/METROBOX.h index 66c4798..0744251 100644 --- a/include/configs/METROBOX.h +++ b/include/configs/METROBOX.h @@ -195,13 +195,15 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed 400kHz */ -#define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */ -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ -#define CONFIG_I2C_BUS1 1 /* Include i2c bus 1 supp */ - +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F +#define CONFIG_SYS_I2C_PPC4XX_CH1 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_1 400000 /* I2C speed 400kHz */ +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_1 0x7F +#define CONFIG_SYS_I2C_NOPROBES { { 0, 0x69} } /* Don't probe these addrs */ /*----------------------------------------------------------------------- * Environment diff --git a/include/configs/MIP405.h b/include/configs/MIP405.h index 0d023ab..7b4d275 100644 --- a/include/configs/MIP405.h +++ b/include/configs/MIP405.h @@ -98,10 +98,11 @@ * The Atmel EEPROM uses 16Bit addressing. ***************************************************************/ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 50000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 50000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x53 /* EEPROM 24C128/256 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ diff --git a/include/configs/OCRTC.h b/include/configs/OCRTC.h index 4a93417..1c15687 100644 --- a/include/configs/OCRTC.h +++ b/include/configs/OCRTC.h @@ -217,10 +217,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/ORSG.h b/include/configs/ORSG.h index cd1f425..eda8af2 100644 --- a/include/configs/ORSG.h +++ b/include/configs/ORSG.h @@ -213,10 +213,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/PCI405.h b/include/configs/PCI405.h index c3cacef..54c8bb2 100644 --- a/include/configs/PCI405.h +++ b/include/configs/PCI405.h @@ -209,10 +209,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/PIP405.h b/include/configs/PIP405.h index 3757af0..148fb19 100644 --- a/include/configs/PIP405.h +++ b/include/configs/PIP405.h @@ -87,10 +87,11 @@ * EEPROM of the SDRAM * The Atmel EEPROM uses 16Bit addressing. ***************************************************************/ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 50000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 50000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x53 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 diff --git a/include/configs/PLU405.h b/include/configs/PLU405.h index 1745eb3..74bd97d 100644 --- a/include/configs/PLU405.h +++ b/include/configs/PLU405.h @@ -281,10 +281,11 @@ /* * I2C EEPROM (24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM 24WC16 */ #define CONFIG_SYS_EEPROM_WREN 1 diff --git a/include/configs/PMC405.h b/include/configs/PMC405.h index d97acec..19583b6 100644 --- a/include/configs/PMC405.h +++ b/include/configs/PMC405.h @@ -239,10 +239,11 @@ /* * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT24W16 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/PMC405DE.h b/include/configs/PMC405DE.h index a427551..33c39f8 100644 --- a/include/configs/PMC405DE.h +++ b/include/configs/PMC405DE.h @@ -217,10 +217,11 @@ /* * I2C EEPROM (24W16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM 24W16 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/PMC440.h b/include/configs/PMC440.h index 4b53182..867f578 100644 --- a/include/configs/PMC440.h +++ b/include/configs/PMC440.h @@ -225,12 +225,14 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F - -#define CONFIG_I2C_MULTI_BUS 1 +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F +#define CONFIG_SYS_I2C_PPC4XX_CH1 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_1 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_1 0x7F #define CONFIG_SYS_I2C_MULTI_EEPROMS diff --git a/include/configs/PPChameleonEVB.h b/include/configs/PPChameleonEVB.h index 210bc30..a705f1c 100644 --- a/include/configs/PPChameleonEVB.h +++ b/include/configs/PPChameleonEVB.h @@ -419,10 +419,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/VOH405.h b/include/configs/VOH405.h index 8f0c4b6..98d975f 100644 --- a/include/configs/VOH405.h +++ b/include/configs/VOH405.h @@ -280,10 +280,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT24WC08 */ #define CONFIG_SYS_EEPROM_WREN 1 diff --git a/include/configs/VOM405.h b/include/configs/VOM405.h index 43d6bb3..85722e4 100644 --- a/include/configs/VOM405.h +++ b/include/configs/VOM405.h @@ -205,10 +205,11 @@ /* * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/W7OLMC.h b/include/configs/W7OLMC.h index 710812f..7c5be40 100644 --- a/include/configs/W7OLMC.h +++ b/include/configs/W7OLMC.h @@ -279,10 +279,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC08) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/W7OLMG.h b/include/configs/W7OLMG.h index f88dfe4..41057d0 100644 --- a/include/configs/W7OLMG.h +++ b/include/configs/W7OLMG.h @@ -286,10 +286,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (ATMEL 24C04N) */ -#define CONFIG_HARD_I2C 1 /* Hardware assisted I2C */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM ATMEL 24C04N */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/WUH405.h b/include/configs/WUH405.h index 0c78aca..2632db2 100644 --- a/include/configs/WUH405.h +++ b/include/configs/WUH405.h @@ -244,10 +244,11 @@ /*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */ -#define CONFIG_HARD_I2C /* I2c with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/acadia.h b/include/configs/acadia.h index 8c447ca..52a64bf 100644 --- a/include/configs/acadia.h +++ b/include/configs/acadia.h @@ -206,7 +206,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/alpr.h b/include/configs/alpr.h index 9f32a60..13978be 100644 --- a/include/configs/alpr.h +++ b/include/configs/alpr.h @@ -121,11 +121,12 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* Don't probe these addrs */ /*----------------------------------------------------------------------- * I2C EEPROM (PCF8594C) diff --git a/include/configs/amcc-common.h b/include/configs/amcc-common.h index 80e5735..1dc44fc 100644 --- a/include/configs/amcc-common.h +++ b/include/configs/amcc-common.h @@ -42,9 +42,10 @@ /* * I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /* * Ethernet/EMAC/PHY diff --git a/include/configs/bamboo.h b/include/configs/bamboo.h index d36984d..03fa17b 100644 --- a/include/configs/bamboo.h +++ b/include/configs/bamboo.h @@ -222,7 +222,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/bluestone.h b/include/configs/bluestone.h index 3e691fd..934da81 100644 --- a/include/configs/bluestone.h +++ b/include/configs/bluestone.h @@ -122,7 +122,7 @@ /* * I2C */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 diff --git a/include/configs/bubinga.h b/include/configs/bubinga.h index 35a473a..43059a0 100644 --- a/include/configs/bubinga.h +++ b/include/configs/bubinga.h @@ -134,9 +134,9 @@ * I2C stuff *----------------------------------------------------------------------- */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_NOPROBES { 0x69 } /* avoid i2c probe hangup (why?) */ +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* avoid i2c probe hangup (?) */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 6 /* 24C02 requires 5ms delay */ #if defined(CONFIG_CMD_EEPROM) diff --git a/include/configs/canyonlands.h b/include/configs/canyonlands.h index 92106d7..a3c04b6 100644 --- a/include/configs/canyonlands.h +++ b/include/configs/canyonlands.h @@ -329,7 +329,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/csb272.h b/include/configs/csb272.h index eec087c..c12c3a2 100644 --- a/include/configs/csb272.h +++ b/include/configs/csb272.h @@ -175,10 +175,11 @@ * I2C configuration * */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed */ -#define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /* I2C slave address */ /* * MII PHY configuration diff --git a/include/configs/csb472.h b/include/configs/csb472.h index f6a456c..663424b 100644 --- a/include/configs/csb472.h +++ b/include/configs/csb472.h @@ -174,10 +174,11 @@ * I2C configuration * */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed */ -#define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /* I2C slave address */ /* * MII PHY configuration diff --git a/include/configs/dlvision-10g.h b/include/configs/dlvision-10g.h index 2cd2027..5d6308f 100644 --- a/include/configs/dlvision-10g.h +++ b/include/configs/dlvision-10g.h @@ -114,7 +114,7 @@ /* * I2C stuff */ -#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 /* Temp sensor/hwmon/dtt */ #define CONFIG_DTT_LM63 1 /* National LM63 */ diff --git a/include/configs/dlvision.h b/include/configs/dlvision.h index c490ff6..24c9fa4 100644 --- a/include/configs/dlvision.h +++ b/include/configs/dlvision.h @@ -107,7 +107,7 @@ /* * I2C stuff */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address*/ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 /* * FLASH organization diff --git a/include/configs/ebony.h b/include/configs/ebony.h index b05ba08..aabc898 100644 --- a/include/configs/ebony.h +++ b/include/configs/ebony.h @@ -138,7 +138,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/gdppc440etx.h b/include/configs/gdppc440etx.h index 7b8bac4..db1fd28 100644 --- a/include/configs/gdppc440etx.h +++ b/include/configs/gdppc440etx.h @@ -145,7 +145,7 @@ /* * I2C */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed+slave address*/ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 /* * Default environment variables diff --git a/include/configs/icon.h b/include/configs/icon.h index c2da4ce..ba43355 100644 --- a/include/configs/icon.h +++ b/include/configs/icon.h @@ -120,9 +120,8 @@ /* * I2C */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 -#define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_SPD_BUS_NUM 0 /* The I2C bus for SPD */ #define CONFIG_SYS_I2C_MULTI_EEPROMS diff --git a/include/configs/intip.h b/include/configs/intip.h index ed96b1b..917d214 100644 --- a/include/configs/intip.h +++ b/include/configs/intip.h @@ -228,7 +228,7 @@ /* * I2C */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/io.h b/include/configs/io.h index 03661cc..4950ad7 100644 --- a/include/configs/io.h +++ b/include/configs/io.h @@ -114,7 +114,7 @@ /* * I2C stuff */ -#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 /* Temp sensor/hwmon/dtt */ #define CONFIG_DTT_LM63 1 /* National LM63 */ diff --git a/include/configs/io64.h b/include/configs/io64.h index 887aaef..bb29bed 100644 --- a/include/configs/io64.h +++ b/include/configs/io64.h @@ -340,7 +340,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_PCA9698 1 /* NXP PCA9698 */ diff --git a/include/configs/iocon.h b/include/configs/iocon.h index 695aa5c..5972711 100644 --- a/include/configs/iocon.h +++ b/include/configs/iocon.h @@ -110,11 +110,11 @@ /* * I2C stuff */ -#undef CONFIG_HARD_I2C #define CONFIG_SYS_I2C -#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SOFT_SPEED 400000 -#define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /* * Software (bit-bang) I2C driver configuration diff --git a/include/configs/katmai.h b/include/configs/katmai.h index c6f712c..0bde392 100644 --- a/include/configs/katmai.h +++ b/include/configs/katmai.h @@ -119,9 +119,8 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 -#define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_SPD_BUS_NUM 0 /* The I2C bus for SPD */ #define IIC0_BOOTPROM_ADDR 0x50 diff --git a/include/configs/kilauea.h b/include/configs/kilauea.h index aec4a58..fc34c24 100644 --- a/include/configs/kilauea.h +++ b/include/configs/kilauea.h @@ -385,7 +385,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 /* I2C boot EEPROM (24C02BN) */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ diff --git a/include/configs/korat.h b/include/configs/korat.h index eea8c98..c2e7118 100644 --- a/include/configs/korat.h +++ b/include/configs/korat.h @@ -155,10 +155,11 @@ /* * I2C */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/luan.h b/include/configs/luan.h index f0e568a..6219df7 100644 --- a/include/configs/luan.h +++ b/include/configs/luan.h @@ -134,7 +134,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h index 4dcb25a..7d9378e 100644 --- a/include/configs/lwmon5.h +++ b/include/configs/lwmon5.h @@ -298,10 +298,11 @@ /* * I2C */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_RTC_ADDR 0x51 /* RTC */ #define CONFIG_SYS_I2C_EEPROM_CPU_ADDR 0x52 /* EEPROM (CPU Modul) */ diff --git a/include/configs/makalu.h b/include/configs/makalu.h index f71f28b..66f35d7 100644 --- a/include/configs/makalu.h +++ b/include/configs/makalu.h @@ -201,7 +201,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 6 /* 24C02 requires 5ms delay */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 /* I2C boot EEPROM (24C02BN) */ diff --git a/include/configs/neo.h b/include/configs/neo.h index 38b5bec..be1c9ff 100644 --- a/include/configs/neo.h +++ b/include/configs/neo.h @@ -117,7 +117,7 @@ /* * I2C stuff */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 /* RTC */ #define CONFIG_RTC_DS1337 diff --git a/include/configs/ocotea.h b/include/configs/ocotea.h index 3e64c74..0bac611 100644 --- a/include/configs/ocotea.h +++ b/include/configs/ocotea.h @@ -151,7 +151,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/p3p440.h b/include/configs/p3p440.h index 3c33da7..9f76428 100644 --- a/include/configs/p3p440.h +++ b/include/configs/p3p440.h @@ -97,11 +97,12 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* Don't probe these addrs */ /*----------------------------------------------------------------------- * I2C RTC diff --git a/include/configs/pcs440ep.h b/include/configs/pcs440ep.h index 6358104..1104f92 100644 --- a/include/configs/pcs440ep.h +++ b/include/configs/pcs440ep.h @@ -139,10 +139,11 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa4>>1) #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 diff --git a/include/configs/quad100hd.h b/include/configs/quad100hd.h index 30a8c55..809d764 100644 --- a/include/configs/quad100hd.h +++ b/include/configs/quad100hd.h @@ -152,10 +152,11 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* base address */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* bytes of address */ diff --git a/include/configs/redwood.h b/include/configs/redwood.h index f75ab67..355c330 100644 --- a/include/configs/redwood.h +++ b/include/configs/redwood.h @@ -110,13 +110,13 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define IIC0_BOOTPROM_ADDR 0x50 #define IIC0_ALT_BOOTPROM_ADDR 0x54 /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_NOPROBES {0x50, 0x52, 0x53, 0x54} +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x50}, {0, 0x52}, {0, 0x53}, {0, 0x54} } #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ diff --git a/include/configs/sbc405.h b/include/configs/sbc405.h index 4120cf4..d5eb745 100644 --- a/include/configs/sbc405.h +++ b/include/configs/sbc405.h @@ -168,10 +168,11 @@ #define CONFIG_SYS_RX_ETH_BUFFER 16 /* use 16 rx buffer on 405 emac */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /*----------------------------------------------------------------------- * PCI stuff diff --git a/include/configs/sc3.h b/include/configs/sc3.h index 59636f7..27859ee 100644 --- a/include/configs/sc3.h +++ b/include/configs/sc3.h @@ -246,15 +246,16 @@ * IIC stuff *----------------------------------------------------------------------- */ -#define CONFIG_HARD_I2C /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 #define I2C_INIT #define I2C_ACTIVE 0 #define I2C_TRISTATE 0 -#define CONFIG_SYS_I2C_SPEED 100000 /* use the standard 100kHz speed */ -#define CONFIG_SYS_I2C_SLAVE 0x7F /* mask valid bits */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 100000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /* mask valid bits */ #define CONFIG_RTC_DS1337 #define CONFIG_SYS_I2C_RTC_ADDR 0x68 diff --git a/include/configs/sequoia.h b/include/configs/sequoia.h index 11fce53..e090695 100644 --- a/include/configs/sequoia.h +++ b/include/configs/sequoia.h @@ -232,7 +232,7 @@ /* * I2C */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/t3corp.h b/include/configs/t3corp.h index ff2189c..dfd8db4 100644 --- a/include/configs/t3corp.h +++ b/include/configs/t3corp.h @@ -319,7 +319,7 @@ /* * I2C */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/taihu.h b/include/configs/taihu.h index a43c3da..d43894c 100644 --- a/include/configs/taihu.h +++ b/include/configs/taihu.h @@ -138,9 +138,9 @@ * I2C stuff *----------------------------------------------------------------------- */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_NOPROBES { 0x69 } /* avoid i2c probe hangup (why?) */ +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* avoid i2c probe hangup (?) */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 6 /* 24C02 requires 5ms delay */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* I2C boot EEPROM (24C02W) */ diff --git a/include/configs/taishan.h b/include/configs/taishan.h index c9f1a9f..20989a7 100644 --- a/include/configs/taishan.h +++ b/include/configs/taishan.h @@ -133,7 +133,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #undef CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 diff --git a/include/configs/walnut.h b/include/configs/walnut.h index 219f276..bb81b2b 100644 --- a/include/configs/walnut.h +++ b/include/configs/walnut.h @@ -95,7 +95,7 @@ * I2C stuff *----------------------------------------------------------------------- */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/xpedite1000.h b/include/configs/xpedite1000.h index 1f48cc5..dab7d39 100644 --- a/include/configs/xpedite1000.h +++ b/include/configs/xpedite1000.h @@ -145,11 +145,11 @@ extern void out32(unsigned int, unsigned long); /* * I2C */ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7f -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7f /* I2C EEPROM */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 diff --git a/include/configs/yosemite.h b/include/configs/yosemite.h index cde0df1..e814cfd 100644 --- a/include/configs/yosemite.h +++ b/include/configs/yosemite.h @@ -137,7 +137,7 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) diff --git a/include/configs/yucca.h b/include/configs/yucca.h index 3282d37..33a82d9 100644 --- a/include/configs/yucca.h +++ b/include/configs/yucca.h @@ -120,13 +120,13 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 #define IIC0_BOOTPROM_ADDR 0x50 #define IIC0_ALT_BOOTPROM_ADDR 0x54 /* Don't probe these addrs */ -#define CONFIG_SYS_I2C_NOPROBES {0x50, 0x52, 0x53, 0x54} +#define CONFIG_SYS_I2C_NOPROBES { {0, 0x50}, {0, 0x52}, {0, 0x53}, {0, 0x54} } /* #if defined(CONFIG_CMD_EEPROM) */ /* #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 */ /* I2C boot EEPROM */ diff --git a/include/configs/zeus.h b/include/configs/zeus.h index 75195bc..b653993 100644 --- a/include/configs/zeus.h +++ b/include/configs/zeus.h @@ -168,10 +168,11 @@ /*----------------------------------------------------------------------- * I2C *----------------------------------------------------------------------*/ -#define CONFIG_HARD_I2C 1 /* I2C with hardware support */ -#define CONFIG_PPC4XX_I2C /* use PPC4xx driver */ -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ -#define CONFIG_SYS_I2C_SLAVE 0x7F +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_PPC4XX +#define CONFIG_SYS_I2C_PPC4XX_CH0 +#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 +#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F /* these are for the ST M24C02 2kbit serial i2c eeprom */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* base address */ -- cgit v1.1 From 67bfae36fa365f911fa258b44eb65ca29d1bad03 Mon Sep 17 00:00:00 2001 From: Holger Brunck Date: Mon, 6 May 2013 02:54:38 +0000 Subject: arm/km: fix u-boot update functionality Due to the new I2C framework we need to adapt the u-boot update function. Due to the new framework all i2c leafs behind a mux are present in the system and not only those who are defined and used. So it is bus number 5 after the rework. Signed-off-by: Holger Brunck cc: Heiko Schocher cc: Prafulla Wadaskar --- include/configs/km/km_arm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index ebbfa84..4da54d5 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -295,7 +295,8 @@ int get_scl(void); #else #define CONFIG_KM_NEW_ENV \ "newenv=setenv addr 0x100000 && " \ - "i2c dev 1; mw.b ${addr} 0 4 && " \ + "i2c dev " __stringify(CONFIG_I2C_ENV_EEPROM_BUS) "; " \ + "mw.b ${addr} 0 4 && " \ "eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " __stringify(CONFIG_ENV_OFFSET) " 4 && " \ "eeprom write " __stringify(CONFIG_SYS_DEF_EEPROM_ADDR) \ -- cgit v1.1 From 1221b3d74a0d92f3fcb5ff3e8b6f721f562b8305 Mon Sep 17 00:00:00 2001 From: Alison Wang Date: Mon, 17 Jun 2013 15:30:38 +0800 Subject: vf610: Add I2C support for Vybrid VF610 platform This patch adds I2C support for Vybrid VF610 platform and adds I2C0 support to VF610TWR board. Signed-off-by: Alison Wang --- include/configs/vf610twr.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h index 5012fc8..9aba5bc 100644 --- a/include/configs/vf610twr.h +++ b/include/configs/vf610twr.h @@ -81,6 +81,13 @@ #define CONFIG_PHYLIB #define CONFIG_PHY_MICREL +/* I2C Configs */ +#define CONFIG_CMD_I2C +#define CONFIG_HARD_I2C +#define CONFIG_I2C_MXC +#define CONFIG_SYS_I2C_BASE I2C0_BASE_ADDR +#define CONFIG_SYS_I2C_SPEED 100000 + #define CONFIG_BOOTDELAY 3 #define CONFIG_LOADADDR 0x82000000 -- cgit v1.1 From ecbd7e1ec7280d90d151a99691f74b892588cadd Mon Sep 17 00:00:00 2001 From: naveen krishna chatradhi Date: Mon, 29 Apr 2013 15:58:52 -0700 Subject: fdtdec: Add compatible string for High speed i2c Adds a new COMPAT string exynos5-hsi2c for high speed i2c controller available on exynos5 SoCs from Samsung. Signed-off-by: Naveen Krishna Chatradhi --- include/fdtdec.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/fdtdec.h b/include/fdtdec.h index bdefda4..c5d3b2b 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -100,6 +100,7 @@ enum fdt_compat_id { COMPAT_MAXIM_98095_CODEC, /* MAX98095 Codec */ COMPAT_INFINEON_SLB9635_TPM, /* Infineon SLB9635 TPM */ COMPAT_INFINEON_SLB9645_TPM, /* Infineon SLB9645 TPM */ + COMPAT_SAMSUNG_EXYNOS5_I2C, /* Exynos5 High Speed I2C Controller */ COMPAT_COUNT, }; -- cgit v1.1