Commit Graph

649837 Commits

Author SHA1 Message Date
Deokgyu Yang
fba033fa1a ODROID-COMMON: drivers/spi: Revert force64b flag back
To avoid unnecessary 64 bit calculation, which is for DMA, data
swapping is needed to be an option.

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: Ie186a332984246bfb83b128b5771197457f4dd21
2021-01-21 17:26:39 +09:00
Luke go
312db50237 Revert "Revert "ODROID-COMMON: drivers/spi: Set the 64 bits per word by default""
This reverts commit 4389a90ae4.

Change-Id: I7f750bd403e75bb7bf871bca01b4bcfcd0389757
2021-01-21 17:26:38 +09:00
Luke go
4389a90ae4 Revert "ODROID-COMMON: drivers/spi: Set the 64 bits per word by default"
This reverts commit 1cff1ec2e4.

Change-Id: I59f92b783a89be3d9fca5663a929b30ccfa33972
2021-01-21 11:40:51 +09:00
Chris
f5eb5e5cc2 Merge "ODROID: Add multitouch v/pid." into odroidg12-4.9.y-android 2021-01-08 09:20:18 +09:00
Chris
9ad0001a5e ODROID: Add multitouch v/pid.
/* UPERFECT HDMI capacitive Screen */
 #define USB_VENDOR_ID_UPERFECT^I^I0x27c0
 #define USB_DEVICE_ID_UPERFECT^I^I0x0818

Change-Id: I9f0d004c2d88fb02e04e9d3f1a50ae7e94190319
2021-01-06 12:07:40 +09:00
Joy Cho
1b7f42a399 ODROID-COMMON: osd: Adjust vertical osd scaler setting
Change-Id: I4d04daf48321b28a30a561ef30a87cdba2fbc7cc
2021-01-06 10:36:05 +09:00
Luke go
331955368f ODROID-N2: Support mpt partition.
Change-Id: Ic65e9a81ef8371fd42162056808224eaeecc5d23
g12_9.0.0_64_20201221
2020-12-21 11:15:30 +09:00
Luke go
c80c005ab8 ODROID-C4: arch/arm64: audio: re-aline the audio card configuration.
- card 0, device 0 (alsaPORT-spdif) - spdif
- card 0, device 1 (alsaPORT-i2s) - i2s(j4, Line-out), hdmitx
- card 0, device 2 alsaPORT-i2s1) - i2s(j7, hifi)

Change-Id: I4e9f0695766eff665c6490e23f7e6e527602252c
2020-12-11 14:29:45 +09:00
Luke go
0af41814b2 ODROID-C4: arm64/dts: audio: Remove spdifb.
- ODROID-C4 does not use the spdifb.

Change-Id: I326f46c221c6e4ab5593b52de0c47c15ee28e7d5
2020-12-09 17:38:21 +09:00
ckkim
424b298e61 ODROID-COMMON:C4 i2s/line-out error fix
Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I86efb023d46dbef769d548be81b7357a015dc0e2
2020-12-09 17:17:20 +09:00
Luke go
cd78762894 ODROID-C4: arm64/dts: audio: Add tdmb (I2S) out.
Change-Id: I56631689a261ac212bc2233188788d27bee892bc
2020-12-04 18:04:02 +09:00
Luke go
49cd68db2d ODROID-COMMON: mpt: Find boot device.
- When mount the mpt, find boot device from the 'boot_device' arguments.

Change-Id: I6d092783f4d081bd803933a8036c0fad2607d82d
2020-12-03 18:15:06 +09:00
Luke go
466ecaa193 ODROID-COMMON: Support MPT partition from block device.
- Before this patch, Only mmc device (eMMC/SD) can use MPT (Multimedia
  Partition Table). So th other devices like ssd, hdd and usb storage
  can't be main storage of the android. To solve this problem, Applied
  new partition support method - mpt partitions.

- It works subset of the msdos partition.

