diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 18:04:33 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 23:42:32 +0100 |
commit | f07e572f6447465d8938679533d604e402b0f066 (patch) | |
tree | cb333bd2a67e59e7c07659514850a0fd55fc825e /target/linux/bcm27xx/patches-5.4/950-0881-Bluetooth-hci_bcm-Support-pcm-params-in-dts.patch | |
parent | 5d3a6fd970619dfc55f8259035c3027d7613a2a6 (diff) | |
download | upstream-f07e572f6447465d8938679533d604e402b0f066.tar.gz upstream-f07e572f6447465d8938679533d604e402b0f066.tar.bz2 upstream-f07e572f6447465d8938679533d604e402b0f066.zip |
bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0881-Bluetooth-hci_bcm-Support-pcm-params-in-dts.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0881-Bluetooth-hci_bcm-Support-pcm-params-in-dts.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0881-Bluetooth-hci_bcm-Support-pcm-params-in-dts.patch b/target/linux/bcm27xx/patches-5.4/950-0881-Bluetooth-hci_bcm-Support-pcm-params-in-dts.patch new file mode 100644 index 0000000000..fa2de56bfe --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0881-Bluetooth-hci_bcm-Support-pcm-params-in-dts.patch @@ -0,0 +1,74 @@ +From 8b4d7321625cc8403a9ce7f050bd8d1b4ef7446d Mon Sep 17 00:00:00 2001 +From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> +Date: Tue, 26 Nov 2019 08:17:32 +0100 +Subject: [PATCH] Bluetooth: hci_bcm: Support pcm params in dts + +commit eb762b94111b646b4f116ebfdbfcadbad14e12b3 upstream. + +BCM chips may require configuration of PCM to operate correctly and +there is a vendor specific HCI command to do this. Add support in the +hci_bcm driver to parse this from devicetree and configure the chip. + +Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> +Signed-off-by: Marcel Holtmann <marcel@holtmann.org> +Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> +--- + drivers/bluetooth/hci_bcm.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- a/drivers/bluetooth/hci_bcm.c ++++ b/drivers/bluetooth/hci_bcm.c +@@ -123,6 +123,7 @@ struct bcm_device { + bool is_suspended; + #endif + bool no_early_set_baudrate; ++ u8 pcm_int_params[5]; + }; + + /* generic bcm uart resources */ +@@ -597,6 +598,16 @@ static int bcm_setup(struct hci_uart *hu + host_set_baudrate(hu, speed); + } + ++ /* PCM parameters if provided */ ++ if (bcm->dev && bcm->dev->pcm_int_params[0] != 0xff) { ++ struct bcm_set_pcm_int_params params; ++ ++ btbcm_read_pcm_int_params(hu->hdev, ¶ms); ++ ++ memcpy(¶ms, bcm->dev->pcm_int_params, 5); ++ btbcm_write_pcm_int_params(hu->hdev, ¶ms); ++ } ++ + finalize: + release_firmware(fw); + +@@ -1134,6 +1145,8 @@ static int bcm_acpi_probe(struct bcm_dev + static int bcm_of_probe(struct bcm_device *bdev) + { + device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed); ++ device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params", ++ bdev->pcm_int_params, 5); + return 0; + } + +@@ -1149,6 +1162,9 @@ static int bcm_probe(struct platform_dev + dev->dev = &pdev->dev; + dev->irq = platform_get_irq(pdev, 0); + ++ /* Initialize routing field to an unused value */ ++ dev->pcm_int_params[0] = 0xff; ++ + if (has_acpi_companion(&pdev->dev)) { + ret = bcm_acpi_probe(dev); + if (ret) +@@ -1409,6 +1425,9 @@ static int bcm_serdev_probe(struct serde + bcmdev->serdev_hu.serdev = serdev; + serdev_device_set_drvdata(serdev, bcmdev); + ++ /* Initialize routing field to an unused value */ ++ bcmdev->pcm_int_params[0] = 0xff; ++ + if (has_acpi_companion(&serdev->dev)) + err = bcm_acpi_probe(bcmdev); + else |