diff options
Diffstat (limited to 'drivers/bluetooth/hci_bcm.c')
| -rw-r--r-- | drivers/bluetooth/hci_bcm.c | 60 | 
1 files changed, 45 insertions, 15 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 2b6c0e1922cb..83bf5d4330c4 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -55,12 +55,14 @@   * @drive_rts_on_open: drive RTS signal on ->open() when platform requires it   * @no_uart_clock_set: UART clock set command for >3Mbps mode is unavailable   * @max_autobaud_speed: max baudrate supported by device in autobaud mode + * @max_speed: max baudrate supported   */  struct bcm_device_data {  	bool	no_early_set_baudrate;  	bool	drive_rts_on_open;  	bool	no_uart_clock_set;  	u32	max_autobaud_speed; +	u32	max_speed;  };  /** @@ -888,7 +890,7 @@ unlock:  #endif  /* Some firmware reports an IRQ which does not work (wrong pin in fw table?) */ -static struct gpiod_lookup_table asus_tf103c_irq_gpios = { +static struct gpiod_lookup_table irq_on_int33fc02_pin17_gpios = {  	.dev_id = "serial0-0",  	.table = {  		GPIO_LOOKUP("INT33FC:02", 17, "host-wakeup-alt", GPIO_ACTIVE_HIGH), @@ -898,12 +900,31 @@ static struct gpiod_lookup_table asus_tf103c_irq_gpios = {  static const struct dmi_system_id bcm_broken_irq_dmi_table[] = {  	{ +		.ident = "Acer Iconia One 7 B1-750", +		.matches = { +			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), +			DMI_MATCH(DMI_PRODUCT_NAME, "VESPA2"), +		}, +		.driver_data = &irq_on_int33fc02_pin17_gpios, +	}, +	{  		.ident = "Asus TF103C",  		.matches = {  			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),  			DMI_MATCH(DMI_PRODUCT_NAME, "TF103C"),  		}, -		.driver_data = &asus_tf103c_irq_gpios, +		.driver_data = &irq_on_int33fc02_pin17_gpios, +	}, +	{ +		.ident = "Lenovo Yoga Tablet 2 830F/L / 1050F/L", +		.matches = { +			DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."), +			DMI_MATCH(DMI_PRODUCT_NAME, "VALLEYVIEW C0 PLATFORM"), +			DMI_MATCH(DMI_BOARD_NAME, "BYT-T FFD8"), +			/* Partial match on beginning of BIOS version */ +			DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"), +		}, +		.driver_data = &irq_on_int33fc02_pin17_gpios,  	},  	{  		.ident = "Meegopad T08", @@ -1300,6 +1321,12 @@ static const struct hci_uart_proto bcm_proto = {  };  #ifdef CONFIG_ACPI + +/* bcm43430a0/a1 BT does not support 48MHz UART clock, limit to 2000000 baud */ +static struct bcm_device_data bcm43430_device_data = { +	.max_speed = 2000000, +}; +  static const struct acpi_device_id bcm_acpi_match[] = {  	{ "BCM2E00" },  	{ "BCM2E01" }, @@ -1414,19 +1441,19 @@ static const struct acpi_device_id bcm_acpi_match[] = {  	{ "BCM2E71" },  	{ "BCM2E72" },  	{ "BCM2E73" }, -	{ "BCM2E74" }, -	{ "BCM2E75" }, +	{ "BCM2E74", (long)&bcm43430_device_data }, +	{ "BCM2E75", (long)&bcm43430_device_data },  	{ "BCM2E76" },  	{ "BCM2E77" },  	{ "BCM2E78" },  	{ "BCM2E79" },  	{ "BCM2E7A" }, -	{ "BCM2E7B" }, +	{ "BCM2E7B", (long)&bcm43430_device_data },  	{ "BCM2E7C" },  	{ "BCM2E7D" },  	{ "BCM2E7E" },  	{ "BCM2E7F" }, -	{ "BCM2E80" }, +	{ "BCM2E80", (long)&bcm43430_device_data },  	{ "BCM2E81" },  	{ "BCM2E82" },  	{ "BCM2E83" }, @@ -1435,7 +1462,7 @@ static const struct acpi_device_id bcm_acpi_match[] = {  	{ "BCM2E86" },  	{ "BCM2E87" },  	{ "BCM2E88" }, -	{ "BCM2E89" }, +	{ "BCM2E89", (long)&bcm43430_device_data },  	{ "BCM2E8A" },  	{ "BCM2E8B" },  	{ "BCM2E8C" }, @@ -1444,29 +1471,30 @@ static const struct acpi_device_id bcm_acpi_match[] = {  	{ "BCM2E90" },  	{ "BCM2E92" },  	{ "BCM2E93" }, -	{ "BCM2E94" }, +	{ "BCM2E94", (long)&bcm43430_device_data },  	{ "BCM2E95" },  	{ "BCM2E96" },  	{ "BCM2E97" },  	{ "BCM2E98" }, -	{ "BCM2E99" }, +	{ "BCM2E99", (long)&bcm43430_device_data },  	{ "BCM2E9A" }, -	{ "BCM2E9B" }, +	{ "BCM2E9B", (long)&bcm43430_device_data },  	{ "BCM2E9C" },  	{ "BCM2E9D" }, +	{ "BCM2E9F", (long)&bcm43430_device_data },  	{ "BCM2EA0" },  	{ "BCM2EA1" }, -	{ "BCM2EA2" }, -	{ "BCM2EA3" }, +	{ "BCM2EA2", (long)&bcm43430_device_data }, +	{ "BCM2EA3", (long)&bcm43430_device_data },  	{ "BCM2EA4" },  	{ "BCM2EA5" },  	{ "BCM2EA6" },  	{ "BCM2EA7" },  	{ "BCM2EA8" },  	{ "BCM2EA9" }, -	{ "BCM2EAA" }, -	{ "BCM2EAB" }, -	{ "BCM2EAC" }, +	{ "BCM2EAA", (long)&bcm43430_device_data }, +	{ "BCM2EAB", (long)&bcm43430_device_data }, +	{ "BCM2EAC", (long)&bcm43430_device_data },  	{ },  };  MODULE_DEVICE_TABLE(acpi, bcm_acpi_match); @@ -1535,6 +1563,8 @@ static int bcm_serdev_probe(struct serdev_device *serdev)  		bcmdev->no_early_set_baudrate = data->no_early_set_baudrate;  		bcmdev->drive_rts_on_open = data->drive_rts_on_open;  		bcmdev->no_uart_clock_set = data->no_uart_clock_set; +		if (data->max_speed && bcmdev->oper_speed > data->max_speed) +			bcmdev->oper_speed = data->max_speed;  	}  	return hci_uart_register_device(&bcmdev->serdev_hu, &bcm_proto);  |