Skip to content

Commit

Permalink
meta-lxatac-bsp: barebox: update to 2024.03.0 with Gen 3 support
Browse files Browse the repository at this point in the history
The main change in this upgrade is the added support for the new generation
of LXA TAC devices (LXA TAC Gen 3).

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
  • Loading branch information
hnez committed Mar 22, 2024
1 parent f37346c commit 6f6566a
Show file tree
Hide file tree
Showing 16 changed files with 413 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SRC_URI += " \
"
require files/patches/series.inc

SRC_URI[sha256sum] = "8079c3c2d8d2f5bbf8dc6130af3202491d68fa94760a99edd240c827a84abc0d"
SRC_URI[sha256sum] = "7dda8cc4e989d38162dc04d287a882edc828093f75baace9e40b2ab7902958ea"

COMPATIBLE_MACHINE = "lxatac"

Expand Down
28 changes: 25 additions & 3 deletions meta-lxatac-bsp/recipes-bsp/barebox/files/lxatac/defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Barebox/arm 2023.12.0-20231222-1 Configuration
# Barebox/arm 2024.03.0-20240322-1 Configuration
#
CONFIG_ARM=y
CONFIG_ARM_LINUX=y
Expand All @@ -17,7 +17,6 @@ CONFIG_ARCH_MULTIARCH=y
# CONFIG_ARCH_DAVINCI is not set
# CONFIG_ARCH_DIGIC is not set
# CONFIG_ARCH_EP93XX is not set
# CONFIG_ARCH_LAYERSCAPE is not set
# CONFIG_ARCH_MVEBU is not set
# CONFIG_ARCH_MXS is not set
# CONFIG_ARCH_NOMADIK is not set
Expand All @@ -29,6 +28,7 @@ CONFIG_ARCH_MULTIARCH=y
# CONFIG_ARCH_ZYNQ is not set
# CONFIG_ARCH_BCM283X is not set
# CONFIG_ARCH_IMX is not set
# CONFIG_ARCH_LAYERSCAPE is not set
# CONFIG_ARCH_OMAP_MULTI is not set
# CONFIG_ARCH_ROCKCHIP is not set
CONFIG_ARCH_STM32MP=y
Expand Down Expand Up @@ -242,6 +242,8 @@ CONFIG_DEFAULT_LOGLEVEL=7
# CONFIG_DEBUG_INITCALLS is not set
# CONFIG_DEBUG_PBL is not set
# CONFIG_DEBUG_PROBES is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_PBL_BREAK is not set
# CONFIG_PRINTF_FULL is not set
# CONFIG_UBSAN is not set
Expand Down Expand Up @@ -312,6 +314,7 @@ CONFIG_CMD_BOOTCHOOSER=y
CONFIG_CMD_PARTITION=y
CONFIG_CMD_AUTOMOUNT=y
CONFIG_CMD_MOUNT=y
# CONFIG_CMD_PARTED is not set
CONFIG_CMD_UMOUNT=y
# end of Partition

Expand Down Expand Up @@ -534,6 +537,7 @@ CONFIG_AT803X_PHY=y
# CONFIG_DAVICOM_PHY is not set
# CONFIG_DP83867_PHY is not set
# CONFIG_DP83TD510_PHY is not set
# CONFIG_DP83TG720_PHY is not set
# CONFIG_LXT_PHY is not set
# CONFIG_MARVELL_PHY is not set
CONFIG_MICREL_PHY=y
Expand Down Expand Up @@ -671,6 +675,7 @@ CONFIG_HAVE_CLK=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_COMMON_CLK=y
CONFIG_COMMON_CLK_OF_PROVIDER=y
CONFIG_COMMON_CLK_STM32MP157=y
CONFIG_COMMON_CLK_GPIO=y

#
Expand Down Expand Up @@ -821,8 +826,13 @@ CONFIG_RESET_CONTROLLER=y
# Firmware Drivers
#
# CONFIG_FIRMWARE_ALTERA_SERIAL is not set
# CONFIG_ARM_SCMI_PROTOCOL is not set
# CONFIG_QEMU_FW_CFG is not set

#
# ARM System Control and Management Interface Protocol
#
# CONFIG_ARM_SCMI_PROTOCOL is not set
# end of ARM System Control and Management Interface Protocol
# end of Firmware Drivers

#
Expand Down Expand Up @@ -862,6 +872,16 @@ CONFIG_PHY_STM32_USBPHYC=y
# end of KVX SoC drivers
# end of SoC drivers

#
# PM Domains
#

#
# i.MX PM Domains
#
# end of i.MX PM Domains
# end of PM Domains