Change-Id: I2a192bf27e75dc040ccc3ea93a79d35c93db8543
2020-12-03 18:15:02 +09:00
Chris
973c3dff8a Merge "Bluetooth: btrtl: Fix an issue that failing to download the FW which size is over 32K bytes" into odroidg12-4.9.y-android 2020-11-09 16:19:04 +09:00
Chris
6ff28c6329 Merge "Bluetooth: btrtl: Remove trailing newline from calls to rtl_dev macros" into odroidg12-4.9.y-android 2020-11-09 16:18:56 +09:00
Chris
a3786624c3 Merge "Bluetooth: btrtl: Remove redundant prefix from calls to rtl_dev macros" into odroidg12-4.9.y-android 2020-11-09 16:18:50 +09:00
Chris
ad8a76fb68 Merge "Bluetooth: btrtl: Add firmware version print" into odroidg12-4.9.y-android 2020-11-09 16:18:42 +09:00
Chris
0447dae959 Merge "Bluetooth: btrtl: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY" into odroidg12-4.9.y-android 2020-11-09 16:18:34 +09:00
Chris
9c82a554d6 Merge "Bluetooth:: btrtl: Add support for RTL8723DU" into odroidg12-4.9.y-android 2020-11-09 16:18:20 +09:00
Chris
2a263e59db Merge "Bluetooth: btrtl: HCI reset on close for Realtek BT chip" into odroidg12-4.9.y-android 2020-11-09 16:18:09 +09:00
Chris
9676daf339 Merge "Bluetooth: btrtl: Restore old logic to assume firmware is already loaded" into odroidg12-4.9.y-android 2020-11-09 16:18:00 +09:00
Chris
d1797cb808 Merge "Bluetooth: btrtl: Add support for RTL8822C with USB interface" into odroidg12-4.9.y-android 2020-11-09 16:17:52 +09:00
Chris
bc30475f2b Merge "Bluetooth: btrtl: Make array extension_sig static, shrinks object size" into odroidg12-4.9.y-android 2020-11-09 16:17:45 +09:00
Chris
c9b7d89405 Merge "Bluetooth: btrtl: Add support for a config filename postfix" into odroidg12-4.9.y-android 2020-11-09 16:17:37 +09:00
Chris
4fcd45ebaf Merge "Bluetooth: btrtl: add support for the RTL8723BS and RTL8723DS chips" into odroidg12-4.9.y-android 2020-11-09 16:17:30 +09:00
Chris
5f6b2db435 Merge "Bluetooth: btrtl: add support for retrieving the UART settings" into odroidg12-4.9.y-android 2020-11-09 16:17:23 +09:00
Chris
9ffc94b44b Merge "Bluetooth: btrtl: Use rtl_dev_err and rtl_dev_info" into odroidg12-4.9.y-android 2020-11-09 16:17:03 +09:00
Chris
5ccd5b3715 Merge "Bluetooth: btrtl: split the device initialization into smaller parts" into odroidg12-4.9.y-android 2020-11-09 16:16:55 +09:00
Chris
5cf810c0f2 Merge "Bluetooth: btrtl: add MODULE_FIRMWARE declarations" into odroidg12-4.9.y-android 2020-11-09 16:16:48 +09:00
Chris
545c8ee16d Merge "Bluetooth: btrtl: Add RTL8723D and RTL8821C devices" into odroidg12-4.9.y-android 2020-11-09 16:16:41 +09:00
Chris
f5d2110753 Merge "Bluetooth: Use bt_dev_err and bt_dev_info when possible" into odroidg12-4.9.y-android 2020-11-09 16:16:33 +09:00
Chris
51f2f8037d Merge "Bluetooth: btrtl: Fix a error code in rtl_load_config()" into odroidg12-4.9.y-android 2020-11-09 16:16:25 +09:00
Chris
bbcbe19935 Merge "Bluetooth: btrtl: Change message for missing config file" into odroidg12-4.9.y-android 2020-11-09 16:16:17 +09:00
Max Chou
cde6144004 Bluetooth: btrtl: Fix an issue that failing to download the FW which size is over 32K bytes
Fix the issue that when the FW size is 32K+, it will fail for the download
process because of the incorrect index.

When firmware patch length is over 32K, "dl_cmd->index" may >= 0x80. It
will be thought as "data end" that download process will not complete.
However, driver should recount the index from 1.

