Support for XPedite5370 and misc GPIO
v2 cover Support for XPedite5370 and misc GPIO
Hello,
This patch series adds support for the XPedite5370 SBC. Its an MPC8572-based VPX card with a PMC/XMC site. The XPedite5370 includes a significant number of I2C GPIO devices (5) which are used for board configuration. I added support for 2 new I2C gpio devices in a new drivers/gpio directory. I'm not sure if this is the preferred location/method, so let me know if others have have different preferences. It'd be nice to have a more generic GPIO framework (like Linux's) at some point, but figured this was a step in the right direction by providing a place for generic GPIO devices in drivers/gpio.
Thanks,
Peter
Changes since v1:
- Rebased to u-boot-mpc85xx tree
- Updated NOR flash remapping method
- Added CONFIG_SYS_I2C2_OFFSET define to XPEDITE5370.h
- Removed CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE from XPEDITE5370.h
Peter Tyser (3):
pca953x: Add support for PCA953x I2C gpio devices
ds4510: Add support for Maxim's DS4510 I2C device XPedite5370 board support
MAINTAINERS | 3 + MAKEALL | 1 + Makefile | 5 + README | 9 + board/xes/common/Makefile | 56 ++++ board/xes/common/fsl_8572_clk.c | 51 +++ board/xes/common/fsl_85xx_ddr.c | 93 ++++++ board/xes/common/fsl_85xx_pci.c | 264 ++++++++++++++++ board/xes/xpedite5370/Makefile | 45 +++ board/xes/xpedite5370/config.mk | 35 ++ board/xes/xpedite5370/ddr.c | 270 ++++++++++++++++ board/xes/xpedite5370/law.c | 54 ++++ board/xes/xpedite5370/tlb.c | 91 ++++++ board/xes/xpedite5370/u-boot.lds | 145 +++++++++ board/xes/xpedite5370/xpedite5370.c | 126 ++++++++ drivers/gpio/Makefile | 48 +++ drivers/gpio/ds4510.c | 344 ++++++++++++++++++++ drivers/gpio/pca953x.c | 186 +++++++++++ include/configs/XPEDITE5370.h | 586 +++++++++++++++++++++++++++++++++++ include/gpio/ds4510.h | 75 +++++ include/gpio/pca953x.h | 39 +++ 21 files changed, 2526 insertions(+), 0 deletions(-) create mode 100644 board/xes/common/Makefile create mode 100644 board/xes/common/fsl_8572_clk.c create mode 100644 board/xes/common/fsl_85xx_ddr.c create mode 100644 board/xes/common/fsl_85xx_pci.c create mode 100644 board/xes/xpedite5370/Makefile create mode 100644 board/xes/xpedite5370/config.mk create mode 100644 board/xes/xpedite5370/ddr.c create mode 100644 board/xes/xpedite5370/law.c create mode 100644 board/xes/xpedite5370/tlb.c create mode 100644 board/xes/xpedite5370/u-boot.lds create mode 100644 board/xes/xpedite5370/xpedite5370.c create mode 100644 drivers/gpio/Makefile create mode 100644 drivers/gpio/ds4510.c create mode 100644 drivers/gpio/pca953x.c create mode 100644 include/configs/XPEDITE5370.h create mode 100644 include/gpio/ds4510.h create mode 100644 include/gpio/pca953x.h
PATCH v2 1/3 Add support for PCA953x I2C gpio devices
Initial support for NXP's 4 and 8 bit I2C gpio expanders (eg pca9537, pca9557, etc). The CONFIG_PCA953X define enables support for the devices while the CONFIG_CMD_PCA953X define enables the pca953x command.
--- Makefile | 2 + README | 7 ++ drivers/gpio/Makefile | 47 ++++++++++++ drivers/gpio/pca953x.c | 186 ++++++++++++++++++++++++++++++++++++++++++++++++ include/gpio/pca953x.h | 39 ++++++++++ 5 files changed, 281 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/Makefile create mode 100644 drivers/gpio/pca953x.c create mode 100644 include/gpio/pca953x.h
Makefile +2 -0
@@ -221,6 +221,7 @@ LIBS += disk/libdisk.a LIBS += drivers/bios_emulator/libatibiosemu.a LIBS += drivers/block/libblock.a LIBS += drivers/dma/libdma.a +LIBS += drivers/gpio/libgpio.a LIBS += drivers/hwmon/libhwmon.a LIBS += drivers/i2c/libi2c.a LIBS += drivers/input/libinput.a
@@ -396,6 +397,7 @@ TAG_SUBDIRS += disk TAG_SUBDIRS += common TAG_SUBDIRS += drivers/bios_emulator TAG_SUBDIRS += drivers/block +TAG_SUBDIRS += drivers/gpio TAG_SUBDIRS += drivers/hwmon TAG_SUBDIRS += drivers/i2c TAG_SUBDIRS += drivers/input
README +7 -0
@@ -601,6 +601,7 @@ The following options need to be configured: CONFIG_CMD_MII * MII utility commands CONFIG_CMD_NAND * NAND support CONFIG_CMD_NET bootp, tftpboot, rarpboot + CONFIG_CMD_PCA953X * PCA953x I2C gpio commands CONFIG_CMD_PCI * pciinfo CONFIG_CMD_PCMCIA * PCMCIA support CONFIG_CMD_PING * send ICMP ECHO_REQUEST to network
@@ -678,6 +679,12 @@ The following options need to be configured: Note that if the RTC uses I2C, then the I2C interface must also be configured. See I2C Support, below. +- GPIO Support: + CONFIG_PCA953X - use NXP's PCA953X series I2C GPIO + + Note that if the GPIO device uses I2C, then the I2C interface + must also be configured. See I2C Support, below. + - Timestamp Support: When CONFIG_TIMESTAMP is selected, the timestamp
drivers/gpio/Makefile new file +47 -0
47 lines not on this page · raw message
drivers/gpio/pca953x.c new file +186 -0
186 lines not on this page · raw message
include/gpio/pca953x.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright 2008 Extreme Engineering Solutions, Inc. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* Version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __PCA953X_H_ +#define __PCA953X_H_ + +#define PCA953X_IN 0x00 +#define PCA953X_OUT 0x01 +#define PCA953X_POL 0x02 +#define PCA953X_CONF 0x03 + +#define PCA953X_OUT_LOW 0 +#define PCA953X_OUT_HIGH 1 +#define PCA953X_POL_NORMAL 0 +#define PCA953X_POL_INVERT 1 +#define PCA953X_DIR_OUT 0 +#define PCA953X_DIR_IN 1 + +int pca953x_set_val (u8 chip,uint mask,uint data); +int pca953x_set_pol (u8 chip,uint mask,uint data); +int pca953x_set_dir (u8 chip,uint mask,uint data); +int pca953x_get_val (u8 chip); + +#endif /* __PCA953X_H_ */
Signature · 1 line
1.6.0.2.GIT
PATCH v2 2/3 Add support for Maxim's DS4510 I2C device
Initial support for the DS4510, a CPU supervisor with integrated EEPROM, SRAM, and 4 programmable non-volatile GPIO pins. The CONFIG_DS4510 define enables support for the device while the CONFIG_CMD_DS4510 define enables the ds4510 command.
--- README | 2 + drivers/gpio/Makefile | 1 + drivers/gpio/ds4510.c | 344 +++++++++++++++++++++++++++++++++++++++++++++++++ include/gpio/ds4510.h | 75 +++++++++++ 4 files changed, 422 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/ds4510.c create mode 100644 include/gpio/ds4510.h
README +2 -0
@@ -572,6 +572,7 @@ The following options need to be configured: CONFIG_CMD_DHCP * DHCP support CONFIG_CMD_DIAG * Diagnostics CONFIG_CMD_DOC * Disk-On-Chip Support + CONFIG_CMD_DS4510 * ds4510 I2C gpio/memory commands CONFIG_CMD_DTT * Digital Therm and Thermostat CONFIG_CMD_ECHO echo arguments CONFIG_CMD_EEPROM * EEPROM read/write support
@@ -681,6 +682,7 @@ The following options need to be configured: - GPIO Support: CONFIG_PCA953X - use NXP's PCA953X series I2C GPIO + CONFIG_DS4510 - use Maxim's DS4510 I2C GPIO/eeprom Note that if the GPIO device uses I2C, then the I2C interface must also be configured. See I2C Support, below.
drivers/gpio/Makefile +1 -0
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB := $(obj)libgpio.a COBJS-$(CONFIG_PCA953X) += pca953x.o +COBJS-$(CONFIG_DS4510) += ds4510.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c)
drivers/gpio/ds4510.c new file +344 -0
344 lines not on this page · raw message
include/gpio/ds4510.h new file +75 -0
75 lines not on this page · raw message
Signature · 1 line
1.6.0.2.GIT
PATCH v2 3/3 XPedite5370 board support
Initial support for Extreme Engineering Solutions XPedite5370 - a MPC8572-based 3U VPX single board computer with a PMC/XMC site.
--- MAINTAINERS | 3 + MAKEALL | 1 + Makefile | 3 + board/xes/common/Makefile | 56 ++++ board/xes/common/fsl_8572_clk.c | 51 +++ board/xes/common/fsl_85xx_ddr.c | 93 ++++++ board/xes/common/fsl_85xx_pci.c | 264 ++++++++++++++++ board/xes/xpedite5370/Makefile | 45 +++ board/xes/xpedite5370/config.mk | 35 ++ board/xes/xpedite5370/ddr.c | 270 ++++++++++++++++ board/xes/xpedite5370/law.c | 54 ++++ board/xes/xpedite5370/tlb.c | 91 ++++++ board/xes/xpedite5370/u-boot.lds | 145 +++++++++ board/xes/xpedite5370/xpedite5370.c | 126 ++++++++ include/configs/XPEDITE5370.h | 586 +++++++++++++++++++++++++++++++++++ 15 files changed, 1823 insertions(+), 0 deletions(-) create mode 100644 board/xes/common/Makefile create mode 100644 board/xes/common/fsl_8572_clk.c create mode 100644 board/xes/common/fsl_85xx_ddr.c create mode 100644 board/xes/common/fsl_85xx_pci.c create mode 100644 board/xes/xpedite5370/Makefile create mode 100644 board/xes/xpedite5370/config.mk create mode 100644 board/xes/xpedite5370/ddr.c create mode 100644 board/xes/xpedite5370/law.c create mode 100644 board/xes/xpedite5370/tlb.c create mode 100644 board/xes/xpedite5370/u-boot.lds create mode 100644 board/xes/xpedite5370/xpedite5370.c create mode 100644 include/configs/XPEDITE5370.h
MAINTAINERS +3 -0
@@ -406,6 +406,9 @@ Rune Torgersen <[email protected]> MPC8266ADS MPC8266 +Peter Tyser <[email protected]> + + XPEDITE5370 MPC8572 David Updegraff <[email protected]>
MAKEALL +1 -0
@@ -375,6 +375,7 @@ LIST_85xx=" \ TQM8548 \ TQM8555 \ TQM8560 \ + XPEDITE5370 \ " #########################################################################
Makefile +3 -0
@@ -2397,6 +2397,9 @@ TQM8560_config: unconfig echo "#define CONFIG_BOARDNAME \"TQM$${CTYPE}\"">>$(obj)include/config.h; @$(MKCONFIG) -a TQM85xx ppc mpc85xx tqm85xx tqc +XPEDITE5370_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc85xx xpedite5370 xes + ######################################################################### ## MPC86xx Systems #########################################################################
board/xes/common/Makefile new file +56 -0
56 lines not on this page · raw message
board/xes/common/fsl_8572_clk.c new file +51 -0
51 lines not on this page · raw message
board/xes/common/fsl_85xx_ddr.c new file +93 -0
93 lines not on this page · raw message
board/xes/common/fsl_85xx_pci.c new file +264 -0
264 lines not on this page · raw message
board/xes/xpedite5370/Makefile new file +45 -0
45 lines not on this page · raw message
board/xes/xpedite5370/config.mk new file +35 -0
@@ -0,0 +1,35 @@ +# +# Copyright 2008 Extreme Engineering Solutions, Inc. +# Copyright 2007-2008 Freescale Semiconductor, Inc. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +# +# xpedite5370 board +# +ifndef TEXT_BASE +TEXT_BASE = 0xfff80000 +endif + +PLATFORM_RELFLAGS += -mrelocatable + +PLATFORM_CPPFLAGS += -DCONFIG_E500=1 +PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1 +PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1
board/xes/xpedite5370/ddr.c new file +270 -0
270 lines not on this page · raw message
board/xes/xpedite5370/law.c new file +54 -0
54 lines not on this page · raw message
board/xes/xpedite5370/tlb.c new file +91 -0
91 lines not on this page · raw message
board/xes/xpedite5370/u-boot.lds new file +145 -0
145 lines not on this page · raw message
board/xes/xpedite5370/xpedite5370.c new file +126 -0
126 lines not on this page · raw message
include/configs/XPEDITE5370.h new file +586 -0
586 lines not on this page · raw message
Signature · 1 line
1.6.0.2.GIT
PATCH v2 3/3 XPedite5370 board support
Quoted 5 lines · Peter Tyser
Initial support for Extreme Engineering Solutions XPedite5370 - a MPC8572-based 3U VPX single board computer with a PMC/XMC site.
Signed-off-by Peter Tyser <[email protected]>
PATCH v2 3/3 XPedite5370 board support
Dear Andy,
Quoted 8 lines · In message <[email protected]> you…
Quoted 5 lines · Peter Tyser
Initial support for Extreme Engineering Solutions XPedite5370 - a MPC8572-based 3U VPX single board computer with a PMC/XMC site.
Signed-off-by Peter Tyser <[email protected]>Acked-by Andy Fleming <[email protected]>
Sorry, here is a late NAK from me. See previous comments.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If all the Chinese simultaneously jumped into the Pacific off a 10 foot platform erected 10 feet off their coast, it would cause a tidal wave that would destroy everything in this country west of Nebraska.
PATCH v2 3/3 XPedite5370 board support
Quoted 8 lines · Wolfgang Denk
Dear Andy,
Quoted 5 lines · In message <[email protected]> you…
Quoted 4 lines · Peter Tyser
Initial support for Extreme Engineering Solutions XPedite5370 - a MPC8572-based 3U VPX single board computer with a PMC/XMC site.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Peter Tyser <[email protected]>Acked-by Andy Fleming <[email protected]>Sorry, here is a late NAK from me. See previous comments.
Alright. Is it still possible to get it in this merge window if the discussed changes are made?
Thanks,
Peter
PATCH v2 3/3 XPedite5370 board support
Dear Peter Tyser,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Sorry, here is a late NAK from me. See previous comments.
Alright. Is it still possible to get it in this merge window if the discussed changes are made?
Yes, sure. The patches were submitted before the merge window closed, and we are in fixing mode.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I've already got a female to worry about. Her name is the Enterprise. -- Kirk, "The Corbomite Maneuver", stardate 1514.0
v2 cover Support for XPedite5370 and misc GPIO
In reply to Peter TyserDear Peter Tyser,
Quoted 11 lines · In message <[email protected]> you wrote:
This patch series adds support for the XPedite5370 SBC. Its an MPC8572-based VPX card with a PMC/XMC site. The XPedite5370 includes a significant number of I2C GPIO devices (5) which are used for board configuration. I added support for 2 new I2C gpio devices in a new
drivers/gpiodirectory. I'm not sure if this is the preferred location/method, so let me know if others have have different preferences. It'd be nice to have a more generic GPIO framework (like Linux's) at some point, but figured this was a step in the right direction by providing a place for generic GPIO devices indrivers/gpio.
Please see comments to previous version of the patches. AFAICT they still apply.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You are an excellent tactician, Captain. You let your second in com- mand attack while you sit and watch for weakness. -- Khan Noonian Singh, "Space Seed", stardate 3141.9