board/km: add support for seli8 design based on nxp ls102x
PATCH v4 5/5 board/km: add support for seli8 design based on nxp ls102x
The SELI8 design is a new tdm service unit card for Hitachi-Powergrids XMC and FOX product lines.
It is based on NXP LS1021 SoC and it provides following interfaces:
- IFC interface for NOR, NAND and external FPGA's
- 1 x RGMII ETH for debug purposes
- 2 x SGMII ETH for management communication via back-plane
- 1 x uQE HDLC for management communication via back-plane
- 1 x I2C for peripheral devices
- 1 x SPI for peripheral devices
- 1 x UART for debug logging
It is foreseen that the design will be later re-used for another XMC and FOX service cards with similar SoC requirements.
---
Changes for v2:
- fix patch subject to 60 characters
Changes for v3:
- remove obsolete CMDLINE_TAG
Changes for v4:
- rebase, include i2c deblocking from keymile/common.h
- move Kconfig's from board.h to board defconfig
- fix ENV_SIZE, it was typo or copy-paste error
---
--- arch/arm/Kconfig | 19 ++ arch/arm/dts/Makefile | 2 + arch/arm/dts/ls1021a-pg-wcom-seli8.dts | 111 +++++++++ board/keymile/Kconfig | 23 +- board/keymile/common/ivm.c | 19 +- board/keymile/pg-wcom-ls102xa/Kconfig | 19 ++ board/keymile/pg-wcom-ls102xa/MAINTAINERS | 10 + board/keymile/pg-wcom-ls102xa/Makefile | 11 + board/keymile/pg-wcom-ls102xa/ddr.c | 90 +++++++ board/keymile/pg-wcom-ls102xa/pg-wcom-ls102xa.c | 160 +++++++++++++ configs/pg_wcom_seli8_defconfig | 65 ++++++ include/configs/km/pg-wcom-ls102xa.h | 297 ++++++++++++++++++++++++ include/configs/pg-wcom-seli8.h | 45 ++++ 13 files changed, 860 insertions(+), 11 deletions(-) create mode 100644 arch/arm/dts/ls1021a-pg-wcom-seli8.dts create mode 100644 board/keymile/pg-wcom-ls102xa/Kconfig create mode 100644 board/keymile/pg-wcom-ls102xa/MAINTAINERS create mode 100644 board/keymile/pg-wcom-ls102xa/Makefile create mode 100644 board/keymile/pg-wcom-ls102xa/ddr.c create mode 100644 board/keymile/pg-wcom-ls102xa/pg-wcom-ls102xa.c create mode 100644 configs/pg_wcom_seli8_defconfig create mode 100644 include/configs/km/pg-wcom-ls102xa.h create mode 100644 include/configs/pg-wcom-seli8.h
arch/arm/Kconfig +19 -0
@@ -1517,6 +1517,24 @@ config TARGET_LS1021ATWR select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI imply SCSI +config TARGET_PG_WCOM_SELI8 + bool "Support Hitachi-Powergrids SELI8 service unit card" + select ARCH_LS1021A + select ARCH_SUPPORT_PSCI + select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT + select CPU_V7A + select CPU_V7_HAS_NONSEC + select CPU_V7_HAS_VIRT + select SYS_FSL_DDR + select FSL_DDR_INTERACTIVE + select VENDOR_KM + imply SCSI + help + Support for Hitachi-Powergrids SELI8 service unit card. + SELI8 is a QorIQ LS1021a based service unit card used + in XMC20 and FOX615 product families. + config TARGET_LS1021ATSN bool "Support ls1021atsn" select ARCH_LS1021A
@@ -2036,6 +2054,7 @@ source "board/variscite/dart_6ul/Kconfig" source "board/vscom/baltos/Kconfig" source "board/phytium/durian/Kconfig" source "board/xen/xenguest_arm64/Kconfig" +source "board/keymile/Kconfig" source "arch/arm/Kconfig.debug"
arch/arm/dts/Makefile +2 -0
@@ -399,6 +399,8 @@ dtb-$(CONFIG_ARCH_LS1021A) += ls1021a-qds-duart.dtb \ ls1021a-qds-lpuart.dtb \ ls1021a-twr-duart.dtb ls1021a-twr-lpuart.dtb \ ls1021a-iot-duart.dtb ls1021a-tsn.dtb +dtb-$(CONFIG_TARGET_PG_WCOM_SELI8) += ls1021a-pg-wcom-seli8.dtb + dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \ fsl-ls2080a-qds-42-x.dtb \ fsl-ls2080a-rdb.dtb \
arch/arm/dts/ls1021a-pg-wcom-seli8.dts new file +111 -0
111 lines not on this page · raw message
board/keymile/Kconfig +17 -6
@@ -20,8 +20,8 @@ config KM_PNVRAM config KM_PHRAM hex "Physical RAM" - default 0x17F000 if ARM - default 0x100000 if PPC + default 0x17F000 if ARM && !ARCH_LS1021A + default 0x100000 if PPC || ARCH_LS1021A depends on !ARCH_SOCFPGA help Start address of the physical RAM, which is the mounted /var folder.
@@ -30,13 +30,14 @@ config KM_RESERVED_PRAM hex "Reserved RAM" default 0x801000 if ARCH_KIRKWOOD default 0x0 if MPC83xx - default 0x1000 if MPC85xx + default 0x1000 if MPC85xx || ARCH_LS1021A depends on !ARCH_SOCFPGA help Reserved physical RAM area at the end of memory for special purposes. config KM_CRAMFS_ADDR hex "CRAMFS Address" + default 0x83000000 if ARCH_LS1021A default 0x3000000 depends on !ARCH_SOCFPGA help
@@ -44,16 +45,25 @@ config KM_CRAMFS_ADDR config KM_KERNEL_ADDR hex "Kernel Load Address" + default 0x82000000 if ARCH_LS1021A default 0x2000000 help Address where to load Linux kernel in RAM. config KM_FDT_ADDR hex "FDT Load Address" + default 0x82FC0000 if ARCH_LS1021A default 0x2FC0000 help Address where to load flattened device tree in RAM. +config SYS_PAX_BASE + hex "PAX IFC Base Address" + default 0x78000000 + depends on ARCH_LS1021A + help + IFC Base Address for PAXx FPGA. + config KM_CONSOLE_TTY string "KM Console" default "ttyS0"
@@ -69,9 +79,9 @@ config KM_DEF_NETDEV config KM_COMMON_ETH_INIT bool "Common Ethernet Initialization" default y if ARCH_KIRKWOOD || MPC83xx - default n if MPC85xx || ARCH_SOCFPGA + default n if MPC85xx || ARCH_SOCFPGA || ARCH_LS1021A help - Use the Ethernet initialization implemented in common code, which + Use the Ethernet initialization implemented in common code that detects if a Piggy board is present. config PIGGY_MAC_ADDRESS_OFFSET
@@ -90,7 +100,7 @@ config KM_MVEXTSW_ADDR config KM_IVM_BUS int "IVM I2C Bus" default 0 if ARCH_SOCFPGA - default 1 if ARCH_KIRKWOOD || MPC85xx + default 1 if ARCH_KIRKWOOD || MPC85xx || ARCH_LS1021A default 2 if MPC83xx help Identifier number of I2C bus, where the inventory EEPROM is connected to.
@@ -116,6 +126,7 @@ config SYS_IVM_EEPROM_PAGE_LEN source "board/keymile/km83xx/Kconfig" source "board/keymile/kmp204x/Kconfig" source "board/keymile/km_arm/Kconfig" +source "board/keymile/pg-wcom-ls102xa/Kconfig" endmenu
board/keymile/common/ivm.c +14 -5
@@ -306,11 +306,7 @@ static int ivm_populate_env(unsigned char *buf, int len, int mac_address_offset)return 0 ; page2 = &buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ]; -if (!IS_ENABLED (CONFIG_KMTEGR1 )) { -/* if an offset is defined, add it */ -process_mac (valbuf, page2, mac_address_offset, true); -env_set ((char *)"ethaddr" , (char *)valbuf); - }else { +if (IS_ENABLED (CONFIG_KMTEGR1 )) {/* KMTEGR1 has a special setup. eth0 has no connection to the * outside and gets an locally administred MAC address, eth1 is * the debug interface and gets the official MAC address from
@@ -320,6 +316,19 @@ static int ivm_populate_env(unsigned char *buf, int len, int mac_address_offset)env_set ((char *)"ethaddr" , (char *)valbuf);process_mac (valbuf, page2, mac_address_offset, true);env_set ((char *)"eth1addr" , (char *)valbuf); + }else if (IS_ENABLED (CONFIG_ARCH_LS1021A )) { +/* LS102xA has 1xRGMII for debug connection and +* 2xSGMII for back-plane mgmt connection +*/ +process_mac (valbuf, page2,1 , true); +env_set ((char *)"ethaddr" , (char *)valbuf); +process_mac (valbuf, page2,2 , true); +env_set ((char *)"eth1addr" , (char *)valbuf); +process_mac (valbuf, page2, mac_address_offset, true); +env_set ((char *)"eth2addr" , (char *)valbuf); + }else { +process_mac (valbuf, page2, mac_address_offset, true); +env_set ((char *)"ethaddr" , (char *)valbuf); }return 0 ;
board/keymile/pg-wcom-ls102xa/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +if TARGET_PG_WCOM_SELI8 + +config SYS_BOARD + default "pg-wcom-ls102xa" + +config SYS_VENDOR + default "keymile" + +config SYS_SOC + default "ls102xa" + +config SYS_CONFIG_NAME + default "pg-wcom-seli8" + +config BOARD_SPECIFIC_OPTIONS + def_bool y + imply FS_CRAMFS + +endif
board/keymile/pg-wcom-ls102xa/MAINTAINERS new file +10 -0
@@ -0,0 +1,10 @@ +Hitachi Power Grids LS102XA BOARD +M: Aleksandar Gerasimovski <[email protected]> +M: Rainer Boschung <[email protected]> +M: Matteo Ghidoni <[email protected]> +S: Maintained +F: board/keymile/pg-wcom-ls102xa/ +F: include/configs/km/pg-wcom-ls102xa.h +F: include/configs/pg-wcom-seli8.h +F: configs/pg_wcom_seli8_defconfig +F: arch/arm/dts/ls1021a-pg-wcom-seli8.dts
board/keymile/pg-wcom-ls102xa/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright 2021 Hitachi Power Grids. All rights reserved. +# + +obj-y += pg-wcom-ls102xa.o ddr.o +obj-y += ../common/common.o ../common/ivm.o ../common/qrio.o +obj-$(CONFIG_LAYERSCAPE_NS_ACCESS) += ../../freescale/common/ns_access.o +obj-$(CONFIG_LS102XA_STREAM_ID) += ../../freescale/common/ls102xa_stream_id.o +obj-$(CONFIG_ID_EEPROM) += ../../freescale/common/sys_eeprom.o
board/keymile/pg-wcom-ls102xa/ddr.c new file +90 -0
90 lines not on this page · raw message
board/keymile/pg-wcom-ls102xa/pg-wcom-ls102xa.c new file +160 -0
160 lines not on this page · raw message
configs/pg_wcom_seli8_defconfig new file +65 -0
65 lines not on this page · raw message
include/configs/km/pg-wcom-ls102xa.h new file +297 -0
297 lines not on this page · raw message
include/configs/pg-wcom-seli8.h new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.8.3.1
-----Original Message-----
From: Tom Rini <[email protected]>
Sent: Donnerstag, 4. Februar 2021 19:10
To: Aleksandar Gerasimovski <[email protected]>
Cc: Priyanka Jain (OSS) <[email protected]>; Priyanka Jain <[email protected]>; u-boot at lists.denx.de; Valentin Longchamp <[email protected]>; Holger Brunck <[email protected]>; Rainer Boschung <[email protected]>; Matteo Ghidoni <[email protected]>
Subject: Re: [PATCH v3 4/4] board/km: add support for seli8 design based on nxp ls102x
Quoted 20 lines · Aleksandar Gerasimovski
The SELI8 design is a new tdm service unit card for Hitachi-Powergrids XMC and FOX product lines.
It is based on NXP LS1021 SoC and it provides following interfaces:
- IFC interface for NOR, NAND and external FPGA's
- 1 x RGMII ETH for debug purposes
- 2 x SGMII ETH for management communication via back-plane
- 1 x uQE HDLC for management communication via back-plane
- 1 x I2C for peripheral devices
- 1 x SPI for peripheral devices
- 1 x UART for debug loggingIt is foreseen that the design will be later re-used for another XMC and FOX service cards with similar SoC requirements.
Signed-off-by: Rainer Boschung
<[email protected]>Signed-off-by Matteo Ghidoni <[email protected]>Signed-off-by Aleksandar Gerasimovski
[snip]
Review
Quoted 6 lines
(quoted diff) +6
-0+#ifndef __ASSEMBLY__ +void set_sda(int state); +void set_scl(int state); +int get_sda(void); +int get_scl(void); +#endif
As a pre-req clean-up, please put these in a proper header file under board/keymile/common/ and #include as needed and not in the per-board config.h files.
[snip]
Review
Quoted 6 lines
(quoted diff) +6
-0+/* + * Environment + */ + +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE)
Environment is handled via Kconfig, please correct this and audit the config.h file for other things that are handled via Kconfig now.
Thanks!
--
Tom
PATCH v4 5/5 board/km: add support for seli8 design based on nxp ls102x
Quoted 12 lines · Aleksandar Gerasimovski
The SELI8 design is a new tdm service unit card for Hitachi-Powergrids XMC and FOX product lines.
It is based on NXP LS1021 SoC and it provides following interfaces:
- IFC interface for NOR, NAND and external FPGA's
- 1 x RGMII ETH for debug purposes
- 2 x SGMII ETH for management communication via back-plane
- 1 x uQE HDLC for management communication via back-plane
- 1 x I2C for peripheral devices
- 1 x SPI for peripheral devices
- 1 x UART for debug logging
Quoted 6 lines
It is foreseen that the design will be later re-used for another XMC and FOX service cards with similar SoC requirements.
Signed-off-by Rainer Boschung <[email protected]>Signed-off-by Matteo Ghidoni <[email protected]>Signed-off-by Aleksandar Gerasimovski <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210205/1d7cef7a/attachment.sig>