April 7, 20242 yr I'm trying to figure out the GPIO settings for my BT module. It seems to be the same as Transpeed M98-8K. bt { compatible = "allwinner,sunxi-bt"; clocks = <0x0e 0x04>; clock-names = "osc32k-out"; bt_power; bt_rst_n = <0x23 0x06 0x13 0x01>; phandle = <0xcf>; }; btlpm { compatible = "allwinner,sunxi-btlpm"; status = "okay"; uart_index = <0x01>; bt_wake = <0x23 0x06 0x11 0x00>; bt_hostwake = <0x23 0x06 0x10 0x00>; wakeup-source; phandle = <0xd1>; }; The only thing I see different in my DTS compared to your DTS is the phandle values. I couldn't find anything that would help with gpioinfo. Which gpio utilities did you use? or commands to figure out your GPIO settings? Edited April 7, 20242 yr by Nick A
April 7, 20242 yr Quote The DTS above is from your Android? Definitely the same IO ports. I'm using the gpiod package that is installed with the armbian image. sudo gpioinfo gives the following: Quote gpiochip0 - 288 lines: . . . line 192: "PG0" kernel input active-high [used] line 193: "PG1" kernel input active-high [used] line 194: "PG2" kernel input active-high [used] line 195: "PG3" kernel input active-high [used] line 196: "PG4" kernel input active-high [used] line 197: "PG5" kernel input active-high [used] line 198: "PG6" kernel input active-high [used] line 199: "PG7" kernel input active-high [used] line 200: "PG8" kernel input active-high [used] line 201: "PG9" kernel input active-high [used] line 202: "PG10" kernel input active-high [used] line 203: "PG11" unused input active-high line 204: "PG12" unused input active-high line 205: "PG13" unused input active-high line 206: "PG14" unused input active-high line 207: "PG15" unused input active-high line 208: "PG16" "host-wakeup" input active-high [used] line 209: "PG17" "device-wakeup" output active-high [used] line 210: "PG18" "reset" output active-low [used] line 211: "PG19" "shutdown" output active-high [used] Don't be surprised to see the GPIO names in the second column, I have temporarily extended the DTB to include them temporarily for better readability. I used gpioset to toggle IO and check with a DMM on the wifi/bt module. Why does your BT come up on hci1? Is there another one on USB?
April 9, 20242 yr I only have the on board BT module. Now it shows hci0. [ 9.927998] Bluetooth: hci0: command 0x0c03 tx timeout [ 9.928065] Bluetooth: hci0: BCM: Reset failed (-110) I also noticed in the android DTS the max voltage settings for aldo1 and dldo1 is set to 3.5V. Whereas, the armbian kernel has 1.8V for aldo1 and 3.3V for dldo1. Maybe that will make a difference? ldo1 { regulator-name = "axp1530-aldo1"; regulator-min-microvolt = <0x7a120>; regulator-max-microvolt = <0x3567e0>; regulator-step-delay-us = <0x19>; regulator-final-delay-us = <0x32>; regulator-always-on; phandle = <0x1d>; }; ldo2 { regulator-name = "axp1530-dldo1"; regulator-min-microvolt = <0x7a120>; regulator-max-microvolt = <0x3567e0>; regulator-step-delay-us = <0x19>; regulator-final-delay-us = <0x32>; regulator-always-on; phandle = <0x1c>; }; Edited April 9, 20242 yr by Nick A
April 9, 20242 yr The data sheet for my AP6330 is available on the net. It specifies: VBAT min: 3.0V typ: 3.6V max: 4.8V VDDIO min: 1.2V typ: 1.8V max: 2.9V+/-3% From that 3.3 or 3.6 should both work. Maybe you can try and add the following to bluetooth in your DTS: brcm,requires-autobaud-mode;
April 10, 20242 yr I finally got bluetooth working... + bluetooth { + compatible = "brcm,bcm43438-bt"; + shutdown-gpios = <&pio 6 19 GPIO_ACTIVE_HIGH>; /* PG19 */ + clocks = <&rtc CLK_OSC32K_FANOUT>; + host-wakeup-gpios = <&pio 6 16 GPIO_ACTIVE_HIGH>; /* PG16 */ + clock-names = "lpo"; + vddio-supply = <®_dldo1>; + device-wakeup-gpios = <&pio 6 17 GPIO_ACTIVE_HIGH>; /* PG17 */ + vbat-supply = <®_dldo1>; + }; }; vddio-supply needed 3.3v on my BT module. Can you check if 3.3v works stable on your board? you just need to edit your patch. It won't break your patch. Miniarch uses 3.3v also on vontar and a few other tv boxes. Edited April 11, 20242 yr by Nick A
April 10, 20242 yr Good afternoon. Sorry, I'm just new to this and just learning. As a result, I was able to compile my own firmware to make only the network card work, and even then only for 100 MB. In Android it works on 1GB. Sound via HDMI does not work 😞 WiFi and bluetooth do not work. I have these modules on the AW869A chip. Is it possible to include support for this chip in the patches?
April 10, 20242 yr yep, my Bluetooth also works with 3.3V but I want to measure the voltage on the board tomorrow.
April 11, 20242 yr You can keep your voltage the way it is.. but we would have to make a separate armbian build config and DTS for your board. https://github.com/NickAlilovic/build/tree/main/config/boards Edited April 11, 20242 yr by Nick A
April 11, 20242 yr Hi Dave2024 We need more information. Which board are you using? can you post some pictures. Edited April 11, 20242 yr by Nick A
April 11, 20242 yr Hi Nick. I published a photo earlier in this thread. Board T95ZPlus. AllWinner H618 4/64. Here is the link ..... https://forum.armbian.com/topic/29794-how-to-install-armbian-in-h618/?do=findComment&comment=183422 Edited April 11, 20242 yr by Dave2024
April 11, 20242 yr On my board it does not matter if I change "vddio-supply" to be 3.3V in the bluetooth section of the dtb. On pin 22 of the BT/wifi module I still have 1.8V. From that finding there is no need to make a separate armbian build. I think the voltage setting for the module is done by the broadcom brcmfxxxx driver and not by the bluetooth code. As a test I removed both xxx-supply lines from the bluetooth section of the dtb and it still works. Can you also try that?
April 11, 20242 yr Can you check dmesg and see if your wifi is loading.. might be asking for a firmware. If not, OrangePi-Zero2 uses the same wifi/bt aw859a chip. You can borrow code off that board to get WIFI to work. https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-sun50iw9/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts reg_vcc33_wifi: vcc33-wifi { /* Always on 3.3V regulator for WiFi and BT */ compatible = "regulator-fixed"; regulator-name = "vcc33-wifi"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; vin-supply = <®_vcc5v>; }; reg_vcc_wifi_io: vcc-wifi-io { /* Always on 1.8V/300mA regulator for WiFi and BT IO */ compatible = "regulator-fixed"; regulator-name = "vcc-wifi-io"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; vin-supply = <®_vcc33_wifi>; }; wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc 1>; clock-names = "osc32k-out"; reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ post-power-on-delay-ms = <200>; }; . . . &mmc1 { vmmc-supply = <®_vcc33_wifi>; vqmmc-supply = <®_vcc_wifi_io>; mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; mmc-ddr-1_8v; status = "okay"; }; Are you using my latest build? I added hdmi audio recently. Maybe you compiled an old build or the current kernel? make sure you are using the edge kernel 6.7 because I haven't added the hdmi audio patches to the 6.6 kernel yet. Some boards have both 100Mbit and 1Gbit Ethernet. 100Mbit comes from the internal SOC PHY. You probably have a external 1Gbit Ethernet chip on your board. I haven't added support for that. I think some Orange pi boards have both. https://www.amazon.ca/Android-Quad-core-Mali-T720MP2-Support-Ethernet/dp/B07L2T9L7J?th=1 here it says you have: LAN: Ethernet:10/100M,standard RJ-45 Is this the same board? Edited April 11, 20242 yr by Nick A
April 11, 20242 yr I removed both xxx-supply lines and it doesn't work for me.. I guess 1.8V is the default for vddio-supply. I forgot to ask you, can I have your wifi/bt firmware. I want to add them to packages/blobs/station/firmware/brcm/. Also, do you have problems with the loop device while building armbian? Sometimes I have to build more than once. I think it has to do with root permissions. Edited April 11, 20242 yr by Nick A
April 12, 20242 yr I found that my board directly connects AXP313A pin15 (ALDO1) to pin 22 of the BT/wifi module. No idea why changing makes a difference on your board. Which BT firmware is used on your device? For BT BCM4330B1.hcd is loaded. It is part of the standard armbian-firmware package. For wifi the links are in https://forum.armbian.com/topic/29794-how-to-install-armbian-in-h618/?do=findComment&comment=186733
April 15, 20242 yr Good evening. Nick is similar but not quite the same. I have one like this. The seller called it QPLOVE Q18. Thanks for the WiFi tip. I'll try to slip this patch. And yes, I used the latest build with kernel 6.7. Here is a link to such a console https://www.amazon.com/dp/B09P9KL1XY Edited April 15, 20242 yr by Dave2024
April 16, 20242 yr Maybe if we can extract more info from android we can figure this out. We need your .dts. Here are steps to do it with a linux PC running ubuntu. git clone https://github.com/cfig/Android_boot_image_editor.git sudo apt install git device-tree-compiler lz4 xz-utils zlib1g-dev openjdk-17-jdk gcc g++ python3 python-is-python3 p7zip-full android-sdk-libsparse-utils erofs-utils cd Android_boot_image_editor sudo apt install adb sudo adb connect 192.168.X.X:5555 (x is your local network address for your box) sudo adb -s 192.168.x.xxx:5555 shell "ls -al /dev/block/platform/soc@3000000/4022000.sdmmc/by-name" if you get: "error: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device." You need to authorise your connection on the box. nick@nick-Inspiron-5680:~/Android_boot_image_editor$ sudo adb -s 192.168.50.8:5555 shell "ls -al /dev/block/platform/soc@3000000/4022000.sdmmc/by-name" total 0 drwxr-xr-x 2 root root 540 1969-12-31 19:00 . drwxr-xr-x 3 root root 620 1969-12-31 19:00 .. lrwxrwxrwx 1 root root 21 1969-12-31 19:00 Reserve0 -> /dev/block/mmcblk0p24 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 boot_a -> /dev/block/mmcblk0p5 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 boot_b -> /dev/block/mmcblk0p6 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 bootloader_a -> /dev/block/mmcblk0p1 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 bootloader_b -> /dev/block/mmcblk0p2 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 dtbo_a -> /dev/block/mmcblk0p21 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 dtbo_b -> /dev/block/mmcblk0p22 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 empty -> /dev/block/mmcblk0p18 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 env_a -> /dev/block/mmcblk0p3 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 env_b -> /dev/block/mmcblk0p4 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 frp -> /dev/block/mmcblk0p17 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 media_data -> /dev/block/mmcblk0p23 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 metadata -> /dev/block/mmcblk0p19 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 misc -> /dev/block/mmcblk0p10 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 private -> /dev/block/mmcblk0p20 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 super -> /dev/block/mmcblk0p9 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 userdata -> /dev/block/mmcblk0p25 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 vbmeta_a -> /dev/block/mmcblk0p11 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 vbmeta_b -> /dev/block/mmcblk0p12 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 vbmeta_system_a -> /dev/block/mmcblk0p13 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 vbmeta_system_b -> /dev/block/mmcblk0p14 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 vbmeta_vendor_a -> /dev/block/mmcblk0p15 lrwxrwxrwx 1 root root 21 1969-12-31 19:00 vbmeta_vendor_b -> /dev/block/mmcblk0p16 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 vendor_boot_a -> /dev/block/mmcblk0p7 lrwxrwxrwx 1 root root 20 1969-12-31 19:00 vendor_boot_b -> /dev/block/mmcblk0p8 sudo adb -s 192.168.x.x:5555 pull /dev/block/platform/soc@3000000/4022000.sdmmc/by-name/boot_a mv boot_a boot_a.img ./gradlew unpack cd build cd unzip_boot Your dtb will either be in "boot_a" or "vendor_boot_a". Android_boot_image_editor will extract it. if the commands don't work you can browse the folders. Find the correct path. sudo adb shell su cd /dev/block/platform/ Edited September 2, 20242 yr by Nick A
April 17, 20242 yr dmitriy@dmitriy-UN62V:~/tvbox/Android_boot_image_editor$ adb -s 192.168.5.161:5555 pull /dev/block/platform/soc@3000000/4022000.sdmmc/by-name/boot_a adb: error: failed to copy '/dev/block/platform/soc@3000000/4022000.sdmmc/by-name/boot_a' to './boot_a': remote open failed: Permission denied Edited April 17, 20242 yr by Dave2024
April 17, 20242 yr Try this. adb shell su dd if=/dev/block/platform/soc@3000000/4022000.sdmmc/by-name/boot_a of=/mnt/sdcard/boot_a.img exit adb -s 192.168.5.161:5555 /mnt/sdcard/boot_a.img Edited October 7, 20242 yr by Nick A
April 17, 20242 yr Thanks, I figured it out. You just had to give the adb root command after adb connect. I'll post it when it's ready
April 17, 20242 yr Another problem appeared here is the result of ./gradlew unpack ./gradlew unpack Downloading https://services.gradle.org/distributions/gradle-8.7-rc-3-bin.zip ............10%.............20%.............30%.............40%............50%.............60%.............70%.............80%.............90%............100% Welcome to Gradle 8.7-rc-3! Here are the highlights of this release: - Compiling and testing with Java 22 - Cacheable Groovy script compilation - New methods in lazy collection properties For more details see https://docs.gradle.org/8.7-rc-3/release-notes.html Starting a Gradle Daemon (subsequent builds will be faster) > Task :helper:compileKotlin w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:123:25 The value 'true' assigned to 'var bSuccess: Boolean defined in cfig.helper.CryptoHelper.KeyBox.Companion.parse4' is never used w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:127:29 The value 'false' assigned to 'var bSuccess: Boolean defined in cfig.helper.CryptoHelper.KeyBox.Companion.parse4' is never used w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:132:29 The value 'false' assigned to 'var bSuccess: Boolean defined in cfig.helper.CryptoHelper.KeyBox.Companion.parse4' is never used w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:502:43 Variable 'obj' initializer is redundant w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:521:29 Variable 'obj' is never used w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:533:47 Variable 'obj' initializer is redundant w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/Launcher.kt:83:19 Variable 'cmd' is never used w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/ZipHelper.kt:120:37 'getter for nextZipEntry: ZipArchiveEntry!' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/ZipHelper.kt:162:13 'constructor ZipFile(String!)' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/ZipHelper.kt:179:13 'constructor ZipFile(String!)' is deprecated. Deprecated in Java > Task :bbootimg:compileKotlin w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/avb/desc/HashDescriptor.kt:88:43 Parameter 'parent' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/bootimg/cpio/AndroidCpio.kt:227:33 'getter for nextCPIOEntry: CpioArchiveEntry!' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt:258:17 Variable 'ai' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/init/BootReason.kt:8:66 Parameter 'subReason' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/init/BootReason.kt:8:86 Parameter 'detail' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/BrilloPropString.kt:55:22 'constructor ZipFile(String!)' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/BrilloPropString.kt:64:13 'constructor ZipFile(String!)' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/BrilloPropString.kt:105:9 'constructor ZipFile(String!)' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/BrilloPropString.kt:151:9 'constructor ZipFile(String!)' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/Common.kt:39:13 'constructor ZipFile(String!)' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/Payload.kt:125:41 Parameter 'sig_data' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/Payload.kt:125:63 Parameter 'pubkey' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/Payload.kt:125:79 Parameter 'sigHash' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/PayloadGenerator.kt:95:26 'constructor ZipFile(String!)' is deprecated. Deprecated in Java w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/PayloadGenerator.kt:173:30 Unchecked cast: Pair<String, String?> to Pair<String, String> w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/packable/OTAzipParser.kt:68:34 Parameter 'fileName' is never used w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/rom/sparse/ErofsGenerator.kt:28:74 Unnecessary non-null assertion (!!) on a non-null receiver of type HashTreeDescriptor w: file:///home/user/tv/Android_boot_image_editor/bbootimg/src/main/kotlin/rom/sparse/SparseImage.kt:242:21 Variable 'ai' is never used > Task :unpack FAILED 16:05:57.128 [main] WARN cfig.packable.PackableLauncher - No handler is activated, DO NOTHING! FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':unpack'. > Process 'command '/usr/lib/jvm/java-17-openjdk-amd64/bin/java'' finished with non-zero exit value 2 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 3m 35s 10 actionable tasks: 10 executed
April 17, 20242 yr Here's another tool you can use to unpack the boot.img Android Image Kitchen https://github.com/Shubhamvis98/AIK
April 17, 20242 yr I did not find the *.dtb file in the unpacked file. I'll try to do the same with vendor_boot_a
April 17, 20242 yr dtb dtb.0 dtb.0.dts dtb.0.dts.yamlThis is it? Edited April 17, 20242 yr by Dave2024
April 18, 20242 yr Here's the latest build if anyone wants to test it out. https://armdev.pixeldrift.net/transpeed/8k618-t/
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.