summaryrefslogtreecommitdiff
path: root/board/cssi
AgeCommit message (Collapse)AuthorFilesLines
2023-05-05board: cssi: Activate SMC relocation on CMPC885 board for MIAE deviceChristophe Leroy1-0/+4
When CMPC885 board is used for MIAE device, SCC2 SCC3 and SMC2 are used for serial lines. Therefore only SCC4 is available for handling the TDM line. In order to use SCC4 in QMC mode without loosing SMC2, SMC2 must be relocated. Activate SMC relocation and relocate SMC2 at offset 0x1fc0 which is unused. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04board: cssi: Load CMPC885's motherboard FPGA earlierChristophe Leroy1-20/+5
In order to know the motherboard type earlier, perform I/O ports initialisation and FPGA loading in board_early_init_f() instead of board_early_init_r(). This is needed to be able to load mpc8xx CPM microcode base on motherboard type and before starting to use the CPM. Console is not available yet so remove the printfs. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04board: cssi: Remove stale macro from cmpcpro.cChristophe Leroy1-5/+0
Three unused macros were left over. Remove them. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-04board: cssi: Remove duplicated FPGA loading sequence on CMPC885Christophe Leroy1-14/+0
A duplicated FPGA loading sequence appears after FPGA reset. Remove it. Fixes: dac3c6f625 ("board: cssi: Add new board MCR3000_2G") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28board: cssi: Add CPU board CMPCPROChristophe Leroy6-0/+491
CSSI has another CPU board, similar to the CMPC885 board that get plugged on the two base boards MCR3000_2G and MIAE. That CPU board is called CMPCPRO because it has a MPC8321E CPU, also known as Power QUICC II PRO. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28board: cssi: Move all mother board code into common.cChristophe Leroy3-133/+151
All the code used to manage the mother boards will be common to soon to come CPU board. Move all that code into common.c Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28board: cssi: Refactor EEPROM readChristophe Leroy3-31/+40
On cmpc885 board, the ethernet addresses are stored in an EEPROM that is accessed through SPI. A 3 bytes command is sent to the chip then the content gets read. At the time being a single block access is performed, ignoring the first 3 bytes read. Reword the SPI transfer to first send 3 bytes then receive the content of the EEPROM so that there don't be 3 dummy bytes at the beginning of the buffer. And move the function into common.c so that it can be reused by the board that will be added in a future patch. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-28board: cssi: Create dedicated file for common sourcesChristophe Leroy4-53/+73
In preparation of the new cssi board called cmpcpro which we be introduce in a future patch, move common functions into a dedicated file in a common directory. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-04-06watchdog: mpc8xxx: Make it genericChristophe Leroy1-14/+0
mpc8xx, mpc83xx and mpc86xx have similar watchdog with almost same memory registers. Refactor the driver to get the register addresses from the device tree and use the compatible to know the prescale factor. Calculate the watchdog setup value from the provided timeout. Don't declare it anymore as an HW_WATCHDOG, u-boot will start servicing the watchdog early enough. On mpc8xx the watchdog configuration register is also used for configuring the bus monitor. So add it as an option to the watchdog when it is mpc8xx. When watchdog is not selected, leave the configuration of the initial SYPCR from Kconfig. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-02-11board: cssi: Add MIAE & VGoIP devicesChristophe Leroy1-5/+281
This 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. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: FRANJOU Stephane <stephane.franjou@csgroup.eu>
2023-02-11board: cssi: Add new board MCR3000_2GChristophe Leroy8-0/+1121
This 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. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: FRANJOU Stephane <stephane.franjou@csgroup.eu>
2023-02-11board: MCR3000: Remove update of non-existing e1-wan DT nodeChristophe Leroy1-12/+0
e1-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 Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: FRANJOU Stephane <stephane.franjou@csgroup.eu>
2023-02-11board: MCR3000: Modernise the settings to properly work on lastest u-boot ↵Christophe Leroy1-8/+8
version Both 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. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: FRANJOU Stephane <stephane.franjou@csgroup.eu>
2023-02-11board: MCR3000: Migrate to using CONFIG_EXTRA_ENV_TEXTChristophe Leroy1-0/+14
We can move all of the environment changes to come from CONFIG_EXTRA_ENV_TEXT. Suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-02-10board: MCR3000: Use lowercase filenamesChristophe Leroy6-4/+4
Rename MCR3000.* to mcr3000.* to be more in line with other boards. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2022-12-06global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini1-1/+1
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass1-1/+1
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-06-23linker_lists: Rename sections to remove . prefixAndrew Scull1-2/+2
Rename the sections used to implement linker lists so they begin with '__u_boot_list' rather than '.u_boot_list'. The double underscore at the start is still distinct from the single underscore used by the symbol names. Having a '.' in the section names conflicts with clang's ASAN instrumentation which tries to add redzones between the linker list elements, causing expected accesses to fail. However, clang doesn't try to add redzones to user sections, which are names with all alphanumeric and underscore characters. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-06-16Update email address and company nameChristophe Leroy1-2/+2
This patch updates my email address and company name. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2021-10-06nand.h: Cleanup linux/mtd/rawnand.h usageTom Rini1-0/+1
We only include <linux/mtd/rawnand.h> in <nand.h> for the forward declaration of struct nand_chip, so do that directly. Then, include <linux/mtd/rawnand.h> where required directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada1-1/+1
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-05-19common: Drop linux/delay.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-12-03common: Move some board functions out of common.hSimon Glass1-0/+1
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-03common: Move serial functions out of common.hSimon Glass1-0/+1
These functions belong in serial.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Move env_set() to env.hSimon Glass1-0/+1
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-03board: MCR3000: use new DM watchdogChristophe Leroy2-1/+16
This patch switches MCR3000 board to the new DM watchdog. The change in u-boot.lds is because MCR3000.o grows a bit with this patch and doesn't fit anymore below env_offset on some versions of GCC. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-12-03board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROLChristophe Leroy1-0/+6
Add mcr3000 device tree and activate CONFIG_DM and CONFIG_OF_CONTROL Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini4-9/+4
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-06board: MCR3000: Use smaller flash sector for environmentChristophe Leroy1-3/+3
Latest versions of u-boot have increased in size and require more than the 256kb allocated to it. The MCR3000 board is equipped with an AM29LV160DB boot flash which is organised as follows: - One 16kb block - Two 8kb block - One 32kb block - Thirty one 64kb blocks At the time being, u-boot is a single piece occupying the 256 first kbytes, then the environment is stored in the following 64kb block The environment being quite tiny, we save one 64kb block by embedding the environment in the first 8kb block, hence allowing to increase the monitor size to 320kb. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06board: MCR3000: cleanup configChristophe Leroy1-0/+2
Some config is redundant with Kconfig. Fix it. Also remove unused configs Move SDRAM_MAX_SIZE in the only place it is used include/environment.h already defines CONFIG_ENV_SIZE from CONFIG_ENV_SECT_SIZE and defines CONFIG_ENV_ADDR as (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) remove BOOTARGS as bootargs is set by the different boot commands Fix CONFIG_SYS_INIT_RAM_ADDR and CONFIG_SYS_INIT_RAM_SIZE to be in line with CPM DPRAM organisation Remove CONFIG_SYS_GBL_DATA_SIZE, CONFIG_SYS_GBL_DATA_OFFSET and CONFIG_SYS_INIT_SP_OFFSET which are unused Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06board: MCR3000: replace mtd->priv by mtd_to_nand()Christophe Leroy1-1/+1
Since commit 17cb4b8f327eb ("mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data"), mtd_to_nand() has to be used instead of mtd->priv Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-08-16env: Rename setenv() to env_set()Simon Glass1-1/+1
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-08powerpc, 8xx: Add support for MCR3000 board from CSSIChristophe Leroy6-0/+331
CS Systemes d'Information (CSSI) manufactures two boards, named MCR3000 and CMPC885 which are respectively based on MPC866 and MPC885 processors. This patch adds support for the first board. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>