# TQC-A01 **Repository Path**: yjun123/tqc-a01 ## Basic Information - **Project Name**: TQC-A01 - **Description**: 泰奇猫 TQC-A01 data about TQC-A01 collection - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 1 - **Created**: 2021-07-16 - **Last Updated**: 2024-11-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 泰奇猫 TQC-A01 - official website: [TQC](https://tq.ultrapower.com.cn/index.html) ![TQC](https://tqc.taiqigame.com/tqc/webImages/indexbanner.png) ## Hardware | Specifications| Description | | ----- | --- | | PCB | AZW-KT02 2.0 | | Soc | Allwinner [H6](https://linux-sunxi.org/H6)@1.8Ghz BGA451/15X15mm/Quad-core Cotex-A53 | | DRAM | 1GiB LPDDR3 [SS256M32V01MD1LPF-107BT](https://www.spectek.com/menus/we_detail.aspx?memType=LPDDR3)/PB047-125 PT/BGA178 1600Mbps | | Power | DC 5V@2A | | Emmc | foresee EMMC NCEMAM6G-08G/BGA153 | | PMU | [AXP805](http://linux-sunxi.org/images/b/bc/AXP805_Datasheet_V1.0_en.pdf)/3V to 5.5V/QFN56_7X7/XPOWER H7044CA/67H1 | | Lan Transformer | [AE-SB16001](http://www.appselectronics.com/Uploads/product/5ae167b80285a.pdf) | | Size | 96 * 96 * 17 | | Interface| Description | | ------------ | --- | | USB 2.0 Host | * 1 | | USB 3.0 Host | * 1 | | MicroUSB OTG | * 1 | | HDMI | | | Ethernet | integrated 10/100M PHY/ RJ45 | | WIreless | 802.11b/g/n [AP6212](https://fccid.io/PJ5-AX905/User-Manual/User-manual-3321089.pdf) /B11210011/1753 | | SPDIF | | | MicroSD | | | Infrared | | | Bluetooth | integraed in AP6212 with WiFi | ## H6 [H6](https://www.allwinnertech.com/index.php?c=product&a=index&id=66) [datasheet](https://www.allwinnertech.com/uploads/pdf/20210204193642c5.pdf) ## FEL connect USB to USB 2.0 port. - Verify - A new USB device appears When you run lsusb, you should see the following in it: `Bus 001 Device 074: ID 1f3a:efe8` - Running the sunxi-fel tool > ./sunxi-fel version > AWUSBFEX soc=00162500(A13) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000 ## TTL UART ![TQC-TTL](./TQC-TTL-UART.png) ## Linux - Images [Orangepi Pi 3 Official Ubuntu Image](http://www.orangepi.cn/downloadresourcescn/OrangePi3/2019-12-16/orangepi3_c6aec9d17921bec3150d356313.htm) [libreELEC](https://libreelec.tv/downloads-new-allwinner/) [Arch Linux ARM Aarch64 generic](https://archlinuxarm.org/platforms/armv8/generic) - Patches **5.11** - mmc *libreELEC*: [0011-mmc-sunxi-fix-unusuable-eMMC-on-some-H6-boards-by-di.patch](https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/devices/H6/patches/linux/0011-mmc-sunxi-fix-unusuable-eMMC-on-some-H6-boards-by-di.patch) - ethernet *libreELEC*: [0002-net-stmmac-sun8i-Use-devm_regulator_get-for-PHY-regu.patch](https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/devices/H6/patches/linux/0002-net-stmmac-sun8i-Use-devm_regulator_get-for-PHY-regu.patch) [0003-net-stmmac-sun8i-Rename-PHY-regulator-variable-to-re.patch](https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/devices/H6/patches/linux/0003-net-stmmac-sun8i-Rename-PHY-regulator-variable-to-re.patch) [0004-net-stmmac-sun8i-Add-support-for-enabling-a-regulato.patch](https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/devices/H6/patches/linux/0004-net-stmmac-sun8i-Add-support-for-enabling-a-regulato.patch) *armbian* [0001-mfd-Add-support-for-AC200.patch](https://github.com/armbian/build/blob/master/patch/kernel/archive/sunxi-5.11/0001-mfd-Add-support-for-AC200.patch) [0002-net-phy-Add-support-for-AC200-EPHY.patch](https://github.com/armbian/build/blob/master/patch/kernel/archive/sunxi-5.11/0002-net-phy-Add-support-for-AC200-EPHY.patch) [0003-arm64-dts-allwinner-h6-Add-AC200-EPHY-related-nodes.patch](https://github.com/armbian/build/blob/master/patch/kernel/archive/sunxi-5.11/0003-arm64-dts-allwinner-h6-Add-AC200-EPHY-related-nodes.patch) - sound *libreELEC* [0001-HACK-h6-Add-HDMI-sound-card.patch](https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/devices/H6/patches/linux/0001-HACK-h6-Add-HDMI-sound-card.patch) **need test** **repo** [libreELEC](https://github.com/LibreELEC/LibreELEC.tv/tree/master/projects/Allwinner/devices/H6/patches/linux) [Armbian sunxi-5.11](https://github.com/armbian/build/tree/master/patch/kernel/archive/sunxi-5.11) [Armbian sunxi-5.13](https://github.com/armbian/build/tree/master/patch/kernel/archive/sunxi-5.13) ## Firmware [Armbian Firmware](https://github.com/armbian/firmware) [LibreELEC Firmware](https://github.com/LibreELEC/brcmfmac_sdio-firmware) [What's the bluetooth HCD](https://community.cypress.com/t5/Resource-Library/Cypress-Bluetooth-SoC-Programming-Guide/ta-p/246400) [What is CLM blob?](https://community.murata.com/s/question/0D55F000096RY5s/what-is-clm-blob) ## WiFi ``` # before change dts none # after change dts [ 10.229583] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 10.240633] usbcore: registered new interface driver brcmfmac [ 10.291495] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.taiqigame,tqc-a01.txt failed with error -2 [ 10.494990] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 10.520081] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Feb 16 2020 22:39:24 version 7.45.98.97 (r724416 CY) FWID 01-bf41ed64 # after using firmware from armbian [ 9.594939] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 9.603928] usbcore: registered new interface driver brcmfmac [ 9.754912] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 9.774657] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 9.800037] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Mar 30 2016 11:30:56 version 7.45.77.h8.4 FWID 01-ee8a6268 # using firmware from rasp repo [ 9.554721] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43 430/1 [ 9.570416] usbcore: registered new interface driver brcmfmac [ 9.821778] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43 430/1 [ 9.840629] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 9.861370] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 22 2019 01:59:2 8 version 7.45.98.94 (r723000 CY) FWID 01-3b33decd # armbian [ 5.937605] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 5.957758] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.xunlong,orangepi-3.txt failed with error -2 [ 6.076907] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 6.076975] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 6.077572] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Mar 30 2016 11:30:56 version 7.45.77.h8.4 FWID 01-ee8a6268 # softlink NVRAM txt [ 12.697288] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 12.707151] usbcore: registered new interface driver brcmfmac [ 12.854371] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 12.939595] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Mar 30 2021 01:12:21 version 7.45.98.118 (7d96287 CY) FWID 01-32059766 ``` - Communicate use `SDIO` protocol - Firmware firmware `brcmfmac43430-sdio` is in *linux-firmware*, but without `txt` config file in it. get it from package [firmware-tqc-a01](https://aur.archlinux.org/packages/firmware-tqc-a01/) - Url [AP6212](http://sunnyqi.com/content/?471.html) [Ampak_WIFi](http://linux-sunxi.org/Wifi#Ampak) `Ampak combines broadcom wifi and bluetooth chips in single modules.` Broadcom BCM43430 - Dts `brcmfmac` module in mainline kernel using `compatible = "brcm,bcm4329-fmac";` in device tree script ## Bluetooth ``` # without firmware [ 129.171336] Bluetooth: Core ver 2.22 [ 129.179779] Bluetooth: HCI device and connection manager initialized [ 129.187718] Bluetooth: HCI socket layer initialized [ 129.192864] Bluetooth: L2CAP socket layer initialized [ 129.204817] Bluetooth: SCO socket layer initialized [ 129.348738] Bluetooth: HCI UART driver ver 2.3 [ 129.353393] Bluetooth: HCI UART protocol H4 registered [ 129.358581] Bluetooth: HCI UART protocol BCSP registered [ 129.367633] Bluetooth: HCI UART protocol LL registered [ 129.373069] Bluetooth: HCI UART protocol ATH3K registered [ 129.373912] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 129.385611] Bluetooth: HCI UART protocol Intel registered [ 129.391527] Bluetooth: HCI UART protocol Broadcom registered [ 129.397487] Bluetooth: HCI UART protocol QCA registered [ 129.411518] Bluetooth: HCI UART protocol Marvell registered [ 129.783158] Bluetooth: hci0: BCM: chip id 94 [ 129.787899] Bluetooth: hci0: BCM: features 0x2e [ 129.794608] Bluetooth: hci0: BCM43430A1 [ 129.798457] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000 [ 129.809351] Bluetooth: hci0: BCM: firmware Patch file not found, tried: [ 129.816039] Bluetooth: hci0: BCM: 'brcm/BCM43430A1.hcd' [ 129.821274] Bluetooth: hci0: BCM: 'brcm/BCM.hcd' # raspberrypi [ 9.811092] Bluetooth: Core ver 2.22 [ 9.820993] Bluetooth: HCI device and connection manager initialized [ 9.821016] Bluetooth: HCI socket layer initialized [ 9.821026] Bluetooth: L2CAP socket layer initialized [ 9.821047] Bluetooth: SCO socket layer initialized [ 10.000248] Bluetooth: HCI UART driver ver 2.3 [ 10.004837] Bluetooth: HCI UART protocol H4 registered [ 10.010007] Bluetooth: HCI UART protocol BCSP registered [ 10.025530] Bluetooth: HCI UART protocol LL registered [ 10.030770] Bluetooth: HCI UART protocol ATH3K registered [ 10.044198] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 10.057944] Bluetooth: HCI UART protocol Intel registered [ 10.079896] Bluetooth: HCI UART protocol Broadcom registered [ 10.085994] Bluetooth: HCI UART protocol QCA registered [ 10.091348] Bluetooth: HCI UART protocol Marvell registered [ 10.463112] Bluetooth: hci0: BCM: chip id 94 [ 10.467847] Bluetooth: hci0: BCM: features 0x2e [ 10.474562] Bluetooth: hci0: BCM43430A1 [ 10.478407] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000 [ 10.490681] Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.hcd' Patch [ 13.112189] Bluetooth: hci0: command 0xfc18 tx timeout [ 21.592195] Bluetooth: hci0: BCM: failed to write update baudrate (-110) [ 21.747578] Bluetooth: hci0: BCM43430A1 [ 21.751435] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000 # libreELEC [ 9.288033] Bluetooth: Core ver 2.22 [ 9.300498] Bluetooth: HCI device and connection manager initialized [ 9.307381] Bluetooth: HCI socket layer initialized [ 9.312409] Bluetooth: L2CAP socket layer initialized [ 9.324612] Bluetooth: SCO socket layer initialized [ 9.586621] Bluetooth: HCI UART driver ver 2.3 [ 9.591196] Bluetooth: HCI UART protocol H4 registered [ 9.596464] Bluetooth: HCI UART protocol BCSP registered [ 9.614803] Bluetooth: HCI UART protocol LL registered [ 9.620022] Bluetooth: HCI UART protocol ATH3K registered [ 9.620427] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 9.653184] Bluetooth: HCI UART protocol Intel registered [ 9.666935] Bluetooth: HCI UART protocol Broadcom registered [ 9.678190] Bluetooth: HCI UART protocol QCA registered [ 9.737771] Bluetooth: HCI UART protocol Marvell registered [ 10.063945] Bluetooth: hci0: BCM: chip id 94 [ 10.068884] Bluetooth: hci0: BCM: features 0x2e [ 10.076236] Bluetooth: hci0: BCM43430A1 [ 10.076275] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000 [ 10.090117] Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.hcd' Patch [ 10.885748] Bluetooth: hci0: BCM43438A1 26MHz AP6212A1_CL1 BT4.0 OTP-BD-0034 [ 10.892863] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0106 # armbian [ 5.802962] Bluetooth: Core ver 2.22 [ 5.803075] Bluetooth: HCI device and connection manager initialized [ 5.803093] Bluetooth: HCI socket layer initialized [ 5.803099] Bluetooth: L2CAP socket layer initialized [ 5.803116] Bluetooth: SCO socket layer initialized [ 5.892163] Bluetooth: HCI UART driver ver 2.3 [ 5.892177] Bluetooth: HCI UART protocol H4 registered [ 5.892180] Bluetooth: HCI UART protocol BCSP registered [ 5.892279] Bluetooth: HCI UART protocol LL registered [ 5.892283] Bluetooth: HCI UART protocol ATH3K registered [ 5.892319] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 5.892480] Bluetooth: HCI UART protocol Intel registered [ 5.892583] Bluetooth: HCI UART protocol Broadcom registered [ 5.892615] Bluetooth: HCI UART protocol QCA registered [ 5.892617] Bluetooth: HCI UART protocol AG6XX registered [ 5.892640] Bluetooth: HCI UART protocol Marvell registered [ 6.242663] Bluetooth: hci0: BCM: chip id 94 [ 6.243107] Bluetooth: hci0: BCM: features 0x2e [ 6.245322] Bluetooth: hci0: BCM43430A1 [ 6.245339] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000 [ 6.249430] Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.hcd' Patch [ 6.992596] Bluetooth: hci0: BCM43438A1 26MHz AP6212A1_CL1 BT4.0 OTP-BD-0034 [ 6.992613] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0106 ``` - Communicate use `UART` protocol - Url [Ampack_Bluttooh](http://linux-sunxi.org/Bluetooth#AMPAK) [AP6212_WiFi/Bluetooth_Chip](https://wiki.archlinux.org/title/Banana_Pi#AP6212_WiFi/Bluetooth_Chip) Broadcom BCM43438 (?) ,get from [sun8i-r40-bananapi-m2-ultra.dts](https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts) - Dts using `compatible = "brcm,bcm4345c5";` in device tree script recgonized as `BCM43430A1` by kernel - Firmware [raspberrypi](https://github.com/RPi-Distro/bluez-firmware/blob/master/broadcom/BCM43430A1.hcd) [libreELEC](https://github.com/LibreELEC/brcmfmac_sdio-firmware/blob/master/BCM43430A1.vim) firmware of *BCM43430A1* from libreELEC works fine on TQC-A01 get it from package [firmware-tqc-a01](https://aur.archlinux.org/packages/firmware-tqc-a01/) ## Ethernet ``` # before patch [ 128.986106] dwmac-sun8i 5020000.ethernet: IRQ eth_wake_irq not found [ 128.992584] dwmac-sun8i 5020000.ethernet: IRQ eth_lpi not found [ 129.006951] dwmac-sun8i 5020000.ethernet: No regulator found [ 129.013022] dwmac-sun8i 5020000.ethernet: PTP uses main clock [ 129.020117] dwmac-sun8i 5020000.ethernet: Current syscon value is not the default 58000 (expect 50000) [ 129.030093] dwmac-sun8i 5020000.ethernet: No HW DMA feature register supported [ 129.037519] dwmac-sun8i 5020000.ethernet: RX Checksum Offload Engine supported [ 129.044839] dwmac-sun8i 5020000.ethernet: COE Type 2 [ 129.049828] dwmac-sun8i 5020000.ethernet: TX Checksum insertion supported [ 129.056680] dwmac-sun8i 5020000.ethernet: Normal descriptors [ 129.062390] dwmac-sun8i 5020000.ethernet: Chain mode enabled [ 129.190483] dwmac-sun8i 5020000.ethernet: EMAC reset timeout [ 129.198407] dwmac-sun8i 5020000.ethernet eth0: stmmac_dvr_remove: removing driver [ 129.452687] dwmac-sun8i: probe of 5020000.ethernet failed with error -14 # after patch [ 9.636942] dwmac-sun8i 5020000.ethernet: IRQ eth_wake_irq not found [ 9.643395] dwmac-sun8i 5020000.ethernet: IRQ eth_lpi not found [ 9.649774] dwmac-sun8i 5020000.ethernet: supply phy-io not found, using dummy regulator [ 9.661798] dwmac-sun8i 5020000.ethernet: PTP uses main clock [ 9.669390] dwmac-sun8i 5020000.ethernet: Current syscon value is not the default 58000 (expect 50000) [ 9.679413] dwmac-sun8i 5020000.ethernet: No HW DMA feature register supported [ 9.686897] dwmac-sun8i 5020000.ethernet: RX Checksum Offload Engine supported [ 9.694192] dwmac-sun8i 5020000.ethernet: COE Type 2 [ 9.699185] dwmac-sun8i 5020000.ethernet: TX Checksum insertion supported [ 9.699194] dwmac-sun8i 5020000.ethernet: Normal descriptors [ 9.715287] dwmac-sun8i 5020000.ethernet: Chain mode enabled [ 9.851120] dwmac-sun8i 5020000.ethernet: EMAC reset timeout [ 9.856949] dwmac-sun8i 5020000.ethernet eth0: stmmac_dvr_remove: removing driver [ 10.093687] dwmac-sun8i: probe of 5020000.ethernet failed with error -14 # after enable pwm in config [ 9.561383] dwmac-sun8i 5020000.ethernet: IRQ eth_wake_irq not found [ 9.567891] dwmac-sun8i 5020000.ethernet: IRQ eth_lpi not found [ 9.587688] dwmac-sun8i 5020000.ethernet: supply phy not found, using dummy regulator [ 9.596694] dwmac-sun8i 5020000.ethernet: supply phy-io not found, using dummy regulator [ 9.605676] dwmac-sun8i 5020000.ethernet: PTP uses main clock [ 9.611596] dwmac-sun8i 5020000.ethernet: Current syscon value is not the default 58000 (expect 50000) [ 9.629261] dwmac-sun8i 5020000.ethernet: No HW DMA feature register supported [ 9.636585] dwmac-sun8i 5020000.ethernet: RX Checksum Offload Engine supported [ 9.643874] dwmac-sun8i 5020000.ethernet: COE Type 2 [ 9.648865] dwmac-sun8i 5020000.ethernet: TX Checksum insertion supported [ 9.655725] dwmac-sun8i 5020000.ethernet: Normal descriptors [ 9.661433] dwmac-sun8i 5020000.ethernet: Chain mode enabled [ 11.648674] dwmac-sun8i 5020000.ethernet eth0: PHY [stmmac-0:01] driver [AC200 EPHY] (irq=POLL) [ 11.659163] dwmac-sun8i 5020000.ethernet eth0: No Safety Features support found [ 11.666528] dwmac-sun8i 5020000.ethernet eth0: No MAC Management Counters available [ 11.674231] dwmac-sun8i 5020000.ethernet eth0: PTP not supported by HW [ 11.681391] dwmac-sun8i 5020000.ethernet eth0: configuring for phy/rmii link mode [ 13.754196] dwmac-sun8i 5020000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx # armbian [ 2.705577] dwmac-sun8i 5020000.ethernet: IRQ eth_wake_irq not found [ 2.705586] dwmac-sun8i 5020000.ethernet: IRQ eth_lpi not found [ 2.705944] dwmac-sun8i 5020000.ethernet: supply phy-io not found, using dummy regulator [ 2.706175] dwmac-sun8i 5020000.ethernet: PTP uses main clock [ 2.706202] dwmac-sun8i 5020000.ethernet: Current syscon value is not the default 58000 (expect 50000) [ 2.709111] dwmac-sun8i 5020000.ethernet: No HW DMA feature register supported [ 2.709125] dwmac-sun8i 5020000.ethernet: RX Checksum Offload Engine supported [ 2.709132] dwmac-sun8i 5020000.ethernet: COE Type 2 [ 2.709137] dwmac-sun8i 5020000.ethernet: TX Checksum insertion supported [ 2.709143] dwmac-sun8i 5020000.ethernet: Normal descriptors [ 2.709149] dwmac-sun8i 5020000.ethernet: Chain mode enabled [ 10.898564] dwmac-sun8i 5020000.ethernet eth0: PHY [stmmac-0:01] driver [AC200 EPHY] (irq=POLL) [ 10.899568] dwmac-sun8i 5020000.ethernet eth0: No Safety Features support found [ 10.899578] dwmac-sun8i 5020000.ethernet eth0: No MAC Management Counters available [ 10.899583] dwmac-sun8i 5020000.ethernet eth0: PTP not supported by HW [ 10.899969] dwmac-sun8i 5020000.ethernet eth0: configuring for phy/rmii link mode ``` ## eMMC ``` # before patch [ 4.939197] sunxi-mmc 4022000.mmc: data error, sending stop command [ 4.945773] sunxi-mmc 4022000.mmc: send stop command failed [ 4.955947] sunxi-mmc 4022000.mmc: data error, sending stop command [ 4.962292] sunxi-mmc 4022000.mmc: send stop command failed [ 4.968596] sunxi-mmc 4022000.mmc: data error, sending stop command [ 4.975045] sunxi-mmc 4022000.mmc: send stop command failed [ 4.981207] sunxi-mmc 4022000.mmc: data error, sending stop command [ 4.987628] sunxi-mmc 4022000.mmc: send stop command failed [ 5.023073] sunxi-mmc 4022000.mmc: data error, sending stop command [ 5.952176] sched: RT throttling activated [ 6.022181] sunxi-mmc 4022000.mmc: send stop command failed # after patch [ 3.857000] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq [ 3.864122] sunxi-mmc 4020000.mmc: Got CD GPIO [ 3.889299] sunxi-mmc 4022000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 3.917653] sunxi-mmc 4020000.mmc: initialized, max. request size: 16384 KB, uses new timings mode [ 4.104758] sunxi-mmc 4021000.mmc: initialized, max. request size: 16384 KB, uses new timings mode # armbian [ 1.999749] sunxi-mmc 4020000.mmc: Got CD GPIO [ 1.999785] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq [ 2.025155] sunxi-mmc 4022000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 2.025240] sunxi-mmc 4020000.mmc: initialized, max. request size: 16384 KB, uses new timings mode [ 2.230247] sunxi-mmc 4021000.mmc: initialized, max. request size: 16384 KB, uses new timings mode # enable HS200 [ 2.206906] vcc33-io-pd-emmc-sd-usb-uart-1: supplied by vcc-5v [ 2.208195] vcc33-io-pd-emmc-sd-usb-uart: supplied by vcc-5v [ 3.770193] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq [ 3.777563] sunxi-mmc 4020000.mmc: Got CD GPIO [ 3.796319] sunxi-mmc 4022000.mmc: initialized, max. request size: 2048 KB, uses new timings mode [ 3.826894] sunxi-mmc 4020000.mmc: initialized, max. request size: 16384 KB, uses new timings mode [ 3.884346] mmc1: new HS200 MMC card at address 0001 [ 3.895322] mmcblk1: mmc1:0001 NCard 7.28 GiB [ 3.900106] mmcblk1boot0: mmc1:0001 NCard 4.00 MiB [ 3.905294] mmcblk1boot1: mmc1:0001 NCard 4.00 MiB [ 3.911826] mmcblk1: p1 p2 [ 4.019027] sunxi-mmc 4021000.mmc: initialized, max. request size: 16384 KB, uses new timings mode [ 4.044163] mmc0: queuing unknown CIS tuple 0x80 (2 bytes) [ 4.051271] mmc0: queuing unknown CIS tuple 0x80 (3 bytes) [ 4.058413] mmc0: queuing unknown CIS tuple 0x80 (3 bytes) [ 4.066786] mmc0: queuing unknown CIS tuple 0x80 (7 bytes) [ 4.098790] mmc0: queuing unknown CIS tuple 0x81 (9 bytes) [ 4.225248] mmc0: new high speed SDIO card at address 0001 ``` ## IR ``` [ 10.230539] rc rc0: sunxi-ir as /devices/platform/soc/7040000.ir/rc/rc0 [ 10.252836] rc rc0: lirc_dev: driver sunxi-ir registered at minor = 0, raw IR receiver, no transmitter [ 10.274061] input: sunxi-ir as /devices/platform/soc/7040000.ir/rc/rc0/input0 [ 10.295015] sunxi-ir 7040000.ir: initialized sunXi IR driver [alarm@tqc-a01 ~]$ ls /dev/lirc* /dev/lirc0 ``` - utils [LIRC](https://wiki.archlinux.org/title/LIRC) - Linux Infrared Remote Control ### AC200 ``` # after patch successfully [ 3.730927] ac200-ephy ac200-ephy: DMA mask not set ``` ## U-Boot ### build from source ``` git clone https://github.com/ARM-software/arm-trusted-firmware.git git clone https://gitlab.denx.de/u-boot/u-boot.git # ATF cd arm-trusted-firmware make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_a64 DEBUG=1 -j4 bl31 cp build/sun50i_a64/debug/bl31.bin ../u-boot/ # U-Boot cd u-boot git checkout tags/v2021.07 make -j$(nproc) ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- orangepi_3_defconfig make -j$(nproc) ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- # dd dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8k seek=1 ``` ### precompile binary [[orangepi_one_plus uboot]](https://gitlab.com/vinibali/orangepi_uboot/-/blob/master/202004/orangepi_one_plus/u-boot-sunxi-with-spl.bin) > (?) Can't boot on TQC ### Boot Config ``` # extlinux/extlinux/.conf LABEL Arch Linux ARM LINUX /Image INITRD /initramfs-linux.img FDT /dtbs/allwinner/sun50i-h6-orangepi-3.dtb APPEND root=UUID=fbf47225-0ed0-4c88-a984-d78043d49c1a console=ttyS0,115200 console=tty1 rw rootwait ``` ## Device Tree [Compiling source into .dtb (FDT binary blob)](https://elinux.org/Device_Tree_Reference#Compiling_source_into_.dtb_.28FDT_binary_blob.29) > all configured dtb > make dtbs > > A specific .dtb > make qcom-msm8960-cdp.dtb `dtc -I dtb -O dts -o xxx.dts xxx.dtb` ## Borad Using Allwinner H6 [H6 Boards](https://linux-sunxi.org/Category:H6_Boards) ## Blogs and Forums [泰奇猫TQC-A01强力推荐此盒子](https://www.znds.com/tv-1185657-1-1.html) [TQC泰奇猫矿渣利用](https://www.right.com.cn/forum/thread-3469793-1-1.html) > 泰奇猫这个是基于Allwinner H6 也就是全志H6 ARM64 芯片的一个盒子 > 整体这个机子的系统其实也是套用了公版sun50iw6 OrangePi3 实施的一个方案。 > 拆开机子 4 个Pin点都可以直接用TTL 连接上去 > 所以如果要改造成电视盒子的话, > 直接adb 连上电脑, 并且找一个公对公的USB 线 连电脑上就可以直接操作盒子了 > 记得要开启开发模式然后把adb调试打开, USB0 调试模式也得打开, USB 线连USB2.0那个口。 > 顺序是GND-TX-RX [# 网络设备杂谈 篇一:小猫变脑斧???!!!泰奇猫深度使用记录](https://post.m.smzdm.com/p/alxld6mp) [# 25元的泰奇猫盒子 还能刷Zidoo机顶盒系统](https://post.smzdm.com/p/awrnn9vg/) > USB Flash , Connect to USB 2.0, and press UPGRADE Buttion, wait for 10 sec. [# 垃圾佬的日常 篇十四:25元就能体验到芝杜(zidoo)系统,一个纯净的电视盒子矿渣——泰奇猫](https://post.m.smzdm.com/p/anxxvrgp/) [教你怎么刷芝杜/zidoo播放器系统-泰奇猫](https://www.hao4k.cn/thread-57639-1-1.html) ![H6vsS905](https://data.hao4k.cn/forum/202105/24/zdm202105Mon091131k21ejyd2gjc.jpg) [矿渣 :泰奇猫刷机芝杜(zidoo)系统](https://www.amobbs.com/thread-5750868-1-1.html) [泰奇猫Zidoo固件发布-更新完美线刷包20201115更新外置网卡版](https://bbs.nas66.com/thread-12104-1-1.html) [矿渣论坛 - 硬件专区›泰奇猫](https://bbs.nas66.com/forum-42-1.html) [矿渣篇:泰奇猫魔改](https://www.bilibili.com/read/mobile?id=9995897&ivk_sa=1024320u) [TQC泰奇猫刷原版Android系统](https://post.m.smzdm.com/p/adwgz3ox/) [40块买到原价1299的矿渣电视盒泰奇猫,能刷芝杜系统还能上4K](https://mbd.baidu.com/newspage/data/landingshare?pageType=1&nid=news_9259844976391711714&wfr=&_refluxos=) [记录某全志H6矿渣LibreELEC系统适配过程](https://www.amobbs.com/thread-5751326-1-1.html) > TQC A01 ## MailList [[PATCH] mmc: sunxi: fix unusuable eMMC on some H6 boards by disabling DDR][https://groups.google.com/d/topic/linux-sunxi/8Z20PtRP-gY] [[PATCH] arm64: dts: allwinner: h6: add eMMC voltage property for Beelink GS1](https://www.spinics.net/lists/kernel/msg3679554.html) [[4/7] arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency](https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210106150525.15403-5-andre.przywara@arm.com/) [[7/7] arm64: dts: allwinner: Pine H64: Enable HS200 eMMC mode](https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210106150525.15403-8-andre.przywara@arm.com/) [Re: [PATCH v2] arm64: dts: allwinner: h6: add eMMC voltage property for Beelink GS1](https://www.spinics.net/lists/devicetree/msg382553.html) >``` >After discussing with Jernej about this issue, I understood that: >- Automatic delay calibration is not implemented >- We also miss some handling of DDR related bits in control register > >So none of H5/H6 boards should actually work. >(Some 'lucky' boards seem to work enough to switch to HS200 mode...) >``` ## 小记 2021/07/19 中午, 测试确定了 TTL 的对应引脚 2021/07/19 下午, 安装 Arch Linux ARM, 遇到 使用 Orangepi One Plus的 U-Boot, 但是无法启动的问题, 如下图是串口的信息, 所以尝试编译 Orangepi Pi 3 的 U-Boot ``` U-Boot SPL 2020.04 (Apr 25 2020 - 10:46:36 +0000) DRAM: 1024 MiB Trying to boot from MMC1 ``` 2021/07/19 下午, 编译的 Orangepi Pi 3 的 U-Boot 也无法启动, 和上面的报错一样。 :( 2021/07/19 下午, 在 LibreELEC 的基础上安装Arch Linux ARM, 保留原来的U-Boot,启动成功 ``` [alarm@alarm ~]$ uname -a Linux alarm 5.11.4-1-ARCH #1 SMP Sun Mar 7 23:46:10 UTC 2021 aarch64 GNU/Linux ``` - 问题: ~~以太网口未识别~~ 措施: 修改dts, 加入使能网卡的内容 - 问题: ~~无线未识别~~ 措施:修改dts, 加入使能无线的内容 - 问题: ~~蓝牙识别到了, 但是缺少固件~~ 措施:添加所需的固件 - 问题: 红外测试 措施: 测试红外 - 问题: ~~内核不稳定~~ 措施: emmm 2021/07/20 中午, 尝试解决网口问题, 加上patch 2021/07/20 下午,发现只修改设备树没效果,需要重新编译内核,于是打包一个 `linux-tqc-a01` 2021/07/21 下午,通过添加 mmc 相关的patch, 使得sd启动非常顺畅, 并且不会有内核警告和卡死, 修改设备树,wifi已经正常, 蓝牙基本正常,以太网目前还无法工作。 打算编译一个 5.11.34 版本的内核再来测试。 2021/07/22 下午, archlinuxarm 的 firmware-raspberrypi 蓝牙固件 和 TQC-AO1 的 蓝牙不兼容, 使用 libreELEC 固件库的老固件可行。顺便把 TQC-A01 需要的固件打了个包 `firmware-tqc-a01` 2021/07/22 晚上, 在armbian论坛的帖子看到需要配置 config ``` -CONFIG_PWM_SUN4I=m +CONFIG_PWM_SUN4I=y -CONFIG_NVMEM_SUNXI_SID=m +CONFIG_NVMEM_SUNXI_SID=y ``` 在修改完后重新编译内核 2021/07/23 中午,测试昨天编译的内核, 以太网口终于能正常工作了!!!测试了蓝牙和wifi, 蓝牙正常, wifi无法扫描到 信号, maybe change firmware could fix it. 2021/07/23 下午, 尝试将alarm 刷入 emmc( 算了,以后再说~), 先测试红外吧 2021/07/25 noon, add hdmi sound node in the device tree of TQC-A01; ``` [alarm@tqc-a01 ~]$ ls /dev/mmcblk* /dev/mmcblk1 /dev/mmcblk1p1 /dev/mmcblk1p12 /dev/mmcblk1p15 /dev/mmcblk1p3 /dev/mmcblk1p7 /dev/mmcblk2 /dev/mmcblk1boot0 /dev/mmcblk1p10 /dev/mmcblk1p13 /dev/mmcblk1p16 /dev/mmcblk1p5 /dev/mmcblk1p8 /dev/mmcblk2p1 /dev/mmcblk1boot1 /dev/mmcblk1p11 /dev/mmcblk1p14 /dev/mmcblk1p2 /dev/mmcblk1p6 /dev/mmcblk1p9 /dev/mmcblk2p2 ``` 2021/07/29 afternoon, dump linux kernel to 5.13.6. 2021/08/05 install alarm to eMMC. test with bluetooth, works well. 2021/08/09 根据 ArchWiki Lirc 测试红外, 无果, 在盖子遮盖的情况下, 也会有很大的干扰。 ## TODO - ~~install arch to eMMC~~ (dd - ~~enable wifi~~ - enable IrDA - enable hdmi sound output - ~~dump kernel verion~~ - build usable U-Boot for H6 ## some info here ``` # without firmware-raspberrypi [alarm@tqc-a01 ~]$ dmesg | grep brcm [ 9.949614] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1 [ 9.963193] usbcore: registered new interface driver brcmfmac [ 10.048272] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.taiqigame,tqc-a01.txt failed with error -2 [ 10.062468] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.txt failed with error -2 [ 10.572080] Bluetooth: hci0: BCM: 'brcm/BCM43430A1.hcd' [ 10.577334] Bluetooth: hci0: BCM: 'brcm/BCM.hcd' [ 11.083664] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 ```