Commit f0305e73 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'for-net-next-2021-06-28' of...

Merge tag 'for-net-next-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next



Luiz Augusto von Dentz says:

====================
bluetooth-next pull request for net-next:

 - Add support for QCA_ROME device (0cf3:e500) and RTL8822CE
 - Update management interface revision to 21
 - Use of incluse language
 - Proper handling of HCI_LE_Advertising_Set_Terminated event
 - Recovery handing of HCI ncmd=0
 - Various memory fixes
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e1289cfb 1f053613
Loading
Loading
Loading
Loading
+0 −69
Original line number Diff line number Diff line
Qualcomm Bluetooth Chips
---------------------

This documents the binding structure and common properties for serial
attached Qualcomm devices.

Serial attached Qualcomm devices shall be a child node of the host UART
device the slave device is attached to.

Required properties:
 - compatible: should contain one of the following:
   * "qcom,qca6174-bt"
   * "qcom,qca9377-bt"
   * "qcom,wcn3990-bt"
   * "qcom,wcn3991-bt"
   * "qcom,wcn3998-bt"
   * "qcom,qca6390-bt"

Optional properties for compatible string qcom,qca6174-bt:

 - enable-gpios: gpio specifier used to enable chip
 - clocks: clock provided to the controller (SUSCLK_32KHZ)
 - firmware-name: specify the name of nvm firmware to load

Optional properties for compatible string qcom,qca9377-bt:

 - max-speed: see Documentation/devicetree/bindings/serial/serial.yaml

Required properties for compatible string qcom,wcn399x-bt:

 - vddio-supply: VDD_IO supply regulator handle.
 - vddxo-supply: VDD_XO supply regulator handle.
 - vddrf-supply: VDD_RF supply regulator handle.
 - vddch0-supply: VDD_CH0 supply regulator handle.

Optional properties for compatible string qcom,wcn399x-bt:

 - max-speed: see Documentation/devicetree/bindings/serial/serial.yaml
 - firmware-name: specify the name of nvm firmware to load
 - clocks: clock provided to the controller

Examples:

serial@7570000 {
	label = "BT-UART";
	status = "okay";

	bluetooth {
		compatible = "qcom,qca6174-bt";

		enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
		clocks = <&divclk4>;
		firmware-name = "nvm_00440302.bin";
	};
};

serial@898000 {
	bluetooth {
		compatible = "qcom,wcn3990-bt";

		vddio-supply = <&vreg_s4a_1p8>;
		vddxo-supply = <&vreg_l7a_1p8>;
		vddrf-supply = <&vreg_l17a_1p3>;
		vddch0-supply = <&vreg_l25a_3p3>;
		max-speed = <3200000>;
		firmware-name = "crnv21.bin";
		clocks = <&rpmhcc RPMH_RF_CLK2>;
	};
};
+183 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/qualcomm-bluetooth.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Bluetooth Chips

maintainers:
  - Balakrishna Godavarthi <bgodavar@codeaurora.org>
  - Rocky Liao <rjliao@codeaurora.org>

description:
  This binding describes Qualcomm UART-attached bluetooth chips.

properties:
  compatible:
    enum:
      - qcom,qca6174-bt
      - qcom,qca9377-bt
      - qcom,wcn3990-bt
      - qcom,wcn3991-bt
      - qcom,wcn3998-bt
      - qcom,qca6390-bt
      - qcom,wcn6750-bt

  enable-gpios:
    maxItems: 1
    description: gpio specifier used to enable chip

  swctrl-gpios:
    maxItems: 1
    description: gpio specifier is used to find status
                 of clock supply to SoC

  clocks:
    maxItems: 1
    description: clock provided to the controller (SUSCLK_32KHZ)

  vddio-supply:
    description: VDD_IO supply regulator handle

  vddxo-supply:
    description: VDD_XO supply regulator handle

  vddrf-supply:
    description: VDD_RF supply regulator handle

  vddch0-supply:
    description: VDD_CH0 supply regulator handle

  vddaon-supply:
    description: VDD_AON supply regulator handle

  vddbtcxmx-supply:
    description: VDD_BT_CXMX supply regulator handle

  vddrfacmn-supply:
    description: VDD_RFA_CMN supply regulator handle

  vddrfa0p8-supply:
    description: VDD_RFA_0P8 suppply regulator handle

  vddrfa1p7-supply:
    description: VDD_RFA_1P7 supply regulator handle

  vddrfa1p2-supply:
    description: VDD_RFA_1P2 supply regulator handle

  vddrfa2p2-supply:
    description: VDD_RFA_2P2 supply regulator handle

  vddasd-supply:
    description: VDD_ASD supply regulator handle

  max-speed:
    description: see Documentation/devicetree/bindings/serial/serial.yaml

  firmware-name:
    description: specify the name of nvm firmware to load

  local-bd-address:
    description: see Documentation/devicetree/bindings/net/bluetooth.txt


