board: add support for WarPboard
PATCH v3 1/1 board: add support for WarPboard
This is a set of patch to add support for warpboard (Freescale board based on imx6sl)
The patch contains :
- defconfig for warpboard
- linux patches from Fabio Estevam to fix device tree due to last change on warpboard schematics (rev 1.12) and to fix kernel imx_v6_v7 defconfig which use incorrect hci protocol
- specific firmware file for warpboard bluetooth (nvram : brcmfmac4330-sdio.txt)
Origin of nvram config file for wifi :
https://github.com/Freescale/meta-fsl-arm-extra/blob/master/recipes-bsp/broadcom-nvram-config/files/imx6sl-warp/brcmfmac4330-sdio.txt
---
Changes v2 -> v3:
- Use imx_v6_v7_defconfig instead of custom config.
- Add patch to enable good hci protocol for bluetooth in kernel config
- Use internal sdma firmware instead of external since the 1.12 integrate good firmware.
- Fix some typo
- Add some extra info in README and remove useless section
- Fix patch naming convention
- Use GLOBAL_PATH_DIR for all patches
- Move some section in defconfig to keep .config ordering
- Upgrade uboot to 2015.07-rc2 to fix bug on dfu process :
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=825adb991ab081a50a92e50cc54a1f42b7277c94
Changes v1 -> v2:
- add specific kernel headers
- use wget download rather than git download for kernel
- fix version symbol for uboot
- add imx_usb_loader host utility
- remove bin firmware file and enable linux-firmware package instead
- fix command to enable bluetooth and fix protocol for hci in custom kernel config
--- board/freescale/warpboard/README | 49 ++++++++++ .../warpboard/patches/linux/0001-hciuart-h4.patch | 34 +++++++ .../linux/0002-replace-uart2-by-uart5.patch | 103 +++++++++++++++++++++ .../lib/firmware/brcm/brcmfmac4330-sdio.txt | 40 ++++++++ configs/warpboard_defconfig | 41 ++++++++ 5 files changed, 267 insertions(+) create mode 100644 board/freescale/warpboard/README create mode 100644 board/freescale/warpboard/patches/linux/0001-hciuart-h4.patch create mode 100644 board/freescale/warpboard/patches/linux/0002-replace-uart2-by-uart5.patch create mode 100644 board/freescale/warpboard/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt create mode 100644 configs/warpboard_defconfig
board/freescale/warpboard/README new file +49 -0
@@ -0,0 +1,49 @@ +Build +===== + +First, configure Buildroot for your WarpBoard. + make warpboard_defconfig + +Build all components: + make + +You will find in ./output/images/ the following files: + - imx6sl-warp.dtb + - rootfs.ext2 + - rootfs.tar + - u-boot.imx + - zImage + +Update uboot +============ + +- Put warpboard in USB download mode + closing the jumper j2 on daugther board +- Load u-boot.imx in warpboard by using imx usb loader from host utility + $ ./imx_usb output/images/u-boot.imx +- Uboot will appear in minicom +- Use the default environment variables: + => env default -f -a + => saveenv +- run the DFU command in uboot prompt: + => dfu 0 mmc 0 +- transfer uboot into flash by running this command in host side: + $ sudo dfu-util -D output/images/u-boot.imx -a boot +- remove power and put warpboard into normal boot mode by opening the jumper. + +Update linux & rootfs +===================== + +Use ums command from uboot prompt to mount emmc as mass storage and update zImage, device tree and rootfs file +=> ums 0 mmc 0 + +Put zimage and dtb file in warp-vfat and rootfs in warp-rootfs partition. + +Enable bluetooth (need to enable bluez-util) +================ +hciattach /dev/ttymxc4 any +hciconfig hci0 up + +Enable Wifi +========== +ifconfig wlan0 up
board/freescale/warpboard/patches/linux/0001-hciuart-h4.patch new file +34 -0
@@ -0,0 +1,34 @@ +From f6878a437a5ba157fd087ef5e1874bdce5eca199 Mon Sep 17 00:00:00 2001 +From: Fabio Estevam <[email protected]> +Date: Mon, 22 Jun 2015 16:37:34 -0300 +Subject: [PATCH] ARM: imx_v6_v7_defconfig: Select HCIUART_H4 + +The old warp board revision had hardware issues that prevented +the RTS/CTS lines to work with the Bluetooth module. + +Tha latest rev1.12 fixes this problem, so now we should better use +CONFIG_BT_HCIUART_H4 instead, as it provides a better throughput than +the CONFIG_BT_HCIUART_3WIRE option. + +Suggested-by: Arthur Lambert <[email protected]> +Signed-off-by: Fabio Estevam <[email protected]> +--- + arch/arm/configs/imx_v6_v7_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig +index f6989fb..c864295 100644 +--- a/arch/arm/configs/imx_v6_v7_defconfig ++++ b/arch/arm/configs/imx_v6_v7_defconfig +@@ -73,7 +73,7 @@ CONFIG_CAN=y + CONFIG_CAN_FLEXCAN=y + CONFIG_BT=y + CONFIG_BT_HCIUART=y +-CONFIG_BT_HCIUART_3WIRE=y ++CONFIG_BT_HCIUART_H4=y + CONFIG_CFG80211=y + CONFIG_CFG80211_WEXT=y + CONFIG_MAC80211=y +-- +1.9.1 +
board/freescale/warpboard/patches/linux/0002-replace-uart2-by-uart5.patch new file +103 -0
103 lines not on this page · raw message
board/freescale/warpboard/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt new file +40 -0
@@ -0,0 +1,40 @@ +# bcm94330wlsdgb.txt +manfid=0x2d0 +prodid=0x0552 +vendid=0x14e4 +devid=0x4360 +boardtype=0x0552 +boardrev=0x11 +# this design has 2.4GHz SP3T switch +boardflags=0x00080200 +nocrc=1 +xtalfreq=37400 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +ag0=255 +aa2g=1 +ccode=CN +pa0b0=0x14d0 +pa0b1=0xfd98 +pa0b2=0xff78 +rssismf2g=0xa +rssismc2g=0x3 +rssisav2g=0x7 +maxp2ga0=0x50 +sromrev=3 +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b +cckPwrOffset=5 +ofdm2gpo=0x66666666 +mcs2gpo0=0x6666 +mcs2gpo1=0x6666 +swctrlmap_2g=0x04040404,0x02020202,0x02020404,0x10202,0x1ff +swctrlmap_5g=0x00100010,0x00280020,0x00200010,0x14202,0x2f8 +rfreg033=0x19 +rfreg033_cck=0x1f +dacrate2g=160 +txalpfbyp2g=1 +bphyscale=17 +cckPwrIdxCorr=-15 +pacalidx2g=45 +txgaintbl=1
configs/warpboard_defconfig new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 1/1 board: add support for WarPboard
Dear Arthur LAMBERT,
Quoted 7 lines · Arthur LAMBERT
This is a set of patch to add support for warpboard (Freescale board based on imx6sl)
The patch contains :
- defconfig for warpboard
- linux patches from Fabio Estevam to fix device tree due to last change on warpboard schematics (rev 1.12) and to fix kernelimx_v6_v7defconfig which use incorrect hci protocol
- specific firmware file for warpboard bluetooth (nvram : brcmfmac4330-sdio.txt)
That's a detail, but the commit log should be wrapped to 80 columns.
Quoted 2 lines
+- transfer uboot into flash by running this command in host side:
+ $ sudo dfu-util -D output/images/u-boot.imx -a boot
So maybe you should build the host-dfu-util package of Buildroot by selecting it in the Buildroot defconfig, and use it here?
board/freescale/warpboard/README line 37
Quoted 6 lines
+- remove power and put warpboard into normal boot mode by opening the jumper.
board/freescale/warpboard/README new file +5
-0+ +Update linux & rootfs +===================== + +Use ums command from uboot prompt to mount emmc as mass storage and update zImage, device tree and rootfs file
Which rootfs file? The tarball or the ext2 one?
board/freescale/warpboard/README line 45
Quoted 4 lines
board/freescale/warpboard/README new file +4
-0+Enable bluetooth (need to enable bluez-util) +================ +hciattach /dev/ttymxc4 any +hciconfig hci0 up
Maybe:
Using Bluetooth
===============
Enable the bluez_utils package, and then:
$ hciattach /dev/ttymxc4 any $ hciconfig hci0 up
Of course, make sure you're really talking about bluez_utils or bluez_utils5, we have two separate packages in Buildroot.
Could you take into account those minor comments, and send an updated version?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v3 1/1 board: add support for WarPboard
Le Tuesday 30 Jun 2015 ? 23:29:41 (+0200), Thomas Petazzoni a ?crit :
Quoted 5 lines
Dear Arthur LAMBERT,
Quoted 2 lines · Arthur LAMBERT
This is a set of patch to add support for warpboard (Freescale board based on imx6sl)
Quoted 10 lines
Quoted 5 lines
The patch contains :
- defconfig for warpboard
- linux patches from Fabio Estevam to fix device tree due to last change on warpboard schematics (rev 1.12) and to fix kernelimx_v6_v7defconfig which use incorrect hci protocol
- specific firmware file for warpboard bluetooth (nvram : brcmfmac4330-sdio.txt)That's a detail, but the commit log should be wrapped to 80 columns.
I will fix that
Quoted 6 lines
Quoted 2 lines
+- transfer uboot into flash by running this command in host side:
+ $ sudo dfu-util -D output/images/u-boot.imx -a bootSo maybe you should build the host-dfu-util package of Buildroot by selecting it in the Buildroot defconfig, and use it here?
Very legit request.
Quoted 8 lines
board/freescale/warpboard/README line 37
Quoted 6 lines
+- remove power and put warpboard into normal boot mode by opening the jumper.
board/freescale/warpboard/README new file +5
-0+ +Update linux & rootfs +===================== + +Use ums command from uboot prompt to mount emmc as mass storage and update zImage, device tree and rootfs fileWhich rootfs file? The tarball or the ext2 one?
I will add more detail in this section
Quoted 11 lines
board/freescale/warpboard/README line 45
Quoted 5 lines
board/freescale/warpboard/README new file +4
-0+Enable bluetooth (need to enable bluez-util) +================ +hciattach /dev/ttymxc4 any +hciconfig hci0 upMaybe:
Using Bluetooth
===============
Quoted 8 lines
Enable the
bluez_utilspackage, and then:$ hciattach /dev/ttymxc4 any $ hciconfig hci0 upOf course, make sure you're really talking about
bluez_utilsorbluez_utils5, we have two separate packages in Buildroot.
Both version are working great.
Quoted 3 lines
Could you take into account those minor comments, and send an updated version?
No problem, V4 is coming !
Quoted 7 lines
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com