Jump to content

Nick A

Members
  • Posts

    554
  • Joined

  • Last visited

Everything posted by Nick A

  1. Maybe you can try loading the original firmware .bin and .txt from android. If that fails try asking the sunxi linux guys for help. https://oftc.irclog.whitequark.org/linux-sunxi/
  2. The current code for transpeed wifi is wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc CLK_OSC32K_FANOUT>; clock-names = "ext_clock"; pinctrl-0 = <&x32clk_fanout_pin>; pinctrl-names = "default"; reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ }; x32clk_fanout_pin: x32clk-fanout-pin { pins = "PG10"; function = "clock"; }; Search online I found this.. https://oftc.irclog.whitequark.org/linux-sunxi/2023-04-03 10:45 <warpme> so it looks wifi lpo is wired to PG10? 10:45 <apritzel> warpme: without a schematic I guess it's the best we can hope for. Take those Allwinner Android DTs with a grain of salt though. 10:48 <apritzel> looks like it: if you program PG10 to use mux 3, it will spit out the 32KHz clock on that pin, so you can use that where ever you need a 32KHz clock 10:57 <warpme> indeed: in android dt i see "allwinner,muxsel = <0x03>;" Can i use such entry also in mainline 6.2 dts? 10:59 <apritzel> no, not directly, but you can use something equivalent 11:01 <apritzel> we describe mux 3 for PG10 as "clock", so you describe that pin in a child of the pinctrl node (like all the other pins), and say: function = "clock"; 11:02 <apritzel> and then reference this in your .dts, in the respective pinctrl-0 property 11:03 <apritzel> that should be in the wifi device's node, not in the mmc1 node, but I am not 100% sure that works 11:07 <warpme> so for pindef: will this be ok: https://pastebin.com/4eSuDYRL line380 ? 11:12 <warpme> and for dts: https://pastebin.com/37tUnZu9 line186? 11:13 <apritzel> yes, that's what I meant TanixTX6s-axp313 has the same wifi code as Vontar. Tanix uses firmware (ap6330@SDIO) where as the Vontar uses (ap6334@SDIO). This is the wifi code for Tanix and Vontar. https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-6.6/files/0633-arm64-dts-allwinner-h616-add-Tanix-TX6s-axp313-TVbox.patch https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-6.6/files/0637-arm64-dts-allwinner-h618-add-vontar-h618-TVbox.patch wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc CLK_OSC32K_FANOUT>; clock-names = "ext_clock"; pinctrl-names = "default"; pinctrl-0 = <&clk_losc>; /* PG10 with MUX3 set */ }; clk_losc: clk-losc { pins = "PG10"; function = "clock"; }; I guess clk-losc is defined in another file where it sets the MUX3. https://mjmwired.net/kernel/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml Orange pi 3/2/2w also have similar code for wifi. But they reset-gpios and add a power-on delay. https://github.com/warpme/minimyth2/blob/7a38452780ca72c198d75b9ca5fccb0c307e5b81/script/kernel/linux-6.5/files/0638-arm64-dts-allwinner-h618-add-opi-2w.patch#L113 wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc CLK_OSC32K_FANOUT>; clock-names = "ext_clock"; pinctrl-names = "default"; pinctrl-0 = <&clk_losc>; /* PG10 with MUX3 set */ reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ post-power-on-delay-ms = <200>; }; You probably need this patch too. 0110-drivers-net-wireless-brcmfmac-add-ap6330-firmware.patch diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index a907d7b06..ec71996c7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -619,13 +619,17 @@ BRCMF_FW_DEF(4354, "brcmfmac4354-sdio"); BRCMF_FW_DEF(4356, "brcmfmac4356-sdio"); BRCMF_FW_DEF(4373, "brcmfmac4373-sdio"); +/* AMPAK */ +BRCMF_FW_DEF(AP6330, "brcmfmac-ap6330-sdio"); + static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143), BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0), BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4), BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, 43241B5), BRCMF_FW_ENTRY(BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, 4329), - BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330), + BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFEF, 4330), + BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0x10, AP6330), BRCMF_FW_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334), BRCMF_FW_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340), BRCMF_FW_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340), Try the Vontar image again and see if you are getting a 32Khz clock? You can use my linux kernel dts with these changes and compile a new image using my build. Adding your box to the build/config/boards as a .wip would be even better.
  3. I got the ethernet patch to work. You can find them here. Use the latest 6.7.9 kernel images. https://armdev.pixeldrift.net/transpeed/8k618-t/
  4. The TanixTX6s-axp313 has the same wifi chip. Try using the miniarch image for TanixTX6s-axp313. https://github.com/warpme/miniarch/releases/download/v20240209/MiniArch-20231112-6.7.4-board-h616.tanix_tx6s_axp313-SD-Image.img.xz
  5. Try using the brcmfmac4330-sdio .bin and .txt files from here. Just place them in /lib/firmware/brcm. The kernel messages should tell you the exact name it's looking for. Do you have any other brcmfmac messages in your log file? https://github.com/LibreELEC/brcmfmac_sdio-firmware/tree/master I haven't added the ethernet patches for the armbian transpeed yet. Haven't been able to get it to work. I'll look at it again sometime this week.
  6. Thanks Hexdump. You are right. I found this http://warped.inet2.org/pkg/minimyth2-garchive/u-boot-h616-v2024.01-2024.01/. Looks like the latest patches for u-boot and http://warped.inet2.org/pkg/minimyth2-garchive/linux-6.7.4/ kernel patches.
  7. Nitrolark, Miniarch already has done the hard work for you. Like adding patches to u-boot and the linux kernel to support your TV Box. Arch linux is a simple, lightweight distribution. Warpme choose this distro to run mythtv2 on TV Boxes because he didn't need a full linux distro. Here is the official Arch Linux for arm. https://archlinuxarm.org/platforms/armv8/allwinner/pine64 This is the installation guide for pine64. This is the only Arm64 board supported right now. You need the u-boot from tanix_tx6s_axp313_defconfig and a linux kernel that has the vontar patches. https://linux-sunxi.org/U-Boot https://linux-sunxi.org/Mainline_Kernel_Howto Then use the rootfs from Archlinuxarm. wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C root ArchLinuxARM-aarch64-latest.tar.gz rootfs might only have the minimal packages needed to run the Arch distro anyways. You probably have to spend a lot of time adding packages like Rick0cm did on his box. I think it would be easier to add Vontar to Armbian. Armbian Build Tools has everthing you need to make a custom server or desktop image. The reason I suggested Miniarch was because Warpme already has all the lastest patches for our boards. Applying them to Armbian can be pain because you have patches that are from older kernel and u-boot versions. Also, you have to work with patches from other boards that have been mainlined in Armbian that might have changed the source code you are trying to patch. Most of the patches will give you Hunk FAILED errors. You might get lucky with some of patches. Understanding C programming and Linux source is needed to get these patches to work.
  8. Rick0cm, I think you have a vontar board maybe the manufacturer mistakenly used a transpeed cover. This is the vontar patch miniarch uses. We can apply that to Armbian. https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-6.6/files/0637-arm64-dts-allwinner-h618-add-vontar-h618-TVbox.patch Some other patches maybe needed for the vontar patch to work. Like openvfd. https://github.com/warpme/minimyth2/tree/master/script/kernel/linux-6.6/files We can add vontar to the "build/config/boards" as WIP (Work In Progress). Since it uses a different wifi than transpeed. U-boot patches are here but I don't see one for vontar. Looks like vontar uses the tanix tx6s axp313 defconfig. The Makefile has "export mm_U-BOOT_BOARD_TYPE = tanix_tx6s_axp313_defconfig". https://github.com/warpme/minimyth2/tree/master/script/bootloaders/u-boot-h616/files https://github.com/warpme/minimyth2/blob/master/script/bootloaders/board-h618.vontar_h618/Makefile https://github.com/warpme/minimyth2/blob/master/script/bootloaders/u-boot-h616/files/53-add-tanix_tx6s_axp313_defconfig.patch When I have time.. I'll try to get vontar in the wip boards menu to build armbian.
  9. First clone my build. git clone https://github.com/NickAlilovic/build.git Patches are located in the "build/patch/kernel/archive/sunxi-6.7/patches.armbian/" directory. If you are adding new patches you need to include them in these two files "build/patch/kernel/archive/sunxi-6.7/series.armbian" and "build/patch/kernel/archive/sunxi-6.7/series.conf". Compile a transpeed image. ./compile.sh In the choose board menu click on "Show CSC/WIP/EOS/TVB" option then choose "transpeed-8k618-t". Choose "bleeding edge", "bookworm", server or desktop doesn't matter. Any desktop environment. Any software. Your image should be in the output directory when it's done compiling. You can see if the patches have been applied properly in the "/build/output/logs" directory. (Note next step is for more advanced users.) If you want to create your own patch. You can find the patched kernel source code in "build/cache/sources/linux-kernel-worktree/6.7__sunxi64__arm64" directory. Go into your kernel source directory and execute these commands. git add . git commit --signoff Now you are ready to edit the patched kernel and add your own code. After you are done editing the source code execute these commands. git status git add path/to/the/file/you/just/edited git commit --signoff git format-patch -1 You should see your new patches created in the kernel source directory. Move them to "build/patch/kernel/archive/sunxi-6.7/patches.armbian/" directory. Edit the files "build/patch/kernel/archive/sunxi-6.7/series.armbian" and "build/patch/kernel/archive/sunxi-6.7/series.conf" to include your new patches. U-boot patches are in "build/patch/u-boot/u-boot-sunxi" directory. No need to edit conf files to apply them. You can find the patched source code in "build/cache/sources/u-boot-worktree/u-boot/v2024.01" directory. git add . git commit --signoff Edit the source code. git status git add path/to/the/file/you/just/edited git commit --signoff git format-patch -1 When your patch is created move them to "build/patch/u-boot/u-boot-sunxi".
  10. Hi Rick0cm Looking at your board again I can see you have a different Wifi chip then mine. Try Miniarch with the Vontar Box image. It's very similar to the Transpeed box but it has the same Wifi chip as yours. https://github.com/warpme/miniarch/releases/download/v20240209/MiniArch-20231112-6.7.4-board-h618.vontar_h618-SD-Image.img.xz . Follow the install guide here. https://github.com/warpme/miniarch?tab=readme-ov-file For serial console I use gtkterm in linux. sudo gtkterm -p /dev/ttyUSB0 -s 115200
  11. Already in the deconfig file. +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 This maybe a bigger issue. https://github.com/apritzel/u-boot/issues/7
  12. I would avoid installing this to internal emmc until we have a copy of the original firmware.
  13. Yes! That is what I was looking at right now. Thanks iun cuim. I was stuck on the 100mbps ethernet. But it seems Warpme got it working. So I'm going to focus on his patches and see if I can get Transpeed working on Armbian. I got this TV Box a month ago and I didn't know Warpme already did most of the hard work.
  14. No they boot fine... I was building mostly Desktop images. But it would be great to have both Desktop and Server images. I prefer Desktop because I want to get the most out of this TV Box. Hopefully, after we are done we can have decent Hardware acceleration. Using the V4L2.
  15. After you flashed the image to your sdcard. Remember to rename the wifi firmware "brcmfmac4335-sdio.bin" to "brcmfmac4335-sdio.transpeed,8k618-t.bin". Then copy both "brcmfmac4335-sdio.transpeed,8k618-t.bin" and "brcmfmac4335-sdio.txt" to /lib/firmware/brcm directory on your sdcard. I'll automate the process in future builds. https://github.com/LibreELEC/brcmfmac_sdio-firmware/blob/master/brcmfmac4335-sdio.bin and https://github.com/LibreELEC/brcmfmac_sdio-firmware/blob/master/brcmfmac4335-sdio.txt
  16. Most of the patches were taken from orangepi zero3 with very minimal changes. Andre Przywara gave me his transpeed-8k618-t_defconfig. The DRAM settings were the same as mine. He knew more about the config options than I do. So I kept his defconfig. He also gave me the code in dts to get wifi working. wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rtc CLK_OSC32K_FANOUT>; clock-names = "ext_clock"; pinctrl-0 = <&x32clk_fanout_pin>; pinctrl-names = "default"; reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ }; &mmc1 { vmmc-supply = <&reg_dldo1>; vqmmc-supply = <&reg_aldo1>; mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; status = "okay"; sdio_wifi: wifi@1 { reg = <1>; }; }; This requires an addition to the h616.dtsi file, at the end of the "pio: pinctrl@300b000" node, to introduce the CLK fanout pin: x32clk_fanout_pin: x32clk-fanout-pin { pins = "PG10"; function = "clock"; }; Here's a irc chat log of Andre and Jernej talking about the transpeed wifi. A lot of good information in these chats. https://oftc.irclog.whitequark.org/linux-sunxi/2023-12-14
  17. Hi Mag911 Awesome, I was hoping my posts would help others with boxes based on the H618. Like ag123 pointed out. There are a lot of boxes that are similar but with different configurations. If I can post enough information and steps on how to setup these boxes we can get enough of them up and running. These boxes are now adding more RAM and larger eMMC's. I think it's a good time to support Armbian development on TV boxes. The original Android that came with this box was very basic. It wouldn't allow me to install most the apps I wanted. So I decided to hack it. Is HDMI and WIFI now working on your box?
  18. I found the wifi firmware needed for this box. Download and rename the file to "brcmfmac4335-sdio.transpeed,8k618-t.bin". Place it in /lib/firmware/brcm. https://github.com/LibreELEC/brcmfmac_sdio-firmware/blob/master/brcmfmac4335-sdio.bin Also needs the brcmfmac4335-sdio.txt. No need to rename it just place it in /lib/firmware/brcm. https://github.com/LibreELEC/brcmfmac_sdio-firmware/blob/master/brcmfmac4335-sdio.txt
  19. I only used the BRCMFMAC driver... I guess your BCMDHD driver might read the nvram_bcm4335.txt correctly. It could be an issue with BRCMFMAC. If not try the brcmfmac4335-sdio.txt. Both nvram_bcm4335.txt and brcmfmac4335-sdio.txt are very similar. It's the config file for the firmware.bin. I'll setup BCMDHD on my box and see if the original nvram_bcm4335.txt works.
  20. I tried the /vendor/etc/firmware/nvram_bcm4335.txt and /vendor/etc/firmware/firmware/bcm4335b0_ag that came with my android box. But it didn't work. When I used the brcmfmac4335-sdio.txt from LibreELEC. Everything worked. Didn't matter which firmware.bin I used (I tried bcm4335b0_ag, LibreELEC and Original Linux Kernel firmware.bin). I think there may be a problem with nvram_bcm4335.txt. Something is missing. Right now, I'm changing the values in brcmfmac4335-sdio.txt because the values in nvram_bcm4335.txt might be more optimal. I'm not sure how armbian rockchip loads your drivers. but if your patches are correct and the wifi still doesn't load. Try the brcmfmac4335-sdio.txt from LibreELEC. Worth a try. It worked for me.
  21. The HK2735M wifi chip is compatible to the bcm4335. the Linux driver is brcmfmac, controlled by kernel config CONFIG_BRCMFMAC_SDIO and CONFIG_BRCMFMAC. The driver expects the firmware files brcmfmac4335-sdio.bin (may need to rename the file, the driver tells you the filename it was looking for) and brcmfmac4335-sdio.txt under /lib/firmware/brcm I'm using a different TV Box. Transpeed 8K618-T TV box. I had some success with the firmware files from https://github.com/LibreELEC/brcmfmac_sdio-firmware/blob/master/. You may need to patch your DT to enable wifi. Haven't checked your DT for your box yet.
  22. I was able to compile a custom Armbian image for the Transpeed 8k618-T TV Box. I added a patch for HDMI and it seems to work ok. Still working on WIFI. The HK2735M wifi chip is compatible to the bcm4335. the Linux driver is brcmfmac, controlled by kernel config CONFIG_BRCMFMAC_SDIO and CONFIG_BRCMFMAC. The driver expects the firmware files under /lib/firmware/brcm. If you want to build your own image or view the patches you can find it here. https://github.com/NickAlilovic/build I like to thank Andre Przywara. I would not of been able to get this far without his help.
  23. Created a new transpeed-8k618-t_defconfig in the u-boot/configs directory. Add the sun50i-h618-transpeed-8k618-t.dts from the linux kernel to u-boot/arch/arm/dts directory. Edited the Makefile in u-boot/arch/arm/dts directory to build the new sun50i-h618-transpeed-8k618-t.dtb. Now this box boots into Linux version 6.7.0-next-20240111. I used the Debian GNU/Linux 12 (bookworm) rootfs. Edited the /etc/fstab in the rootfs to include /dev/mmcblk0p2. Patches have been submitted to the u-boot repo. Hopefully they will be accepted soon.
  24. Using the original sun50i-h618-orangepi-zero3.dtb and the modified orangepi_zero3_defconfig (posted above) with the new DRAM setup.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines