afiftyp
Members-
Posts
19 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Nick, i can do a patch, but I really would like to understand why this change makes it work. In the end it would be less patching. Our sun50i-h618-transpeed-8k618-t.dtb does not have "osc32k" nor "osc32k-out" so i don't think it is dtb related. To try it, it is two additional changes: - change kernel config to CONFIG_SUN6I_RTC_CCU=y - remove the tree patches: patches.armbian/drv-rtc-sun6i-support-RTCs-without-external-LOSCs.patch patches.armbian/drv-rtc-sun6i-Add-Allwinner-H616-support.patch patches.armbian/Code-to-enable-Internal-OSC-Clock-Auto-Calibration.patch rtc-sun6i.c is still in place but it simply calls the new code in drivers/clk/sunxi-ng/ccu-sun6i-rtc.c as it no longer finds a usable RTC. Unfortunately I do not have a H616 to test how it behaves here.
-
The kernel people are not really happy with the patch to introduce the RTC auto calibration. The right way to go is using the existing code from the newer sunxi-ng source instead of adding the H616/H618 into the drivers/rtc/rtc-sun6i.c. I have to admit that I only partially understood the code in both places. Unfortunately the current code in drivers/clk/sunxi-ng/ccu-sun6i-rtc.c ends up with a completely unreliable box. Crashes and hangs during startup and only occasionally a successful boot. To get around that I have to patch ccu-sun6i-rtc.c the following way: My problem is that I have no idea why this change works Any idea is welcome.
-
one important point on the BT module is that the frequency setting in the xxxxx-sdio.txt needs to match the speed of the oscillator sitting beside the BT module. There seem to be to common frequency's, 26 and 37.4 MHz. My transpeed uses "xtalfreq=26000". The corresponding link is: brcmfmac4330-sdio.transpeed,8k618-t.txt -> brcmfmac-ap6330-sdio.txt
-
A bss138 FET or something similar can be used.
-
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
-
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?
-
yep, my Bluetooth also works with 3.3V but I want to measure the voltage on the board tomorrow.
-
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;
-
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?
-
Hi Nick, thanks for adding the patches. I updated from git, recompiled the image and wrote it to SD. All is as expected. Here is my bluetooth output from dmesg: I thick communication with the BT module is not coming up on your board because otherwise there should be a message line BCM: chip id xx. My suspicion would be that some of the BT control signals are connected to different GPIO or UART on your hardware. I have used the gpio utilities to identify the ports (without bluetooth being in the device tree).
-
Now the 32k clock is working. I do not find the manual easy tu understand on what has to be done so it was try and error until the auto calibration worked und gives a usable 32k clock. This 32k clock is required to enable bluetooth on my SP6330. Without the clean clock the driver was not able to identify the ID of the module. Attached are two patches. One changes the sunxi rtc driver to calibrate the clock. The kernel needs to be recompiled to include the change. The second patch extends the device tree to include bluetooth connected to uart1. It also adds a device tree overlay that can be activated and turns on spdif-tx on the optical output. Not sure if my changes are god enough to convince armbian experts but it is at lease an idea to get things working. Wit bluetooth i had the additional problem that it comes up with a default device address. One have to change it and that makes usable. Code-to-enable-Internal-OSC-Clock-Auto-Calibration.patch Add-Bluetooth-and-spdif-tx-for-transeed8k.patch
-
Hi all, I can withdraw some of my speculations: This seems to be normal in the log and does not indicate that wifi isn't working There is no need to touch the voltage setting for the SP/AP6330 module in the device tree. This kind of settings seem to be adjusted by the code in the kernel module In the end, the symbolic links above were sufficient to get wifi working on the this SP6330 module. It is using a 26MHz xtal and the brcmfmac-ap6330-sdio.txt has this.
-
Hello Nick A. I got my ugly wifi up ad running. In the end I have the .bin and .txt files that are used with Android In addition I had to modify the dtb for mmc1 so that vqmmc-supply = <®_dldo1>; This enables 3.3V instead of 1.8. I will check if the 0110-drivers-net-wireless-brcmfmac-add-ap6330-firmware.patch makes the difference so that the Android firmware isn't needed. Regarding the 32kHz clock i found the following: - the code from the file that has some calibration is not called because call to it's _probe function can never happen. It is in rtc/rtc-sun6i.c At that point chip has already a pointer assigned - I think for calibrated 32kkHz clock both the IOSC_CLK_CALI_REG and the LOSC_OUT_GATING_REG need to be managed. BTW when I compile the image from the build environment I have no 100M Ethernet. No idea why.
-
That was one of the first things I tried but the result was the same. I know the document and I think there is code in "drivers/clk/sunxi-ng/ccu-sun6i-rtc.c". It is compiles as a kernel module but it doesn't get loaded. I'll put a few printk to see if its called and what happens inside.
-
Thank you @Nick A for the detailed information. I checked the Vontar image again but no onboard wifi because of timeout even after symbolic linking the right .bin file to the requested name. And not surprising, I only measure 29kHz. My guess is that the wifi/bt module can not sync communication with the SOC because of the wrong frequency. I have also decompiled the fdt from Android and it looks quite similar regarding the configuration of the PG10 output. One difference is however that the fdt explicitly defines a fixed 32kHz entry. I have also looked in the H618 datasheet for clock and rtc but I could not match that to the source in the kernel yet. I was looking to find a simple way to feed the pin with the 32kHz.