Jump to content

Nick A

Members
  • Posts

    554
  • Joined

  • Last visited

Everything posted by Nick A

  1. It's possible to get your H616 running with armbian.. we need more info. First you need to install a serial console on your uart. So we can see where the boot process stops. You probably have a different Dram setup. We can figure that out easily by extracting the boot0 from your android. The H616 is almost the same as H618. I have a H618 and everything works but the headphone jack. Banana Pi zero 3 has H618 with headphone jack working. I just don't have time right now to figure out the headphone issue. Please read this thread you'll find a lot of useful information getting your box up and running.
  2. Hi Long Vu, you should install a UART Serial port so we can find out where it hangs.
  3. Hi Dave, I don't see any difference between our dts (That deal with hdmi/audio). Maybe the overlay dtbo_a changed something.? If you can extract that. Have you tried your box with different TV/monitors and hdmi cables? Here's my dts. devicetree.dts
  4. Here's the latest build if anyone wants to test it out. https://armdev.pixeldrift.net/transpeed/8k618-t/
  5. rename it to vendor_boot.img
  6. Here's another tool you can use to unpack the boot.img Android Image Kitchen https://github.com/Shubhamvis98/AIK
  7. Try renaming it to boot.img.
  8. 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
  9. 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/
  10. I'm using BCM4335A0.hcd. It's from my original android.
  11. 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.
  12. 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 = <&reg_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 = <&reg_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 = <&reg_vcc33_wifi>; vqmmc-supply = <&reg_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?
  13. Hi Dave2024 We need more information. Which board are you using? can you post some pictures.
  14. 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
  15. 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 = <&reg_dldo1>; + device-wakeup-gpios = <&pio 6 17 GPIO_ACTIVE_HIGH>; /* PG17 */ + vbat-supply = <&reg_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.
  16. 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>; };
  17. 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?
  18. Hi afiftyp, Thanks for the patches. I added them to my build. Unfortunately, bluetooth doesn't work for me. [ 7.691181] Bluetooth: Core ver 2.22 [ 7.691282] NET: Registered PF_BLUETOOTH protocol family [ 7.691287] Bluetooth: HCI device and connection manager initialized [ 7.691306] Bluetooth: HCI socket layer initialized [ 7.691315] Bluetooth: L2CAP socket layer initialized [ 7.691331] Bluetooth: SCO socket layer initialized . . . [ 7.873425] Bluetooth: HCI UART driver ver 2.3 [ 7.873455] Bluetooth: HCI UART protocol H4 registered [ 7.873460] Bluetooth: HCI UART protocol BCSP registered [ 7.873560] Bluetooth: HCI UART protocol LL registered [ 7.873565] Bluetooth: HCI UART protocol ATH3K registered [ 7.873603] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 7.873789] Bluetooth: HCI UART protocol Intel registered [ 7.873882] Bluetooth: HCI UART protocol Broadcom registered [ 7.873914] Bluetooth: HCI UART protocol QCA registered [ 7.873919] Bluetooth: HCI UART protocol AG6XX registered [ 7.873949] Bluetooth: HCI UART protocol Marvell registered . . . [ 10.147991] Bluetooth: hci1: command 0x0c03 tx timeout [ 10.148042] Bluetooth: hci1: BCM: Reset failed (-110)
  19. Forgot to mention there's an easy way to get the proper DRAM Settings from your board and apply it to u-boot defconfig. Using Andre's firmware extraction tool. https://github.com/apritzel/sunxi-fw
  20. I don't have your board but feel free to test out HDMI audio with my build. I think everything is in the sun50i-h616-orangepi-zero.dtsi for audio to work. https://github.com/NickAlilovic/build
  21. Good work. Try the official linux firmware see if that works. https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/brcm I compiled both the current and edge kernels today and didn't have any Ethernet issues. Maybe something changed in your build? I only have the HDMI audio patches applied to the edge kernel. If you need HDMI audio stick with edge.
  22. You are right there is calibration code here. static int ccu_iosc_32k_prepare(struct clk_hw *hw) { struct ccu_common *cm = hw_to_ccu_common(hw); u32 val; if (!have_iosc_calibration) return 0; val = readl(cm->base + IOSC_CLK_CALI_REG); writel(val | IOSC_CLK_CALI_EN | IOSC_CLK_CALI_SRC_SEL, cm->base + IOSC_CLK_CALI_REG); return 0; } static void ccu_iosc_32k_unprepare(struct clk_hw *hw) { struct ccu_common *cm = hw_to_ccu_common(hw); u32 val; if (!have_iosc_calibration) return; val = readl(cm->base + IOSC_CLK_CALI_REG); writel(val & ~(IOSC_CLK_CALI_EN | IOSC_CLK_CALI_SRC_SEL), cm->base + IOSC_CLK_CALI_REG); } static unsigned long ccu_iosc_32k_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { struct ccu_common *cm = hw_to_ccu_common(hw); u32 val; if (have_iosc_calibration) { val = readl(cm->base + IOSC_CLK_CALI_REG); /* Assume the calibrated 32k clock is accurate. */ if (val & IOSC_CLK_CALI_SRC_SEL) return LOSC_RATE; } val = readl(cm->base + IOSC_32K_CLK_DIV_REG) & IOSC_32K_CLK_DIV; return parent_rate / IOSC_32K_PRE_DIV / (val + 1); } static unsigned long ccu_iosc_32k_recalc_accuracy(struct clk_hw *hw, unsigned long parent_accuracy) { struct ccu_common *cm = hw_to_ccu_common(hw); u32 val; if (have_iosc_calibration) { val = readl(cm->base + IOSC_CLK_CALI_REG); /* Assume the calibrated 32k clock is accurate. */ if (val & IOSC_CLK_CALI_SRC_SEL) return 0; } return parent_accuracy; } So I was looking at the code and I believe it's not the way the user manual calibrates the internal 32kHz clock.. I think it has to do with this. "One major difference regarding the H6 is the 24 MHz crystal is now routed through the RTC, as a digitally compensated oscillator (DCXO). This is not covered in this patch and will be supported later. Other differences are either unrelated to RTC or clock functionality, such as boot or crypto related registers, or the driver simply doesn't use the feature in question. One example of the latter is the calibration function for the RC oscillator. We consider this clock to be very bad and avoid using it." https://patchwork.kernel.org/project/linux-arm-kernel/patch/20181128093013.24442-7-wens@csie.org/ This code seems to be using the prescaler. IOSC_32K_PRE_DIV.
  23. I found more information on 32kHz clock. Starting at page 275. https://www.scs.stanford.edu/~zyedidia/docs/allwinner/h616.pdf 3.13.3.4.6. RC Calibration The basic circuit of RC calibration is shown in Figure 3-39. Whether to output the calibrated RC clock can be selected by the RC_Cali_SEL control bit, the calibration principle is as follows. http://nskhuman.ru/allwinner/h616reglist.php?nreg=153 3.13.3.5.3. Fanout Set the bit0 of 32K_FANOUT_GATING_REG to 1, and ensure that external pull-up resistor and voltage are normal, then 32.768 kHz fanout square wave can be output. Fanout: The clock source of fanout can select RTC_32K, or 32K divided by PLL_PERI(2X), or 32K divided by HOSC. http://nskhuman.ru/allwinner/h616reglist.php?nreg=161 /* * There are other differences between models, including: * * - number of GPIO pins that can be configured to hold a certain level * - crypto-key related registers (H5, H6) * - boot process related (super standby, secondary processor entry address) * registers (R40, H6) * - SYS power domain controls (R40) * - DCXO controls (H6) * - RC oscillator calibration (H6) * * These functions are not covered by this driver. */ I guess there's no function to calibrate the internal RC oscillator yet. https://github.com/torvalds/linux/blob/master/drivers/rtc/rtc-sun6i.c This is the 32K_FANOUT_GATING_REG. #define SUN6I_LOSC_OUT_GATING 0x0060 rtc->ext_losc = clk_register_gate(NULL, clkout_name, init.name, 0, rtc->base + SUN6I_LOSC_OUT_GATING, SUN6I_LOSC_OUT_GATING_EN_OFFSET, 0, &rtc->lock); If we can find out which clock source we are using and change it to something more accurate? All though, Calibrating the RTC is the ideal solution. On these cheap boxes there is no external 32KHz oscillator.
  24. I added HDMI audio patches and some other various fixes to my build. You can find the new images here. https://armdev.pixeldrift.net/transpeed/8k618-t/
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines