cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Bluetooth for Linux

billwu
New Contributor

Dear All.

I downloaded the file from https://community.cypress.com/t5/Resource-Library/Cypress-Android-10-Release-2020-07-17/ta-p/252298 and followed the "README" file to port the driver.

Now, I am confused about  how to apply or port the Android patches in $ANDROID_BUILD_TOP/vendor/cypress/patches.(Please see the attached for the screenshot. )

Could  you please provide me procedures in detail?

billwu_0-1622605747615.png

 

 

 

Thanks for your help.

Bill

0 Likes
7 Replies
GauravS_31
Moderator
Moderator

For your reference, the latest android driver is available at this link https://community.cypress.com/t5/Wi-Fi-Bluetooth-for-Linux/Cypress-Android-10-Release-2021-01-14/m-p... Also some of the patch files are relevant to i.mx8mq host processor. To apply the patches, you can simply use the command "patch <name_of_patch_file>.patch. That should apply the patches to the path as specified in the patch file.

0 Likes
billwu
New Contributor

Hi All,

got it. I will try it and thanks for the information

 

Bill

0 Likes
billwu
New Contributor

Hi All,

1. We can't patch the file below.
0001-Add-Cypress-FMAC-support-in-Android-10-on-NXP-i.MX8M.patch

Contents of the patch file are different from the attached file.
Are there any errors in the files on my side? Or any suggestions?
/imx8m/evk_8mq/BoardConfig.mk
/imx8m/evk_8mq/SharedBoardConfig.mk
/imx8m/evk_8mq/early.init.cfg
/imx8m/evk_8mq/evk_8mq.mk

2.What is the interface of wifi driver?

Is it sdio or usb? If it is sdio, how do we change to the usb interface?

https://community.cypress.com/t5/Wi-Fi-Bluetooth-for-Linux/Cypress-Android-10-Release-2021-01-14/m-p...

3.Can we change Imxmq to Imxmm platform?If we can, how do we modify?

Thanks for your help.

Bill

0 Likes
GauravS_31
Moderator
Moderator

1. Which host processor is being used? If it is other than imx8mq, you can manually copy the changes into your .mk files.

2. The wifi interface depends on the WLAN chip. Some of them support SDIO and some support PCIE. Kindly refer to android_v5.4.18-gamera-android-2_cy-imx-android-10.0.0_2.0.0-6_REL_PKG\cypress\firmware. USB interface chip is not supported by default in this package. Which WLAN chip is being used in your setup? Is it CYW4373? Is USB interface a requirement for your application?

3. The .mk files for imxmq and imxmm may not be exactly the same, so changing it directly in the patch file may cause the patching to fail. In that case, you can manually apply the changes into the .mk files of imx8mm.

0 Likes
billwu
New Contributor

Dear GauravS,

Thank you for the information.

1.My development platform is Android 10.0 for imx8mm board and WLAN chip is CYW43569.The Wifi chip interface is USB.
2.Would you like me to the patch file do not support CYW4356.Likewise it do not support USB interface?
If we cannot, do you have any suggestions on this?

 

Bill

0 Likes
GauravS_31
Moderator
Moderator

By default, CYW43569 is not a broad market chip and its FW is not packaged in FMAC releases. But i can see that it is mentioned in android_v5.4.18-gamera-android-2_cy-imx-android-10.0.0_2.0.0-6_REL_PKG\cypress\backports-wireless\drivers\net\wireless\broadcom\brcm80211\brcmfmac\usb.c as shown below:

BRCMF_FW_DEF(43569, "brcmfmac43569");

BRCMF_FW_ENTRY(BRCM_CC_43569_CHIP_ID, 0xFFFFFFFF, 43569)

So, there is a possibility that this chip could be enumerated during driver bring up but we have not tested this chip on FMAC driver. You can consider adding this chip in /vendor/firmware/brcm and load the driver and check if it works.

0 Likes
billwu
New Contributor

Dear GauravS
1.Our flow is below.
a.patch files(ref:for your information #2)
b.key in commands
export AARCH64_GCC_CROSS_COMPILE=/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin/aarch64-elf-
export AARCH64_GCC_CROSS_COMPILE=/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-
source build/envsetup.sh
lunch evk_8mm-userdebug
./imx-make.sh -j4
c.It is our compiler results(ref:for your information#1 : codes are not patched in imx8mm-evk.dts

It appears still some errors. 

billwu_0-1623290300327.png

 

2.We have modified patch files but it does not work. What steps do we miss?

for your information,
1.Some files will be generated if the following codes are not patched in imx8mm-evk.dts.
brcmf: bcrmf@1 {
reg = <1>;
compatible = "brcm,bcm4329-fmac";
interrupt-parent = <&gpio5>;
interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "host-wake";
};

Error Message:

If we patched the imx8mm-evk.dts, it shows a message below.
vendor/nxp-opensource/kernel_imx/arch/arm64/boot/dts/freescale/imx8mm-evk.dts:487.17-493.4: ERROR (duplicate_label): /soc@0/bus@30800000/mmc@30b50000/bcrmf@1: Duplicate label 'brcmf' on /soc@0/bus@30800000/mmc@30b50000/bcrmf@1 and /soc@0/bus@30800000/mmc@30b40000/bcrmf@1
ERROR: Input tree has errors, aborting (use -f to force output)


2.Below is manual patch.
0001-Add-Cypress-FMAC-support-in-NXP-Android-10.0.0_2.0.0.patch
evk_8mm/BoardConfig.mk
evk_8mm/ SharedBoardConfig.mk
evk_8mm/early.init.cfg
evk_8mm/evk_8mm.mk
evk_8mm/overlay/frameworks/base/core/res/res/values/config.xml

0001-Add-Cypress-wifi-chip-support-in-Android-10.0.0-2.0..patch
arch/arm64/boot/dts/freescale/imx8mq-evk.dts

0002-change-wifi-default-country-code-to-US
imx8m/evk_8mm/BoardConfig.mk

 

B.R.

Bill

0 Likes