User talk:Sehraf

I'm messing around with Bluetooth at the moment ... it is't working but i'll use this page to keep track of commands and stuff

No Bluetooth in mainline kernel for now. (clk_out_a needs to be running but there is no nice way for doing this right now)

= Firmware = You can find the Firmware for the AP210 here

= old 3.8 kernel = Based on this, this and this Bluetooth should work with the 3.8 Kernel. To get it working you need
 * UART2 enabled
 * brcm_patchram_plus
 * (maybe) PH24 and PH18

= other things = exporting GPIOs echo 242 > /sys/class/gpio/export # BT-RESET echo 248 > /sys/class/gpio/export # BT-WAKE echo out > /sys/class/gpio/gpio242/direction echo out > /sys/class/gpio/gpio248/direction
 * 1) change directions

I'm not sure about BT-WAKE; some say it should be 0 and some 1. BT-RESET is low active (0=reset)

To get a minimal sign of life from the BT chip (use BT-RESET (1-0-1) and immediately run brcm_patchram_plus ... don't ask me why but this gives at least a single response) echo 0 > /sys/class/gpio/gpio242/value && echo 1 > /sys/class/gpio/gpio242/value && brcm_patchram_plus -d --patchram /home/cubie/bcm20710a1.hcd --enable_hci --bd_addr 11:22:33:44:55:66 --no2bytes --tosleep 1000 /dev/ttyS1

= Patches = This repo should contain everything needed

stand alone patch for uart2
Patch to enable UART2 (Cubietruck) for bluetooth

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index a6c1a3c..2cd13a3 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts @@ -112,6 +112,12 @@                        status = "okay"; }; +               uart2: serial@01c28800 { +                      pinctrl-names = "default"; +                      pinctrl-0 = <&uart2_pins_a>; +                      status = "okay"; +              }; +                 i2c0: i2c@01c2ac00 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>;