Add new equipment from CSSI - v2
PATCH v2 4/8 board: MCR3000: Remove update of non-existing e1-wan DT node
In reply to Christophe Leroye1-wan device-tree node doesn't exist. Remove related update to avoid following warning at startup:
Loading Device Tree to 007fa000, end 007ff951 ... OK
Unable to update property /localbus/e1-wan:data-rate, err=FDT_ERR_NOTFOUND Unable to update property /localbus/e1-wan:channel-phase, err=FDT_ERR_NOTFOUND Unable to update property /localbus/e1-wan:rising-edge-sync-pulse, err=FDT_ERR_NOTFOUND
--- board/cssi/mcr3000/mcr3000.c | 12 ------------ 1 file changed, 12 deletions(-)
board/cssi/mcr3000/mcr3000.c +0 -12
@@ -58,8 +58,6 @@ static const uint cs1_dram_table_66[] = {int ft_board_setup (void *blob,struct bd_info *bd) { -const char *sync ="receive" ; -ft_cpu_setup (blob, bd);/* BRG */
@@ -72,16 +70,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)/* Bus Frequency for CPM */ do_fixup_by_path_u32 (blob,"/soc" ,"bus-frequency" , bd->bi_busfreq,1 ); -/* E1 interface - Set data rate */ -do_fixup_by_path_u32 (blob,"/localbus/e1-wan" ,"data-rate" ,2 ,1 ); - -/* E1 interface - Set channel phase to 0 */ -do_fixup_by_path_u32 (blob,"/localbus/e1-wan" ,"channel-phase" ,0 ,1 ); - -/* E1 interface - rising edge sync pulse transmit */ -do_fixup_by_path (blob,"/localbus/e1-wan" ,"rising-edge-sync-pulse" , - sync,strlen (sync),1 ); -return 0 ; }
Signature · 1 line
2.39.1
PATCH v2 6/8 spi, mpc8xx: Add support for chipselect via GPIO and fixups
In reply to Christophe LeroyThis patch fixes the mpc8xx SPI driver:
- A stub callbacks for mode and speed,
- Use chip selects defined as GPIOs,
- Write proper value to disable relocation, other it fails on mpc885,
- Don't modify ports setup, ports can be different from one board to another and are already set by board_early_init_r().
This patch was originally written by Charles Frey who's email address is not valid anymore as he left the company.
--- drivers/spi/mpc8xx_spi.c | 96 ++++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 37 deletions(-)
drivers/spi/mpc8xx_spi.c +59 -37
@@ -24,12 +24,29 @@#include <asm/cpm_8xx.h> #include <asm/io.h> +#include <asm/gpio.h> #define CPM_SPI_BASE_RX CPM_SPI_BASE#define CPM_SPI_BASE_TX (CPM_SPI_BASE + sizeof(cbd_t))#define MAX_BUFFER 0x104 +struct mpc8xx_priv { +spi_t __iomem *spi; +struct gpio_desc gpios[16 ]; +int max_cs; +}; + +static int mpc8xx_spi_set_mode (struct udevice *dev,uint mod) +{ +return 0 ; +} + +static int mpc8xx_spi_set_speed (struct udevice *dev,uint speed) +{ +return 0 ; +} +static int mpc8xx_spi_probe (struct udevice *dev) {immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR ;
@@ -38,42 +55,9 @@ static int mpc8xx_spi_probe(struct udevice *dev)cbd_t __iomem *tbdf, *rbdf;/* Disable relocation */ -out_be16 (&spi->spi_rpbase,0 ); +out_be16 (&spi->spi_rpbase,0x1d80 );/* 1 */ -/* ------------------------------------------------ -* Initialize Port B SPI pins -> page 34-8 MPC860UM -* (we are only in Master Mode !) -* ------------------------------------------------ */ - -/* -------------------------------------------- -* GPIO or per. Function -* PBPAR[28] = 1 [0x00000008] -> PERI: (SPIMISO) -* PBPAR[29] = 1 [0x00000004] -> PERI: (SPIMOSI) -* PBPAR[30] = 1 [0x00000002] -> PERI: (SPICLK) -* PBPAR[31] = 0 [0x00000001] -> GPIO: (CS for PCUE/CCM-EEPROM) -* -------------------------------------------- */ -clrsetbits_be32 (&cp->cp_pbpar,0x00000001 ,0x0000000E );/* set bits */ - -/* ---------------------------------------------- -* In/Out or per. Function 0/1 -* PBDIR[28] = 1 [0x00000008] -> PERI1: SPIMISO -* PBDIR[29] = 1 [0x00000004] -> PERI1: SPIMOSI -* PBDIR[30] = 1 [0x00000002] -> PERI1: SPICLK -* PBDIR[31] = 1 [0x00000001] -> GPIO OUT: CS for PCUE/CCM-EEPROM -* ---------------------------------------------- */ -setbits_be32 (&cp->cp_pbdir,0x0000000F ); - -/* ---------------------------------------------- -* open drain or active output -* PBODR[28] = 1 [0x00000008] -> open drain: SPIMISO -* PBODR[29] = 0 [0x00000004] -> active output SPIMOSI -* PBODR[30] = 0 [0x00000002] -> active output: SPICLK -* PBODR[31] = 0 [0x00000001] -> active output GPIO OUT: CS for PCUE/CCM -* ---------------------------------------------- */ - -clrsetbits_be16 (&cp->cp_pbodr,0x00000007 ,0x00000008 ); -/* Initialize the parameter ram. * We need to make sure many things are initialized to zero */
@@ -143,6 +127,22 @@ static int mpc8xx_spi_probe(struct udevice *dev)return 0 ; } +static void mpc8xx_spi_cs_activate (struct udevice *dev) +{ +struct mpc8xx_priv *priv =dev_get_priv (dev->parent); +struct dm_spi_slave_plat *platdata =dev_get_parent_plat (dev); + +dm_gpio_set_value (&priv->gpios[platdata->cs],1 ); +} + +static void mpc8xx_spi_cs_deactivate (struct udevice *dev) +{ +struct mpc8xx_priv *priv =dev_get_priv (dev->parent); +struct dm_spi_slave_plat *platdata =dev_get_parent_plat (dev); + +dm_gpio_set_value (&priv->gpios[platdata->cs],0 ); +} +static int mpc8xx_spi_xfer (struct udevice *dev,unsigned int bitlen,const void *dout,void *din,unsigned long flags) {
@@ -159,7 +159,8 @@ static int mpc8xx_spi_xfer(struct udevice *dev, unsigned int bitlen, rbdf = (cbd_t __iomem *)&cp->cp_dpmem[CPM_SPI_BASE_RX ];/* Set CS for device */ -clrbits_be32 (&cp->cp_pbdat,0x0001 ); +if (flags &SPI_XFER_BEGIN ) +mpc8xx_spi_cs_activate (dev);/* Setting tx bd status and data length */ out_be32 (&tbdf->cbd_bufaddr, (ulong )dout);
@@ -186,21 +187,40 @@ static int mpc8xx_spi_xfer(struct udevice *dev, unsigned int bitlen,for (tm =0 ; tm <1000 ; ++tm) {if (in_8 (&cp->cp_spie) &SPI_TXB )/* Tx Buffer Empty */ break ; +if ((in_be16 (&tbdf->cbd_sc) &BD_SC_READY ) ==0 )break ;udelay (1000 ); } +if (tm >=1000 )printf ("*** spi_xfer: Time out while xferring to/from SPI!\n" );/* Clear CS for device */ -setbits_be32 (&cp->cp_pbdat,0x0001 ); +if (flags &SPI_XFER_END ) +mpc8xx_spi_cs_deactivate (dev); -return count; +return 0 ; } +static int mpc8xx_spi_ofdata_to_platdata (struct udevice *dev) +{ +struct mpc8xx_priv *priv =dev_get_priv (dev); +int ret; + + ret =gpio_request_list_by_name (dev,"gpios" , priv->gpios, +ARRAY_SIZE (priv->gpios),GPIOD_IS_OUT ); +if (ret <0 ) +return ret; + + priv->max_cs = ret; + +return 0 ; +}static const struct dm_spi_ops mpc8xx_spi_ops = { .xfer = mpc8xx_spi_xfer, + .set_speed = mpc8xx_spi_set_speed, + .set_mode = mpc8xx_spi_set_mode, };static const struct udevice_id mpc8xx_spi_ids[] = {
@@ -212,6 +232,8 @@ U_BOOT_DRIVER(mpc8xx_spi) = { .name = "mpc8xx_spi", .id = UCLASS_SPI, .of_match = mpc8xx_spi_ids, + .of_to_plat = mpc8xx_spi_ofdata_to_platdata, .ops = &mpc8xx_spi_ops, .probe = mpc8xx_spi_probe, + .priv_auto = sizeof(struct mpc8xx_priv), };
Signature · 1 line
2.39.1
v2 cover Add new equipment from CSSI - v2
This series adds a new CPU board called CMPC885 which is used on two equipments called MCR3000 second generation and MIAE/VGoIP devices, manufactured by former CSSI company now called CS GROUP France.
This new board has a mpc 885 cpu.
The four first patches of the series update the already included MCR3000 board in order to get more similarities.
Changes in v2:
- Migrate existing board to CONFIG_EXTRA_ENV_TEXT and also use that for the new board
- Rebased on top of 2023.04-rc1
- More aggressive filename changes to lowercase
- CI: https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/15137
Christophe Leroy (8):
board: MCR3000: Use lowercase filenames
board: MCR3000: Migrate to using CONFIG_EXTRA_ENV_TEXT
board: MCR3000: Modernise the settings to properly work on lastest
u-boot version
board: MCR3000: Remove update of non-existing e1-wan DT node driver, gpio: Add support for MPC 8xx CPU ports
spi, mpc8xx: Add support for chipselect via GPIO and fixups
board: cssi: Add new board MCR3000_2G
board: cssi: Add MIAE & VGoIP devices
arch/powerpc/Kconfig | 1 +
arch/powerpc/cpu/mpc8xx/Kconfig | 6 +-
arch/powerpc/dts/Makefile | 1 +
arch/powerpc/dts/cmpc885.dts | 94 ++
arch/powerpc/include/asm/arch-mpc8xx/gpio.h | 12 +
board/cssi/MAINTAINERS | 4 +-
board/cssi/cmpc885/Kconfig | 23 +
board/cssi/{MCR3000 => cmpc885}/Makefile | 6 +-
board/cssi/cmpc885/cmpc885.c | 1106 +++++++++++++++++
board/cssi/cmpc885/cmpc885.env | 7 +
board/cssi/cmpc885/nand.c | 47 +
board/cssi/cmpc885/sdram.c | 107 ++
board/cssi/{MCR3000 => cmpc885}/u-boot.lds | 2 +-
board/cssi/{MCR3000 => mcr3000}/Kconfig | 4 +-
board/cssi/{MCR3000 => mcr3000}/Makefile | 2 +-
.../{MCR3000/MCR3000.c => mcr3000/mcr3000.c} | 12 -
board/cssi/mcr3000/mcr3000.env | 14 +
board/cssi/{MCR3000 => mcr3000}/nand.c | 0
board/cssi/{MCR3000 => mcr3000}/u-boot.lds | 0
.../{MCR3000_defconfig => CMPC885_defconfig} | 87 +-
configs/MCR3000_defconfig | 10 +-
drivers/gpio/Kconfig | 7 +
drivers/gpio/Makefile | 1 +
drivers/gpio/mpc8xx_gpio.c | 347 ++++++
drivers/spi/mpc8xx_spi.c | 96 +-
include/configs/MCR3000.h | 83 --
include/configs/cmpc885.h | 29 +
include/configs/mcr3000.h | 40 +
28 files changed, 1966 insertions(+), 182 deletions(-)
create mode 100644 arch/powerpc/dts/cmpc885.dts
create mode 100644 arch/powerpc/include/asm/arch-mpc8xx/gpio.h
create mode 100644 board/cssi/cmpc885/Kconfig
copy board/cssi/{MCR3000 => cmpc885}/Makefile (52%)
create mode 100644 board/cssi/cmpc885/cmpc885.c
create mode 100644 board/cssi/cmpc885/cmpc885.env
create mode 100644 board/cssi/cmpc885/nand.c
create mode 100644 board/cssi/cmpc885/sdram.c
copy board/cssi/{MCR3000 => cmpc885}/u-boot.lds (97%)
rename board/cssi/{MCR3000 => mcr3000}/Kconfig (78%)
rename board/cssi/{MCR3000 => mcr3000}/Makefile (90%)
rename board/cssi/{MCR3000/MCR3000.c => mcr3000/mcr3000.c} (90%)
create mode 100644 board/cssi/mcr3000/mcr3000.env
rename board/cssi/{MCR3000 => mcr3000}/nand.c (100%)
rename board/cssi/{MCR3000 => mcr3000}/u-boot.lds (100%)
copy configs/{MCR3000_defconfig => CMPC885_defconfig} (54%)
create mode 100644 drivers/gpio/mpc8xx_gpio.c
delete mode 100644 include/configs/MCR3000.h
create mode 100644 include/configs/cmpc885.h
create mode 100644 include/configs/mcr3000.hSignature · 1 line
2.39.1
PATCH v2 1/8 board: MCR3000: Use lowercase filenames
Rename MCR3000.* to mcr3000.* to be more in line with other boards.
---
arch/powerpc/cpu/mpc8xx/Kconfig | 2 +-
board/cssi/MAINTAINERS | 2 +-
board/cssi/{MCR3000 => mcr3000}/Kconfig | 4 ++--
board/cssi/{MCR3000 => mcr3000}/Makefile | 2 +-
board/cssi/{MCR3000/MCR3000.c => mcr3000/mcr3000.c} | 0
board/cssi/{MCR3000 => mcr3000}/nand.c | 0
board/cssi/{MCR3000 => mcr3000}/u-boot.lds | 0
include/configs/{MCR3000.h => mcr3000.h} | 0
8 files changed, 5 insertions(+), 5 deletions(-)
rename board/cssi/{MCR3000 => mcr3000}/Kconfig (78%)
rename board/cssi/{MCR3000 => mcr3000}/Makefile (90%)
rename board/cssi/{MCR3000/MCR3000.c => mcr3000/mcr3000.c} (100%)
rename board/cssi/{MCR3000 => mcr3000}/nand.c (100%)
rename board/cssi/{MCR3000 => mcr3000}/u-boot.lds (100%)
rename include/configs/{MCR3000.h => mcr3000.h} (100%)arch/powerpc/cpu/mpc8xx/Kconfig +1 -1
@@ -84,6 +84,6 @@ config SYS_DER help Debug Event Register (37-47) -source "board/cssi/MCR3000/Kconfig" +source "board/cssi/mcr3000/Kconfig" endmenu
board/cssi/MAINTAINERS +1 -1
@@ -2,5 +2,5 @@ BOARDS from CS GROUP France M: Christophe Leroy <[email protected]> S: Maintained F: board/cssi/ -F: include/configs/MCR3000.h +F: include/configs/mcr3000.h F: configs/MCR3000_defconfig
board/cssi/mcr3000/Kconfig renamed from board/cssi/MCR3000/Kconfig +2 -2
@@ -1,13 +1,13 @@ if TARGET_MCR3000 config SYS_BOARD - default "MCR3000" + default "mcr3000" config SYS_VENDOR default "cssi" config SYS_CONFIG_NAME - default "MCR3000" + default "mcr3000" config TEXT_BASE default 0x04000000
board/cssi/mcr3000/Makefile renamed from board/cssi/MCR3000/Makefile +1 -1
@@ -4,5 +4,5 @@ # Christophe Leroy <[email protected]> # -obj-y += MCR3000.o +obj-y += mcr3000.o obj-$(CONFIG_CMD_NAND) += nand.o
board/cssi/mcr3000/mcr3000.c renamed from board/cssi/MCR3000/MCR3000.c +0 -0
board/cssi/mcr3000/nand.c renamed from board/cssi/MCR3000/nand.c +0 -0
board/cssi/mcr3000/u-boot.lds renamed from board/cssi/MCR3000/u-boot.lds +0 -0
include/configs/mcr3000.h renamed from include/configs/MCR3000.h +0 -0
Signature · 1 line
2.39.1
PATCH v2 3/8 board: MCR3000: Modernise the settings to properly work on lastest u-boot version
In reply to Christophe LeroyBoth U-boot and Linux kernel have grown over the last releases and don't fit anymore in the 2M EPROM of the board.
So, rework the setup to allow storing the Linux kernel image on the UBIFS NAND Flash.
Also add support to FIT images as this is what the Linux kernel look like nowadays.
Also increase CFG_SYS_BOOTMAPSZ to 32Mbytes and define CONFIG_SYS_BOOTM_LEN with the same value, otherwise it defaults to 8M which is not sufficient anymore with nowadays Linux kernels.
And set the netmask to 255.255.255.0 as a class C address is used.
--- board/cssi/mcr3000/mcr3000.env | 16 ++++++++-------- configs/MCR3000_defconfig | 10 +++++++--- include/configs/mcr3000.h | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-)
board/cssi/mcr3000/mcr3000.env +8 -8
@@ -2,13 +2,13 @@ sdram_type=SDRAM flash_type=AM29LV160DB -loadaddr=0x400000 -filename=uImage.lzma -nfsroot=/opt/ofs +loadaddr=0x1200000 +filename=mcr3000.itb dhcp_ip=ip=:::::eth0:dhcp console_args=console=ttyCPM0,115200N8 -flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off;${ofl_args}; bootm 0x04060000 - 0x04050000 -tftpboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename};tftp 0xf00000 mcr3000.dtb;bootm ${loadaddr} - 0xf00000 -netboot=dhcp ${loadaddr} ${filename};tftp 0xf00000 mcr3000.dtb;setenv bootargs root=/dev/nfs rw ${console_args} ${dhcp_ip};bootm ${loadaddr} - 0xf00000 -nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${nfsroot} ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off;bootm 0x04060000 - 0x04050000 -dhcpboot=dhcp ${loadaddr} ${filename};tftp 0xf00000 mcr3000.dtb;setenv bootargs ${console_args} ${dhcp_ip} ${ofl_args}; bootm ${loadaddr} - 0xf00000 +loadkernel=ubi part nand0;ubifsmount ubi0;ubifsload ${loadaddr} /boot/${filename};ubifsumount; ubi detach +bootcmd=run flashboot +flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off;${ofl_args}; run loadkernel; bootm ${loadaddr} +tftpboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename}; bootm ${loadaddr} +dhcpboot=dhcp ${loadaddr} ${filename};setenv bootargs ${console_args} ${dhcp_ip} ${ofl_args}; bootm ${loadaddr} +update=echo 'Updating ubi image'; if tftp 0x2000 $ubifile; then nand erase.chip; nand write 0x2000 0x00 $filesize; fi
configs/MCR3000_defconfig +7 -3
@@ -20,6 +20,7 @@ CONFIG_SYS_SCCR=0x00C20000 CONFIG_SYS_SCCR_MASK=0x60000000 CONFIG_SYS_DER=0x2002000F CONFIG_SYS_MONITOR_LEN=327680 +CONFIG_FIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_MONITOR_BASE=0x04000000 CONFIG_BOOTDELAY=5
@@ -36,11 +37,12 @@ CONFIG_HUSH_PARSER=y CONFIG_SYS_PBSIZE=278 # CONFIG_CMD_BDI is not set # CONFIG_CMD_CONSOLE is not set -CONFIG_SYS_BOOTM_LEN=0x800000 +CONFIG_SYS_BOOTM_LEN=0x2000000 # CONFIG_CMD_IMI is not set CONFIG_CMD_ASKENV=y # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set +CONFIG_CMD_MTD=y CONFIG_CMD_NAND=y # CONFIG_CMD_ECHO is not set # CONFIG_CMD_ITEST is not set
@@ -51,6 +53,8 @@ CONFIG_CMD_MII=y CONFIG_MII_INIT=y CONFIG_CMD_PING=y # CONFIG_CMD_SLEEP is not set +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_FLASH=y
@@ -58,7 +62,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_IPADDR=y CONFIG_IPADDR="192.168.0.3" CONFIG_USE_NETMASK=y -CONFIG_NETMASK="255.0.0.0" +CONFIG_NETMASK="255.255.255.0" CONFIG_USE_SERVERIP=y CONFIG_SERVERIP="192.168.0.1" CONFIG_SYS_BR0_PRELIM_BOOL=y
@@ -87,6 +91,7 @@ CONFIG_SYS_BR7_PRELIM=0x1C000001 CONFIG_SYS_OR7_PRELIM=0xFFFF810A # CONFIG_MMC is not set CONFIG_MTD=y +CONFIG_DM_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_FLASH_SHOW_PROGRESS=0
@@ -97,5 +102,4 @@ CONFIG_MPC8XX_FEC=y # CONFIG_PCI is not set CONFIG_DM_SERIAL=y CONFIG_WDT=y -CONFIG_SHA256=y CONFIG_LZMA=y
include/configs/mcr3000.h +2 -2
@@ -23,10 +23,10 @@/* * For booting Linux, the board info and command line data -* have to be in the first 8 MB of memory, since this is +* have to be in the first 32 MB of memory, since this is * the maximum mapped by the Linux kernel during initialization. */ -#define CFG_SYS_BOOTMAPSZ (8 << 20) +#define CFG_SYS_BOOTMAPSZ (32 << 20)/* Environment Configuration */
Signature · 1 line
2.39.1
PATCH v2 2/8 board: MCR3000: Migrate to using CONFIG_EXTRA_ENV_TEXT
In reply to Christophe LeroyWe can move all of the environment changes to come from CONFIG_EXTRA_ENV_TEXT.
--- board/cssi/mcr3000/mcr3000.env | 14 +++++++++++ include/configs/mcr3000.h | 43 ---------------------------------- 2 files changed, 14 insertions(+), 43 deletions(-) create mode 100644 board/cssi/mcr3000/mcr3000.env
board/cssi/mcr3000/mcr3000.env new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +sdram_type=SDRAM +flash_type=AM29LV160DB +loadaddr=0x400000 +filename=uImage.lzma +nfsroot=/opt/ofs +dhcp_ip=ip=:::::eth0:dhcp +console_args=console=ttyCPM0,115200N8 +flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off;${ofl_args}; bootm 0x04060000 - 0x04050000 +tftpboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename};tftp 0xf00000 mcr3000.dtb;bootm ${loadaddr} - 0xf00000 +netboot=dhcp ${loadaddr} ${filename};tftp 0xf00000 mcr3000.dtb;setenv bootargs root=/dev/nfs rw ${console_args} ${dhcp_ip};bootm ${loadaddr} - 0xf00000 +nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${nfsroot} ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off;bootm 0x04060000 - 0x04050000 +dhcpboot=dhcp ${loadaddr} ${filename};tftp 0xf00000 mcr3000.dtb;setenv bootargs ${console_args} ${dhcp_ip} ${ofl_args}; bootm ${loadaddr} - 0xf00000
include/configs/mcr3000.h +0 -43
49 lines not on this page · raw message
Signature · 1 line
2.39.1
PATCH v2 5/8 driver, gpio: Add support for MPC 8xx CPU ports
In reply to Christophe LeroyPorts A, C and D are 16 bits ports.
Ports B and E are 32 bits ports.
The "compatible" is used to determine each port type.
This patch was originally written by Charles Frey who's email address is not valid anymore as he left the company.
--- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/arch-mpc8xx/gpio.h | 12 + drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/mpc8xx_gpio.c | 347 ++++++++++++++++++++ 5 files changed, 368 insertions(+) create mode 100644 arch/powerpc/include/asm/arch-mpc8xx/gpio.h create mode 100644 drivers/gpio/mpc8xx_gpio.c
arch/powerpc/Kconfig +1 -0
@@ -28,6 +28,7 @@ config MPC85xx config MPC8xx bool "MPC8xx" + select CREATE_ARCH_SYMLINK select BOARD_EARLY_INIT_F imply CMD_REGINFO imply WDT_MPC8xx
arch/powerpc/include/asm/arch-mpc8xx/gpio.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef _MPC8XX_GPIO_H_ +#define _MPC8XX_GPIO_H_ + +struct mpc8xx_gpio_plat { +ulong addr; +unsigned long size; +uint ngpios; +}; + +#endif /* MPC8XX_GPIO_H_ */
drivers/gpio/Kconfig +7 -0
@@ -547,6 +547,13 @@ config MPC8XXX_GPIO value setting, the open-drain feature, which can configure individual GPIOs to work as open-drain outputs, is supported. +config MPC8XX_GPIO + bool "Freescale MPC8XX GPIO driver" + depends on DM_GPIO + help + This driver supports parallel IO ports from MPC8XX CPUs. + Each GPIO bank is identified by its own entry in the device tree. + config MPC83XX_SPISEL_BOOT bool "Freescale MPC83XX SPISEL_BOOT driver" depends on DM_GPIO && ARCH_MPC830X
drivers/gpio/Makefile +1 -0
@@ -42,6 +42,7 @@ obj-$(CONFIG_DM644X_GPIO) += da8xx_gpio.o obj-$(CONFIG_ALTERA_PIO) += altera_pio.o obj-$(CONFIG_MPC83XX_GPIO) += mpc83xx_gpio.o obj-$(CONFIG_MPC8XXX_GPIO) += mpc8xxx_gpio.o +obj-$(CONFIG_MPC8XX_GPIO) += mpc8xx_gpio.o obj-$(CONFIG_MPC83XX_SPISEL_BOOT) += mpc83xx_spisel_boot.o obj-$(CONFIG_SH_GPIO_PFC) += sh_pfc.o obj-$(CONFIG_OMAP_GPIO) += omap_gpio.o
drivers/gpio/mpc8xx_gpio.c new file +347 -0
347 lines not on this page · raw message
Signature · 1 line
2.39.1
PATCH v2 8/8 board: cssi: Add MIAE & VGoIP devices
In reply to Christophe LeroyThis adds support for the MIAE and VGoIP devices. Those devices have the same CPU board that the MCR3000_2G board.
The devices are very modular, they are provided with interchangeable front and back panels.
Linux kernel is shipped with a device tree which contains all possible setups, and U-boot eliminates unrelated nodes based on detected hardware.
This patch was originally written by Charles Frey who's email address is not valid anymore as he left the company.
--- board/cssi/cmpc885/cmpc885.c | 286 ++++++++++++++++++++++++++++++++++- 1 file changed, 281 insertions(+), 5 deletions(-)
board/cssi/cmpc885/cmpc885.c +281 -5
@@ -29,8 +29,16 @@ DECLARE_GLOBAL_DATA_PTR;#define BOARD_CMPC885 "cmpc885"#define BOARD_MCR3000_2G "mcr3k_2g" +#define BOARD_VGOIP "vgoip" +#define BOARD_MIAE "miae"#define TYPE_MCR 0x22 +#define TYPE_MIAE 0x23 + +#define FAR_CASRSA 2 +#define FAR_VGOIP 4 +#define FAV_CLA 7 +#define FAV_SRSA 8#define ADDR_CPLD_R_RESET ((unsigned short __iomem *)CONFIG_CPLD_BASE)#define ADDR_CPLD_R_ETAT ((unsigned short __iomem *)(CONFIG_CPLD_BASE + 2))
@@ -38,6 +46,12 @@ DECLARE_GLOBAL_DATA_PTR;#define ADDR_FPGA_R_BASE ((unsigned char __iomem *)CONFIG_FPGA_BASE)#define ADDR_FPGA_R_ALARMES_IN ((unsigned char __iomem *)CONFIG_FPGA_BASE + 0x31) +#define ADDR_FPGA_R_FAV ((unsigned char __iomem *)CONFIG_FPGA_BASE + 0x44) + +#define PATH_PHY2 "/soc@ff000000/mdio@e00/ethernet-phy@2" +#define PATH_PHY3 "/soc@ff000000/mdio@e00/ethernet-phy@3" +#define PATH_ETH1 "/soc@ff000000/ethernet@1e00" +#define FIBER_PHY PATH_PHY2#define FPGA_R_ACQ_AL_FAV 0x04#define R_ETAT_PRES_BASE 0x0040
@@ -45,15 +59,68 @@ DECLARE_GLOBAL_DATA_PTR;#define R_RESET_STATUS 0x0400#define R_RST_STATUS 0x0004 +static int fdt_set_node_and_value (void *blob,char *node,const char *prop, +void *var,int size) +{ +int ret, off; + + off =fdt_path_offset (blob, node); + +if (off <0 ) { +printf ("Cannot find %s node err:%s\n" , node,fdt_strerror (off)); + +return off; + } + + ret =fdt_setprop (blob, off, prop, var, size); + +if (ret <0 ) +printf ("Cannot set %s/%s prop err: %s\n" , node, prop,fdt_strerror (ret)); + +return ret; +} + +/* Checks front/rear id and remove unneeded nodes from the blob */ +static void ft_cleanup (void *blob,uint32_t id,const char *prop,const char *compatible) +{ +int off; + + off =fdt_node_offset_by_compatible (blob,-1 , compatible); + +while (off != -FDT_ERR_NOTFOUND ) { +const struct fdt_property *ids; +int nb_ids, idx; +int tmp =-1 ; + + ids =fdt_get_property (blob, off, prop, &nb_ids); + +for (idx =0 ; idx < nb_ids; idx +=4 ) { +if (*((uint32_t *)&ids->data[idx]) == id) +break ; + } + +if (idx >= nb_ids) +fdt_del_node (blob, off); +else + tmp = off; + + off =fdt_node_offset_by_compatible (blob, tmp, compatible); + } + +fdt_set_node_and_value (blob,"/" , prop, &id,sizeof (uint32_t )); +} +int ft_board_setup (void *blob,struct bd_info *bd) { +u8 fav_id, far_id; +const char *sync ="receive" ;ft_cpu_setup (blob, bd);/* BRG */ -do_fixup_by_path_u32 (blob,"/soc/cpm" ,"brg-frequency" , - bd->bi_busfreq,1 ); +do_fixup_by_path_u32 (blob,"/soc/cpm" ,"brg-frequency" , bd->bi_busfreq,1 ); +/* MAC addr */ fdt_fixup_ethernet (blob);
@@ -67,8 +134,33 @@ int ft_board_setup(void *blob, struct bd_info *bd)do_fixup_by_path_u32 (blob,"/localbus/e1" ,"channel-phase" ,0 ,1 );/* E1 interface - rising edge sync pulse transmit */ -do_fixup_by_path (blob,"/localbus/e1" ,"rising-edge-sync-pulse" , - sync,strlen (sync),1 ); +do_fixup_by_path (blob,"/localbus/e1" ,"rising-edge-sync-pulse" , sync,strlen (sync),1 ); + +/* MIAE only */ +if (!(in_be16 (ADDR_CPLD_R_ETAT ) &R_ETAT_PRES_BASE ) ||in_8 (ADDR_FPGA_R_BASE ) !=TYPE_MIAE ) +return 0 ; + + far_id =in_8 (ADDR_FPGA_R_BASE +0x43 ) >>5 ; +ft_cleanup (blob, (u32 )far_id,"far-id" ,"cs,mia-far" ); + +/* +* special case, with CASRSA (far_id: 2) +* FAV-SRSA register itself as FAV-CLA +*/ + fav_id =in_8 (ADDR_FPGA_R_BASE +0x44 ) >>5 ; + +if (far_id ==FAR_CASRSA && fav_id ==FAV_CLA ) + fav_id =FAV_SRSA ; + +ft_cleanup (blob, (u32 )fav_id,"fav-id" ,"cs,mia-fav" ); + +if (far_id ==FAR_CASRSA ) { +/* switch to phy3 with gpio, we'll only use phy3 */ +immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR ; +cpm8xx_t __iomem *cp = (cpm8xx_t __iomem *)&immr->im_cpm; + +setbits_be32 (&cp->cp_pedat,0x00002000 ); + }return 0 ; }
@@ -80,8 +172,18 @@ int checkboard(void)/* Is a motherboard present ? */ if (in_be16 (ADDR_CPLD_R_ETAT ) &R_ETAT_PRES_BASE ) {switch (in_8 (ADDR_FPGA_R_BASE )) { +int far_id;case TYPE_MCR :printf ("MCR3000_2G (CS GROUP)\n" ); +break ; +case TYPE_MIAE : + far_id =in_8 (ADDR_FPGA_R_BASE +0x43 ) >>5 ; + +if (far_id ==FAR_VGOIP ) +printf ("VGoIP (CS GROUP)\n" ); +else +printf ("MIAE (CS GROUP)\n" ); +break ;default :printf ("Unknown\n" );
@@ -149,7 +251,8 @@ static int setup_mac(void)int misc_init_r (void ) { -u8 val; +u8 val, tmp, far_id; +int count =3 ; val =in_8 (ADDR_FPGA_R_BASE );
@@ -165,6 +268,31 @@ int misc_init_r(void)env_set ("config" ,BOARD_MCR3000_2G );env_set ("hostname" ,BOARD_MCR3000_2G );break ; + +case TYPE_MIAE : +do { + tmp =in_8 (ADDR_FPGA_R_BASE +0x41 ); + count--; +mdelay (10 );/* 10msec wait */ + }while (count && tmp !=in_8 (ADDR_FPGA_R_BASE +0x41 )); + +if (!count) { +printf ("Cannot read the reset factory switch position\n" ); +hang (); + } + +if (tmp &0x1 ) +env_set_default ("Factory settings switch ON" ,0 ); + +env_set ("config" ,BOARD_MIAE ); + far_id =in_8 (ADDR_FPGA_R_BASE +0x43 ) >>5 ; + +if (far_id ==FAR_VGOIP ) +env_set ("hostname" ,BOARD_VGOIP ); +else +env_set ("hostname" ,BOARD_MIAE ); +break ; +default :env_set ("config" ,BOARD_CMPC885 );env_set ("hostname" ,BOARD_CMPC885 );
@@ -488,6 +616,150 @@ static void iop_setup_cmpc885(void)clrbits_be32 (&cp->cp_peso,0x00031980 ); } +static void iop_setup_miae (void ) +{ +immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR ; +iop8xx_t __iomem *iop = &immr->im_ioport; +cpm8xx_t __iomem *cp = &immr->im_cpm; + +/* Wait reset on FPGA_F */ +udelay (100 ); + +/* Set the front panel LED color to red */ +clrbits_8 (ADDR_FPGA_R_FAV ,0x02 ); + +/* We must initialize data before changing direction */ +setbits_be16 (&iop->iop_pcdat,0x0888 ); +setbits_be16 (&iop->iop_pddat,0x0201 ); +setbits_be32 (&cp->cp_pbdat,0x00021510 ); +setbits_be32 (&cp->cp_pedat,0x00000002 ); + +/* +* PAPAR[13] = 1 [0x0004] -> GPIO: (RXD2) +* PAPAR[12] = 1 [0x0008] -> GPIO: (TXD2) +* PAPAR[9] = 1 [0x0040] -> GPIO: (TDM1O) +* PAPAR[8] = 1 [0x0080] -> GPIO: (TDM1I) +* PAPAR[7] = 1 [0x0100] -> GPIO: (TDM_BCLK_MPC) +* PAPAR[6] = 1 [0x0200] -> GPIO: (CLK2) +*/ +setbits_be16 (&iop->iop_papar,0x03CC ); + +/* +* PBODR[16] = 0 [0x00008000] -> GPIO: (L1ST4) +*/ +clrbits_be16 (&cp->cp_pbodr,0x00008000 ); + +/* +* PBDIR[27] = 1 [0x00000010] -> GPIO: (WR_TEMP2) +* PBDIR[26] = 1 [0x00000020] -> GPIO: (BRG02) +* PBDIR[23] = 1 [0x00000100] -> GPIO: (CS_TEMP2) +* PBDIR[18] = 1 [0x00002000] -> GPIO: (RTS2) +* PBDIR[16] = 0 [0x00008000] -> GPIO: (L1ST4) +* PBDIR[15] = 1 [0x00010000] -> GPIO: (BRG03) +* PBDIR[14] = 1 [0x00020000] -> GPIO: (CS_TEMP) +*/ +clrsetbits_be32 (&cp->cp_pbdir,0x0003A130 ,0x00032130 ); + +/* +* PBPAR[20] = 1 [0x00000800] -> GPIO: (SMRXD2) +* PBPAR[17] = 1 [0x00004000] -> GPIO: (L1ST3) +* PBPAR[16] = 1 [0x00008000] -> GPIO: (L1ST4) +*/ +setbits_be32 (&cp->cp_pbpar,0x0000C800 ); + +/* +* PCPAR[14] = 1 [0x0002] -> GPIO: (L1ST2) +*/ +setbits_be16 (&iop->iop_pcpar,0x0002 ); + +/* +* PDPAR[14] = 1 [0x0002] -> GPIO: (TDM_FS_MPC) +* PDPAR[11] = 1 [0x0010] -> GPIO: (RXD3) +* PDPAR[10] = 1 [0x0020] -> GPIO: (TXD3) +* PDPAR[9] = 1 [0x0040] -> GPIO: (TXD4) +* PDPAR[7] = 1 [0x0100] -> GPIO: (RTS3) +* PDPAR[5] = 1 [0x0400] -> GPIO: (CLK8) +* PDPAR[3] = 1 [0x1000] -> GPIO: (CLK7) +*/ +setbits_be16 (&iop->iop_pdpar,0x1572 ); + +/* +* PEPAR[27] = 1 [0x00000010] -> GPIO: (R2_RXER) +* PEPAR[26] = 1 [0x00000020] -> GPIO: (R2_CRS_DV) +* PEPAR[25] = 1 [0x00000040] -> GPIO: (RXD4) +* PEPAR[24] = 1 [0x00000080] -> GPIO: (BRG01) +* PEPAR[23] = 1 [0x00000100] -> GPIO: (L1ST1) +* PEPAR[22] = 1 [0x00000200] -> GPIO: (R2_RXD1) +* PEPAR[21] = 1 [0x00000400] -> GPIO: (R2_RXD0) +* PEPAR[20] = 1 [0x00000800] -> GPIO: (SMTXD2) +* PEPAR[19] = 1 [0x00001000] -> GPIO: (R2_TXEN) +* PEPAR[17] = 1 [0x00004000] -> GPIO: (CLK5) +* PEPAR[16] = 1 [0x00008000] -> GPIO: (R2_REF_CLK) +* PEPAR[15] = 1 [0x00010000] -> GPIO: (R2_TXD1) +* PEPAR[14] = 1 [0x00020000] -> GPIO: (R2_TXD0) +*/ +setbits_be32 (&cp->cp_pepar,0x0003DFF0 ); + +/* +* PADIR[9] = 1 [0x0040] -> GPIO: (TDM1O) +* PADIR[8] = 1 [0x0080] -> GPIO: (TDM1I) +* PADIR[5] = 0 [0x0400] -> GPIO: () +*/ +clrsetbits_be16 (&iop->iop_padir,0x04C0 ,0x00C0 ); + +/* +* PCDIR[15] = 1 [0x0001] -> GPIO: (WP_EEPROM2) +* PCDIR[14] = 1 [0x0002] -> GPIO: (L1ST2) +* PCDIR[13] = 0 [0x0004] -> GPIO: () +* PCDIR[12] = 1 [0x0008] -> GPIO: (CS_EEPROM2) +* PCDIR[8] = 1 [0x0080] -> GPIO: (CS_CODEC_2) +* PCDIR[4] = 1 [0x0800] -> GPIO: (CS_CODEC_1) +*/ +clrsetbits_be16 (&iop->iop_pcdir,0x088F ,0x088B ); + +/* +* PDDIR[9] = 1 [0x0040] -> GPIO: (TXD4) +* PDDIR[6] = 1 [0x0200] -> GPIO: (CS_CODEC_3) +*/ +setbits_be16 (&iop->iop_pddir,0x0240 ); + +/* +* PEDIR[30] = 1 [0x00000002] -> GPIO: (FPGA_FIRMWARE) +* PEDIR[27] = 1 [0x00000010] -> GPIO: (R2_RXER) +* PEDIR[26] = 1 [0x00000020] -> GPIO: (R2_CRS_DV) +* PEDIR[23] = 1 [0x00000100] -> GPIO: (L1ST1) +* PEDIR[22] = 1 [0x00000200] -> GPIO: (R2_RXD1) +* PEDIR[21] = 1 [0x00000400] -> GPIO: (R2_RXD0) +* PEDIR[19] = 1 [0x00001000] -> GPIO: (R2_TXEN) +* PEDIR[18] = 1 [0x00002000] -> GPIO: (PE18) +* PEDIR[16] = 1 [0x00008000] -> GPIO: (R2_REF_CLK) +* PEDIR[15] = 1 [0x00010000] -> GPIO: (R2_TXD1) +* PEDIR[14] = 1 [0x00020000] -> GPIO: (R2_TXD0) +*/ +setbits_be32 (&cp->cp_pedir,0x0003B732 ); + +/* +* PAODR[10] = 1 [0x0020] -> GPIO: (INIT_FPGA_F) +*/ +setbits_be16 (&iop->iop_paodr,0x0020 ); + +/* +* PEODR[30] = 1 [0x00000002] -> GPIO: (FPGA_FIRMWARE) +* PEODR[18] = 0 [0x00002000] -> GPIO: (PE18) +*/ +clrsetbits_be32 (&cp->cp_peodr,0x00002002 ,0x00000002 ); + +/* +* PESO[24] = 1 [0x00000080] -> GPIO: (BRG01) +* PESO[23] = 1 [0x00000100] -> GPIO: (L1ST1) +* PESO[20] = 1 [0x00000800] -> GPIO: (SMTXD2) +* PESO[19] = 1 [0x00001000] -> GPIO: (R2_TXEN) +* PESO[15] = 1 [0x00010000] -> GPIO: (R2_TXD1) +* PESO[14] = 1 [0x00020000] -> GPIO: (R2_TXD0) +*/ +setbits_be32 (&cp->cp_peso,0x00031980 ); +} +int board_early_init_f (void ) {return 0 ;
@@ -818,6 +1090,10 @@ int board_early_init_r(void)iop_setup_mcr ();break ; +case TYPE_MIAE : +iop_setup_miae (); +break ; +default :break ; }
Signature · 1 line
2.39.1
PATCH v2 7/8 board: cssi: Add new board MCR3000_2G
In reply to Christophe LeroyThis adds a new board from CS GROUP. The board is called MCR3000_2G, and has a CPU board called CMPC885.
That CPU board is shared with another equipment that will be added in a later patch.
That board stores Ethernet MAC addresses in an EEPROM which is accessed using SPI bus.
This patch was originally written by Charles Frey who's email address is not valid anymore as he left the company.
--- arch/powerpc/cpu/mpc8xx/Kconfig | 4 + arch/powerpc/dts/Makefile | 1 + arch/powerpc/dts/cmpc885.dts | 94 ++++ board/cssi/MAINTAINERS | 2 + board/cssi/cmpc885/Kconfig | 23 + board/cssi/cmpc885/Makefile | 10 + board/cssi/cmpc885/cmpc885.c | 830 ++++++++++++++++++++++++++++++++ board/cssi/cmpc885/cmpc885.env | 7 + board/cssi/cmpc885/nand.c | 47 ++ board/cssi/cmpc885/sdram.c | 107 ++++ board/cssi/cmpc885/u-boot.lds | 95 ++++ configs/CMPC885_defconfig | 110 +++++ include/configs/cmpc885.h | 29 ++ 13 files changed, 1359 insertions(+) create mode 100644 arch/powerpc/dts/cmpc885.dts create mode 100644 board/cssi/cmpc885/Kconfig create mode 100644 board/cssi/cmpc885/Makefile create mode 100644 board/cssi/cmpc885/cmpc885.c create mode 100644 board/cssi/cmpc885/cmpc885.env create mode 100644 board/cssi/cmpc885/nand.c create mode 100644 board/cssi/cmpc885/sdram.c create mode 100644 board/cssi/cmpc885/u-boot.lds create mode 100644 configs/CMPC885_defconfig create mode 100644 include/configs/cmpc885.h
arch/powerpc/cpu/mpc8xx/Kconfig +4 -0
@@ -11,6 +11,9 @@ choice config TARGET_MCR3000 bool "Support MCR3000 board from CSSI" +config TARGET_CMPC885 + bool "Support CMPC885 board from CSSI" + endchoice choice
@@ -86,4 +89,5 @@ config SYS_DER source "board/cssi/mcr3000/Kconfig" +source "board/cssi/cmpc885/Kconfig" endmenu
arch/powerpc/dts/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_TARGET_TUGE1) += kmtuge1.dtb dtb-$(CONFIG_TARGET_TUXX1) += kmtuxa1.dtb dtb-$(CONFIG_TARGET_MCR3000) += mcr3000.dtb dtb-$(CONFIG_TARGET_GAZERBEAM) += gazerbeam.dtb +dtb-$(CONFIG_TARGET_CMPC885) += cmpc885.dtb include $(srctree)/scripts/Makefile.dts
arch/powerpc/dts/cmpc885.dts new file +94 -0
94 lines not on this page · raw message
board/cssi/MAINTAINERS +2 -0
@@ -4,3 +4,5 @@ S: Maintained F: board/cssi/ F: include/configs/mcr3000.h F: configs/MCR3000_defconfig +F: include/configs/cmpc885.h +F: configs/CMPC885_defconfig
board/cssi/cmpc885/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_CMPC885 + +config SYS_BOARD + default "cmpc885" + +config SYS_VENDOR + default "cssi" + +config SYS_CONFIG_NAME + default "cmpc885" + +config TEXT_BASE + default 0x40000000 + +config CPLD_BASE + hex + default 0xc8000000 + +config FPGA_BASE + hex + default 0xd0000000 + +endif
board/cssi/cmpc885/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2010-2020 CS Group +# Charles Frey <[email protected]> +# Christophe Leroy <[email protected]> +# + +obj-y += cmpc885.o +obj-y += sdram.o +obj-$(CONFIG_CMD_NAND) += nand.o
board/cssi/cmpc885/cmpc885.c new file +830 -0
830 lines not on this page · raw message
board/cssi/cmpc885/cmpc885.env new file +7 -0
@@ -0,0 +1,7 @@ +loadaddr=0x1a00000 +filename=cmpc885.itb +console_args=console=ttyCPM0,115200N8 +loadkernel=ubi part nand0;ubifsmount ubi0;ubifsload ${loadaddr} /boot/${filename};ubifsumount; ubi detach +flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; run loadkernel; bootm $loadaddr#$config +tftpboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename};bootm $loadaddr#$config +update=echo 'Updating ubi image'; if tftp $loadaddr $ubifile; then nand erase.chip; nand write $loadaddr 0x00 $filesize; fi;
board/cssi/cmpc885/nand.c new file +47 -0
47 lines not on this page · raw message
board/cssi/cmpc885/sdram.c new file +107 -0
107 lines not on this page · raw message
board/cssi/cmpc885/u-boot.lds new file +95 -0
95 lines not on this page · raw message
configs/CMPC885_defconfig new file +110 -0
110 lines not on this page · raw message
include/configs/cmpc885.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2022 CS Group +*/ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* Definitions for initial stack pointer and data area (in DPRAM) */ +#define CFG_SYS_INIT_RAM_ADDR (CONFIG_SYS_IMMR + 0x2800) +#define CFG_SYS_INIT_RAM_SIZE (0x2e00 - 0x2800) + +/* RAM configuration (note that CFG_SYS_SDRAM_BASE must be zero) */ +#define CFG_SYS_SDRAM_BASE 0x00000000 + +/* FLASH Configuration */ +#define CFG_SYS_FLASH_BASE 0x40000000 + +/* +* For booting Linux, the board info and command line data +* have to be in the first 24 MB of memory, since this is +* the maximum mapped by the Linux kernel during initialization. +*/ +#define CFG_SYS_BOOTMAPSZ (32 << 20) + +/* NAND configuration part */ +#define CFG_SYS_NAND_BASE 0xC0000000 + +#endif /* __CONFIG_H */
Signature · 1 line
2.39.1