Signed-off-by: Max Chou <max.chou@realtek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: Ic2ea247c2df828df28f535efb61ddf1c5d379367
2020-11-06 17:17:30 +09:00
Alex Lu
7b5b38f352 Bluetooth: btrtl: Remove trailing newline from calls to rtl_dev macros
These printing macros already add a trailing newline, so drop these
unnecessary additional newlines.

Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I54df8f119c1927971e4382eaa381981264b68f6a
2020-11-06 17:17:29 +09:00
Alex Lu
9559208a49 Bluetooth: btrtl: Remove redundant prefix from calls to rtl_dev macros
the rtl: or RTL: prefix in the string is pointless. The rtl_dev_* macros
already does that.

Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I4d9b975b0f914f08bf556282a3a0140b71225283
2020-11-06 17:17:28 +09:00
Alex Lu
c39dc71767 Bluetooth: btrtl: Add firmware version print
This patch is used to print fw version for debug convenience

Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I47c36597134eb6e1cea3f984951de2e76b52a267
2020-11-06 17:17:27 +09:00
Alex Lu
d4e1827a68 Bluetooth: btrtl: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY
Realtek Bluetooth controllers can do both LE scan and BR/EDR inquiry
at once, need to set HCI_QUIRK_SIMULTANEOUS_DISCOVERY quirk.

Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: If809ec66e8aebe7ba8e675606f5d6202b981f54e
2020-11-06 17:17:26 +09:00
Larry Finger
50a76ca46d Bluetooth:: btrtl: Add support for RTL8723DU
This device is functionally equivalent to the BT part of the RTL8723DE,
uses the same firmware, but the LMP subversion and HCI revision are unique.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I2c4d3cedb5216064d8edc05eb77f240256da3228
2020-11-06 17:17:25 +09:00
Jian-Hong Pan
2157072ee3 Bluetooth: btrtl: HCI reset on close for Realtek BT chip
Realtek RTL8822BE BT chip on ASUS X420FA cannot be turned on correctly
after on-off several times. Bluetooth daemon sets BT mode failed when
this issue happens. Scanning must be active while turning off for this
bug to be hit.

bluetoothd[1576]: Failed to set mode: Failed (0x03)

If BT is turned off, then turned on again, it works correctly again.

According to the vendor driver, the HCI_QUIRK_RESET_ON_CLOSE flag is set
during probing. So, this patch makes Realtek's BT reset on close to fix
this issue.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=203429
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Reviewed-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I764d6c28e43fcbc7eb1a8f3586633be7920155b8
2020-11-06 17:17:24 +09:00
Kai-Heng Feng
7125a35762 Bluetooth: btrtl: Restore old logic to assume firmware is already loaded
Realtek bluetooth may not work after reboot:
[   12.446130] Bluetooth: hci0: RTL: rtl: unknown IC info, lmp subver a99e, hci rev 826c, hci ver 0008

