ARM: kirkwood: remove automatic I2C config if DM_I2C is enabled
Subsystems (2)
PATCH v2 1/2 ARM: kirkwood: remove automatic I2C config if DM_I2C is enabled
The mach/config.h file would helpfully define CONFIG_SYS_I2C and CONFIG_SYS_I2C_MVTWSI if CONFIG_CMD_I2C was defined by the board. This conflicts with the way DM_I2C works. As a transitional measure don't automatically define these if CONFIG_DM_I2C is defined. It should be possible to remove this once all kirkwood boards are migrated to DM.
---
Changes in v2: None
arch/arm/mach-kirkwood/include/mach/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-kirkwood/include/mach/config.h +1 -1
@@ -116,7 +116,7 @@/* * I2C related stuff */ -#ifdef CONFIG_CMD_I2C +#if defined(CONFIG_CMD_I2C ) && !defined(CONFIG_DM_I2C )#ifndef CONFIG_SYS_I2C_SOFT #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_MVTWSI
Signature · 1 line
2.17.0
PATCH v2 2/2 ARM: add SBx81LIFKW board
This is a series of line cards for Allied Telesis's SBx8100 chassis switch. The CPU block is common to the SBx81GS24a, SBx81XS6, SBx81XS16 and SBx81GT40 cards collectively referred to as SBx81LIFKW in u-boot.
---
This is the board I've been using for testing the device tree support for kirkwood. The Ethernet arrangement is a bit complicated and doesn't currently work on u-boot#master but I can test SPI and I2C.
Changes in v2:
- remove unnecessary platform.S
arch/arm/dts/kirkwood-atl-sbx81lifkw.dts | 133 ++++++++++++++ arch/arm/mach-kirkwood/Kconfig | 4 + board/alliedtelesis/SBx81LIFKW/Kconfig | 12 ++ board/alliedtelesis/SBx81LIFKW/MAINTAINERS | 7 + board/alliedtelesis/SBx81LIFKW/Makefile | 7 + board/alliedtelesis/SBx81LIFKW/kwbimage.cfg | 47 +++++ board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c | 187 ++++++++++++++++++++ configs/SBx81LIFKW_defconfig | 33 ++++ include/configs/SBx81LIFKW.h | 124 +++++++++++++ 9 files changed, 554 insertions(+) create mode 100644 arch/arm/dts/kirkwood-atl-sbx81lifkw.dts create mode 100644 board/alliedtelesis/SBx81LIFKW/Kconfig create mode 100644 board/alliedtelesis/SBx81LIFKW/MAINTAINERS create mode 100644 board/alliedtelesis/SBx81LIFKW/Makefile create mode 100644 board/alliedtelesis/SBx81LIFKW/kwbimage.cfg create mode 100644 board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c create mode 100644 configs/SBx81LIFKW_defconfig create mode 100644 include/configs/SBx81LIFKW.h
arch/arm/dts/kirkwood-atl-sbx81lifkw.dts new file +133 -0
@@ -0,0 +1,133 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "kirkwood.dtsi" +#include "kirkwood-6281.dtsi" + +/ { + model = "Allied Telesis SBx81LIFKW Board"; + compatible = "atl,SBx81LIFKW", "marvell,kirkwood-88f6281", + "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x08000000>; /* 128 MB */ + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + stdout-path = &uart0; + }; + + aliases { + ethernet0 = ð0; + i2c0 = &i2c0; + spi0 = &spi0; + }; + + dsa { + compatible = "marvell,dsa"; + #address-cells = <2>; + #size-cells = <0>; + dsa,ethernet = <ð0>; + dsa,mii-bus = <&mdio>; + status = "okay"; + + switch at 0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1 0>; + + port at 0 { + reg = <0>; + label = "internal0"; + }; + port at 1 { + reg = <1>; + label = "internal1"; + }; + port at 8 { + reg = <8>; + label = "internal8"; + phy-mode = "rgmii-id"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + port at 9 { + reg = <9>; + label = "internal9"; + phy-mode = "rgmii-id"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + port at 10 { + reg = <10>; + label = "cpu"; + }; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "st,m25p128", "jedec,spi-nor", "spi-flash"; + reg = <0>; + spi-max-frequency = <50000000>; + mode = <0>; + + partition at u-boot { + reg = <0x00000000 0x00c00000>; + label = "u-boot"; + }; + partition at u-boot-env { + reg = <0x00c00000 0x00040000>; + label = "u-boot-env"; + }; + partition at unused { + reg = <0x00100000 0x00f00000>; + label = "unused"; + }; + }; +}; + +&i2c0 { + status = "okay"; + + eeprom at 52 { + compatible = "atmel,24c04"; + reg = <0x52>; + }; +}; + +&uart0 { + status = "okay"; +}; + +&mdio { + status = "okay"; +}; + +ð0 { + status = "okay"; + + ethernet0-port at 0 { + speed = <1000>; + duplex = <1>; + }; +}; + +&pciec { + status = "okay"; +}; + +&pcie0 { + status = "okay"; +};
arch/arm/mach-kirkwood/Kconfig +4 -0
@@ -59,6 +59,9 @@ config TARGET_NAS220 config TARGET_NSA310S bool "Zyxel NSA310S" +config TARGET_SBx81LIFKW + bool "Allied Telesis SBx81GS24/SBx81GT40/SBx81XS6/SBx81XS16" + endchoice config SYS_SOC
@@ -81,5 +84,6 @@ source "board/Seagate/dockstar/Kconfig" source "board/Seagate/goflexhome/Kconfig" source "board/Seagate/nas220/Kconfig" source "board/zyxel/nsa310s/Kconfig" +source "board/alliedtelesis/SBx81LIFKW/Kconfig" endif
board/alliedtelesis/SBx81LIFKW/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_SBx81LIFKW + +config SYS_BOARD + default "SBx81LIFKW" + +config SYS_VENDOR + default "alliedtelesis" + +config SYS_CONFIG_NAME + default "SBx81LIFKW" + +endif
board/alliedtelesis/SBx81LIFKW/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +SBx81LIFKW BOARD +M: Chris Packham <[email protected]> +S: Maintained +F: board/alliedtelesis/SBx81LIFKW/ +F: include/configs/SBx81LIFKW +F: configs/SBx81LIFKW_defconfig +F: arch/arm/dts/kirkwood-atl-sbx81lifkw.dts
board/alliedtelesis/SBx81LIFKW/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2010, 2018 +# Allied Telesis <www.alliedtelesis.com> +# + +obj-y += sbx81lifkw.o
board/alliedtelesis/SBx81LIFKW/kwbimage.cfg new file +47 -0
47 lines not on this page · raw message
board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c new file +187 -0
187 lines not on this page · raw message
configs/SBx81LIFKW_defconfig new file +33 -0
@@ -0,0 +1,33 @@ +CONFIG_ARM=y +CONFIG_KIRKWOOD=y +CONFIG_SYS_TEXT_BASE=0x00600000 +CONFIG_TARGET_SBx81LIFKW=y +CONFIG_IDENT_STRING="\nSBx81LIFKW" +CONFIG_DEFAULT_DEVICE_TREE="kirkwood-atl-sbx81lifkw" +# CONFIG_SYS_MALLOC_F is not set +CONFIG_BOOTDELAY=3 +CONFIG_SILENT_CONSOLE=y +CONFIG_SILENT_U_BOOT_ONLY=y +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_I2C=y +CONFIG_CMD_SF=y +CONFIG_CMD_DHCP=y +CONFIG_BOOTP_NTPSERVER=y +CONFIG_CMD_PING=y +CONFIG_CMD_SNTP=y +CONFIG_OF_CONTROL=y +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_DM=y +CONFIG_DM_GPIO=y +CONFIG_DM_PCA953X=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MVTWSI=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_PCA954x=y +# CONFIG_MMC is not set +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_STMICRO=y +# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_SPI=y +CONFIG_KIRKWOOD_SPI=y
include/configs/SBx81LIFKW.h new file +124 -0
124 lines not on this page · raw message
Signature · 1 line
2.17.0
PATCH v2 2/2 ARM: add SBx81LIFKW board
Quoted 6 lines · Chris Packham
This is a series of line cards for Allied Telesis's SBx8100 chassis switch. The CPU block is common to the SBx81GS24a, SBx81XS6, SBx81XS16 and SBx81GT40 cards collectively referred to as SBx81LIFKW in u-boot.
Reviewed-by Stefan Roese <[email protected]>Signed-off-by Chris Packham <[email protected]>
Applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH v2 1/2 ARM: kirkwood: remove automatic I2C config if DM_I2C is enabled
In reply to Chris PackhamQuoted 10 lines · Chris Packham
The
mach/config.hfile would helpfully defineCONFIG_SYS_I2CandCONFIG_SYS_I2C_MVTWSIifCONFIG_CMD_I2Cwas defined by the board. This conflicts with the wayDM_I2Cworks. As a transitional measure don't automatically define these ifCONFIG_DM_I2Cis defined. It should be possible to remove this once all kirkwood boards are migrated to DM.Signed-off-by Chris Packham <[email protected]>---
Changes in v2: None
Thanks,
Stefan
PATCH v2 1/2 ARM: kirkwood: remove automatic I2C config if DM_I2C is enabled
In reply to Chris PackhamQuoted 7 lines · Chris Packham
The
mach/config.hfile would helpfully defineCONFIG_SYS_I2CandCONFIG_SYS_I2C_MVTWSIifCONFIG_CMD_I2Cwas defined by the board. This conflicts with the wayDM_I2Cworks. As a transitional measure don't automatically define these ifCONFIG_DM_I2Cis defined. It should be possible to remove this once all kirkwood boards are migrated to DM.Signed-off-by Chris Packham <[email protected]>
Applied to u-boot-marvell/master.
Thanks,
Stefan