boot/uboot: add stm32 binary format
PATCH v3 1/4 boot/uboot: add stm32 binary format
Add .stm32 binary format that uboot generates for the trusted configuration.
--- boot/uboot/Config.in | 4 ++++ boot/uboot/uboot.mk | 5 +++++ 2 files changed, 9 insertions(+)
boot/uboot/Config.in +4 -0
@@ -343,6 +343,10 @@ config BR2_TARGET_UBOOT_FORMAT_SD See doc/README.mxs (or doc/README.mx28_common before 2013.07) +config BR2_TARGET_UBOOT_FORMAT_STM32 + bool "u-boot.stm32" + depends on BR2_arm + config BR2_TARGET_UBOOT_FORMAT_CUSTOM bool "Custom (specify below)" help
boot/uboot/uboot.mk +5 -0
@@ -121,6 +121,11 @@ UBOOT_MAKE_TARGET += u-boot.sb UBOOT_DEPENDENCIES += host-elftosb host-openssl endif +ifeq ($(BR2_TARGET_UBOOT_FORMAT_STM32),y) +UBOOT_BINS += u-boot.stm32 +UBOOT_MAKE_TARGET += u-boot.stm32 +endif + ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y) UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME)) endif
Signature · 1 line
2.25.1
PATCH v3 2/4 configs/stm32mp157*: use trusted configuration
Adding support for trusted configuration for stm32mp157c-dk2 and stm32mp157a-dk1. This patch change using uboot spl as fsbl to using arm trusted firmware. The reason for this change is that st recommends to use this configuration (or optee) and not the basic.
In addition, this commit enables gadget support in linux.config.
In addition, removing partition-type from genimage.cfg is mandatory,
since it creates a hybrid MBR partition table which causes ATF to not find ssbl parition.
---
.../{genimage.cfg => genimage.cfg.template} | 7 ++-
.../common/stm32mp157/post-image.sh | 43 +++++++++++++++++++
.../stm32mp157a-dk1/linux.config | 24 ++++-------
.../stm32mp157c-dk2/linux.config | 20 ++++-----
configs/stm32mp157a_dk1_defconfig | 14 +++---
configs/stm32mp157c_dk2_defconfig | 14 +++---
6 files changed, 78 insertions(+), 44 deletions(-)
rename board/stmicroelectronics/common/stm32mp157/{genimage.cfg => genimage.cfg.template} (63%)
create mode 100755 board/stmicroelectronics/common/stm32mp157/post-image.shboard/stmicroelectronics/common/stm32mp157/genimage.cfg.template renamed from board/stmicroelectronics/common/stm32mp157/genimage.cfg +3 -4
@@ -4,20 +4,19 @@ image sdcard.img { } partition fsbl1 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition fsbl2 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition ssbl { - image = "u-boot.img" + image = "u-boot.stm32" } partition rootfs { image = "rootfs.ext4" - partition-type = 0x83 bootable = "yes" } }
board/stmicroelectronics/common/stm32mp157/post-image.sh new file +43 -0
43 lines not on this page · raw message
board/stmicroelectronics/stm32mp157a-dk1/linux.config +8 -16
@@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y
@@ -107,13 +102,6 @@ CONFIG_REGULATOR_STPMIC1=y CONFIG_DRM=y CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y -# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set -# CONFIG_DRM_SII902X is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_LCD_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_DYNAMIC_MINORS=y
@@ -129,12 +117,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y
@@ -157,15 +150,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=y CONFIG_IIO_STM32_LPTIMER_TRIGGER=y
@@ -179,4 +169,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=y
board/stmicroelectronics/stm32mp157c-dk2/linux.config +8 -12
@@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y
@@ -82,7 +77,6 @@ CONFIG_SERIAL_STM32_CONSOLE=y CONFIG_SERIAL_DEV_BUS=y CONFIG_HW_RANDOM=y CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y CONFIG_I2C_STM32F7=y CONFIG_SPI=y CONFIG_SPI_STM32=y
@@ -109,8 +103,6 @@ CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y CONFIG_DRM_SII902X=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
@@ -129,12 +121,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y
@@ -157,15 +154,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=y CONFIG_IIO_STM32_LPTIMER_TRIGGER=y
@@ -179,4 +173,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=y
configs/stm32mp157a_dk1_defconfig +8 -6
@@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157a-dk1/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10"
@@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157a-dk1" BR2_PACKAGE_HOST_GENIMAGE=y
configs/stm32mp157c_dk2_defconfig +8 -6
@@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157c-dk2/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10"
@@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-dk2.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-dk2" BR2_PACKAGE_HOST_GENIMAGE=y
Signature · 1 line
2.25.1
PATCH v3 2/4 configs/stm32mp157*: use trusted configuration
Hi Shlomi,
Quoted 6 lines · Shlomi Vaknin
Adding support for trusted configuration for stm32mp157c-dk2 and stm32mp157a-dk1. This patch change using uboot spl as fsbl to using arm trusted firmware. The reason for this change is that st recommends to use this configuration (or optee) and not the basic.
In addition, this commit enables gadget support in
linux.config.
This should be committed as a separate patch because it's not related to the trusted configuration at all.
Quoted 166 lines
In addition, removing partition-type from genimage.cfg is mandatory,
since it creates a hybrid MBR partition table which causes ATF to not find ssbl parition.Signed-off-by Shlomi Vaknin <[email protected]>--- .../{genimage.cfg => genimage.cfg.template} | 7 ++- .../common/stm32mp157/post-image.sh | 43 +++++++++++++++++++ .../stm32mp157a-dk1/linux.config | 24 ++++------- .../stm32mp157c-dk2/linux.config | 20 ++++----- configs/stm32mp157a_dk1_defconfig | 14 +++--- configs/stm32mp157c_dk2_defconfig | 14 +++--- 6 files changed, 78 insertions(+), 44 deletions(-)rename board/stmicroelectronics/common/stm32mp157/{genimage.cfg => genimage.cfg.template} (63%) create mode 100755
board/stmicroelectronics/common/stm32mp157/post-image.shboard/stmicroelectronics/common/stm32mp157/genimage.cfg.template renamed from board/stmicroelectronics/common/stm32mp157/genimage.cfg +3
-4@@ -4,20 +4,19 @@ image sdcard.img { } partition fsbl1 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition fsbl2 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition ssbl { - image = "u-boot.img" + image = "u-boot.stm32" } partition rootfs { image = "rootfs.ext4" - partition-type = 0x83 bootable = "yes" } }board/stmicroelectronics/common/stm32mp157/post-image.sh new file +43
-0@@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# +# atf_image extracts the ATF binary image from DTB_FILE_NAME that appears in +# BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES in ${BR_CONFIG}, +# then prints the corresponding file name for the genimage +# configuration file +# +atf_image() +{ + local ATF_VARIABLES="$(sed -n 's/^BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="\([\/a-zA-Z0-9_=. \-]*\)"$/\1/p' ${BR2_CONFIG})" + + if grep -Eq "DTB_FILE_NAME=stm32mp157c-dk2.dtb" <<< ${ATF_VARIABLES}; then + echo "tf-a-stm32mp157c-dk2.stm32" + elif grep -Eq "DTB_FILE_NAME=stm32mp157a-dk1.dtb" <<< ${ATF_VARIABLES}; then + echo "tf-a-stm32mp157a-dk1.stm32" + fi +} + +main() +{ + local ATFBIN="$(atf_image)" + local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" + local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + + sed -e "s/%ATFBIN%/${ATFBIN}/" \ + board/stmicroelectronics/common/stm32mp157/genimage.cfg.template > ${GENIMAGE_CFG} + + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + + rm -f ${GENIMAGE_CFG} + + exit $? +} + +main $@board/stmicroelectronics/stm32mp157a-dk1/linux.config +6
-16@@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y@@ -107,13 +102,6 @@ CONFIG_REGULATOR_STPMIC1=y CONFIG_DRM=y CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y -# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set -# CONFIG_DRM_SII902X is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_LCD_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_DYNAMIC_MINORS=y@@ -129,12 +117,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y@@ -157,15 +150,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=y CONFIG_IIO_STM32_LPTIMER_TRIGGER=y
board/stmicroelectronics/stm32mp157a-dk1/linux.config CONFIG_MSDOS_FS=y · line 174
Quoted 6 lines
board/stmicroelectronics/stm32mp157a-dk1/linux.config +2
-0@@ -179,4 +169,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=y
Are these changes related to the trusted configuration or it's a result of resync with newer kernel configuration?
Quoted 73 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +6
-12@@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y@@ -82,7 +77,6 @@ CONFIG_SERIAL_STM32_CONSOLE=y CONFIG_SERIAL_DEV_BUS=y CONFIG_HW_RANDOM=y CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y CONFIG_I2C_STM32F7=y CONFIG_SPI=y CONFIG_SPI_STM32=y@@ -109,8 +103,6 @@ CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y CONFIG_DRM_SII902X=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y@@ -129,12 +121,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y@@ -157,15 +154,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=y CONFIG_IIO_STM32_LPTIMER_TRIGGER=y
board/stmicroelectronics/stm32mp157c-dk2/linux.config CONFIG_MSDOS_FS=y · line 178
Quoted 6 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +2
-0@@ -179,4 +173,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=y
same here.
Quoted 64 lines
configs/stm32mp157a_dk1_defconfig +8
-6@@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157a-dk1/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10"@@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157a-dk1" BR2_PACKAGE_HOST_GENIMAGE=yconfigs/stm32mp157c_dk2_defconfig +6
-2@@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157c-dk2/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10"@@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-dk2.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07"
configs/stm32mp157c_dk2_defconfig BR2_TARGET_ROOTFS_EXT2=y · line 32
Quoted 10 lines
configs/stm32mp157c_dk2_defconfig +2
-4-BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-dk2" BR2_PACKAGE_HOST_GENIMAGE=y
Best
Bartek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201012/e2b27169/attachment-0001.html>
PATCH v3 2/4 configs/stm32mp157*: use trusted configuration
Hi Bartek,
??????? ??? ??, 12 ????? 2020 ?-21:08 ??? ?Bartosz Bilas?? <? [email protected]??>:?
Quoted 186 lines
Hi Shlomi,
On 07.10.2020 16:49, Shlomi Vaknin wrote:Adding support for trusted configuration for stm32mp157c-dk2 and stm32mp157a-dk1. This patch change using uboot spl as fsbl to using arm trusted firmware. The reason for this change is that st recommends to use this configuration (or optee) and not the basic.
In addition, this commit enables gadget support in
linux.config.This should be committed as a separate patch because it's not related to the trusted configuration at all.
In addition, removing partition-type from genimage.cfg is mandatory,
since it creates a hybrid MBR partition table which causes ATF to not find ssbl parition.Signed-off-by Shlomi Vaknin <[email protected]> <[email protected]>--- .../{genimage.cfg => genimage.cfg.template} | 7 ++- .../common/stm32mp157/post-image.sh | 43 +++++++++++++++++++ .../stm32mp157a-dk1/linux.config | 24 ++++------- .../stm32mp157c-dk2/linux.config | 20 ++++----- configs/stm32mp157a_dk1_defconfig | 14 +++--- configs/stm32mp157c_dk2_defconfig | 14 +++--- 6 files changed, 78 insertions(+), 44 deletions(-) rename board/stmicroelectronics/common/stm32mp157/{genimage.cfg => genimage.cfg.template} (63%) create mode 100755 board/stmicroelectronics/common/stm32mp157/post-image.shboard/stmicroelectronics/common/stm32mp157/genimage.cfg.template renamed from board/stmicroelectronics/common/stm32mp157/genimage.cfg +3
-4@@ -4,20 +4,19 @@ image sdcard.img { } partition fsbl1 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition fsbl2 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition ssbl { - image = "u-boot.img" + image = "u-boot.stm32" } partition rootfs { image = "rootfs.ext4" - partition-type = 0x83 bootable = "yes" } }board/stmicroelectronics/common/stm32mp157/post-image.sh new file +43
-0@@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# +# atf_image extracts the ATF binary image from DTB_FILE_NAME that appears in +# BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES in ${BR_CONFIG}, +# then prints the corresponding file name for the genimage +# configuration file +# +atf_image() +{ + local ATF_VARIABLES="$(sed -n 's/^BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="\([\/a-zA-Z0-9_=. \-]*\)"$/\1/p' ${BR2_CONFIG})" + + if grep -Eq "DTB_FILE_NAME=stm32mp157c-dk2.dtb" <<< ${ATF_VARIABLES}; then + echo "tf-a-stm32mp157c-dk2.stm32" + elif grep -Eq "DTB_FILE_NAME=stm32mp157a-dk1.dtb" <<< ${ATF_VARIABLES}; then + echo "tf-a-stm32mp157a-dk1.stm32" + fi +} + +main() +{ + local ATFBIN="$(atf_image)" + local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" + local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + + sed -e "s/%ATFBIN%/${ATFBIN}/" \ + board/stmicroelectronics/common/stm32mp157/genimage.cfg.template > ${GENIMAGE_CFG} + + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + + rm -f ${GENIMAGE_CFG} + + exit $? +} + +main $@board/stmicroelectronics/stm32mp157a-dk1/linux.config +8
-16@@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y@@ -107,13 +102,6 @@ CONFIG_REGULATOR_STPMIC1=y CONFIG_DRM=y CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y -# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set -# CONFIG_DRM_SII902X is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_LCD_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_DYNAMIC_MINORS=y@@ -129,12 +117,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y@@ -157,15 +150,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=y CONFIG_IIO_STM32_LPTIMER_TRIGGER=y@@ -179,4 +169,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=y
Quoted 3 lines
Are these changes related to the trusted configuration or it's a result of resync with newer kernel configuration?
The changes are the effect of running linux-update-defconfig after adding the gadget support. I remember that I looked at some of the variables that were removed, and found out that they are no longer exist in the kernel.
Quoted 2 lines
(quoted diff) +0 -0
b/board/stmicroelectronics/stm32mp157c-dk2/linux.config
Quoted 156 lines
index
878a0c39f1..c03eb748b4100644board/stmicroelectronics/stm32mp157c-dk2/linux.config +8
-12@@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y@@ -82,7 +77,6 @@ CONFIG_SERIAL_STM32_CONSOLE=y CONFIG_SERIAL_DEV_BUS=y CONFIG_HW_RANDOM=y CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y CONFIG_I2C_STM32F7=y CONFIG_SPI=y CONFIG_SPI_STM32=y@@ -109,8 +103,6 @@ CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y CONFIG_DRM_SII902X=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y@@ -129,12 +121,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y@@ -157,15 +154,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=y CONFIG_IIO_STM32_LPTIMER_TRIGGER=y@@ -179,4 +173,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=ysame here.
configs/stm32mp157a_dk1_defconfig +8
-6@@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157a-dk1/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10"@@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157a-dk1" BR2_PACKAGE_HOST_GENIMAGE=yconfigs/stm32mp157c_dk2_defconfig +8
-6@@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157c-dk2/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10"@@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-dk2.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-dk2" BR2_PACKAGE_HOST_GENIMAGE=y
Quoted 3 lines
Best
Bartek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201012/9e5a455b/attachment.html>
PATCH v3 2/4 configs/stm32mp157*: use trusted configuration
Hi Shlomi,
Quoted 187 lines · Shlomi Vaknin
Hi Bartek,
??????? ??? ??, 12 ????? 2020 ?-21:08 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:?
Hi Shlomi, On 07.10.2020 16:49, Shlomi Vaknin wrote:Quoted 6 lines
Adding support for trusted configuration for stm32mp157c-dk2 and stm32mp157a-dk1. This patch change using uboot spl as fsbl to using arm trusted firmware. The reason for this change is that st recommends to use this configuration (or optee) and not the basic.
In addition, this commit enables gadget support in
linux.config.This should be committed as a separate patch because it's not related to the trusted configuration at all.
Quoted 163 lines
In addition, removing partition-type from genimage.cfg is mandatory, since it creates a hybrid MBR partition table which causes ATF to not find ssbl parition. Signed-off-by: Shlomi Vaknin<[email protected]> <mailto:[email protected]> --- .../{genimage.cfg => genimage.cfg.template} | 7 ++- .../common/stm32mp157/post-image.sh | 43 +++++++++++++++++++ .../stm32mp157a-dk1/linux.config | 24 ++++------- .../stm32mp157c-dk2/linux.config | 20 ++++----- configs/stm32mp157a_dk1_defconfig | 14 +++--- configs/stm32mp157c_dk2_defconfig | 14 +++--- 6 files changed, 78 insertions(+), 44 deletions(-) rename board/stmicroelectronics/common/stm32mp157/{genimage.cfg => genimage.cfg.template} (63%) create mode 100755 board/stmicroelectronics/common/stm32mp157/post-image.sh diff --git a/board/stmicroelectronics/common/stm32mp157/genimage.cfg b/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template similarity index 63% rename from board/stmicroelectronics/common/stm32mp157/genimage.cfg rename to board/stmicroelectronics/common/stm32mp157/genimage.cfg.template index d1ce530cc5..f341c19f2f 100644 --- a/board/stmicroelectronics/common/stm32mp157/genimage.cfg +++ b/board/stmicroelectronics/common/stm32mp157/genimage.cfg.template @@ -4,20 +4,19 @@ image sdcard.img { } partition fsbl1 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition fsbl2 { - image = "u-boot-spl.stm32" + image = "%ATFBIN%" } partition ssbl { - image = "u-boot.img" + image = "u-boot.stm32" } partition rootfs { image = "rootfs.ext4" - partition-type = 0x83 bootable = "yes" } } diff --git a/board/stmicroelectronics/common/stm32mp157/post-image.sh b/board/stmicroelectronics/common/stm32mp157/post-image.sh new file mode 100755 index 0000000000..c00a5c6f6c --- /dev/null +++ b/board/stmicroelectronics/common/stm32mp157/post-image.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# +# atf_image extracts the ATF binary image from DTB_FILE_NAME that appears in +# BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES in ${BR_CONFIG}, +# then prints the corresponding file name for the genimage +# configuration file +# +atf_image() +{ + local ATF_VARIABLES="$(sed -n 's/^BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="\([\/a-zA-Z0-9_=. \-]*\)"$/\1/p' ${BR2_CONFIG})" + + if grep -Eq "DTB_FILE_NAME=stm32mp157c-dk2.dtb" <<< ${ATF_VARIABLES}; then + echo "tf-a-stm32mp157c-dk2.stm32" + elif grep -Eq "DTB_FILE_NAME=stm32mp157a-dk1.dtb" <<< ${ATF_VARIABLES}; then + echo "tf-a-stm32mp157a-dk1.stm32" + fi +} + +main() +{ + local ATFBIN="$(atf_image)" + local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" + local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + + sed -e "s/%ATFBIN%/${ATFBIN}/" \ + board/stmicroelectronics/common/stm32mp157/genimage.cfg.template > ${GENIMAGE_CFG} + + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + + rm -f ${GENIMAGE_CFG} + + exit $? +} + +main $@ diff --git a/board/stmicroelectronics/stm32mp157a-dk1/linux.config b/board/stmicroelectronics/stm32mp157a-dk1/linux.config index 95c834e431..47729ea97c 100644 --- a/board/stmicroelectronics/stm32mp157a-dk1/linux.config +++ b/board/stmicroelectronics/stm32mp157a-dk1/linux.config @@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y @@ -107,13 +102,6 @@ CONFIG_REGULATOR_STPMIC1=y CONFIG_DRM=y CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y -# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set -# CONFIG_DRM_SII902X is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_LCD_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_GENERIC is not set -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_DYNAMIC_MINORS=y @@ -129,12 +117,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y @@ -157,15 +150,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=yQuoted 8 lines
CONFIG_IIO_STM32_LPTIMER_TRIGGER=y @@ -179,4 +169,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=y
Quoted 8 lines
Are these changes related to the trusted configuration or it's a result of resync with newer kernel configuration?
The changes are the effect of running linux-update-defconfig after adding the gadget support. I remember that I looked at some of the variables that were removed, and found out that they are no longer exist in the kernel.
So this patch shouldn't be within this series because it isn't related to trusted configuration ;) Please send a separate patch where you add gadget support in the kernel configuration.
Quoted 155 lines
Quoted 72 lines
diff --git a/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/board/stmicroelectronics/stm32mp157c-dk2/linux.config index 878a0c39f1..c03eb748b4 100644 --- a/board/stmicroelectronics/stm32mp157c-dk2/linux.config +++ b/board/stmicroelectronics/stm32mp157c-dk2/linux.config @@ -47,15 +47,10 @@ CONFIG_CAN=y CONFIG_CAN_M_CAN=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=128 CONFIG_SIMPLE_PM_BUS=y CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_STM32_FMC2=y CONFIG_MTD_SPI_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_UBI=y @@ -82,7 +77,6 @@ CONFIG_SERIAL_STM32_CONSOLE=y CONFIG_SERIAL_DEV_BUS=y CONFIG_HW_RANDOM=y CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y CONFIG_I2C_STM32F7=y CONFIG_SPI=y CONFIG_SPI_STM32=y @@ -109,8 +103,6 @@ CONFIG_DRM_STM=y CONFIG_DRM_STM_DSI=y CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y CONFIG_DRM_SII902X=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -129,12 +121,17 @@ CONFIG_USB_DWC2=y CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y +CONFIG_USB_ISP1760_HOST_ROLE=y CONFIG_USB_HSIC_USB3503=y CONFIG_USB_GPIO_VBUS=y CONFIG_USB_ISP1301=y CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_TYPEC=y -CONFIG_TYPEC_STUSB=y CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_ARMMMCI=y @@ -157,15 +154,12 @@ CONFIG_STM32_IPCC=y CONFIG_REMOTEPROC=y CONFIG_STM32_RPROC=y CONFIG_RPMSG_VIRTIO=y -CONFIG_RPMSG_TTY=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_SD_ADC_MODULATOR=y CONFIG_STM32_ADC_CORE=y CONFIG_STM32_ADC=y -CONFIG_STM32_ADC_TEMP=y CONFIG_STM32_DFSDM_ADC=y -CONFIG_STM32_LPTIMER_CNT=y CONFIG_STM32_DAC=y CONFIG_IIO_HRTIMER_TRIGGER=yQuoted 8 lines
CONFIG_IIO_STM32_LPTIMER_TRIGGER=y @@ -179,4 +173,6 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 CONFIG_PRINTK_TIME=ysame here.
Quoted 66 lines
diff --git a/configs/stm32mp157a_dk1_defconfig b/configs/stm32mp157a_dk1_defconfig index f172539c02..cdbb5a8cdf 100644 --- a/configs/stm32mp157a_dk1_defconfig +++ b/configs/stm32mp157a_dk1_defconfig @@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157a-dk1/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10" @@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157a-dk1.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157a-dk1" BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig index 49cfb0733c..6251491e0f 100644 --- a/configs/stm32mp157c_dk2_defconfig +++ b/configs/stm32mp157c_dk2_defconfig @@ -2,8 +2,7 @@ BR2_arm=y BR2_cortex_a7=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157c-dk2/overlay/" -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10" @@ -16,15 +15,18 @@ BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M" # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-dk2.dtb" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted"Quoted 8 lines
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config" # BR2_TARGET_UBOOT_FORMAT_BIN is not set -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_FORMAT_STM32=y BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-dk2" BR2_PACKAGE_HOST_GENIMAGE=y
Quoted 3 lines
Best
Bartek
Best
Bartek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201013/b6efc7cc/attachment.html>
PATCH v3 2/4 configs/stm32mp157*: use trusted configuration
In reply to Shlomi VakninHello,
Quoted 10 lines · On Wed, 7 Oct 2020 17:49:43 +0300 Shlomi Vaknin <[email protected]> wrote:
Adding support for trusted configuration for stm32mp157c-dk2 and stm32mp157a-dk1. This patch change using uboot spl as fsbl to using arm trusted firmware. The reason for this change is that st recommends to use this configuration (or optee) and not the basic.
In addition, this commit enables gadget support inlinux.config.In addition, removing partition-type from genimage.cfg is mandatory,
since it creates a hybrid MBR partition table which causes ATF to not find ssbl parition.Signed-off-by Shlomi Vaknin <[email protected]>
Thanks, I have applied, with some changes. See below.
Quoted 13 lines
board/stmicroelectronics/common/stm32mp157/post-image.sh new file +8
-0+main() +{ + local ATFBIN="$(atf_image)" + local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" + local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + + sed -e "s/%ATFBIN%/${ATFBIN}/" \ +board/stmicroelectronics/common/stm32mp157/genimage.cfg.template > ${GENIMAGE_CFG} +
board/stmicroelectronics/common/stm32mp157/post-image.sh new file +3
-0+ rm -rf "${GENIMAGE_TMP}" + + genimage \
board/stmicroelectronics/common/stm32mp157/post-image.sh line 41
Quoted 10 lines
board/stmicroelectronics/common/stm32mp157/post-image.sh new file +10
-0+ --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + + rm -f ${GENIMAGE_CFG} + + exit $? +}
I have replaced the manual call to genimage by a call to support/scripts/genimage.sh.
board/stmicroelectronics/stm32mp157a-dk1/linux.config
Quoted 4 lines
board/stmicroelectronics/stm32mp157a-dk1/linux.config +0
-0
I have dropped those changes to the Linux kernel configuration, as they are not related to the switch to a trusted configuration.
board/stmicroelectronics/stm32mp157c-dk2/linux.config
Quoted 4 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +0
-0
Same.
Quoted 1 line
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
I have changed to used a fixed version of arm-trusted-firmware, i.e v2.2, so that the defconfig will always use the same configuration instead of "the latest".
Quoted 1 line
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
Same here.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 3/4 configs/stm32mp157*: bump kernel version
In reply to Shlomi VakninSince kernel 5.7 is EOL now, this upgrades it to version 5.8.13.
--- configs/stm32mp157a_dk1_defconfig | 4 ++-- configs/stm32mp157c_dk2_defconfig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
configs/stm32mp157a_dk1_defconfig +2 -2
@@ -1,11 +1,11 @@ BR2_arm=y BR2_cortex_a7=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157a-dk1/overlay/" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157a-dk1/linux.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y
configs/stm32mp157c_dk2_defconfig +2 -2
@@ -1,11 +1,11 @@ BR2_arm=y BR2_cortex_a7=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157c-dk2/overlay/" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/stmicroelectronics/common/stm32mp157/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y
Signature · 1 line
2.25.1
Thomas Petazzoni
AppliedPATCH v3 3/4 configs/stm32mp157*: bump kernel version
Quoted 7 lines · On Wed, 7 Oct 2020 17:49:44 +0300 Shlomi Vaknin <[email protected]> wrote:
Since kernel 5.7 is EOL now, this upgrades it to version 5.8.13.
Signed-off-by Shlomi Vaknin <[email protected]>--- configs/stm32mp157a_dk1_defconfig | 4 ++-- configs/stm32mp157c_dk2_defconfig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
In reply to Shlomi VakninAdding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ .../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.txt create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts
board/stmicroelectronics/stm32mp157c-dk2/linux.config +2 -2
@@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y CONFIG_FORCE_MAX_ZONEORDER=12 CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y
@@ -45,6 +43,7 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_CAN=y CONFIG_CAN_M_CAN=y +CONFIG_CFG80211=m CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_SIMPLE_PM_BUS=y
@@ -66,6 +65,7 @@ CONFIG_SMSC911X=y CONFIG_STMMAC_ETH=y CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_MDIO_BITBANG=y +CONFIG_BRCMFMAC=m CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_TOUCHSCREEN=y
board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf +1 -1
@@ -1,4 +1,4 @@ label stm32mp157c-dk2-buildroot kernel /boot/zImage - devicetree /boot/stm32mp157c-dk2.dtb + devicetree /boot/stm32mp157c-dk2-wifi.dtb append root=/dev/mmcblk0p4 rootwait
board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.txt new file +59 -0
59 lines not on this page · raw message
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts new file +32 -0
@@ -0,0 +1,32 @@ +/dts-v1/; + +#include "stm32mp157c-dk2.dts" + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; + }; +}; + +/* Wifi */ +&sdmmc2 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +};
configs/stm32mp157c_dk2_defconfig +6 -1
@@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_WIRELESS_REGDB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
Signature · 1 line
2.25.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi Shlomi,
Quoted 173 lines · Bartosz Bilas
Hi Shlomi,
Quoted 169 lines · Shlomi Vaknin
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin<[email protected]>--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ .../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-)create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.txtcreate mode 100644board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsboard/stmicroelectronics/stm32mp157c-dk2/linux.config +2
-2@@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y CONFIG_FORCE_MAX_ZONEORDER=12 CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y@@ -45,6 +43,7 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_CAN=y CONFIG_CAN_M_CAN=y +CONFIG_CFG80211=m CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_SIMPLE_PM_BUS=y@@ -66,6 +65,7 @@ CONFIG_SMSC911X=y CONFIG_STMMAC_ETH=y CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_MDIO_BITBANG=y +CONFIG_BRCMFMAC=m CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_TOUCHSCREEN=yboard/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf +1
-1@@ -1,4 +1,4 @@ label stm32mp157c-dk2-buildroot kernel /boot/zImage - devicetree /boot/stm32mp157c-dk2.dtb + devicetree /boot/stm32mp157c-dk2-wifi.dtb append root=/dev/mmcblk0p4 rootwaitboard/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.txt new file +59
-0@@ -0,0 +1,59 @@ +# NVRAM file for BCM943430WLSELG +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to be updated. +manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1202 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +#xtalfreq=19200 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=84 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 +pacalidx2g=32 +papdepsoffset=-36 +papdendidx=61 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffff +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG +muxenab=0x1 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + +#VCO freq 326.4MHz +spurconfig=0x3board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts new file +32
-0@@ -0,0 +1,32 @@ +/dts-v1/; + +#include "stm32mp157c-dk2.dts" + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; + }; +}; + +/* Wifi */ +&sdmmc2 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +};configs/stm32mp157c_dk2_defconfig +1
-1@@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" BR2_LINUX_KERNEL_INSTALL_TARGET=y
Quoted 8 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 21
Quoted 8 lines
configs/stm32mp157c_dk2_defconfig +5
-0+BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_WIRELESS_REGDB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
I suggest to add BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV to load firmware and driver automatically on boot.
Unfortunately it doesn't work for me, see:
[??? 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[??? 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [??? 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[??? 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
clkctl 0x50
[??? 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
clkctl 0x50
Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully?
# ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ????????? BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ????????? Interrupt:49 Base address:0xe000
lo??????? Link encap:Local Loopback
????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host
????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B)
sit0????? Link encap:IPv6-in-IPv4
????????? NOARP? MTU:1480? Metric:1
????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B)
#
As you can see there is no wlan0 interface.
Best
Bartek
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi Bartek,
That is very strange, since it works for me:
#############################################################################################################################
Starting mdev... OK
[ 4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0:
Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:80:E1:42:58:DB
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 00:9D:6B:A6:BC:BA
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#############################################################################################################################
The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell):
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt
Regards,
Shlomi
??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <? [email protected]??>:?
Quoted 249 lines
Hi Shlomi,
Quoted 14 lines · Bartosz Bilas
Hi Shlomi,
Quoted 10 lines · Shlomi Vaknin
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin<[email protected]>--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59+++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-)create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 1 line
Quoted 1 line
create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0
b/board/stmicroelectronics/stm32mp157c-dk2/linux.configQuoted 21 lines
Quoted 21 lines
index
c03eb748b4..4beee3a708100644board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-2@@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y CONFIG_FORCE_MAX_ZONEORDER=12 CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y@@ -45,6 +43,7 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_CAN=y CONFIG_CAN_M_CAN=y +CONFIG_CFG80211=m CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_SIMPLE_PM_BUS=y@@ -66,6 +65,7 @@ CONFIG_SMSC911X=yQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-0CONFIG_STMMAC_ETH=y CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_MDIO_BITBANG=y +CONFIG_BRCMFMAC=m CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_TOUCHSCREEN=ydiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confb/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 2 lines
Quoted 2 lines
index
5b7f56ee77..a6595971a8100644
---
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 1 line
Quoted 1 line
+++
b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 7 lines
Quoted 7 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-1@@ -1,4 +1,4 @@ label stm32mp157c-dk2-buildroot kernel /boot/zImage - devicetree /boot/stm32mp157c-dk2.dtb + devicetree /boot/stm32mp157c-dk2-wifi.dtb append root=/dev/mmcblk0p4 rootwaitdiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..b36de8837f
---/dev/null
+++b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config line 4
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +4
-0@@ -0,0 +1,59 @@ +# NVRAM file for BCM943430WLSELG +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to beupdated.
Quoted 48 lines
Quoted 48 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +48
-0+manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1202 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +#xtalfreq=19200 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=84 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 +pacalidx2g=32 +papdepsoffset=-36 +papdendidx=61 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffffQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG +muxenab=0x1 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + +#VCO freq 326.4MHz +spurconfig=0x3diff --git
a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsb/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 30 lines
Quoted 30 lines
new file mode 100644
index 0000000000..89747d2b5fboard/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts new file +25
-0@@ -0,0 +1,32 @@ +/dts-v1/; + +#include "stm32mp157c-dk2.dts" + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; + }; +}; + +/* Wifi */ +&sdmmc2 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + #address-cells = <1>; + #size-cells = <0>;Quoted 8 lines
Review
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts new file +7
-0+ status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +};(quoted diff) +0
-0b/configs/stm32mp157c_dk2_defconfig
Quoted 6 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 10
Quoted 6 lines
index
bf7b9868b1..9c2e436244100644configs/stm32mp157c_dk2_defconfig +0
-0@@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=yBR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config"
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig +0
-1BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2"+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 21
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig +5
-0BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_WIRELESS_REGDB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"I suggest to add
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEVto load firmware and driver automatically on boot.Unfortunately it doesn't work for me, see:
[ 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully?
# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:56:44 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Quoted 7 lines
#
As you can see there is no wlan0 interface.
Best
Bartek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201007/1c680496/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi Shlomi,
Quoted 51 lines · Shlomi Vaknin
Hi Bartek,
That is very strange, since it works for me:
#############################################################################################################################
Starting mdev... OK
[ ? ?4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ ? ?4.224122] cfg80211: Loaded X.509 cert 'sforshee:00b28ddf47aef9cea7' [ ? ?4.288641] brcmfmac:brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ ? ?4.486998] brcmfmac:brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ ? ?4.501649] brcmfmac:brcmf_c_process_clm_blob: noclm_blobavailable (err=-2), device may have limited channels available [ ? ?4.536998] brcmfmac:brcmf_c_preinit_dcmds: Firmware: BCM43430/1
wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f# ifconfig -a eth0 ? ? ?Link encap:Ethernet ?HWaddr 00:80:E1:42:58:DB ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) ? ? ? ? ? Interrupt:49 Base address:0xe000lo ? ? ? ?Link encap:Local Loopback
? ? ? ? ? inet addr:127.0.0.1 ?Mask:255.0.0.0
? ? ? ? ? inet6 addr: ::1/128 Scope:Host
? ? ? ? ? UP LOOPBACK RUNNING ?MTU:65536 ?Metric:1
? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000
? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)sit0 ? ? ?Link encap:IPv6-in-IPv4
? ? ? ? ? NOARP ?MTU:1480 ?Metric:1
? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000
? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)wlan0 ? ? Link encap:Ethernet ?HWaddr 00:9D:6B:A6:BC:BA ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1
? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000
? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)
#############################################################################################################################
Quoted 6 lines
The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell):
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txtRegards,
Shlomi
So in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
Bartek
Quoted 269 lines
??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:?
Hi Shlomi, On 07.10.2020 21:13, Bartosz Bilas wrote: > > Hi Shlomi, > > On 07.10.2020 16:49, Shlomi Vaknin wrote: >> Adding support for wifi for stm32mp157c-dk2 is achieved by using >> another dts which includes the bindings for the wifi module. >> In addition, a txt file for the wifi firmware was added. >> This was copied from the yocto bsp layer of st. >> >> Signed-off-by: Shlomi Vaknin<[email protected] <mailto:[email protected]>> >> --- >>? ?.../stm32mp157c-dk2/linux.config? ? ? ? ? ? ? | 4 +- >>? ?.../overlay/boot/extlinux/extlinux.conf? ? ? ?| 2 +- >>? ?.../brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ >>? ?.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts? | 32 ++++++++++ >>? ?configs/stm32mp157c_dk2_defconfig? ? ? ? ? ? ?| 7 ++- >>? ?5 files changed, 100 insertions(+), 4 deletions(-) >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> index c03eb748b4..4beee3a708 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> @@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y >>? ?CONFIG_FORCE_MAX_ZONEORDER=12 >>? ?CONFIG_SECCOMP=y >>? ?# CONFIG_ATAGS is not set >> -CONFIG_ZBOOT_ROM_TEXT=0x0 >> -CONFIG_ZBOOT_ROM_BSS=0x0 >>? ?CONFIG_ARM_APPENDED_DTB=y >>? ?CONFIG_ARM_ATAG_DTB_COMPAT=y >>? ?CONFIG_VFP=y >> @@ -45,6 +43,7 @@ CONFIG_UNIX=y >>? ?CONFIG_INET=y >>? ?CONFIG_CAN=y >>? ?CONFIG_CAN_M_CAN=y >> +CONFIG_CFG80211=m >>? ?CONFIG_DEVTMPFS=y >>? ?CONFIG_DEVTMPFS_MOUNT=y >>? ?CONFIG_SIMPLE_PM_BUS=y >> @@ -66,6 +65,7 @@ CONFIG_SMSC911X=y >>? ?CONFIG_STMMAC_ETH=y >>? ?CONFIG_DWMAC_DWC_QOS_ETH=y >>? ?CONFIG_MDIO_BITBANG=y >> +CONFIG_BRCMFMAC=m >>? ?CONFIG_INPUT_JOYDEV=y >>? ?CONFIG_INPUT_EVDEV=y >>? ?CONFIG_INPUT_TOUCHSCREEN=y >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> index 5b7f56ee77..a6595971a8 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> @@ -1,4 +1,4 @@ >>? ?label stm32mp157c-dk2-buildroot >>? ? ?kernel /boot/zImage >> -? devicetree /boot/stm32mp157c-dk2.dtb >> +? devicetree /boot/stm32mp157c-dk2-wifi.dtb >>? ? ?append root=/dev/mmcblk0p4 rootwait >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> new file mode 100644 >> index 0000000000..b36de8837f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> @@ -0,0 +1,59 @@ >> +# NVRAM file for BCM943430WLSELG >> +# 2.4 GHz, 20 MHz BW mode >> + >> +# The following parameter values are just placeholders, need to be updated. >> +manfid=0x2d0 >> +prodid=0x0726 >> +vendid=0x14e4 >> +devid=0x43e2 >> +boardtype=0x0726 >> +boardrev=0x1202 >> +boardnum=22 >> +macaddr=00:90:4c:c5:12:38 >> +sromrev=11 >> +boardflags=0x00404201 >> +boardflags3=0x08000000 >> +xtalfreq=37400 >> +#xtalfreq=19200 >> +nocrc=1 >> +ag0=255 >> +aa2g=1 >> +ccode=ALL >> + >> +pa0itssit=0x20 >> +extpagain2g=0 >> + >> +#PA parameters for 2.4GHz, measured at CHIP OUTPUT >> +pa2ga0=-168,7161,-820 >> +AvVmid_c0=0x0,0xc8 >> +cckpwroffset0=5 >> + >> +# PPR params >> +maxp2ga0=84 >> +txpwrbckof=6 >> +cckbw202gpo=0 >> +legofdmbw202gpo=0x66111111 >> +mcsbw202gpo=0x77711111 >> +propbw202gpo=0xdd >> + >> +# OFDM IIR : >> +ofdmdigfilttype=18 >> +ofdmdigfilttypebe=18 >> +# PAPD mode: >> +papdmode=1 >> +papdvalidtest=1 >> +pacalidx2g=32 >> +papdepsoffset=-36 >> +papdendidx=61 >> + >> +il0macaddr=00:90:4c:c5:12:38 >> +wl0id=0x431b >> + >> +deadman_to=0xffffffff >> +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG >> +muxenab=0x1 >> +# CLDO PWM voltage settings - 0x4 - 1.1 volt >> +#cldo_pwm=0x4 >> + >> +#VCO freq 326.4MHz >> +spurconfig=0x3 >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> new file mode 100644 >> index 0000000000..89747d2b5f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> @@ -0,0 +1,32 @@ >> +/dts-v1/; >> + >> +#include "stm32mp157c-dk2.dts" >> + >> +/ { >> +? ? wifi_pwrseq: wifi-pwrseq { >> +? ? ? ? ? ? compatible = "mmc-pwrseq-simple"; >> +? ? ? ? ? ? reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; >> +? ? }; >> +}; >> + >> +/* Wifi */ >> +&sdmmc2 { >> +? ? arm,primecell-periphid = <0x10153180>; >> +? ? pinctrl-names = "default", "opendrain", "sleep"; >> +? ? pinctrl-0 = <&sdmmc2_b4_pins_a>; >> +? ? pinctrl-1 = <&sdmmc2_b4_od_pins_a>; >> +? ? pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; >> +? ? non-removable; >> +? ? st,neg-edge; >> +? ? bus-width = <4>; >> +? ? vmmc-supply = <&v3v3>; >> +? ? mmc-pwrseq = <&wifi_pwrseq>; >> +? ? #address-cells = <1>; >> +? ? #size-cells = <0>; >> +? ? status = "okay"; >> + >> +? ? brcmf: bcrmf at 1 { >> +? ? ? ? ? ? reg = <1>; >> +? ? ? ? ? ? compatible = "brcm,bcm4329-fmac"; >> +? ? }; >> +}; >> diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig >> index bf7b9868b1..9c2e436244 100644 >> --- a/configs/stm32mp157c_dk2_defconfig >> +++ b/configs/stm32mp157c_dk2_defconfig >> @@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" >>? ?BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >> ?BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" >>? ?BR2_LINUX_KERNEL_DTS_SUPPORT=y >> -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" >> +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" >>? ?BR2_LINUX_KERNEL_INSTALL_TARGET=y >> +BR2_PACKAGE_LINUX_FIRMWARE=y >> +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y >> +BR2_PACKAGE_WIRELESS_REGDB=y >> +BR2_PACKAGE_WPA_SUPPLICANT=y >> +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y >>? ?BR2_TARGET_ROOTFS_EXT2=y >>? ?BR2_TARGET_ROOTFS_EXT2_4=y >>? ?BR2_TARGET_ROOTFS_EXT2_SIZE="120M" I suggest to add BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV to load firmware and driver automatically on boot. Unfortunately it doesn't work for me, see: [??? 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [??? 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [??? 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [??? 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [??? 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully? # ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ?????????? BROADCAST MULTICAST? MTU:1500? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ?????????? Interrupt:49 Base address:0xe000 lo??????? Link encap:Local Loopback ?????????? inet addr:127.0.0.1? Mask:255.0.0.0 ?????????? inet6 addr: ::1/128 Scope:Host ?????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) sit0????? Link encap:IPv6-in-IPv4 ?????????? NOARP? MTU:1480? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) # As you can see there is no wlan0 interface. Best Bartek
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201008/7c6e84df/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharing
This problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
Shlomi
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <? [email protected]??>:?
Quoted 331 lines
Hi Shlomi,
On 07.10.2020 22:16, Shlomi Vaknin wrote:Hi Bartek,
That is very strange, since it works for me:
#############################################################################################################################
Starting mdev... OK[ 4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0:Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:58:DB BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 00:9D:6B:A6:BC:BA
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)#############################################################################################################################
The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell):
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txtRegards,
ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
Bartek??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 251 lines
Hi Shlomi,
Quoted 14 lines · Bartosz Bilas
Hi Shlomi,
Quoted 10 lines · Shlomi Vaknin
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin<[email protected]>--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59+++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-)create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 1 line
Quoted 1 line
create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0
b/board/stmicroelectronics/stm32mp157c-dk2/linux.configQuoted 21 lines
Quoted 21 lines
index
c03eb748b4..4beee3a708100644board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-2@@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y CONFIG_FORCE_MAX_ZONEORDER=12 CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y@@ -45,6 +43,7 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_CAN=y CONFIG_CAN_M_CAN=y +CONFIG_CFG80211=m CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_SIMPLE_PM_BUS=y@@ -66,6 +65,7 @@ CONFIG_SMSC911X=yQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-0CONFIG_STMMAC_ETH=y CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_MDIO_BITBANG=y +CONFIG_BRCMFMAC=m CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_TOUCHSCREEN=ydiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confb/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 2 lines
Quoted 2 lines
index
5b7f56ee77..a6595971a8100644
---
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 1 line
Quoted 1 line
+++
b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 7 lines
Quoted 7 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-1@@ -1,4 +1,4 @@ label stm32mp157c-dk2-buildroot kernel /boot/zImage - devicetree /boot/stm32mp157c-dk2.dtb + devicetree /boot/stm32mp157c-dk2-wifi.dtb append root=/dev/mmcblk0p4 rootwaitdiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..b36de8837f
---/dev/null
+++b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config line 4
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +4
-0@@ -0,0 +1,59 @@ +# NVRAM file for BCM943430WLSELG +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to beupdated.
Quoted 48 lines
Quoted 48 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +48
-0+manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1202 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +#xtalfreq=19200 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=84 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 +pacalidx2g=32 +papdepsoffset=-36 +papdendidx=61 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffffQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG +muxenab=0x1 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + +#VCO freq 326.4MHz +spurconfig=0x3diff --git
a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsb/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 30 lines
Quoted 30 lines
new file mode 100644
index 0000000000..89747d2b5fboard/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts new file +25
-0@@ -0,0 +1,32 @@ +/dts-v1/; + +#include "stm32mp157c-dk2.dts" + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; + }; +}; + +/* Wifi */ +&sdmmc2 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + #address-cells = <1>; + #size-cells = <0>;Quoted 8 lines
Review
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts new file +7
-0+ status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +};(quoted diff) +0
-0b/configs/stm32mp157c_dk2_defconfig
Quoted 6 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 10
Quoted 6 lines
index
bf7b9868b1..9c2e436244100644configs/stm32mp157c_dk2_defconfig +0
-0@@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=yBR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config"
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig +0
-1BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2"+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 21
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig +5
-0BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_WIRELESS_REGDB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"I suggest to add
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEVto load firmware and driver automatically on boot.Unfortunately it doesn't work for me, see:
[ 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully?
# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:56:44 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)#
Quoted 10 lines
Quoted 5 lines
As you can see there is no wlan0 interface.
Best
Bartek_______________________________________________
buildroot mailing listbuildroot at busybox.nethttp://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201008/844b2c83/attachment-0001.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hello Shlomi,
Quoted 7 lines · Shlomi Vaknin
Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard?image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharing
Quoted 7 lines
This problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
Shlomi
I've tested your image but the result is the same, see:
[? 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[? 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [? 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[? 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
clkctl 0x50
[? 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
clkctl 0x50
My board is:
CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var2.0 Rev.C-01
DRAM:? 512 MiB
Best
Bartek
Quoted 76 lines
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:?
Hi Shlomi, On 07.10.2020 22:16, Shlomi Vaknin wrote:Quoted 51 lines
Hi Bartek, That is very strange, since it works for me: ############################################################################################################################# Starting mdev... OK [ ? ?4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ ? ?4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ ? ?4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ ? ?4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f # ifconfig -a eth0 ? ? ?Link encap:Ethernet ?HWaddr 00:80:E1:42:58:DB ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) ? ? ? ? ? Interrupt:49 Base address:0xe000 lo ? ? ? ?Link encap:Local Loopback ? ? ? ? ? inet addr:127.0.0.1 ?Mask:255.0.0.0 ? ? ? ? ? inet6 addr: ::1/128 Scope:Host ? ? ? ? ? UP LOOPBACK RUNNING ?MTU:65536 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) sit0 ? ? ?Link encap:IPv6-in-IPv4 ? ? ? ? ? NOARP ?MTU:1480 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) wlan0 ? ? Link encap:Ethernet ?HWaddr 00:9D:6B:A6:BC:BA ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)Quoted 8 lines
############################################################################################################################# The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell): https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt Regards, ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Quoted 279 lines
Best
BartekQuoted 276 lines
??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 21:13, Bartosz Bilas wrote: > > Hi Shlomi, > > On 07.10.2020 16:49, Shlomi Vaknin wrote: >> Adding support for wifi for stm32mp157c-dk2 is achieved by using >> another dts which includes the bindings for the wifi module. >> In addition, a txt file for the wifi firmware was added. >> This was copied from the yocto bsp layer of st. >> >> Signed-off-by: Shlomi Vaknin<[email protected] <mailto:[email protected]>> >> --- >>? ?.../stm32mp157c-dk2/linux.config ? ? |? 4 +- >>? ?.../overlay/boot/extlinux/extlinux.conf ? ? ?|? 2 +- >>? ?.../brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ >> ?.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts? | 32 ++++++++++ >>? ?configs/stm32mp157c_dk2_defconfig ? ? ?|? 7 ++- >>? ?5 files changed, 100 insertions(+), 4 deletions(-) >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> index c03eb748b4..4beee3a708 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> @@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y >>? ?CONFIG_FORCE_MAX_ZONEORDER=12 >>? ?CONFIG_SECCOMP=y >>? ?# CONFIG_ATAGS is not set >> -CONFIG_ZBOOT_ROM_TEXT=0x0 >> -CONFIG_ZBOOT_ROM_BSS=0x0 >>? ?CONFIG_ARM_APPENDED_DTB=y >>? ?CONFIG_ARM_ATAG_DTB_COMPAT=y >>? ?CONFIG_VFP=y >> @@ -45,6 +43,7 @@ CONFIG_UNIX=y >>? ?CONFIG_INET=y >>? ?CONFIG_CAN=y >>? ?CONFIG_CAN_M_CAN=y >> +CONFIG_CFG80211=m >>? ?CONFIG_DEVTMPFS=y >>? ?CONFIG_DEVTMPFS_MOUNT=y >>? ?CONFIG_SIMPLE_PM_BUS=y >> @@ -66,6 +65,7 @@ CONFIG_SMSC911X=y >>? ?CONFIG_STMMAC_ETH=y >>? ?CONFIG_DWMAC_DWC_QOS_ETH=y >>? ?CONFIG_MDIO_BITBANG=y >> +CONFIG_BRCMFMAC=m >>? ?CONFIG_INPUT_JOYDEV=y >>? ?CONFIG_INPUT_EVDEV=y >>? ?CONFIG_INPUT_TOUCHSCREEN=y >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> index 5b7f56ee77..a6595971a8 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> @@ -1,4 +1,4 @@ >>? ?label stm32mp157c-dk2-buildroot >>? ? ?kernel /boot/zImage >> -? devicetree /boot/stm32mp157c-dk2.dtb >> +? devicetree /boot/stm32mp157c-dk2-wifi.dtb >>? ? ?append root=/dev/mmcblk0p4 rootwait >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> new file mode 100644 >> index 0000000000..b36de8837f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> @@ -0,0 +1,59 @@ >> +# NVRAM file for BCM943430WLSELG >> +# 2.4 GHz, 20 MHz BW mode >> + >> +# The following parameter values are just placeholders, need to be updated. >> +manfid=0x2d0 >> +prodid=0x0726 >> +vendid=0x14e4 >> +devid=0x43e2 >> +boardtype=0x0726 >> +boardrev=0x1202 >> +boardnum=22 >> +macaddr=00:90:4c:c5:12:38 >> +sromrev=11 >> +boardflags=0x00404201 >> +boardflags3=0x08000000 >> +xtalfreq=37400 >> +#xtalfreq=19200 >> +nocrc=1 >> +ag0=255 >> +aa2g=1 >> +ccode=ALL >> + >> +pa0itssit=0x20 >> +extpagain2g=0 >> + >> +#PA parameters for 2.4GHz, measured at CHIP OUTPUT >> +pa2ga0=-168,7161,-820 >> +AvVmid_c0=0x0,0xc8 >> +cckpwroffset0=5 >> + >> +# PPR params >> +maxp2ga0=84 >> +txpwrbckof=6 >> +cckbw202gpo=0 >> +legofdmbw202gpo=0x66111111 >> +mcsbw202gpo=0x77711111 >> +propbw202gpo=0xdd >> + >> +# OFDM IIR : >> +ofdmdigfilttype=18 >> +ofdmdigfilttypebe=18 >> +# PAPD mode: >> +papdmode=1 >> +papdvalidtest=1 >> +pacalidx2g=32 >> +papdepsoffset=-36 >> +papdendidx=61 >> + >> +il0macaddr=00:90:4c:c5:12:38 >> +wl0id=0x431b >> + >> +deadman_to=0xffffffff >> +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG >> +muxenab=0x1 >> +# CLDO PWM voltage settings - 0x4 - 1.1 volt >> +#cldo_pwm=0x4 >> + >> +#VCO freq 326.4MHz >> +spurconfig=0x3 >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> new file mode 100644 >> index 0000000000..89747d2b5f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> @@ -0,0 +1,32 @@ >> +/dts-v1/; >> + >> +#include "stm32mp157c-dk2.dts" >> + >> +/ { >> +? ? wifi_pwrseq: wifi-pwrseq { >> +? ? ? ? ? ? compatible = "mmc-pwrseq-simple"; >> +? ? ? ? ? ? reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; >> +? ? }; >> +}; >> + >> +/* Wifi */ >> +&sdmmc2 { >> +? ? arm,primecell-periphid = <0x10153180>; >> +? ? pinctrl-names = "default", "opendrain", "sleep"; >> +? ? pinctrl-0 = <&sdmmc2_b4_pins_a>; >> +? ? pinctrl-1 = <&sdmmc2_b4_od_pins_a>; >> +? ? pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; >> +? ? non-removable; >> +? ? st,neg-edge; >> +? ? bus-width = <4>; >> +? ? vmmc-supply = <&v3v3>; >> +? ? mmc-pwrseq = <&wifi_pwrseq>; >> +? ? #address-cells = <1>; >> +? ? #size-cells = <0>; >> +? ? status = "okay"; >> + >> +? ? brcmf: bcrmf at 1 { >> +? ? ? ? ? ? reg = <1>; >> +? ? ? ? ? ? compatible = "brcm,bcm4329-fmac"; >> +? ? }; >> +}; >> diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig >> index bf7b9868b1..9c2e436244 100644 >> --- a/configs/stm32mp157c_dk2_defconfig >> +++ b/configs/stm32mp157c_dk2_defconfig >> @@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" >>? ?BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >> ?BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" >>? ?BR2_LINUX_KERNEL_DTS_SUPPORT=y >> -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" >> +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" >>? ?BR2_LINUX_KERNEL_INSTALL_TARGET=y >> +BR2_PACKAGE_LINUX_FIRMWARE=y >> +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y >> +BR2_PACKAGE_WIRELESS_REGDB=y >> +BR2_PACKAGE_WPA_SUPPLICANT=y >> +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y >>? ?BR2_TARGET_ROOTFS_EXT2=y >>? ?BR2_TARGET_ROOTFS_EXT2_4=y >>? ?BR2_TARGET_ROOTFS_EXT2_SIZE="120M" I suggest to add BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV to load firmware and driver automatically on boot. Unfortunately it doesn't work for me, see: [??? 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [??? 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [??? 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [??? 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [??? 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully? # ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ?????????? BROADCAST MULTICAST? MTU:1500? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ?????????? Interrupt:49 Base address:0xe000 lo??????? Link encap:Local Loopback ?????????? inet addr:127.0.0.1? Mask:255.0.0.0 ?????????? inet6 addr: ::1/128 Scope:Host ?????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) sit0????? Link encap:IPv6-in-IPv4 ?????????? NOARP? MTU:1480? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) # As you can see there is no wlan0 interface. Best Bartek _______________________________________________ buildroot mailing list buildroot at busybox.net <mailto:[email protected]> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201009/518ebed5/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
HI!
According to u-boot I have the same revision as you. Could you try the formal version from st:
https://www.st.com/en/embedded-software/stm32mp1starter.html ? I flashed it and the wifi worked. Just to be sure that there is no issue or something else with your board.
Best
Shlomi
??????? ??? ??, 9 ????? 2020 ?-19:49 ??? ?Bartosz Bilas?? <? [email protected]??>:?
Quoted 38 lines
Hello Shlomi,
On 08.10.2020 22:45, Shlomi Vaknin wrote:Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharingThis problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
ShlomiI've tested your image but the result is the same, see:
[ 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [ 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50My board is:
CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var2.0 Rev.C-01
DRAM: 512 MiB
Best
Bartek
Quoted 345 lines
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 342 lines
Hi Shlomi,
On 07.10.2020 22:16, Shlomi Vaknin wrote:Hi Bartek,
That is very strange, since it works for me:
#############################################################################################################################
Starting mdev... OK[ 4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0:Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:58:DB BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 00:9D:6B:A6:BC:BA
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)#############################################################################################################################
The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell):
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txtRegards,
ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
Bartek??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 250 lines
Hi Shlomi,
Quoted 14 lines · Bartosz Bilas
Hi Shlomi,
Quoted 10 lines · Shlomi Vaknin
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin<[email protected]>--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59+++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-)create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 1 line
Quoted 1 line
create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0
b/board/stmicroelectronics/stm32mp157c-dk2/linux.configQuoted 21 lines
Quoted 21 lines
index
c03eb748b4..4beee3a708100644board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-2@@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y CONFIG_FORCE_MAX_ZONEORDER=12 CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y@@ -45,6 +43,7 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_CAN=y CONFIG_CAN_M_CAN=y +CONFIG_CFG80211=m CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_SIMPLE_PM_BUS=y@@ -66,6 +65,7 @@ CONFIG_SMSC911X=yQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-0CONFIG_STMMAC_ETH=y CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_MDIO_BITBANG=y +CONFIG_BRCMFMAC=m CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_TOUCHSCREEN=ydiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confb/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 2 lines
Quoted 2 lines
index
5b7f56ee77..a6595971a8100644
---
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 1 line
Quoted 1 line
+++
b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 7 lines
Quoted 7 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-1@@ -1,4 +1,4 @@ label stm32mp157c-dk2-buildroot kernel /boot/zImage - devicetree /boot/stm32mp157c-dk2.dtb + devicetree /boot/stm32mp157c-dk2-wifi.dtb append root=/dev/mmcblk0p4 rootwaitdiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..b36de8837f
---/dev/null
+++b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config line 4
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +4
-0@@ -0,0 +1,59 @@ +# NVRAM file for BCM943430WLSELG +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to beupdated.
Quoted 48 lines
Quoted 48 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +48
-0+manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1202 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +#xtalfreq=19200 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=84 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 +pacalidx2g=32 +papdepsoffset=-36 +papdendidx=61 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffffQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG +muxenab=0x1 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + +#VCO freq 326.4MHz +spurconfig=0x3diff --git
a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsb/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..89747d2b5f
---/dev/null
+++
b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 26 lines
Quoted 26 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +25
-0@@ -0,0 +1,32 @@ +/dts-v1/; + +#include "stm32mp157c-dk2.dts" + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; + }; +}; + +/* Wifi */ +&sdmmc2 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + #address-cells = <1>; + #size-cells = <0>;Quoted 8 lines
Review
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+ status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +};(quoted diff) +0
-0b/configs/stm32mp157c_dk2_defconfig
Quoted 6 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 10
Quoted 6 lines
index
bf7b9868b1..9c2e436244100644configs/stm32mp157c_dk2_defconfig +0
-0@@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=yBR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config"
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 12
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig +0
-1BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2"+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig +5
-0BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_WIRELESS_REGDB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"I suggest to add
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEVto load firmware and driver automatically on boot.Unfortunately it doesn't work for me, see:
[ 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully?
# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:56:44 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)Quoted 7 lines
#
As you can see there is no wlan0 interface.
Best
Bartek_______________________________________________
buildroot mailing listbuildroot at busybox.nethttp://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201009/377db30f/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hello Shlomi,
Quoted 11 lines · Shlomi Vaknin
HI!
According to u-boot I have the same revision as you. Could you try the formal version from st:
https://www.st.com/en/embedded-software/stm32mp1starter.html ? I flashed it and the wifi worked. Just to be sure that there is no issue or something else with your board.Best
Shlomi
I've used:
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 3.1-openstlinux-5.4-dunfell-mp1-20-06-24 stm32mp1 ttySTM0
and everything seems to be ok
root at stm32mp1:~# ifconfig -a
eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44
????????? UP BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ????????? Interrupt:48 Base address:0x4000
lo??????? Link encap:Local Loopback
????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host
????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ????????? RX packets:80 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:6080 (5.9 KiB)? TX bytes:6080 (5.9 KiB)
usb0????? Link encap:Ethernet? HWaddr 4E:12:37:C3:7B:6C
????????? UP BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B)
wlan0???? Link encap:Ethernet? HWaddr 10:98:C3:5F:FB:F9
????????? BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B)
I'm gonna double-check one more time what's wrong with buildroot's image though.
Best
Bartek
Quoted 35 lines
??????? ??? ??, 9 ????? 2020 ?-19:49 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:?
Hello Shlomi, On 08.10.2020 22:45, Shlomi Vaknin wrote:Quoted 7 lines
Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard?image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharingQuoted 7 lines
This problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
ShlomiI've tested your image but the result is the same, see: [? 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database [? 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [? 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [? 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [? 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 My board is:
Quoted 378 lines
CPU: STM32MP157CAC Rev.B Model: STMicroelectronics STM32MP157C-DK2 Discovery Board Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2) Board: MB1272 Var2.0 Rev.C-01 DRAM:? 512 MiB Best BartekQuoted 370 lines
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 22:16, Shlomi Vaknin wrote:Quoted 52 lines
Hi Bartek, That is very strange, since it works for me: ############################################################################################################################# Starting mdev... OK [ ? ?4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ ? ?4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ ? ?4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ ? ?4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f # ifconfig -a eth0 ? ? ?Link encap:Ethernet ?HWaddr 00:80:E1:42:58:DB ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) ? ? ? ? ? Interrupt:49 Base address:0xe000 lo ? ? ? ?Link encap:Local Loopback ? ? ? ? ? inet addr:127.0.0.1 ?Mask:255.0.0.0 ? ? ? ? ? inet6 addr: ::1/128 Scope:Host ? ? ? ? ? UP LOOPBACK RUNNING ?MTU:65536 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) sit0 ? ? ?Link encap:IPv6-in-IPv4 ? ? ? ? ? NOARP ?MTU:1480 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) wlan0 ? ? Link encap:Ethernet ?HWaddr 00:9D:6B:A6:BC:BA ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)Quoted 8 lines
############################################################################################################################# The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell): https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt Regards, ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
BartekQuoted 289 lines
??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <[email protected] <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 21:13, Bartosz Bilas wrote: > > Hi Shlomi, > > On 07.10.2020 16:49, Shlomi Vaknin wrote: >> Adding support for wifi for stm32mp157c-dk2 is achieved by using >> another dts which includes the bindings for the wifi module. >> In addition, a txt file for the wifi firmware was added. >> This was copied from the yocto bsp layer of st. >> >> Signed-off-by: Shlomi Vaknin<[email protected] <mailto:[email protected]>> >> --- >>? ?.../stm32mp157c-dk2/linux.config ? ? ? ? ? ? |? 4 +- >> ?.../overlay/boot/extlinux/extlinux.conf ? ?|? 2 +- >>? ?.../brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ >> ?.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ >> ?configs/stm32mp157c_dk2_defconfig ? ?|? 7 ++- >>? ?5 files changed, 100 insertions(+), 4 deletions(-) >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> index c03eb748b4..4beee3a708 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> @@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y >>? ?CONFIG_FORCE_MAX_ZONEORDER=12 >>? ?CONFIG_SECCOMP=y >>? ?# CONFIG_ATAGS is not set >> -CONFIG_ZBOOT_ROM_TEXT=0x0 >> -CONFIG_ZBOOT_ROM_BSS=0x0 >>? ?CONFIG_ARM_APPENDED_DTB=y >>? ?CONFIG_ARM_ATAG_DTB_COMPAT=y >>? ?CONFIG_VFP=y >> @@ -45,6 +43,7 @@ CONFIG_UNIX=y >>? ?CONFIG_INET=y >>? ?CONFIG_CAN=y >>? ?CONFIG_CAN_M_CAN=y >> +CONFIG_CFG80211=m >>? ?CONFIG_DEVTMPFS=y >>? ?CONFIG_DEVTMPFS_MOUNT=y >>? ?CONFIG_SIMPLE_PM_BUS=y >> @@ -66,6 +65,7 @@ CONFIG_SMSC911X=y >>? ?CONFIG_STMMAC_ETH=y >>? ?CONFIG_DWMAC_DWC_QOS_ETH=y >>? ?CONFIG_MDIO_BITBANG=y >> +CONFIG_BRCMFMAC=m >>? ?CONFIG_INPUT_JOYDEV=y >>? ?CONFIG_INPUT_EVDEV=y >>? ?CONFIG_INPUT_TOUCHSCREEN=y >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> index 5b7f56ee77..a6595971a8 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> @@ -1,4 +1,4 @@ >>? ?label stm32mp157c-dk2-buildroot >>? ? ?kernel /boot/zImage >> -? devicetree /boot/stm32mp157c-dk2.dtb >> +? devicetree /boot/stm32mp157c-dk2-wifi.dtb >>? ? ?append root=/dev/mmcblk0p4 rootwait >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> new file mode 100644 >> index 0000000000..b36de8837f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> @@ -0,0 +1,59 @@ >> +# NVRAM file for BCM943430WLSELG >> +# 2.4 GHz, 20 MHz BW mode >> + >> +# The following parameter values are just placeholders, need to be updated. >> +manfid=0x2d0 >> +prodid=0x0726 >> +vendid=0x14e4 >> +devid=0x43e2 >> +boardtype=0x0726 >> +boardrev=0x1202 >> +boardnum=22 >> +macaddr=00:90:4c:c5:12:38 >> +sromrev=11 >> +boardflags=0x00404201 >> +boardflags3=0x08000000 >> +xtalfreq=37400 >> +#xtalfreq=19200 >> +nocrc=1 >> +ag0=255 >> +aa2g=1 >> +ccode=ALL >> + >> +pa0itssit=0x20 >> +extpagain2g=0 >> + >> +#PA parameters for 2.4GHz, measured at CHIP OUTPUT >> +pa2ga0=-168,7161,-820 >> +AvVmid_c0=0x0,0xc8 >> +cckpwroffset0=5 >> + >> +# PPR params >> +maxp2ga0=84 >> +txpwrbckof=6 >> +cckbw202gpo=0 >> +legofdmbw202gpo=0x66111111 >> +mcsbw202gpo=0x77711111 >> +propbw202gpo=0xdd >> + >> +# OFDM IIR : >> +ofdmdigfilttype=18 >> +ofdmdigfilttypebe=18 >> +# PAPD mode: >> +papdmode=1 >> +papdvalidtest=1 >> +pacalidx2g=32 >> +papdepsoffset=-36 >> +papdendidx=61 >> + >> +il0macaddr=00:90:4c:c5:12:38 >> +wl0id=0x431b >> + >> +deadman_to=0xffffffff >> +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG >> +muxenab=0x1 >> +# CLDO PWM voltage settings - 0x4 - 1.1 volt >> +#cldo_pwm=0x4 >> + >> +#VCO freq 326.4MHz >> +spurconfig=0x3 >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> new file mode 100644 >> index 0000000000..89747d2b5f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> @@ -0,0 +1,32 @@ >> +/dts-v1/; >> + >> +#include "stm32mp157c-dk2.dts" >> + >> +/ { >> +? ? wifi_pwrseq: wifi-pwrseq { >> +? ? ? ? ? ? compatible = "mmc-pwrseq-simple"; >> +? ? ? ? ? ? reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; >> +? ? }; >> +}; >> + >> +/* Wifi */ >> +&sdmmc2 { >> +? ? arm,primecell-periphid = <0x10153180>; >> +? ? pinctrl-names = "default", "opendrain", "sleep"; >> +? ? pinctrl-0 = <&sdmmc2_b4_pins_a>; >> +? ? pinctrl-1 = <&sdmmc2_b4_od_pins_a>; >> +? ? pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; >> +? ? non-removable; >> +? ? st,neg-edge; >> +? ? bus-width = <4>; >> +? ? vmmc-supply = <&v3v3>; >> +? ? mmc-pwrseq = <&wifi_pwrseq>; >> +? ? #address-cells = <1>; >> +? ? #size-cells = <0>; >> +? ? status = "okay"; >> + >> +? ? brcmf: bcrmf at 1 { >> +? ? ? ? ? ? reg = <1>; >> +? ? ? ? ? ? compatible = "brcm,bcm4329-fmac"; >> +? ? }; >> +}; >> diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig >> index bf7b9868b1..9c2e436244 100644 >> --- a/configs/stm32mp157c_dk2_defconfig >> +++ b/configs/stm32mp157c_dk2_defconfig >> @@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" >> ?BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >> ?BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" >>? ?BR2_LINUX_KERNEL_DTS_SUPPORT=y >> -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" >> +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" >>? ?BR2_LINUX_KERNEL_INSTALL_TARGET=y >> +BR2_PACKAGE_LINUX_FIRMWARE=y >> +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y >> +BR2_PACKAGE_WIRELESS_REGDB=y >> +BR2_PACKAGE_WPA_SUPPLICANT=y >> +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y >>? ?BR2_TARGET_ROOTFS_EXT2=y >>? ?BR2_TARGET_ROOTFS_EXT2_4=y >> ?BR2_TARGET_ROOTFS_EXT2_SIZE="120M" I suggest to add BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV to load firmware and driver automatically on boot. Unfortunately it doesn't work for me, see: [??? 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [??? 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [??? 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [??? 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [??? 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully? # ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ?????????? BROADCAST MULTICAST? MTU:1500 Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ?????????? Interrupt:49 Base address:0xe000 lo??????? Link encap:Local Loopback ?????????? inet addr:127.0.0.1 Mask:255.0.0.0 ?????????? inet6 addr: ::1/128 Scope:Host ?????????? UP LOOPBACK RUNNING? MTU:65536 Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) sit0????? Link encap:IPv6-in-IPv4 ?????????? NOARP? MTU:1480? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) # As you can see there is no wlan0 interface. Best Bartek _______________________________________________ buildroot mailing list buildroot at busybox.net <mailto:[email protected]> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201010/99957703/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi!
I still don't know why it works only for me, but I discovered the
following: st doesn't use the firmware from the official linux-firmware repo. They are using the firmware from Murata github. In addition, the nvram file that I supplied was copied from st, which means that it matches the murata firmware they use. So I suggest the following:
1. Take the nvram file from the official linux-firmware repository (worked for me as well). Btw, should it be installed by default by the linux-firmware package?
2. Use more recent firmware from murata.
I would be happy if you can test these. Do you have another idea or something that I can try by myself?
Thanks,
Shlomi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201010/102035f2/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi,
I succeeded in reproducing the issue with my board. All I needed to do is to make a hard reset. I don't know why rebooting does not reproduce it as well. I will update later
Regards,
Shlomi
??????? ???, 10 ????? 2020 ?-21:08 ??? ?Shlomi Vaknin?? <? [email protected]??>:?
Quoted 13 lines
Hi!
I still don't know why it works only for me, but I discovered the
following: st doesn't use the firmware from the official linux-firmware repo. They are using the firmware from Murata github. In addition, the nvram file that I supplied was copied from st, which means that it matches the murata firmware they use. So I suggest the following:1. Take the nvram file from the official linux-firmware repository (worked for me as well). Btw, should it be installed by default by the linux-firmware package?
2. Use more recent firmware from murata.
Quoted 6 lines
I would be happy if you can test these. Do you have another idea or something that I can try by myself?
Thanks,
Shlomi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201010/d61c5888/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
In reply to Bartosz BilasHi Shlomi,
Quoted 54 lines · Bartosz Bilas
Hello Shlomi,
Quoted 11 lines · Shlomi Vaknin
HI!
According to u-boot I have the same revision as you. Could you try the formal version from st:
https://www.st.com/en/embedded-software/stm32mp1starter.html ? I flashed it and the wifi worked. Just to be sure that there is no issue or something else with your board.Best
ShlomiI've used:
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 3.1-openstlinux-5.4-dunfell-mp1-20-06-24 stm32mp1 ttySTM0
and everything seems to be ok
root at stm32mp1:~# ifconfig -a
eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ????????? UP BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ????????? Interrupt:48 Base address:0x4000lo??????? Link encap:Local Loopback
????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host
????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ????????? RX packets:80 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:6080 (5.9 KiB)? TX bytes:6080 (5.9 KiB)usb0????? Link encap:Ethernet? HWaddr 4E:12:37:C3:7B:6C ????????? UP BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B)wlan0???? Link encap:Ethernet? HWaddr 10:98:C3:5F:FB:F9 ????????? BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B)
Quoted 5 lines
I'm gonna double-check one more time what's wrong with buildroot's image though.
Best
Bartek
I've got this working fine, I had to add BR2_PACKAGE_MURATA_CYW_FW_CYW43430 instead of BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX as I mentioned before, I also added BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE
and I've successfully connected with my wifi network.
# ifconfig lo??????? Link encap:Local Loopback ????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host ????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B)
wlan0???? Link encap:Ethernet? HWaddr 10:98:C3:5F:FB:F9
????????? inet addr:192.168.10.110? Bcast:192.168.10.255 Mask:255.255.255.0 ????????? inet6 addr: fd3a:e7f5:fc04:0:1298:c3ff:fe5f:fbf9/64 Scope:Global ????????? inet6 addr: fe80::1298:c3ff:fe5f:fbf9/64 Scope:Link ????????? UP BROADCAST RUNNING MULTICAST? MTU:1500? Metric:1 ????????? RX packets:8 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000
????????? RX bytes:1624 (1.5 KiB)? TX bytes:1988 (1.9 KiB)
# ping google.com PING google.com (216.58.215.78): 56 data bytes 64 bytes from 216.58.215.78: seq=0 ttl=116 time=29.594 ms 64 bytes from 216.58.215.78: seq=1 ttl=116 time=39.401 ms ^C --- google.com ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 29.594/34.497/39.401 ms
Could you verify if it works well on your device?
Quoted 415 lines
Quoted 36 lines
??????? ??? ??, 9 ????? 2020 ?-19:49 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:?
Hello Shlomi, On 08.10.2020 22:45, Shlomi Vaknin wrote:Quoted 8 lines
Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard?image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharingQuoted 7 lines
This problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
ShlomiI've tested your image but the result is the same, see: [? 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database [? 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [? 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [? 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [? 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 My board is:Quoted 378 lines
CPU: STM32MP157CAC Rev.B Model: STMicroelectronics STM32MP157C-DK2 Discovery Board Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2) Board: MB1272 Var2.0 Rev.C-01 DRAM:? 512 MiB Best BartekQuoted 370 lines
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 22:16, Shlomi Vaknin wrote:Quoted 52 lines
Hi Bartek, That is very strange, since it works for me: ############################################################################################################################# Starting mdev... OK [ ? ?4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ ? ?4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ ? ?4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ ? ?4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f # ifconfig -a eth0 ? ? ?Link encap:Ethernet ?HWaddr 00:80:E1:42:58:DB ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) ? ? ? ? ? Interrupt:49 Base address:0xe000 lo ? ? ? ?Link encap:Local Loopback ? ? ? ? ? inet addr:127.0.0.1 ?Mask:255.0.0.0 ? ? ? ? ? inet6 addr: ::1/128 Scope:Host ? ? ? ? ? UP LOOPBACK RUNNING ?MTU:65536 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) sit0 ? ? ?Link encap:IPv6-in-IPv4 ? ? ? ? ? NOARP ?MTU:1480 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) wlan0 ? ? Link encap:Ethernet ?HWaddr 00:9D:6B:A6:BC:BA ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)Quoted 8 lines
############################################################################################################################# The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell): https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt Regards, ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
BartekQuoted 289 lines
??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <[email protected] <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 21:13, Bartosz Bilas wrote: > > Hi Shlomi, > > On 07.10.2020 16:49, Shlomi Vaknin wrote: >> Adding support for wifi for stm32mp157c-dk2 is achieved by using >> another dts which includes the bindings for the wifi module. >> In addition, a txt file for the wifi firmware was added. >> This was copied from the yocto bsp layer of st. >> >> Signed-off-by: Shlomi Vaknin<[email protected] <mailto:[email protected]>> >> --- >> ?.../stm32mp157c-dk2/linux.config ? ? |? 4 +- >> ?.../overlay/boot/extlinux/extlinux.conf ? ? ?|? 2 +- >>? ?.../brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ >> ?.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ >> ?configs/stm32mp157c_dk2_defconfig ? ? ?|? 7 ++- >>? ?5 files changed, 100 insertions(+), 4 deletions(-) >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> index c03eb748b4..4beee3a708 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> @@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y >>? ?CONFIG_FORCE_MAX_ZONEORDER=12 >>? ?CONFIG_SECCOMP=y >>? ?# CONFIG_ATAGS is not set >> -CONFIG_ZBOOT_ROM_TEXT=0x0 >> -CONFIG_ZBOOT_ROM_BSS=0x0 >>? ?CONFIG_ARM_APPENDED_DTB=y >>? ?CONFIG_ARM_ATAG_DTB_COMPAT=y >>? ?CONFIG_VFP=y >> @@ -45,6 +43,7 @@ CONFIG_UNIX=y >>? ?CONFIG_INET=y >>? ?CONFIG_CAN=y >>? ?CONFIG_CAN_M_CAN=y >> +CONFIG_CFG80211=m >>? ?CONFIG_DEVTMPFS=y >>? ?CONFIG_DEVTMPFS_MOUNT=y >>? ?CONFIG_SIMPLE_PM_BUS=y >> @@ -66,6 +65,7 @@ CONFIG_SMSC911X=y >>? ?CONFIG_STMMAC_ETH=y >>? ?CONFIG_DWMAC_DWC_QOS_ETH=y >>? ?CONFIG_MDIO_BITBANG=y >> +CONFIG_BRCMFMAC=m >>? ?CONFIG_INPUT_JOYDEV=y >>? ?CONFIG_INPUT_EVDEV=y >>? ?CONFIG_INPUT_TOUCHSCREEN=y >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> index 5b7f56ee77..a6595971a8 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> @@ -1,4 +1,4 @@ >>? ?label stm32mp157c-dk2-buildroot >>? ? ?kernel /boot/zImage >> -? devicetree /boot/stm32mp157c-dk2.dtb >> +? devicetree /boot/stm32mp157c-dk2-wifi.dtb >>? ? ?append root=/dev/mmcblk0p4 rootwait >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> new file mode 100644 >> index 0000000000..b36de8837f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> @@ -0,0 +1,59 @@ >> +# NVRAM file for BCM943430WLSELG >> +# 2.4 GHz, 20 MHz BW mode >> + >> +# The following parameter values are just placeholders, need to be updated. >> +manfid=0x2d0 >> +prodid=0x0726 >> +vendid=0x14e4 >> +devid=0x43e2 >> +boardtype=0x0726 >> +boardrev=0x1202 >> +boardnum=22 >> +macaddr=00:90:4c:c5:12:38 >> +sromrev=11 >> +boardflags=0x00404201 >> +boardflags3=0x08000000 >> +xtalfreq=37400 >> +#xtalfreq=19200 >> +nocrc=1 >> +ag0=255 >> +aa2g=1 >> +ccode=ALL >> + >> +pa0itssit=0x20 >> +extpagain2g=0 >> + >> +#PA parameters for 2.4GHz, measured at CHIP OUTPUT >> +pa2ga0=-168,7161,-820 >> +AvVmid_c0=0x0,0xc8 >> +cckpwroffset0=5 >> + >> +# PPR params >> +maxp2ga0=84 >> +txpwrbckof=6 >> +cckbw202gpo=0 >> +legofdmbw202gpo=0x66111111 >> +mcsbw202gpo=0x77711111 >> +propbw202gpo=0xdd >> + >> +# OFDM IIR : >> +ofdmdigfilttype=18 >> +ofdmdigfilttypebe=18 >> +# PAPD mode: >> +papdmode=1 >> +papdvalidtest=1 >> +pacalidx2g=32 >> +papdepsoffset=-36 >> +papdendidx=61 >> + >> +il0macaddr=00:90:4c:c5:12:38 >> +wl0id=0x431b >> + >> +deadman_to=0xffffffff >> +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG >> +muxenab=0x1 >> +# CLDO PWM voltage settings - 0x4 - 1.1 volt >> +#cldo_pwm=0x4 >> + >> +#VCO freq 326.4MHz >> +spurconfig=0x3 >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> new file mode 100644 >> index 0000000000..89747d2b5f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> @@ -0,0 +1,32 @@ >> +/dts-v1/; >> + >> +#include "stm32mp157c-dk2.dts" >> + >> +/ { >> +? ? wifi_pwrseq: wifi-pwrseq { >> +? ? ? ? ? ? compatible = "mmc-pwrseq-simple"; >> +? ? ? ? ? ? reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; >> +? ? }; >> +}; >> + >> +/* Wifi */ >> +&sdmmc2 { >> +? ? arm,primecell-periphid = <0x10153180>; >> +? ? pinctrl-names = "default", "opendrain", "sleep"; >> +? ? pinctrl-0 = <&sdmmc2_b4_pins_a>; >> +? ? pinctrl-1 = <&sdmmc2_b4_od_pins_a>; >> +? ? pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; >> +? ? non-removable; >> +? ? st,neg-edge; >> +? ? bus-width = <4>; >> +? ? vmmc-supply = <&v3v3>; >> +? ? mmc-pwrseq = <&wifi_pwrseq>; >> +? ? #address-cells = <1>; >> +? ? #size-cells = <0>; >> +? ? status = "okay"; >> + >> +? ? brcmf: bcrmf at 1 { >> +? ? ? ? ? ? reg = <1>; >> +? ? ? ? ? ? compatible = "brcm,bcm4329-fmac"; >> +? ? }; >> +}; >> diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig >> index bf7b9868b1..9c2e436244 100644 >> --- a/configs/stm32mp157c_dk2_defconfig >> +++ b/configs/stm32mp157c_dk2_defconfig >> @@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" >> ?BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >> ?BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" >>? ?BR2_LINUX_KERNEL_DTS_SUPPORT=y >> -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" >> +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" >> ?BR2_LINUX_KERNEL_INSTALL_TARGET=y >> +BR2_PACKAGE_LINUX_FIRMWARE=y >> +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y >> +BR2_PACKAGE_WIRELESS_REGDB=y >> +BR2_PACKAGE_WPA_SUPPLICANT=y >> +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y >>? ?BR2_TARGET_ROOTFS_EXT2=y >>? ?BR2_TARGET_ROOTFS_EXT2_4=y >> ?BR2_TARGET_ROOTFS_EXT2_SIZE="120M" I suggest to add BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV to load firmware and driver automatically on boot. Unfortunately it doesn't work for me, see: [??? 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [??? 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [??? 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [??? 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [??? 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully? # ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ?????????? BROADCAST MULTICAST? MTU:1500 Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ?????????? Interrupt:49 Base address:0xe000 lo??????? Link encap:Local Loopback ?????????? inet addr:127.0.0.1 Mask:255.0.0.0 ?????????? inet6 addr: ::1/128 Scope:Host ?????????? UP LOOPBACK RUNNING? MTU:65536 Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) sit0????? Link encap:IPv6-in-IPv4 ?????????? NOARP? MTU:1480? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) # As you can see there is no wlan0 interface. Best Bartek _______________________________________________ buildroot mailing list buildroot at busybox.net <mailto:[email protected]> http://lists.busybox.net/mailman/listinfo/buildroot
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201010/7316ed07/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi Bartek,
I did as you said and it didn't work. Here are the steps I did:
1. I changed as you said - didn't work.
2. I flashed the original image from st - works.
3. I flashed again the buildroot image - works.
4. I did hard reset - not working.
Can you verify that you have this experience?
??????? ???, 10 ????? 2020 ?-22:01 ??? ?Bartosz Bilas?? <? [email protected]??>:?
Quoted 485 lines
Hi Shlomi,
On 10.10.2020 17:41, Bartosz Bilas wrote:Hello Shlomi,
On 09.10.2020 21:13, Shlomi Vaknin wrote:HI!
According to u-boot I have the same revision as you. Could you try the formal version from st:
https://www.st.com/en/embedded-software/stm32mp1starter.html ? I flashed it and the wifi worked. Just to be sure that there is no issue or something else with your board.Best
ShlomiI've used:
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 3.1-openstlinux-5.4-dunfell-mp1-20-06-24 stm32mp1 ttySTM0
and everything seems to be ok
root at stm32mp1:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:80:E1:42:56:44
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:48 Base address:0x4000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:80 errors:0 dropped:0 overruns:0 frame:0 TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:6080 (5.9 KiB) TX bytes:6080 (5.9 KiB)usb0 Link encap:Ethernet HWaddr 4E:12:37:C3:7B:6C
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 10:98:C3:5F:FB:F9
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)I'm gonna double-check one more time what's wrong with buildroot's image though.
Best
BartekI've got this working fine, I had to add
BR2_PACKAGE_MURATA_CYW_FW_CYW43430instead ofBR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXXas I mentioned before, I also addedBR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASEand I've successfully connected with my wifi network.
# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 10:98:C3:5F:FB:F9
inet addr:192.168.10.110 Bcast:192.168.10.255Mask:255.255.255.0
inet6 addr: fd3a:e7f5:fc04:0:1298:c3ff:fe5f:fbf9/64 Scope:Global inet6 addr: fe80::1298:c3ff:fe5f:fbf9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:1624 (1.5 KiB) TX bytes:1988 (1.9 KiB)# ping google.com PING google.com (216.58.215.78): 56 data bytes 64 bytes from 216.58.215.78: seq=0 ttl=116 time=29.594 ms 64 bytes from 216.58.215.78: seq=1 ttl=116 time=39.401 ms ^C --- google.com ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 29.594/34.497/39.401 msCould you verify if it works well on your device?
??????? ??? ??, 9 ????? 2020 ?-19:49 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 381 lines
Hello Shlomi,
On 08.10.2020 22:45, Shlomi Vaknin wrote:Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharingThis problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
ShlomiI've tested your image but the result is the same, see:
[ 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [ 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50My board is:
CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var2.0 Rev.C-01
DRAM: 512 MiB
Best
Bartek??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 340 lines
Hi Shlomi,
On 07.10.2020 22:16, Shlomi Vaknin wrote:Hi Bartek,
That is very strange, since it works for me:
#############################################################################################################################
Starting mdev... OK[ 4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:58:DB BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 00:9D:6B:A6:BC:BA
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)#############################################################################################################################
The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell):
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txtRegards,
ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
Bartek??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 259 lines
Hi Shlomi,
Quoted 14 lines · Bartosz Bilas
Hi Shlomi,
Quoted 10 lines · Shlomi Vaknin
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin<[email protected]>--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59+++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-)create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 1 line
Quoted 1 line
create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0
b/board/stmicroelectronics/stm32mp157c-dk2/linux.configQuoted 21 lines
Quoted 21 lines
index
c03eb748b4..4beee3a708100644board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-2@@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y CONFIG_FORCE_MAX_ZONEORDER=12 CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y@@ -45,6 +43,7 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_CAN=y CONFIG_CAN_M_CAN=y +CONFIG_CFG80211=m CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_SIMPLE_PM_BUS=y@@ -66,6 +65,7 @@ CONFIG_SMSC911X=yQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-0CONFIG_STMMAC_ETH=y CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_MDIO_BITBANG=y +CONFIG_BRCMFMAC=m CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_TOUCHSCREEN=ydiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confb/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 2 lines
Quoted 2 lines
index
5b7f56ee77..a6595971a8100644
---
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 1 line
Quoted 1 line
+++
b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 7 lines
Quoted 7 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-1@@ -1,4 +1,4 @@ label stm32mp157c-dk2-buildroot kernel /boot/zImage - devicetree /boot/stm32mp157c-dk2.dtb + devicetree /boot/stm32mp157c-dk2-wifi.dtb append root=/dev/mmcblk0p4 rootwaitdiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..b36de8837f
---/dev/null
+++b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config line 4
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +4
-0@@ -0,0 +1,59 @@ +# NVRAM file for BCM943430WLSELG +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to beupdated.
Quoted 48 lines
Quoted 48 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +48
-0+manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1202 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +#xtalfreq=19200 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=84 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 +pacalidx2g=32 +papdepsoffset=-36 +papdendidx=61 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffffQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG +muxenab=0x1 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + +#VCO freq 326.4MHz +spurconfig=0x3diff --git
a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsb/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..89747d2b5f
---/dev/null
+++
b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 26 lines
Quoted 26 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +25
-0@@ -0,0 +1,32 @@ +/dts-v1/; + +#include "stm32mp157c-dk2.dts" + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; + }; +}; + +/* Wifi */ +&sdmmc2 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + #address-cells = <1>; + #size-cells = <0>;Quoted 8 lines
Review
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+ status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +};(quoted diff) +0
-0b/configs/stm32mp157c_dk2_defconfig
Quoted 6 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 10
Quoted 6 lines
index
bf7b9868b1..9c2e436244100644configs/stm32mp157c_dk2_defconfig +0
-0@@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=yBR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config"
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 12
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig +0
-1BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2"+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig +5
-0BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_WIRELESS_REGDB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"I suggest to add
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEVto load firmware and driver automatically on boot.Unfortunately it doesn't work for me, see:
[ 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50Google says that it could be due to wrong nvram file configuration but I
assume that you have run it successfully?# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:56:44 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)#
As you can see there is no wlan0 interface.
Best
Bartek
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
buildroot mailing listbuildroot at busybox.nethttp://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing listbuildroot at busybox.nethttp://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201010/01f56385/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi Shlomi,
Quoted 10 lines · Shlomi Vaknin
Hi Bartek,
I did as you said and it didn't work. Here are the steps I did:
1. I changed as you said - didn't work.
2. I flashed the original image from st - works.
3. I flashed again the buildroot image - works.
4. I did hard reset - not working.Can you verify that you have this experience?
Let's put this topic off for now because it blocks the rest of the patches that look good and can be merged. I need more time to check what exactly is going on with this wlan module.
Best
Bartek
Quoted 101 lines
??????? ???, 10 ????? 2020 ?-22:01 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:?
Hi Shlomi, On 10.10.2020 17:41, Bartosz Bilas wrote:Quoted 51 lines
Hello Shlomi, On 09.10.2020 21:13, Shlomi Vaknin wrote:Quoted 11 lines
HI!
According to u-boot I have the same revision as you. Could you try the formal version from st:
https://www.st.com/en/embedded-software/stm32mp1starter.html ? I flashed it and the wifi worked. Just to be sure that there is no issue or something else with your board.Best
ShlomiI've used: ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 3.1-openstlinux-5.4-dunfell-mp1-20-06-24 stm32mp1 ttySTM0 and everything seems to be ok root at stm32mp1:~# ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ????????? UP BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ????????? Interrupt:48 Base address:0x4000 lo??????? Link encap:Local Loopback ????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host ????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ????????? RX packets:80 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:6080 (5.9 KiB)? TX bytes:6080 (5.9 KiB) usb0????? Link encap:Ethernet? HWaddr 4E:12:37:C3:7B:6C ????????? UP BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) wlan0???? Link encap:Ethernet? HWaddr 10:98:C3:5F:FB:F9 ????????? BROADCAST MULTICAST? MTU:1500? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0Quoted 8 lines
????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) I'm gonna double-check one more time what's wrong with buildroot's image though. Best BartekI've got this working fine, I had to add BR2_PACKAGE_MURATA_CYW_FW_CYW43430 instead of BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX as I mentioned before, I also added BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE and I've successfully connected with my wifi network. # ifconfig lo??????? Link encap:Local Loopback ????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host ????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) wlan0???? Link encap:Ethernet? HWaddr 10:98:C3:5F:FB:F9 ????????? inet addr:192.168.10.110? Bcast:192.168.10.255 Mask:255.255.255.0 ????????? inet6 addr: fd3a:e7f5:fc04:0:1298:c3ff:fe5f:fbf9/64 Scope:Global ????????? inet6 addr: fe80::1298:c3ff:fe5f:fbf9/64 Scope:Link ????????? UP BROADCAST RUNNING MULTICAST? MTU:1500 Metric:1 ????????? RX packets:8 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:1624 (1.5 KiB)? TX bytes:1988 (1.9 KiB) # ping google.com <http://google.com> PING google.com <http://google.com> (216.58.215.78): 56 data bytes 64 bytes from 216.58.215.78 <http://216.58.215.78>: seq=0 ttl=116 time=29.594 ms 64 bytes from 216.58.215.78 <http://216.58.215.78>: seq=1 ttl=116
Quoted 448 lines
time=39.401 ms ^C --- google.com <http://google.com> ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 29.594/34.497/39.401 ms Could you verify if it works well on your device?Quoted 438 lines
Quoted 36 lines
??????? ??? ??, 9 ????? 2020 ?-19:49 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:? Hello Shlomi, On 08.10.2020 22:45, Shlomi Vaknin wrote:Quoted 8 lines
Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard?image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharingQuoted 7 lines
This problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
ShlomiI've tested your image but the result is the same, see: [? 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database [? 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [? 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [? 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [? 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 My board is:Quoted 397 lines
CPU: STM32MP157CAC Rev.B Model: STMicroelectronics STM32MP157C-DK2 Discovery Board Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2) Board: MB1272 Var2.0 Rev.C-01 DRAM:? 512 MiB Best BartekQuoted 389 lines
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <[email protected] <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 22:16, Shlomi Vaknin wrote:Quoted 60 lines
Hi Bartek, That is very strange, since it works for me: ############################################################################################################################# Starting mdev... OK [ ? ?4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ ? ?4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ ? ?4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ ? ?4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f # ifconfig -a eth0 ? ? ?Link encap:Ethernet ?HWaddr 00:80:E1:42:58:DB ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) ? ? ? ? ? Interrupt:49 Base address:0xe000 lo ? ? ? ?Link encap:Local Loopback ? ? ? ? ? inet addr:127.0.0.1 ?Mask:255.0.0.0 ? ? ? ? ? inet6 addr: ::1/128 Scope:Host ? ? ? ? ? UP LOOPBACK RUNNING ?MTU:65536 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) sit0 ? ? ?Link encap:IPv6-in-IPv4 ? ? ? ? ? NOARP ?MTU:1480 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) wlan0 ? ? Link encap:Ethernet ?HWaddr 00:9D:6B:A6:BC:BA ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)Quoted 8 lines
############################################################################################################################# The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell): https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt Regards, ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
BartekQuoted 298 lines
??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <[email protected] <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 21:13, Bartosz Bilas wrote: > > Hi Shlomi, > > On 07.10.2020 16:49, Shlomi Vaknin wrote: >> Adding support for wifi for stm32mp157c-dk2 is achieved by using >> another dts which includes the bindings for the wifi module. >> In addition, a txt file for the wifi firmware was added. >> This was copied from the yocto bsp layer of st. >> >> Signed-off-by: Shlomi Vaknin<[email protected] <mailto:[email protected]>> >> --- >> ?.../stm32mp157c-dk2/linux.config ? ? ? ? ? ? |? 4 +- >> ?.../overlay/boot/extlinux/extlinux.conf ? ? ?|? 2 +- >>? ?.../brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ >> ?.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ >> ?configs/stm32mp157c_dk2_defconfig ? ? ? ? ? ?|? 7 ++- >>? ?5 files changed, 100 insertions(+), 4 deletions(-) >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> index c03eb748b4..4beee3a708 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> @@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y >> ?CONFIG_FORCE_MAX_ZONEORDER=12 >>? ?CONFIG_SECCOMP=y >>? ?# CONFIG_ATAGS is not set >> -CONFIG_ZBOOT_ROM_TEXT=0x0 >> -CONFIG_ZBOOT_ROM_BSS=0x0 >> ?CONFIG_ARM_APPENDED_DTB=y >> ?CONFIG_ARM_ATAG_DTB_COMPAT=y >>? ?CONFIG_VFP=y >> @@ -45,6 +43,7 @@ CONFIG_UNIX=y >>? ?CONFIG_INET=y >>? ?CONFIG_CAN=y >>? ?CONFIG_CAN_M_CAN=y >> +CONFIG_CFG80211=m >>? ?CONFIG_DEVTMPFS=y >>? ?CONFIG_DEVTMPFS_MOUNT=y >>? ?CONFIG_SIMPLE_PM_BUS=y >> @@ -66,6 +65,7 @@ CONFIG_SMSC911X=y >>? ?CONFIG_STMMAC_ETH=y >> ?CONFIG_DWMAC_DWC_QOS_ETH=y >>? ?CONFIG_MDIO_BITBANG=y >> +CONFIG_BRCMFMAC=m >>? ?CONFIG_INPUT_JOYDEV=y >>? ?CONFIG_INPUT_EVDEV=y >> ?CONFIG_INPUT_TOUCHSCREEN=y >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> index 5b7f56ee77..a6595971a8 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> @@ -1,4 +1,4 @@ >>? ?label stm32mp157c-dk2-buildroot >>? ? ?kernel /boot/zImage >> -? devicetree /boot/stm32mp157c-dk2.dtb >> +? devicetree /boot/stm32mp157c-dk2-wifi.dtb >>? ? ?append root=/dev/mmcblk0p4 rootwait >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> new file mode 100644 >> index 0000000000..b36de8837f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> @@ -0,0 +1,59 @@ >> +# NVRAM file for BCM943430WLSELG >> +# 2.4 GHz, 20 MHz BW mode >> + >> +# The following parameter values are just placeholders, need to be updated. >> +manfid=0x2d0 >> +prodid=0x0726 >> +vendid=0x14e4 >> +devid=0x43e2 >> +boardtype=0x0726 >> +boardrev=0x1202 >> +boardnum=22 >> +macaddr=00:90:4c:c5:12:38 >> +sromrev=11 >> +boardflags=0x00404201 >> +boardflags3=0x08000000 >> +xtalfreq=37400 >> +#xtalfreq=19200 >> +nocrc=1 >> +ag0=255 >> +aa2g=1 >> +ccode=ALL >> + >> +pa0itssit=0x20 >> +extpagain2g=0 >> + >> +#PA parameters for 2.4GHz, measured at CHIP OUTPUT >> +pa2ga0=-168,7161,-820 >> +AvVmid_c0=0x0,0xc8 >> +cckpwroffset0=5 >> + >> +# PPR params >> +maxp2ga0=84 >> +txpwrbckof=6 >> +cckbw202gpo=0 >> +legofdmbw202gpo=0x66111111 >> +mcsbw202gpo=0x77711111 >> +propbw202gpo=0xdd >> + >> +# OFDM IIR : >> +ofdmdigfilttype=18 >> +ofdmdigfilttypebe=18 >> +# PAPD mode: >> +papdmode=1 >> +papdvalidtest=1 >> +pacalidx2g=32 >> +papdepsoffset=-36 >> +papdendidx=61 >> + >> +il0macaddr=00:90:4c:c5:12:38 >> +wl0id=0x431b >> + >> +deadman_to=0xffffffff >> +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG >> +muxenab=0x1 >> +# CLDO PWM voltage settings - 0x4 - 1.1 volt >> +#cldo_pwm=0x4 >> + >> +#VCO freq 326.4MHz >> +spurconfig=0x3 >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> new file mode 100644 >> index 0000000000..89747d2b5f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> @@ -0,0 +1,32 @@ >> +/dts-v1/; >> + >> +#include "stm32mp157c-dk2.dts" >> + >> +/ { >> +? ? wifi_pwrseq: wifi-pwrseq { >> +? ? ? ? ? ? compatible = "mmc-pwrseq-simple"; >> +? ? ? ? ? ? reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; >> +? ? }; >> +}; >> + >> +/* Wifi */ >> +&sdmmc2 { >> + arm,primecell-periphid = <0x10153180>; >> +? ? pinctrl-names = "default", "opendrain", "sleep"; >> +? ? pinctrl-0 = <&sdmmc2_b4_pins_a>; >> +? ? pinctrl-1 = <&sdmmc2_b4_od_pins_a>; >> +? ? pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; >> +? ? non-removable; >> +? ? st,neg-edge; >> +? ? bus-width = <4>; >> +? ? vmmc-supply = <&v3v3>; >> +? ? mmc-pwrseq = <&wifi_pwrseq>; >> +? ? #address-cells = <1>; >> +? ? #size-cells = <0>; >> +? ? status = "okay"; >> + >> +? ? brcmf: bcrmf at 1 { >> +? ? ? ? ? ? reg = <1>; >> +? ? ? ? ? ? compatible = "brcm,bcm4329-fmac"; >> +? ? }; >> +}; >> diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig >> index bf7b9868b1..9c2e436244 100644 >> --- a/configs/stm32mp157c_dk2_defconfig >> +++ b/configs/stm32mp157c_dk2_defconfig >> @@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" >> ?BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >> ?BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" >> ?BR2_LINUX_KERNEL_DTS_SUPPORT=y >> -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" >> +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" >> ?BR2_LINUX_KERNEL_INSTALL_TARGET=y >> +BR2_PACKAGE_LINUX_FIRMWARE=y >> +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y >> +BR2_PACKAGE_WIRELESS_REGDB=y >> +BR2_PACKAGE_WPA_SUPPLICANT=y >> +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y >> ?BR2_TARGET_ROOTFS_EXT2=y >> ?BR2_TARGET_ROOTFS_EXT2_4=y >> ?BR2_TARGET_ROOTFS_EXT2_SIZE="120M" I suggest to add BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV to load firmware and driver automatically on boot. Unfortunately it doesn't work for me, see: [??? 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [??? 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [??? 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [??? 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [??? 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully? # ifconfig -a eth0????? Link encap:Ethernet HWaddr 00:80:E1:42:56:44 ?????????? BROADCAST MULTICAST MTU:1500? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ?????????? Interrupt:49 Base address:0xe000 lo??????? Link encap:Local Loopback ?????????? inet addr:127.0.0.1 Mask:255.0.0.0 ?????????? inet6 addr: ::1/128 Scope:Host ?????????? UP LOOPBACK RUNNING MTU:65536? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) sit0????? Link encap:IPv6-in-IPv4 ?????????? NOARP? MTU:1480 Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) # As you can see there is no wlan0 interface. Best Bartek _______________________________________________ buildroot mailing list buildroot at busybox.net <mailto:[email protected]> http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201012/402ba190/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi,
I agree. Do I need to send the other patches again?
Shlomi
??????? ??? ??, 12 ????? 2020 ?-17:49 ??? ?Bartosz Bilas?? <? [email protected]??>:?
Quoted 21 lines
Hi Shlomi,
On 10.10.2020 22:48, Shlomi Vaknin wrote:Hi Bartek,
I did as you said and it didn't work. Here are the steps I did:
1. I changed as you said - didn't work.
2. I flashed the original image from st - works.
3. I flashed again the buildroot image - works.
4. I did hard reset - not working.Can you verify that you have this experience?
Let's put this topic off for now because it blocks the rest of the patches that look good and can be merged. I need more time to check what exactly is going on with this wlan module.
Best
Bartek
Quoted 498 lines
??????? ???, 10 ????? 2020 ?-22:01 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 495 lines
Hi Shlomi,
On 10.10.2020 17:41, Bartosz Bilas wrote:Hello Shlomi,
On 09.10.2020 21:13, Shlomi Vaknin wrote:HI!
According to u-boot I have the same revision as you. Could you try the formal version from st:
https://www.st.com/en/embedded-software/stm32mp1starter.html ? I flashed it and the wifi worked. Just to be sure that there is no issue or something else with your board.Best
ShlomiI've used:
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 3.1-openstlinux-5.4-dunfell-mp1-20-06-24 stm32mp1 ttySTM0
and everything seems to be ok
root at stm32mp1:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:80:E1:42:56:44
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:48 Base address:0x4000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:80 errors:0 dropped:0 overruns:0 frame:0 TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:6080 (5.9 KiB) TX bytes:6080 (5.9 KiB)usb0 Link encap:Ethernet HWaddr 4E:12:37:C3:7B:6C
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 10:98:C3:5F:FB:F9
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)I'm gonna double-check one more time what's wrong with buildroot's image though.
Best
BartekI've got this working fine, I had to add
BR2_PACKAGE_MURATA_CYW_FW_CYW43430instead ofBR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXXas I mentioned before, I also addedBR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASEand I've successfully connected with my wifi network.
# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 10:98:C3:5F:FB:F9
inet addr:192.168.10.110 Bcast:192.168.10.255Mask:255.255.255.0
inet6 addr: fd3a:e7f5:fc04:0:1298:c3ff:fe5f:fbf9/64 Scope:Global inet6 addr: fe80::1298:c3ff:fe5f:fbf9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:1624 (1.5 KiB) TX bytes:1988 (1.9 KiB)# ping google.com PING google.com (216.58.215.78): 56 data bytes 64 bytes from 216.58.215.78: seq=0 ttl=116 time=29.594 ms 64 bytes from 216.58.215.78: seq=1 ttl=116 time=39.401 ms ^C --- google.com ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 29.594/34.497/39.401 msCould you verify if it works well on your device?
??????? ??? ??, 9 ????? 2020 ?-19:49 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 39 lines
Hello Shlomi,
On 08.10.2020 22:45, Shlomi Vaknin wrote:Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharingThis problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
ShlomiI've tested your image but the result is the same, see:
[ 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [ 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50My board is:
CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var2.0 Rev.C-01
DRAM: 512 MiB
Best
BartekQuoted 348 lines
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 345 lines
Hi Shlomi,
On 07.10.2020 22:16, Shlomi Vaknin wrote:Hi Bartek,
That is very strange, since it works for me:
#############################################################################################################################
Starting mdev... OK[ 4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:58:DB BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 00:9D:6B:A6:BC:BA
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)#############################################################################################################################
The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell):
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txtRegards,
ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
Bartek??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <? b.bilas at grinn-global.com??>:?
Quoted 252 lines
Hi Shlomi,
Quoted 14 lines · Bartosz Bilas
Hi Shlomi,
Quoted 10 lines · Shlomi Vaknin
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin<[email protected]>--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59+++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-)create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 1 line
Quoted 1 line
create mode 100644
board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0
b/board/stmicroelectronics/stm32mp157c-dk2/linux.configQuoted 21 lines
Quoted 21 lines
index
c03eb748b4..4beee3a708100644board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-2@@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y CONFIG_FORCE_MAX_ZONEORDER=12 CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y@@ -45,6 +43,7 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_CAN=y CONFIG_CAN_M_CAN=y +CONFIG_CFG80211=m CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_SIMPLE_PM_BUS=y@@ -66,6 +65,7 @@ CONFIG_SMSC911X=yQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-0CONFIG_STMMAC_ETH=y CONFIG_DWMAC_DWC_QOS_ETH=y CONFIG_MDIO_BITBANG=y +CONFIG_BRCMFMAC=m CONFIG_INPUT_JOYDEV=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_TOUCHSCREEN=ydiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confb/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 2 lines
Quoted 2 lines
index
5b7f56ee77..a6595971a8100644
---
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 1 line
Quoted 1 line
+++
b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.confQuoted 7 lines
Quoted 7 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +1
-1@@ -1,4 +1,4 @@ label stm32mp157c-dk2-buildroot kernel /boot/zImage - devicetree /boot/stm32mp157c-dk2.dtb + devicetree /boot/stm32mp157c-dk2-wifi.dtb append root=/dev/mmcblk0p4 rootwaitdiff --git
a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..b36de8837f
---/dev/null
+++b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/ brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config line 4
Quoted 5 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +4
-0@@ -0,0 +1,59 @@ +# NVRAM file for BCM943430WLSELG +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to beupdated.
Quoted 48 lines
Quoted 48 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +48
-0+manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1202 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +#xtalfreq=19200 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=84 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 +pacalidx2g=32 +papdepsoffset=-36 +papdendidx=61 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffffQuoted 8 lines
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG +muxenab=0x1 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + +#VCO freq 326.4MHz +spurconfig=0x3diff --git
a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsb/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..89747d2b5f
---/dev/null
+++
b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dtsQuoted 26 lines
Quoted 26 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +25
-0@@ -0,0 +1,32 @@ +/dts-v1/; + +#include "stm32mp157c-dk2.dts" + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; + }; +}; + +/* Wifi */ +&sdmmc2 { + arm,primecell-periphid = <0x10153180>; + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; + non-removable; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + #address-cells = <1>; + #size-cells = <0>;Quoted 8 lines
Review
Quoted 8 lines
board/stmicroelectronics/stm32mp157c-dk2/linux.config +7
-0+ status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +};(quoted diff) +0
-0b/configs/stm32mp157c_dk2_defconfig
Quoted 6 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 10
Quoted 6 lines
index
bf7b9868b1..9c2e436244100644configs/stm32mp157c_dk2_defconfig +0
-0@@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=yBR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config"
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" · line 12
Quoted 3 lines
configs/stm32mp157c_dk2_defconfig +0
-1BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2"+BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13"
Quoted 9 lines
configs/stm32mp157c_dk2_defconfig +5
-0BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_WIRELESS_REGDB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="120M"I suggest to add
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEVto load firmware and driver automatically on boot.Unfortunately it doesn't work for me, see:
[ 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50Google says that it could be due to wrong nvram file configuration but I
assume that you have run it successfully?# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:80:E1:42:56:44 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:49 Base address:0xe000lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)Quoted 7 lines
#
As you can see there is no wlan0 interface.
Best
Bartek_______________________________________________
buildroot mailing listbuildroot at busybox.nethttp://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing listbuildroot at busybox.nethttp://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201012/fb1e810e/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
Hi Shlomi,
Quoted 6 lines · Shlomi Vaknin
Hi,
I agree. Do I need to send the other patches again?
Shlomi
I've commented v3,2/4, so it would be fine if you sent the new series without this last patch when we end the discussion? ?
Best
Bartek
Quoted 15 lines
??????? ??? ??, 12 ????? 2020 ?-17:49 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:?
Hi Shlomi, On 10.10.2020 22:48, Shlomi Vaknin wrote:Quoted 9 lines
Hi Bartek,
I did as you said and it didn't work. Here are the steps I did:
1. I changed as you said - didn't work.
2. I flashed the original image from st - works.
3. I flashed again the buildroot image - works.
4. I did hard reset - not working.
Quoted 568 lines
Quoted 1 line
Can you verify that you have this experience?
Let's put this topic off for now because it blocks the rest of the patches that look good and can be merged. I need more time to check what exactly is going on with this wlan module.
Best
BartekQuoted 560 lines
??????? ???, 10 ????? 2020 ?-22:01 ??? ?Bartosz Bilas?? <?b.bilas at grinn-global.com <mailto:[email protected]>??>:? Hi Shlomi, On 10.10.2020 17:41, Bartosz Bilas wrote:Quoted 51 lines
Hello Shlomi, On 09.10.2020 21:13, Shlomi Vaknin wrote:Quoted 11 lines
HI!
According to u-boot I have the same revision as you. Could you try the formal version from st:
https://www.st.com/en/embedded-software/stm32mp1starter.html
? I flashed it and the wifi worked. Just to be sure that there is no issue or something else with your board.Best
ShlomiI've used: ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 3.1-openstlinux-5.4-dunfell-mp1-20-06-24 stm32mp1 ttySTM0 and everything seems to be ok root at stm32mp1:~# ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ????????? UP BROADCAST MULTICAST? MTU:1500 Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ????????? Interrupt:48 Base address:0x4000 lo??????? Link encap:Local Loopback ????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host ????????? UP LOOPBACK RUNNING? MTU:65536 Metric:1 ????????? RX packets:80 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:6080 (5.9 KiB)? TX bytes:6080 (5.9 KiB) usb0????? Link encap:Ethernet? HWaddr 4E:12:37:C3:7B:6C ????????? UP BROADCAST MULTICAST? MTU:1500 Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) wlan0???? Link encap:Ethernet? HWaddr 10:98:C3:5F:FB:F9 ????????? BROADCAST MULTICAST? MTU:1500 Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0Quoted 8 lines
????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) I'm gonna double-check one more time what's wrong with buildroot's image though. Best BartekI've got this working fine, I had to add BR2_PACKAGE_MURATA_CYW_FW_CYW43430 instead of BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX as I mentioned before, I also added BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE and I've successfully connected with my wifi network. # ifconfig lo??????? Link encap:Local Loopback ????????? inet addr:127.0.0.1? Mask:255.0.0.0 ????????? inet6 addr: ::1/128 Scope:Host ????????? UP LOOPBACK RUNNING? MTU:65536? Metric:1 ????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) wlan0???? Link encap:Ethernet? HWaddr 10:98:C3:5F:FB:F9 ????????? inet addr:192.168.10.110 Bcast:192.168.10.255? Mask:255.255.255.0 ????????? inet6 addr: fd3a:e7f5:fc04:0:1298:c3ff:fe5f:fbf9/64 Scope:Global ????????? inet6 addr: fe80::1298:c3ff:fe5f:fbf9/64 Scope:Link ????????? UP BROADCAST RUNNING MULTICAST MTU:1500? Metric:1 ????????? RX packets:8 errors:0 dropped:0 overruns:0 frame:0 ????????? TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 ????????? collisions:0 txqueuelen:1000 ????????? RX bytes:1624 (1.5 KiB)? TX bytes:1988 (1.9 KiB) # ping google.com <http://google.com> PING google.com <http://google.com> (216.58.215.78): 56 data bytes 64 bytes from 216.58.215.78 <http://216.58.215.78>: seq=0 ttl=116 time=29.594 ms 64 bytes from 216.58.215.78 <http://216.58.215.78>: seq=1 ttl=116 time=39.401 ms ^C --- google.com <http://google.com> ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 29.594/34.497/39.401 ms Could you verify if it works well on your device?Quoted 448 lines
Quoted 37 lines
??????? ??? ??, 9 ????? 2020 ?-19:49 ??? ?Bartosz Bilas?? <[email protected] <mailto:[email protected]>??>:? Hello Shlomi, On 08.10.2020 22:45, Shlomi Vaknin wrote:Quoted 8 lines
Hi Bartek,
I pulled the latest commits, downloaded my patches from patchwork and applied them. Then, I started a new out of tree build and everything is working. You can find my sdcard?image here:
https://drive.google.com/drive/folders/1_FwVtw70iPS_hz7yFiiOlhXiUKlsi9bH?usp=sharingQuoted 7 lines
This problem is very strange. Maybe you can check if your board's wifi is working with an image that is known to work? Maybe the formal image from st?
Regards,
ShlomiI've tested your image but the result is the same, see: [? 129.691504] cfg80211: Loading compiled-in X.509 certificates for regulatory database [? 129.740878] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' # [? 129.804593] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [? 130.885129] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [? 131.911135] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 My board is:Quoted 406 lines
CPU: STM32MP157CAC Rev.B Model: STMicroelectronics STM32MP157C-DK2 Discovery Board Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2) Board: MB1272 Var2.0 Rev.C-01 DRAM:? 512 MiB Best BartekQuoted 398 lines
??????? ??? ??, 8 ????? 2020 ?-20:31 ??? ?Bartosz Bilas?? <[email protected] <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 22:16, Shlomi Vaknin wrote:Quoted 62 lines
Hi Bartek, That is very strange, since it works for me: ############################################################################################################################# Starting mdev... OK [ ? ?4.168709] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ ? ?4.224122] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ ? ?4.288641] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.486998] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ ? ?4.501649] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ ? ?4.536998] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f # ifconfig -a eth0 ? ? ?Link encap:Ethernet ?HWaddr 00:80:E1:42:58:DB ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) ? ? ? ? ? Interrupt:49 Base address:0xe000 lo ? ? ? ?Link encap:Local Loopback ? ? ? ? ? inet addr:127.0.0.1 ?Mask:255.0.0.0 ? ? ? ? ? inet6 addr: ::1/128 Scope:Host ? ? ? ? ? UP LOOPBACK RUNNING ?MTU:65536 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) sit0 ? ? ?Link encap:IPv6-in-IPv4 ? ? ? ? ? NOARP ?MTU:1480 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B) wlan0 ? ? Link encap:Ethernet ?HWaddr 00:9D:6B:A6:BC:BA ? ? ? ? ? BROADCAST MULTICAST ?MTU:1500 ?Metric:1 ? ? ? ? ? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ? ? ? ? ? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ? ? ? ? ? collisions:0 txqueuelen:1000 ? ? ? ? ? RX bytes:0 (0.0 B) ?TX bytes:0 (0.0 B)Quoted 8 lines
############################################################################################################################# The nvram configuration file was directly copied from the bsp layer of st in yocto (dunfell): https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt Regards, ShlomiSo in that case we have to clarify our environments. Have you tested using the latest master branch or is it some tagged version? Could you do a clean build once again to be sure that you don't use any cached things? If you were able to attach your sdcard image I would test it using my device and check if it really works because I don't see what could be wrong with that series. I don't think that ST has changed something between HW revision but I'm not able to locate on PCB what revision exactly is my board (I guess ST hasn't written it on the soldermask).
Best
BartekQuoted 304 lines
??????? ??? ??, 7 ????? 2020 ?-22:27 ??? ?Bartosz Bilas?? <[email protected] <mailto:[email protected]>??>:? Hi Shlomi, On 07.10.2020 21:13, Bartosz Bilas wrote: > > Hi Shlomi, > > On 07.10.2020 16:49, Shlomi Vaknin wrote: >> Adding support for wifi for stm32mp157c-dk2 is achieved by using >> another dts which includes the bindings for the wifi module. >> In addition, a txt file for the wifi firmware was added. >> This was copied from the yocto bsp layer of st. >> >> Signed-off-by: Shlomi Vaknin<[email protected] <mailto:[email protected]>> >> --- >> ?.../stm32mp157c-dk2/linux.config ? ? ? ? ? ? |? 4 +- >> ?.../overlay/boot/extlinux/extlinux.conf ? ? ?|? 2 +- >>? ?.../brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ >> ?.../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ >> ?configs/stm32mp157c_dk2_defconfig ? ? ? ? ? ?|? 7 ++- >>? ?5 files changed, 100 insertions(+), 4 deletions(-) >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >>? ?create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> index c03eb748b4..4beee3a708 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/linux.config >> @@ -24,8 +24,6 @@ CONFIG_HIGHMEM=y >> ?CONFIG_FORCE_MAX_ZONEORDER=12 >> ?CONFIG_SECCOMP=y >>? ?# CONFIG_ATAGS is not set >> -CONFIG_ZBOOT_ROM_TEXT=0x0 >> -CONFIG_ZBOOT_ROM_BSS=0x0 >> ?CONFIG_ARM_APPENDED_DTB=y >> ?CONFIG_ARM_ATAG_DTB_COMPAT=y >>? ?CONFIG_VFP=y >> @@ -45,6 +43,7 @@ CONFIG_UNIX=y >>? ?CONFIG_INET=y >>? ?CONFIG_CAN=y >> ?CONFIG_CAN_M_CAN=y >> +CONFIG_CFG80211=m >> ?CONFIG_DEVTMPFS=y >> ?CONFIG_DEVTMPFS_MOUNT=y >> ?CONFIG_SIMPLE_PM_BUS=y >> @@ -66,6 +65,7 @@ CONFIG_SMSC911X=y >> ?CONFIG_STMMAC_ETH=y >> ?CONFIG_DWMAC_DWC_QOS_ETH=y >> ?CONFIG_MDIO_BITBANG=y >> +CONFIG_BRCMFMAC=m >> ?CONFIG_INPUT_JOYDEV=y >> ?CONFIG_INPUT_EVDEV=y >> ?CONFIG_INPUT_TOUCHSCREEN=y >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> index 5b7f56ee77..a6595971a8 100644 >> --- a/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf >> @@ -1,4 +1,4 @@ >>? ?label stm32mp157c-dk2-buildroot >>? ? ?kernel /boot/zImage >> -? devicetree /boot/stm32mp157c-dk2.dtb >> +? devicetree /boot/stm32mp157c-dk2-wifi.dtb >>? ? ?append root=/dev/mmcblk0p4 rootwait >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> new file mode 100644 >> index 0000000000..b36de8837f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st <http://brcmfmac43430-sdio.st>,stm32mp157c-dk2.txt >> @@ -0,0 +1,59 @@ >> +# NVRAM file for BCM943430WLSELG >> +# 2.4 GHz, 20 MHz BW mode >> + >> +# The following parameter values are just placeholders, need to be updated. >> +manfid=0x2d0 >> +prodid=0x0726 >> +vendid=0x14e4 >> +devid=0x43e2 >> +boardtype=0x0726 >> +boardrev=0x1202 >> +boardnum=22 >> +macaddr=00:90:4c:c5:12:38 >> +sromrev=11 >> +boardflags=0x00404201 >> +boardflags3=0x08000000 >> +xtalfreq=37400 >> +#xtalfreq=19200 >> +nocrc=1 >> +ag0=255 >> +aa2g=1 >> +ccode=ALL >> + >> +pa0itssit=0x20 >> +extpagain2g=0 >> + >> +#PA parameters for 2.4GHz, measured at CHIP OUTPUT >> +pa2ga0=-168,7161,-820 >> +AvVmid_c0=0x0,0xc8 >> +cckpwroffset0=5 >> + >> +# PPR params >> +maxp2ga0=84 >> +txpwrbckof=6 >> +cckbw202gpo=0 >> +legofdmbw202gpo=0x66111111 >> +mcsbw202gpo=0x77711111 >> +propbw202gpo=0xdd >> + >> +# OFDM IIR : >> +ofdmdigfilttype=18 >> +ofdmdigfilttypebe=18 >> +# PAPD mode: >> +papdmode=1 >> +papdvalidtest=1 >> +pacalidx2g=32 >> +papdepsoffset=-36 >> +papdendidx=61 >> + >> +il0macaddr=00:90:4c:c5:12:38 >> +wl0id=0x431b >> + >> +deadman_to=0xffffffff >> +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG >> +muxenab=0x1 >> +# CLDO PWM voltage settings - 0x4 - 1.1 volt >> +#cldo_pwm=0x4 >> + >> +#VCO freq 326.4MHz >> +spurconfig=0x3 >> diff --git a/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> new file mode 100644 >> index 0000000000..89747d2b5f >> --- /dev/null >> +++ b/board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts >> @@ -0,0 +1,32 @@ >> +/dts-v1/; >> + >> +#include "stm32mp157c-dk2.dts" >> + >> +/ { >> +? ? wifi_pwrseq: wifi-pwrseq { >> + compatible = "mmc-pwrseq-simple"; >> + reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>; >> +? ? }; >> +}; >> + >> +/* Wifi */ >> +&sdmmc2 { >> + arm,primecell-periphid = <0x10153180>; >> + pinctrl-names = "default", "opendrain", "sleep"; >> +? ? pinctrl-0 = <&sdmmc2_b4_pins_a>; >> +? ? pinctrl-1 = <&sdmmc2_b4_od_pins_a>; >> +? ? pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; >> + non-removable; >> +? ? st,neg-edge; >> +? ? bus-width = <4>; >> +? ? vmmc-supply = <&v3v3>; >> +? ? mmc-pwrseq = <&wifi_pwrseq>; >> + #address-cells = <1>; >> +? ? #size-cells = <0>; >> +? ? status = "okay"; >> + >> +? ? brcmf: bcrmf at 1 { >> +? ? ? ? ? ? reg = <1>; >> + compatible = "brcm,bcm4329-fmac"; >> +? ? }; >> +}; >> diff --git a/configs/stm32mp157c_dk2_defconfig b/configs/stm32mp157c_dk2_defconfig >> index bf7b9868b1..9c2e436244 100644 >> --- a/configs/stm32mp157c_dk2_defconfig >> +++ b/configs/stm32mp157c_dk2_defconfig >> @@ -9,8 +9,13 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.13" >> ?BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y >> ?BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" >> ?BR2_LINUX_KERNEL_DTS_SUPPORT=y >> -BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" >> +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts" >> ?BR2_LINUX_KERNEL_INSTALL_TARGET=y >> +BR2_PACKAGE_LINUX_FIRMWARE=y >> +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y >> +BR2_PACKAGE_WIRELESS_REGDB=y >> +BR2_PACKAGE_WPA_SUPPLICANT=y >> +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y >> ?BR2_TARGET_ROOTFS_EXT2=y >> ?BR2_TARGET_ROOTFS_EXT2_4=y >> ?BR2_TARGET_ROOTFS_EXT2_SIZE="120M" I suggest to add BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV to load firmware and driver automatically on boot. Unfortunately it doesn't work for me, see: [??? 4.186415] cfg80211: Loading compiled-in X.509 certificates for regulatory database [??? 4.237180] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [??? 4.300765] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [??? 5.389412] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [??? 6.407710] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 Google says that it could be due to wrong nvram file configuration but I assume that you have run it successfully? # ifconfig -a eth0????? Link encap:Ethernet? HWaddr 00:80:E1:42:56:44 ?????????? BROADCAST MULTICAST? MTU:1500 Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) ?????????? Interrupt:49 Base address:0xe000 lo??????? Link encap:Local Loopback ?????????? inet addr:127.0.0.1 Mask:255.0.0.0 ?????????? inet6 addr: ::1/128 Scope:Host ?????????? UP LOOPBACK RUNNING? MTU:65536 Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) sit0????? Link encap:IPv6-in-IPv4 ?????????? NOARP MTU:1480? Metric:1 ?????????? RX packets:0 errors:0 dropped:0 overruns:0 frame:0 ?????????? TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 ?????????? collisions:0 txqueuelen:1000 ?????????? RX bytes:0 (0.0 B)? TX bytes:0 (0.0 B) # As you can see there is no wlan0 interface. Best Bartek _______________________________________________ buildroot mailing list buildroot at busybox.net <mailto:[email protected]> http://lists.busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201012/40660862/attachment.html>
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
In reply to Shlomi VakninQuoted 6 lines · On Wed, 7 Oct 2020 17:49:45 +0300 Shlomi Vaknin <[email protected]> wrote:
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin <[email protected]>
Quoted 9 lines
--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ .../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.txt create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts
Since there are still some issues apparently with this patch, I marked it as Changes Requested.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 4/4 configs/stm32mp157c-dk2: add support for wifi
In reply to Shlomi VakninHello,
Quoted 6 lines
Adding support for wifi for stm32mp157c-dk2 is achieved by using another dts which includes the bindings for the wifi module. In addition, a txt file for the wifi firmware was added. This was copied from the yocto bsp layer of st.
Signed-off-by Shlomi Vaknin <[email protected]>
Quoted 9 lines
--- .../stm32mp157c-dk2/linux.config | 4 +- .../overlay/boot/extlinux/extlinux.conf | 2 +- .../brcmfmac43430-sdio.st,stm32mp157c-dk2.txt | 59 +++++++++++++++++++ .../stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts | 32 ++++++++++ configs/stm32mp157c_dk2_defconfig | 7 ++- 5 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/overlay/lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-dk2.txt create mode 100644 board/stmicroelectronics/stm32mp157c-dk2/stm32mp157c-dk2-wifi.dts
I would suggest to add a kernel patch for stm32mp157c-dk2 dts file instead of adding custom dts directly. This way no need to modify extlinux.conf. Besides, patch will be easy to drop as soon as wifi support is mainlined.
As for WiFi on stm32mp157c-dk2, I have the same problems as mentioned earlier in this email thread. Firmware is loaded, but times out later on
[8.083508] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [9.130954] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
clkctl 0x50
I tried both linux-firmware and murata firmware package. None of them makes wifi work on my board.
Regards,
Sergey
Thomas Petazzoni
AppliedPATCH v3 1/4 boot/uboot: add stm32 binary format
In reply to Shlomi VakninQuoted 7 lines · On Wed, 7 Oct 2020 17:49:42 +0300 Shlomi Vaknin <[email protected]> wrote:
Add
.stm32binary format that uboot generates for the trusted configuration.Signed-off-by Shlomi Vaknin <[email protected]>--- boot/uboot/Config.in | 4 ++++ boot/uboot/uboot.mk | 5 +++++ 2 files changed, 9 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com