ARM: dts: ux500: samsung-golden: Add Bluetooth
authorStephan Gerhold <stephan@gerhold.net>
Thu, 19 Dec 2019 20:20:51 +0000 (21:20 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 25 Dec 2019 23:12:25 +0000 (00:12 +0100)
samsung-golden uses a BCM4334 WiFi+BT combo chip.
The BT part is connected via UART and supported by the hci_bcm
driver in mainline.
Add the necessary device tree changes to make it load correctly.

It requires (seemingly) device-specific firmware that can be
extracted from the stock Android system used on samsung-golden:
  - /system/bin/bcm4334.hcd -> /lib/firmware/brcm/BCM4334B0.hcd

On my device, scanning for other Bluetooth devices works just fine,
but for some reason it keeps disconnecting immediately
when attempting to connect to an other device.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20191219202052.19039-9-stephan@gerhold.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/ste-ux500-samsung-golden.dts

index d22b287..313f0ab 100644 (file)
                        pinctrl-names = "default", "sleep";
                        pinctrl-0 = <&u0_a_1_default>;
                        pinctrl-1 = <&u0_a_1_sleep>;
+
+                       bluetooth {
+                               compatible = "brcm,bcm4330-bt";
+                               /* GPIO222 (BT_VREG_ON) */
+                               shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
+                               /* GPIO199 (BT_WAKE) */
+                               device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+                               /* GPIO97 (BT_HOST_WAKE) */
+                               host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&bluetooth_default>;
+                       };
                };
 
                /* GPF UART */
                };
        };
 
+       bluetooth {
+               bluetooth_default: bluetooth_default {
+                       golden_cfg1 {
+                               pins = "GPIO199_AH23",  /* BT_WAKE */
+                                      "GPIO222_AJ9";   /* BT_VREG_ON */
+                               ste,config = <&gpio_out_lo>;
+                       };
+                       golden_cfg2 {
+                               pins = "GPIO97_D9";     /* BT_HOST_WAKE */
+                               ste,config = <&gpio_in_nopull>;
+                       };
+               };
+       };
+
        vibrator {
                vibrator_default: vibrator_default {
                        golden_cfg1 {