#
# NVME Support
#
Expand All @@ -877,6 +897,7 @@ CONFIG_SYSCON_REBOOT_MODE=y
CONFIG_RESET_STM32=y
# CONFIG_VIRTIO_MENU is not set
# CONFIG_MAILBOX is not set
# CONFIG_TEE is not set
# end of Drivers

#
Expand Down Expand Up @@ -984,6 +1005,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
#
# Hardening options
#
# CONFIG_BUG_ON_DATA_CORRUPTION is not set
# CONFIG_STACK_GUARD_PAGE is not set
CONFIG_STACKPROTECTOR_NONE=y
# CONFIG_STACKPROTECTOR_STRONG is not set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ index 12a2dfce553e..522109c17b55 100644
}

diff --git a/include/of.h b/include/of.h
index 7d1df462d8cf..d2f8ab8a83df 100644
index 19b8e7c038a4..51ad5773007b 100644
--- a/include/of.h
+++ b/include/of.h
@@ -332,7 +332,8 @@ int of_add_memory(struct device_node *node, bool dump);
@@ -336,7 +336,8 @@ int of_add_memory(struct device_node *node, bool dump);
int of_add_memory_bank(struct device_node *node, bool dump, int r,
u64 base, u64 size);
struct device *of_find_device_by_node_path(const char *path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 9a982e943cd4..6f431f820e33 100644
index a539e57bc8a7..36145fc89eac 100644
--- a/Makefile
+++ b/Makefile
@@ -445,6 +445,7 @@ LINUXINCLUDE := -Iinclude \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
1 file changed, 20 insertions(+)

diff --git a/include/net.h b/include/net.h
index 83fb4def5d99..8c3ecf648af4 100644
index ffc1093ae6e7..a569fdcf470f 100644
--- a/include/net.h
+++ b/include/net.h
@@ -522,6 +522,26 @@ static inline void eth_addr_add(u8 *addr, long offset)
@@ -520,6 +520,26 @@ static inline void eth_addr_add(u8 *addr, long offset)
u64_to_ether_addr(u, addr);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 24 insertions(+)

diff --git a/common/Kconfig b/common/Kconfig
index 76b28ceaafe0..f0d37018cb67 100644
index d16c8696dad4..e25131b74198 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1087,6 +1087,14 @@ config MACHINE_ID
@@ -1089,6 +1089,14 @@ config MACHINE_ID
Note: if no hashable information is available no machine id will be passed
to the kernel.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/include/net.h b/include/net.h
index 8c3ecf648af4..98e7d4f7b768 100644
index a569fdcf470f..d11b7b8f1e0d 100644
--- a/include/net.h
+++ b/include/net.h
@@ -131,6 +131,18 @@ static inline void of_eth_register_ethaddr(struct device_node *node,
@@ -130,6 +130,18 @@ static inline void of_eth_register_ethaddr(struct device_node *node,
void eth_register_ethaddr(int ethid, const char *ethaddr);
void of_eth_register_ethaddr(struct device_node *node, const char *ethaddr);
#endif
Expand All @@ -37,10 +37,10 @@ index 8c3ecf648af4..98e7d4f7b768 100644
* Ethernet header
*/
diff --git a/net/eth.c b/net/eth.c
index d1474ec57df3..ec9f46c0800a 100644
index 28961e868b7a..8097fb949412 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -322,19 +322,11 @@ static int eth_param_set_ethaddr(struct param_d *param, void *priv)
@@ -319,19 +319,11 @@ static int eth_param_set_ethaddr(struct param_d *param, void *priv)
}

#ifdef CONFIG_OFTREE
Expand All @@ -62,7 +62,7 @@ index d1474ec57df3..ec9f46c0800a 100644

if (node_path) {
bb_node = of_find_node_by_path_from(0, node_path);
@@ -347,6 +339,23 @@ static void eth_of_fixup_node(struct device_node *root,
@@ -344,6 +336,23 @@ static void eth_of_fixup_node(struct device_node *root,
fixup_node = of_find_node_by_alias(root, eth);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/include/net.h b/include/net.h
index 98e7d4f7b768..1576ed544a48 100644
index d11b7b8f1e0d..0ec2519e2eff 100644
--- a/include/net.h
+++ b/include/net.h
@@ -629,6 +629,15 @@ void ifdown_all(void);
@@ -627,6 +627,15 @@ void ifdown_all(void);

extern struct list_head netdev_list;

Expand All @@ -44,7 +44,7 @@ index 98e7d4f7b768..1576ed544a48 100644

#endif /* __NET_H__ */
diff --git a/net/eth.c b/net/eth.c
index ec9f46c0800a..ffc4355145a8 100644
index 8097fb949412..ebeeb620d567 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -23,14 +23,7 @@
Expand All @@ -63,7 +63,7 @@ index ec9f46c0800a..ffc4355145a8 100644

int eth_set_promisc(struct eth_device *edev, bool enable)
{
@@ -105,7 +98,7 @@ void eth_register_ethaddr(int ethid, const char *ethaddr)
@@ -102,7 +95,7 @@ void eth_register_ethaddr(int ethid, const char *ethaddr)
for_each_netdev(edev) {
if (edev->dev.id == ethid) {
register_preset_mac_address(edev, ethaddr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,38 @@ used in a follow up commit.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/net.h | 1 +
net/lib.c | 10 ++++++++++
2 files changed, 11 insertions(+)
include/net.h | 2 ++
net/lib.c | 17 +++++++++++++++++
2 files changed, 19 insertions(+)

diff --git a/include/net.h b/include/net.h
index 1576ed544a48..6cb319349784 100644
index 0ec2519e2eff..728684b56646 100644
--- a/include/net.h
+++ b/include/net.h
@@ -372,6 +372,7 @@ int setenv_ip(const char *name, IPaddr_t ip);
@@ -370,6 +370,8 @@ IPaddr_t getenv_ip(const char *name);
int setenv_ip(const char *name, IPaddr_t ip);

int string_to_ethaddr(const char *str, u8 enetaddr[6]);
void ethaddr_to_string(const u8 enetaddr[6], char *str);
+void ethaddr_to_string(const u8 enetaddr[6], char *str);
+int ethaddr_string_cmp(const u8 enetaddr_a[6], const char *str_b);

#ifdef CONFIG_NET_RESOLV
int resolv(const char *host, IPaddr_t *ip);
diff --git a/net/lib.c b/net/lib.c
index d4536441bd71..59bd4c280caf 100644
index dc6e138f392c..59bd4c280caf 100644
--- a/net/lib.c
+++ b/net/lib.c
@@ -44,6 +44,16 @@ void ethaddr_to_string(const u8 enetaddr[ETH_ALEN], char *str)
enetaddr[4], enetaddr[5]);
@@ -37,6 +37,23 @@ int string_to_ethaddr(const char *str, u8 enetaddr[ETH_ALEN])
return 0;
}

+void ethaddr_to_string(const u8 enetaddr[ETH_ALEN], char *str)
+{
+ sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x",
+ enetaddr[0], enetaddr[1], enetaddr[2], enetaddr[3],
+ enetaddr[4], enetaddr[5]);
+}
+
+int ethaddr_string_cmp(const u8 enetaddr_a[ETH_ALEN], const char *str_b)
+{
+ u8 enetaddr_b[ETH_ALEN];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
create mode 100644 include/tlv/tlv.h

diff --git a/common/Kconfig b/common/Kconfig
index f0d37018cb67..4dfc58f3fbff 100644
index e25131b74198..c3d8eeabf63d 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1012,6 +1012,30 @@ config BTHREAD
@@ -1014,6 +1014,30 @@ config BTHREAD
scheduled within delay loops and the console idle to asynchronously
execute actions, like checking for link up or feeding a watchdog.

Expand Down Expand Up @@ -66,7 +66,7 @@ index f0d37018cb67..4dfc58f3fbff 100644
bool "generic state infrastructure"
select CRC32
diff --git a/common/Makefile b/common/Makefile
index 7fb864f61480..643daba600a9 100644
index 74ef8b7d8af2..08c38eaff358 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_RESET_SOURCE) += reset_source.o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
create mode 100644 commands/tlv.c

diff --git a/commands/Kconfig b/commands/Kconfig
index a6806f198ec4..a4f4669d2bfb 100644
index d8bcb573fd43..33cbf3c2d545 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -2375,6 +2375,18 @@ config CMD_STATE
@@ -2396,6 +2396,18 @@ config CMD_STATE
depends on STATE
prompt "state"

Expand All @@ -37,7 +37,7 @@ index a6806f198ec4..a4f4669d2bfb 100644
bool
prompt "dhrystone"
diff --git a/commands/Makefile b/commands/Makefile
index 4924755500e3..3ff5ed1ae7ca 100644
index b3114102765c..754f21576cab 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -132,6 +132,7 @@ obj-$(CONFIG_CMD_CMP) += cmp.o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
create mode 100644 common/boards/lxa/factory-data.c

diff --git a/common/boards/Kconfig b/common/boards/Kconfig
index a1d87c02158f..8c1dd928879a 100644
index fe3a60d50879..7054a18007b8 100644
--- a/common/boards/Kconfig
+++ b/common/boards/Kconfig
@@ -10,3 +10,8 @@ config BOARD_PHYTEC_SOM_DETECTION
config BOARD_PHYTEC_SOM_IMX8M_DETECTION
@@ -13,3 +13,8 @@ config BOARD_PHYTEC_SOM_IMX8M_DETECTION

config BOARD_TQ
bool
select BOARD_PHYTEC_SOM_DETECTION
+
+config BOARD_LXA
+ bool "LXA common board support" if COMPILE_TEST
+ select TLV
+ select TLV_BAREBOX
diff --git a/common/boards/Makefile b/common/boards/Makefile
index c1e1b78df383..f10d2e849838 100644
index 147c36643d2b..4f30be78dce9 100644
--- a/common/boards/Makefile
+++ b/common/boards/Makefile
@@ -2,3 +2,4 @@

@@ -3,3 +3,4 @@
obj-$(CONFIG_BOARD_QEMU_VIRT) += qemu-virt/
obj-$(CONFIG_BOARD_PHYTEC_SOM_DETECTION) += phytec/
+obj-$(CONFIG_BOARD_LXA) += lxa/
obj-$(CONFIG_BOARD_TQ) += tq/
+obj-$(CONFIG_BOARD_LXA) += lxa/
diff --git a/common/boards/include/boards/lxa/tlv.h b/common/boards/include/boards/lxa/tlv.h
new file mode 100644
index 000000000000..7b4222de43d0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
create mode 100644 arch/arm/dts/stm32mp15xc-lxa-tac.dtsi

diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 024ceeb6fd7e..ddf6c8587146 100644
index e597b02be6c9..cfc35bdb158f 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -143,6 +143,7 @@ obj-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += solidrun-microsom/
Expand Down Expand Up @@ -179,15 +179,15 @@ index 000000000000..bb0600b4d66c
+ select_fdt_and_start((void *)r2);
+}
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 339108445afa..f8c5744d157c 100644
index 7800231570cd..d39924c1d252 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -145,6 +145,7 @@ lwl-$(CONFIG_MACH_SEEED_ODYSSEY) += stm32mp157c-odyssey.dtb.o
lwl-$(CONFIG_MACH_STM32MP15XX_DKX) += stm32mp157c-dk2.dtb.o stm32mp157a-dk1.dtb.o
@@ -146,6 +146,7 @@ lwl-$(CONFIG_MACH_STM32MP15XX_DKX) += stm32mp157c-dk2.dtb.o stm32mp157a-dk1.dtb.
stm32mp157c-dk2-scmi.dtb.o stm32mp157a-dk1-scmi.dtb.o
lwl-$(CONFIG_MACH_STM32MP13XX_DK) += stm32mp135f-dk.dtb.o
lwl-$(CONFIG_MACH_LXA_MC1) += stm32mp157c-lxa-mc1.dtb.o
lwl-$(CONFIG_MACH_LXA_MC1) += stm32mp157c-lxa-mc1.dtb.o stm32mp157c-lxa-mc1-scmi.dtb.o
+lwl-$(CONFIG_MACH_LXA_TAC) += stm32mp157c-lxa-tac-gen1.dtb.o stm32mp157c-lxa-tac-gen2.dtb.o
lwl-$(CONFIG_MACH_STM32MP15X_EV1) += stm32mp157c-ev1.dtb.o
lwl-$(CONFIG_MACH_STM32MP15X_EV1) += stm32mp157c-ev1.dtb.o stm32mp157c-ev1-scmi.dtb.o
lwl-$(CONFIG_MACH_SCB9328) += imx1-scb9328.dtb.o
lwl-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += imx6q-wandboard.dtb.o imx6dl-wandboard.dtb.o
diff --git a/arch/arm/dts/stm32mp157c-lxa-tac-gen1.dts b/arch/arm/dts/stm32mp157c-lxa-tac-gen1.dts
Expand Down Expand Up @@ -408,10 +408,10 @@ index 524d282a1db8..220d5b2c15e5 100644
select ARCH_STM32MP157
bool "Seeed Studio Odyssey"
diff --git a/images/Makefile.stm32mp b/images/Makefile.stm32mp
index 86ff870051c2..8659bd44140f 100644
index cc70aee92388..e8c7adc9d8f6 100644
--- a/images/Makefile.stm32mp
+++ b/images/Makefile.stm32mp
@@ -35,6 +35,7 @@ $(call build_stm32mp_image, CONFIG_MACH_STM32MP15XX_DKX, start_stm32mp15xx_dkx,
@@ -34,6 +34,7 @@ $(call build_stm32mp_image, CONFIG_MACH_STM32MP15XX_DKX, start_stm32mp15xx_dkx,
$(call build_stm32mp_image, CONFIG_MACH_STM32MP15X_EV1, start_stm32mp15x_ev1, stm32mp15x-ev1)

$(call build_stm32mp_image, CONFIG_MACH_LXA_MC1, start_stm32mp157c_lxa_mc1, stm32mp157c-lxa-mc1)
Expand Down
Loading

0 comments on commit 6f6566a

Please sign in to comment.