required:
  - compatible

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,qca6174-bt
    then:
      required:
        - enable-gpios
        - clocks

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,wcn3990-bt
              - qcom,wcn3991-bt
              - qcom,wcn3998-bt
    then:
      required:
        - vddio-supply
        - vddxo-supply
        - vddrf-supply
        - vddch0-supply

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,wcn6750-bt
    then:
      required:
        - enable-gpios
        - swctrl-gpios
        - vddio-supply
        - vddaon-supply
        - vddbtcxmx-supply
        - vddrfacmn-supply
        - vddrfa0p8-supply
        - vddrfa1p7-supply
        - vddrfa1p2-supply
        - vddasd-supply

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    serial {

        bluetooth {
            compatible = "qcom,qca6174-bt";
            enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
            clocks = <&divclk4>;
            firmware-name = "nvm_00440302.bin";
        };
    };
  - |
    serial {

        bluetooth {
            compatible = "qcom,wcn3990-bt";
            vddio-supply = <&vreg_s4a_1p8>;
            vddxo-supply = <&vreg_l7a_1p8>;
            vddrf-supply = <&vreg_l17a_1p3>;
            vddch0-supply = <&vreg_l25a_3p3>;
            max-speed = <3200000>;
            firmware-name = "crnv21.bin";
        };
    };
  - |
    serial {

        bluetooth {
            compatible = "qcom,wcn6750-bt";
            pinctrl-names = "default";
            pinctrl-0 = <&bt_en_default>;
            enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
            swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
            vddio-supply = <&vreg_l19b_1p8>;
            vddaon-supply = <&vreg_s7b_0p9>;
            vddbtcxmx-supply = <&vreg_s7b_0p9>;
            vddrfacmn-supply = <&vreg_s7b_0p9>;
            vddrfa0p8-supply = <&vreg_s7b_0p9>;
            vddrfa1p7-supply = <&vreg_s1b_1p8>;
            vddrfa1p2-supply = <&vreg_s8b_1p2>;
            vddrfa2p2-supply = <&vreg_s1c_2p2>;
            vddasd-supply = <&vreg_l11c_2p8>;
            max-speed = <3200000>;
            firmware-name = "msnv11.bin";
        };
    };
+1 −0
Original line number Diff line number Diff line
@@ -404,6 +404,7 @@ static const struct bcm_subver_table bcm_uart_subver_table[] = {
	{ 0x4217, "BCM4329B1"   },	/* 002.002.023 */
	{ 0x6106, "BCM4359C0"	},	/* 003.001.006 */
	{ 0x4106, "BCM4335A0"	},	/* 002.001.006 */
	{ 0x410c, "BCM43430B0"	},	/* 002.001.012 */
	{ }
};

+1 −3
Original line number Diff line number Diff line
@@ -1461,9 +1461,7 @@ static void btmrvl_sdio_coredump(struct device *dev)
					BT_ERR("Allocated buffer not enough");
			}

			if (stat != RDWR_STATUS_DONE) {
				continue;
			} else {
			if (stat == RDWR_STATUS_DONE) {
				BT_INFO("%s done: size=0x%tx",
					entry->mem_name,
					dbg_ptr - entry->mem_ptr);
+2 −4
Original line number Diff line number Diff line
@@ -581,11 +581,9 @@ static int btmtkuart_open(struct hci_dev *hdev)

	/* Enable the power domain and clock the device requires */
	pm_runtime_enable(dev);
	err = pm_runtime_get_sync(dev);
	if (err < 0) {
		pm_runtime_put_noidle(dev);
	err = pm_runtime_resume_and_get(dev);
	if (err < 0)
		goto err_disable_rpm;
	}

	err = clk_prepare_enable(bdev->clk);
	if (err < 0)
Loading