This is a regression introduced by commit 26503ad25d ("Bluetooth:
btrtl: split the device initialization into smaller parts"). The new
logic errors out early when no matching IC info can be found, in this
case it means the firmware is already loaded.

So let's assume the firmware is already loaded when we can't find
matching IC info, like the old logic did.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201921
Fixes: 26503ad25d ("Bluetooth: btrtl: split the device initialization into smaller parts")
Cc: stable@vger.kernel.org # 4.19+
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: Iaecc33c211041dff616fac485ef9af4e80263b38
2020-11-06 17:17:23 +09:00
Alex Lu
4469f0117c Bluetooth: btrtl: Add support for RTL8822C with USB interface
This device is included in the RTL8822CU combination wifi and BT part,
as well as the BT part of the RTL8822CE.
The necessary firmware has been submitted to the linux-firmware
project.

Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: Ic42028110646bb55c604d3e6042a43b34ccf5501
2020-11-06 17:17:22 +09:00
Colin Ian King
29a987c1cd Bluetooth: btrtl: Make array extension_sig static, shrinks object size
Don't populate the array extension_sig on the stack but instead make it
static. Makes the object code smaller by 75 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
  14325	   4920	      0	  19245	   4b2d	drivers/bluetooth/btrtl.o

After:
   text	   data	    bss	    dec	    hex	filename
  14186	   4984	      0	  19170	   4ae2	drivers/bluetooth/btrtl.o

(gcc version 8.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I4f8c2f2e1fc242110a322fe9618dce95f7280711
2020-11-06 17:17:21 +09:00
Hans de Goede
5c43fce888 Bluetooth: btrtl: Add support for a config filename postfix
The contents of the rtl_bt/rtlXXXX_config.bin file may be board specific
allow the caller of btrtl_initialize to specify a postfix identifying
the board, which if specified will make btrtl_initialize look for
rtl_bt/rtlXXXX_config-<postfix>.bin instead.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I841a33115606d66f539266ff8b3be3ab24f3c744
2020-11-06 17:17:20 +09:00
Martin Blumenstingl
bf4c262868 Bluetooth: btrtl: add support for the RTL8723BS and RTL8723DS chips
The Realtek RTL8723BS and RTL8723DS chipsets are SDIO wifi chips. They
also contain a Bluetooth module which is connected via UART to the host.

Realtek's userspace initialization tool (rtk_hciattach) differentiates
these two via the HCI version and revision returned by the
HCI_OP_READ_LOCAL_VERSION command.
Additionally we apply these checks only the for UART devices. Everything
else is assumed to be a "RTL8723B" which was originally supported by the
driver (communicating via USB).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I80200b7f62924e91a8e757418f6ccfde81877565
2020-11-06 17:17:19 +09:00
Martin Blumenstingl
e9bca80c94 Bluetooth: btrtl: add support for retrieving the UART settings
The UART settings are embedded in the config blob. This has to be parsed
to successfully initialize the Bluetooth part of the RTL8723BS (which is
an SDIO chip, but the Bluetooth part is connected via UART).

The Realtek "rtl8723bs_bt" and "rtl8723ds_bt" userspace Bluetooth UART
initialization tools (rtk_hciattach) use the following sequence:
- send H5 sync pattern (already supported by hci_h5)
- get LMP version (already supported by btrtl)
- get ROM version (already supported by btrtl)
- load the firmware and config for the current chipset (already
  supported by btrtl)
- read UART settings from the config blob (part of this patch)
- send UART settings via a vendor command to the device (which changes
  the baudrate of the device and enables or disables flow control
  depending on the config)
- change the baudrate and flow control settings on the host
- send the firmware and config blob to the device (already supported by
  btrtl)

Sending the last firmware and config blob download command
(rtl_download_cmd) fails if the UART settings are not updated
beforehand. This is presumably because the device applies the config
right after the firmware and config blob download - which means that at
this point the host is using different UART settings than the device
(which will obviously result in non-working communication).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I95b475b88aca0d4aa62a7bf482479236d803890c
2020-11-06 17:17:18 +09:00
Hans de Goede
4ab0e18488 Bluetooth: btrtl: Use rtl_dev_err and rtl_dev_info
Consistently use rtl_dev_err and rtl_dev_info everywhere for messages.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: I4a41cf52f92b11a33b60834324efcdceb74c48b2
2020-11-06 17:17:17 +09:00
Martin Blumenstingl
9dd53ee7a3 Bluetooth: btrtl: split the device initialization into smaller parts
This prepares the btrtl code so it can be used to initialize Bluetooth
modules connected via UART (these are found for example on the RTL8723BS
and RTL8723DS SDIO chips, which come with an embedded UART Bluetooth
module).

The Realtek "rtl8723bs_bt" and "rtl8723ds_bt" userspace Bluetooth UART
initialization tools (rtk_hciattach) use the following sequence:
1) send H5 sync pattern (already supported by hci_h5)
2) get LMP version (already supported by btrtl)
3) get ROM version (already supported by btrtl)
4) load the firmware and config for the current chipset (already
   supported by btrtl)
5) read UART settings from the config blob (currently not supported)
6) send UART settings via a vendor command to the device (which changes
   the baudrate of the device and enables or disables flow control
   depending on the config)
7) change the baudrate and flow control settings on the host
8) send the firmware and config blob to the device (already supported by
   btrtl)

The main reason why the initialization has to be split is step #7. This
requires changes to the underlying "bus", which should be kept outside
of the "generic" btrtl driver.
The idea for this split is borrowed from the btbcm driver but adjusted
where needed (the btrtl driver for example needs two blobs: firmware and
config, while the btbcm only needs one).

This also prepares the code for step #5 (parsing the config blob) by
centralizing the code which loads the firmware and config blobs and
storing the result in the new struct btrtl_device_info.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: Icc40dd820b448be0a4b3933777e02d09b9d38acf
2020-11-06 17:17:16 +09:00
Martin Blumenstingl
32c553803e Bluetooth: btrtl: add MODULE_FIRMWARE declarations
This makes the firmware names show up in modinfo.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: Ib331d5de3a10f21d30ee21a8b008f78fb574c5af
2020-11-06 17:17:15 +09:00
Alex Lu
96f88fe6fa Bluetooth: btrtl: Add RTL8723D and RTL8821C devices
The Bluetooth parts of RTL8723D and RTL8723B share the same lmp
subversion, thus we need to check both lmp subversion and hci revision
to distinguish the two. The same situation is true for RTL8821A and
RTL8821C. Accordingly, the selection code is revised.

To improve maintainability, a new id_table struct is defined, and an
array of such structs is constructed. Adding a new device can thus be
as simple as adding another value to the table.

Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Change-Id: Ic98eb91ac87a671d7fc3d2a611545e36c3c8cf69
2020-11-06 17:17:13 +09:00