platform/kernel/linux-rpi.git
2 years agoBluetooth: IPSP Connect/Disconnect apis
Sudha Bheemanna [Thu, 15 Sep 2016 07:23:03 +0000 (12:53 +0530)]
Bluetooth: IPSP Connect/Disconnect apis

This patch adds MGMT code to support IPSP connect and
disconnect apis and handle connection state changed event.

Change-Id: I1c41ec4f38cf9a108e443def3bc23c1b964e2985
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add support to enable/disable IPSP
Sudha Bheemanna [Thu, 15 Sep 2016 04:42:09 +0000 (10:12 +0530)]
Bluetooth: Add support to enable/disable IPSP

This patch supports MGMT commands and code to enable or disable
IPSP 6LowPan features.

Change-Id: Ia866ecfa517c7d7e4320f17d94d80dfeb9261e59
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Fix issue in the Set LE privacy function.
Sudha Bheemanna [Thu, 8 Sep 2016 10:51:01 +0000 (16:21 +0530)]
Bluetooth: Fix issue in the Set LE privacy function.

This patch fixes not to check the hdev power before setting
LE Privacy.

Change-Id: I344ea13b1d90527e3e7554ec616cdc640b85159c
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Store the key if auth type is P192
Sudha Bheemanna [Mon, 12 Sep 2016 07:16:44 +0000 (12:46 +0530)]
Bluetooth: Store the key if auth type is P192

This patch allows to store the key after authentication
if auth type is "HCI_LK_AUTH_COMBINATION_P192"

Change-Id: Ie44dbe7dfec361edab61aceaf9b2ca4057b88fa5
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Cancel the Sniff timer
Sudha Bheemanna [Thu, 8 Sep 2016 11:31:39 +0000 (17:01 +0530)]
Bluetooth: Cancel the Sniff timer

This patch adds code to cancel the sniff timer.

Change-Id: I756d3b08acf6462044d1fb204064fe12ce1238c1
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Enable sniff mode for incoming connection
Sudha Bheemanna [Thu, 8 Sep 2016 11:10:50 +0000 (16:40 +0530)]
Bluetooth: Enable sniff mode for incoming connection

Add provision to set the link poilicy to enable sniff mode
for incoming connection.

Change-Id: Ifff9e9f0838f26a6c96d81f4cbaae43429aa231f
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Modify fast connectable type.
Sudha Bheemanna [Thu, 8 Sep 2016 10:31:23 +0000 (16:01 +0530)]
Bluetooth: Modify fast connectable type.

This patch modifies the fast connectable function
to just set the type.

Change-Id: I0cce96f85d823f9798ae7f147c4e33ce7b18e0e3
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Send Authentication Request command on pairing failure
Sudha Bheemanna [Thu, 8 Sep 2016 09:41:28 +0000 (15:11 +0530)]
Bluetooth: Send Authentication Request command on pairing failure

This patch allows to send HCI_OP_AUTH_REQUESTED command
to the remote device if pairing failure happens because
of pin or key missing error.

Change-Id: I9c28394dc06b22fd5fe9e58ac0b7d728c086bde4
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Enable inquiry and page scan
Sudha Bheemanna [Thu, 8 Sep 2016 09:24:54 +0000 (14:54 +0530)]
Bluetooth: Enable inquiry and page scan

This patch enables the inquiry and page scan after ACL
disconnection with one device and if there are no other
devices connected.

Change-Id: Ifb28be7d23f237d35112b2e0739ed55169baacf7
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Change authentication requirement.
Sudha Bheemanna [Thu, 8 Sep 2016 07:34:11 +0000 (13:04 +0530)]
Bluetooth: Change authentication requirement.

This patch updates the authentication requirement to general
MITM if local and remote device IO capabilities are not
NO_INPUT_NO_OUTPUT.

Change-Id: Ie3955c3f8287418e74af20d40bdf30d0f1963e31
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Set link Supervision timeout for a connection
Sudha Bheemanna [Thu, 8 Sep 2016 06:54:43 +0000 (12:24 +0530)]
Bluetooth: Set link Supervision timeout for a connection

This patch allows to set the supervision timeout for a connection
if the device role is master.

Change-Id: I7897167ec07803f3059f2ab4d3314b0b7a951533
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Set filter policy for LE connection
Sudha Bheemanna [Thu, 8 Sep 2016 05:51:06 +0000 (11:21 +0530)]
Bluetooth: Set filter policy for LE connection

This patch sets the filter policy to a default value 0x01 during
LE auto connection if the destination address is not set. And it
updates the destination address once the LE connection complete
event is recieved during LE auto connection. And for it checks
valid destination address before cancelling LE connection when
connection timeout occurs.

Change-Id: I9877556c0b0ab4826f5f4934ead4d85b7837036d
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
[squash patches, LE connection policy, set dest address and check dest address before cancelling connection]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Get Advertising TX power
Sudha Bheemanna [Wed, 7 Sep 2016 09:52:08 +0000 (15:22 +0530)]
Bluetooth: Get Advertising TX power

This patch adds MGMT command to read the advertising TX power.

Change-Id: Ide9e5d332f034928d2eae2cbd68a025a0d42be1b
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Set the link for SCO connection
Sudha Bheemanna [Thu, 8 Sep 2016 07:07:45 +0000 (12:37 +0530)]
Bluetooth: Set the link for SCO connection

This patch sets the link policy for SCO/eSCO connection.

Change-Id: I71caef5a3887f73a10329b6886c8cf52b80e8d37
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
[add link policy setting in sco connection]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add MGMT command to set SCO settings
Sudha Bheemanna [Tue, 6 Sep 2016 11:08:36 +0000 (16:38 +0530)]
Bluetooth: Add MGMT command to set SCO settings

Added code to set sco settings.

Change-Id: I37aa572436241b06e00d1e9e75964aac747eeba5
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
[remove sco link policy part]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add multiple LE advertise state change event
Sudha Bheemanna [Thu, 8 Sep 2016 05:01:17 +0000 (10:31 +0530)]
Bluetooth: Add multiple LE advertise state change event

This patch adds code for providing multiple LE advertisement state
changed event to upper layer.

Change-Id: I58fb8044e74402376ec30b121081edce7c8709d1
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
[divide hci_vendor_mutli_adv_state_change_evt and remove hci event structure from mgmt]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add LE device found MGMT event
Sudha Bheemanna [Thu, 8 Sep 2016 04:40:03 +0000 (10:10 +0530)]
Bluetooth: Add LE device found MGMT event

This patch adds new MGMT event for LE device discovery and allows
the handling of all advertisement packets in platform.

Change-Id: I1927acb75eff0b60a5899898c6d7a000e1a108ef
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: fix vendor ext rssi link alert event
Seung-Woo Kim [Wed, 28 Sep 2016 16:59:05 +0000 (01:59 +0900)]
Bluetooth: fix vendor ext rssi link alert event

This patch fixes style for rssi link alert event from vendor
specific group ext.

Change-Id: I0e7003e417c5f5a590cce8264caccad515dd3c10
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add H/W TX timeout error MGMT event
Sudha Bheemanna [Wed, 7 Sep 2016 11:17:58 +0000 (16:47 +0530)]
Bluetooth: Add H/W TX timeout error MGMT event

This patch sends the H/W TX timeout error MGMT event if HCI command
timeout occurs after sending HCI commands.

Change-Id: I5eb593f2fe4d31c404dd94ef582790e47d03b10a
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add hardware error MGMT event
Sudha Bheemanna [Wed, 7 Sep 2016 10:12:22 +0000 (15:42 +0530)]
Bluetooth: Add hardware error MGMT event

Add code to handle hardware error MGMT event.

Change-Id: I5875ea2aeae7aba95c1f8e15b456704dc6bcdee4
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add LE vendor specific event handler
Sudha Bheemanna [Thu, 8 Sep 2016 05:26:15 +0000 (10:56 +0530)]
Bluetooth: Add LE vendor specific event handler

This patch adds the vendor specific LE meta event handler.
It handles the vendor specific handles like,
LE_MULTI_ADV_STATE_CHANGE_SUB_EVENT, LE_RSSI_LINK_ALERT.

Change-Id: I1f344a31e36f9c7442fe0bd8b598e67d9f5fb9bf
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
[divide hci vendor speicif group event function]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add set LE scan parameter feature
Sudha Bheemanna [Thu, 25 Aug 2016 07:16:07 +0000 (12:46 +0530)]
Bluetooth: Add set LE scan parameter feature

Added new MGMT command to set LE scan parameters

Change-Id: I5ea660f97e93dfcc72273971ad0250e7f582f718
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Set Manufacturer data feature
Sudha Bheemanna [Thu, 25 Aug 2016 06:43:09 +0000 (12:13 +0530)]
Bluetooth: Set Manufacturer data feature

Added new MGMT command to set the manufacturer data
in the BR/EDR packet.

Change-Id: Ie08062f4cad0c676deab94fd95fdc1a8c5602135
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add LE connection parameter update procedure
Sudha Bheemanna [Thu, 25 Aug 2016 06:28:22 +0000 (11:58 +0530)]
Bluetooth: Add LE connection parameter update procedure

Added new MGMT command to update LE connection parameters

Change-Id: I6ae16513437cd42d40e75958aa8415baa1cbedbb
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add stop LE auto connection feature
Sudha Bheemanna [Thu, 25 Aug 2016 06:11:34 +0000 (11:41 +0530)]
Bluetooth: Add stop LE auto connection feature

Added new MGMT command to disable LE auto connection.

Change-Id: I1f5f61b83227501ad54019008b405fd47fd722a3
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add BT LE discovery feature
Sudha Bheemanna [Thu, 25 Aug 2016 05:53:02 +0000 (11:23 +0530)]
Bluetooth: Add BT LE discovery feature

This patch adds new MGMT commands to start LE discovery separately
and handles LE discovery state.

Change-Id: I85958b8c2b5c7e28f57c69e86037ab1e61a75db0
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Update device name on remote_name_event
Sudha Bheemanna [Thu, 25 Aug 2016 04:47:19 +0000 (10:17 +0530)]
Bluetooth: Update device name on remote_name_event

This patch updates the device name on receiving the HCI event
remote_name_event during connection establishment.

Change-Id: I9a217e6760b1803a70af201a3f6903e722079749
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add RSSI Monitor feature
Sudha Bheemanna [Wed, 24 Aug 2016 11:51:15 +0000 (17:21 +0530)]
Bluetooth: Add RSSI Monitor feature

Added feature support for monitoring the RSSI value.
Commands and events for enabling, disabling and setting
rssi threshold values are added.

Change-Id: I850643a9228afc017e54217a11826b9c6a68a96b
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Functions to modify WhiteList
Sudha Bheemanna [Wed, 24 Aug 2016 09:32:56 +0000 (15:02 +0530)]
Bluetooth: Functions to modify WhiteList

This patch provides MGMT commands to manage the white
list which includes, adding, removing and clearing the
devices from white list.

Change-Id: If71107129d3a090ae81448a8122b76accd4f5522
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add Advertising Packet Configuration
Sudha Bheemanna [Wed, 24 Aug 2016 06:47:16 +0000 (12:17 +0530)]
Bluetooth: Add Advertising Packet Configuration

This patch provides new MGMT commands to configure
the advertising data and scan response data packets for
LE peripheral devices.

Change-Id: I914d13795f4fb58e5f2e1cadb55086f4bcbc82df
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
[jhoon20.kim: adjust some codes to apply it in 5.4 kernel]
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
2 years agoBluetooth: Add MGMT tizen_handlers and TIZEN_OP_BASE_CODE.
h.sandeep [Thu, 1 Sep 2016 06:30:57 +0000 (12:00 +0530)]
Bluetooth: Add MGMT tizen_handlers and TIZEN_OP_BASE_CODE.

Added the basic skeleton code for tizen_mgmt_handlers and
mgmt_tizen.h header file.

Change-Id: I8f3100aa79e6673840ba561f0a9c50238ca0880b
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoBluetooth: Add "TIZEN_BT" flag
Sudha Bheemanna [Tue, 23 Aug 2016 11:37:10 +0000 (17:07 +0530)]
Bluetooth: Add "TIZEN_BT" flag

Added the tizen specific flag for use in adding tizen patches.

Change-Id: Ia391644fddbe600c8d845e0bf0808f587aa73e0c
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
2 years agoASoC: ac108: Fixes kernel bug message when starting to capture
Jaechul Lee [Thu, 9 May 2019 00:26:53 +0000 (09:26 +0900)]
ASoC: ac108: Fixes kernel bug message when starting to capture

The code in the trigger function is moved to prepare function that is
called right before trigger function. clock operation would be ran by
parepare function without disabling preemption.

BUG: scheduling while atomic: arecord/1244/0x00000004
Preemption disabled at:
[<ffffff80087c4a08>] snd_pcm_stream_lock+0x30/0x68

Call trace:
[<ffffff800808b250>] dump_backtrace+0x0/0x270
[<ffffff800808b4e4>] show_stack+0x24/0x30
[<ffffff8008ae87c4>] dump_stack+0xac/0xe8
[<ffffff80080cc814>] __schedule_bug+0x7c/0xd8
[<ffffff8008afb558>] __schedule+0x718/0x880
[<ffffff8008afb6fc>] schedule+0x3c/0xa0
[<ffffff8008aff028>] schedule_timeout+0x190/0x408
[<ffffff8008afc4b8>] wait_for_common+0xa8/0x150
[<ffffff8008afc5c4>] wait_for_completion_timeout+0x2c/0x38
[<ffffff80086e5a0c>] bcm2835_i2c_xfer+0x16c/0x400
[<ffffff80086deedc>] __i2c_transfer+0x12c/0x570
[<ffffff80086df38c>] i2c_transfer+0x6c/0xc0
[<ffffff80086df430>] i2c_master_send+0x50/0x68
[<ffffff8008584454>] regmap_i2c_write+0x34/0x70
[<ffffff800857fe34>] _regmap_raw_write+0x7cc/0x7e0
[<ffffff800857feb8>] _regmap_bus_raw_write+0x70/0x88
[<ffffff800857ea48>] _regmap_write+0x70/0x160
[<ffffff800857ec10>] _regmap_update_bits+0xd8/0xf8
[<ffffff80085800b0>] regmap_update_bits_base+0x68/0x98
[<ffffff8008805838>] ac10x_update_bits+0x48/0x88
[<ffffff8008805c00>] ac108_trigger+0x118/0x130

Change-Id: I73ef21247e1dfbd0acd3272b6a73311377eb000d
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
2 years agomisc: tizen-inform-reboot: Use ksys_open() and ksys_close() wrappers
Junghoon Kim [Mon, 29 Apr 2019 22:43:58 +0000 (07:43 +0900)]
misc: tizen-inform-reboot: Use ksys_open() and ksys_close() wrappers

Using ksys_open() and ksys_close() wrappers allow us to avoid the
in-kernel calls to the sys_open() and sys_close() syscalls.

Change-Id: Iea33654daef917f88cede31675c66e8b5becad77
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
2 years agoASoC: ac108: Adds default 4channels mic volume
Jaechul Lee [Thu, 18 Apr 2019 06:02:37 +0000 (15:02 +0900)]
ASoC: ac108: Adds default 4channels mic volume

It needs to be set default volume to max value.

Change-Id: Icdcf255e3a57bb5dffb225116723a3d9a4cf11fe
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
2 years agoARM64: dts: bcm2710-rpi-3-b: Adds respeaker 4mic nodes
Jaechul Lee [Tue, 2 Apr 2019 01:30:46 +0000 (10:30 +0900)]
ARM64: dts: bcm2710-rpi-3-b: Adds respeaker 4mic nodes

adds respeaker 4mic nodes.

Change-Id: I8145a93dfebe716be61cb4cad30b7174a1e4bea1
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
 Conflicts:
arch/arm/boot/dts/bcm2710-rpi-3-b.dts

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agoASoC: ac108: Adds ac108 codec and machine code
Jaechul Lee [Mon, 1 Apr 2019 02:08:55 +0000 (11:08 +0900)]
ASoC: ac108: Adds ac108 codec and machine code

adds respeaker machine code and ac101/ac108 codec code.

ReSpeaker driver
https://github.com/respeaker/seeed-voicecard

Change-Id: Idc034aafd39157ccfe19b2dae6c80ba6afd8e60c
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
2 years agodrm/vc4: Fix with pm_runtime synchronization on DSI
Hoegeun Kwon [Fri, 22 Mar 2019 07:00:27 +0000 (16:00 +0900)]
drm/vc4: Fix with pm_runtime synchronization on DSI

There is a problem when often dpms goes from off to on. pm idle is not
in sync and the problem occurs. Modify pm_runtime_put from
asynchronous to synchronous.

Change-Id: I7b39e01d452623190d9ead28477e4b0e6122d71b
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agoLOCAL / mm, page_alloc: Add print page allocation failure reason
Hoegeun Kwon [Thu, 7 Mar 2019 02:18:21 +0000 (11:18 +0900)]
LOCAL / mm, page_alloc: Add print page allocation failure reason

There is an unclear problem when page alloc failed. So clearly print
the cause of the failure.

Change-Id: Ie59e1d4e34deabb8733268edfb433754f43766a8
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agosound: bcm: allo: Fix duplicate-decl-specifier build warnings
Seung-Woo Kim [Thu, 7 Mar 2019 02:02:10 +0000 (11:02 +0900)]
sound: bcm: allo: Fix duplicate-decl-specifier build warnings

SOC_ENUM_### macros has const specifier, but there are declaration
with const again. Fix the duplicate-decl-specifier build warnings.

Change-Id: If2fe42936cb4766d73067433dd6d1029dfe4ff61
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agomisc: bcm2835_smi: use proper enum in dma_map_single
Seung-Woo Kim [Wed, 6 Mar 2019 08:53:48 +0000 (17:53 +0900)]
misc: bcm2835_smi: use proper enum in dma_map_single

With llvm/clang, there are implicit conversion build warnings.
Use proper enum in dma_map_single/dma_unmap_single.

Change-Id: Id241d8f2d5fec16946bb34184af7b6053b6f9ca6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agodrm/vc4: Fix reduce interrupt timeout 'workaround'
Hoegeun Kwon [Thu, 14 Feb 2019 02:22:19 +0000 (11:22 +0900)]
drm/vc4: Fix reduce interrupt timeout 'workaround'

Since flag 'ignore_lcd=0' is set in config.txt, dsi interrupt is
disabled so that interrupt does not occur even when dsi_write is
operated. The waiting time causes a boot delay. So it reduces the
timeout to 100msecs until it is resolved. As a result, the boot delay
has been reduced from 22,000 to 2,200 msecs.

Change-Id: I2c27397102f38128ffd3599405d57198fd0f16f6
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agodrm/panel: Add error handling for write of dsi
Hoegeun Kwon [Mon, 18 Feb 2019 05:40:49 +0000 (14:40 +0900)]
drm/panel: Add error handling for write of dsi

There is a problem that dsi write timeout even when dsi interrupt is
activated by adding 'ignore_lcd=1' flag to config.txt. Add error
handling to write once more when timeout occurs.

Change-Id: If1deb9753a02a3082e7a1ba59ee20531828447d9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agoARM: dts: bcm283x: Fix the priority of pixelvalve0 to the lowest value
Hoegeun Kwon [Wed, 5 Dec 2018 10:23:05 +0000 (19:23 +0900)]
ARM: dts: bcm283x: Fix the priority of pixelvalve0 to the lowest value

There is a problem that the vblank test can not be verified when the
hdmi display is connected. Because the vblank test can only test crtc
top index 0, 1.

The Tizen mainly uses dsi and hdmi, so lower the priority of pixelvalve0
used with dpi.

Change-Id: Id2b3024f5960d3526e7a815e47f6d802a13d38d3
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agoARM: dts: bcm2710-rpi-3-b-plus: Add DT support for DRM relevant devices
Hoegeun Kwon [Fri, 19 Oct 2018 06:23:42 +0000 (15:23 +0900)]
ARM: dts: bcm2710-rpi-3-b-plus: Add DT support for DRM relevant devices

Add dts to support the official RPI touchscreen LCD.

Change-Id: I05eff2d5548f84d1e3df62a080bfd2694bbc59ae
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agoARM: dts: bcm2710-rpi-3-b-plus: Enable dt nodes for audio, i2c1, spi0
Seung-Woo Kim [Fri, 19 Oct 2018 01:46:53 +0000 (10:46 +0900)]
ARM: dts: bcm2710-rpi-3-b-plus: Enable dt nodes for audio, i2c1, spi0

In Tizen dt-overlay is not used, so some device nodes should be
enabled to use. Enable dt nodes for audio, i2c1 and spi0 like
rpi3 b model.

Change-Id: I07504d1ece3c0aeb797ddfc372c956226d316814
Reference: 7fbb122e5232 ("ARM: dts: bcm2710-rpi-3-b: enable spi0 device node")
Reference: 34a29d8d477a ("ARM64: dts: bcm2710-rpi-3-b: enable i2c1")
Reference: 2ad26af6908c ("ARM: dts: bcm2710-rpi-3-b : Change audio node status as "okay"")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agoARM: dts: bcm2710-rpi-3-b-plus: Add reserved memory for secure os
Seung-Woo Kim [Fri, 19 Oct 2018 01:44:27 +0000 (10:44 +0900)]
ARM: dts: bcm2710-rpi-3-b-plus: Add reserved memory for secure os

Add reserved memory for secure os for 64bit like rpi3 b model.

Change-Id: I7c51b689734b3ba80f4efdf96def776581d05ad1
Reference: f86c6d68c5fb ("ARM64: dts: bcm2710-rpi-3-b : add memory reserve")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agoARM: dts: Add support for drm vc4 on RPI3 b plus
Hoegeun Kwon [Thu, 18 Oct 2018 07:49:04 +0000 (16:49 +0900)]
ARM: dts: Add support for drm vc4 on RPI3 b plus

Fixed the DT status to operate drm vc4.

Change-Id: I0ae3472e3336e0d6dfc107b936490a6af6eb23d6
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agonet: rtl8192cu: change config name as vendor driver
Jaehoon Chung [Tue, 18 Sep 2018 09:43:43 +0000 (18:43 +0900)]
net: rtl8192cu: change config name as vendor driver

There is already rtl8192cu mainline driver.
To distinguish with vendor driver, changed config name to
RTL8192CU_VENDOR.

Change-Id: I2663bc12f787cc4f417a13c9b4de42b4b63a8efb
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agostaging: bcm2835-camera: fix overflow warnings
Seung-Woo Kim [Mon, 20 Aug 2018 04:07:05 +0000 (13:07 +0900)]
staging: bcm2835-camera: fix overflow warnings

Fix overflow in implicit constant conversion warnings.

Change-Id: I3e419cb927241c9400147b36a2e36f2173c96025
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agomisc: tizen-inform-reboot: Add support for download mode
Dongwoo Lee [Thu, 5 Apr 2018 01:57:43 +0000 (10:57 +0900)]
misc: tizen-inform-reboot: Add support for download mode

To pass download mode information to bootloader, this patch adds
the new parameter 'download' to reboot command.

Change-Id: I4673a0badf42429987f91edd960b871410bfb794
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
2 years agoARM: dts: bcm2809-rpi-2-b: enable display, touch, audio, spi and i2c
Seung-Woo Kim [Wed, 17 Jan 2018 09:35:52 +0000 (18:35 +0900)]
ARM: dts: bcm2809-rpi-2-b: enable display, touch, audio, spi and i2c

On RPI dt, several devices are enabled with overlay dt. Enable dsi,
hdmi, touchscreen, audio, spi and i2c devices without overlay from
rpi2 dt for Tizen kernel like rpi3.

Change-Id: I3e6f5dcd000a6c01d9a0c740a87ef28a41f3eb22
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agousb: dwc_otg: remove wrong memory accesses found by kasan
Seung-Woo Kim [Wed, 17 Jan 2018 01:29:01 +0000 (10:29 +0900)]
usb: dwc_otg: remove wrong memory accesses found by kasan

dwc_otg_hcd_is_bandwidth_allocated() requres ep_hcpriv pointer,
but passed parameter is double pointer and it cuases bad memory
access. Remove the wrong memory accesses.

Change-Id: I8292613f16fbf91ed9736b2a97e4afdb3bbbccec
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agoARM64: dts: bcm2710-rpi-3-b : add memory reserve
egukim [Tue, 4 Jul 2017 04:53:36 +0000 (13:53 +0900)]
ARM64: dts: bcm2710-rpi-3-b : add memory reserve

add memory reserve for rpi3(64bit) secure OS

Change-Id: I346a2d7c1afc0441ab4655592f3d81836a106f94
Signed-off-by: eunggu kim <egukim@dignsys.com>
2 years agoARM64: dts: bcm2710: add psci device node
egukim [Mon, 3 Jul 2017 05:06:47 +0000 (14:06 +0900)]
ARM64: dts: bcm2710: add psci device node

This patch changes the enable-method from 'spin-table' to
'PSCI (Power State Coordination Interface)' in order to control
the cpu state such as cpu up/down.

Change-Id: I92eaa95cbccbd86f6067bc9977acc45813703cad
Signed-off-by: eunggu kim <egukim@dignsys.com>
2 years agoARM64: dts: rpi3: Add optee node
egukim [Mon, 3 Jul 2017 04:55:37 +0000 (13:55 +0900)]
ARM64: dts: rpi3: Add optee node

Add device node for optee kernel driver. This based on
https://github.com/linaro-swg/linux/commit/a3d16523b5c3bd3c21e2009f2af0901b0d6d09dd

Change-Id: I9cc6d97354897b4656b02744076efd91889d7630
Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
[egukim: modified commit from linaro-swg/linux of github]
Signed-off-by: Eunggu kim <egukim@dignsys.com>
2 years agomisc: tizen-inform-reboot: resolve sync failure about reboot parameter
Junghoon Kim [Tue, 17 Oct 2017 05:43:04 +0000 (14:43 +0900)]
misc: tizen-inform-reboot: resolve sync failure about reboot parameter

Currently, writing reboot paramter into INFORM partition fails
infrequently.

Resolve this issue by calling sync_filesystem function so that it writes
out and waits upon all dirty data associated with this superblock.

Change-Id: Ic62df0c3c4e565ca7211eb85661ead6979f0ad8d
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
2 years agomisc: make sure Tizen notifier is executed before reset
Łukasz Stelmach [Fri, 29 Sep 2017 13:24:05 +0000 (15:24 +0200)]
misc: make sure Tizen notifier is executed before reset

In case of RaspberryPi the CPU is reset by watchdog triggered from
the bcm2835_restart_notifier_call function. Tizen notifier needs higher
priority to be called before the watchdog.

Change-Id: Ia7f6d895f6f40d1a9b4e57ad41b5bdb55c94f4f2
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2 years agomisc: add Tizen reboot notifier for passing reboot parameter
Junghoon Kim [Mon, 21 Aug 2017 02:04:32 +0000 (11:04 +0900)]
misc: add Tizen reboot notifier for passing reboot parameter

To determine booting mode (e.g, fota or recovery) in u-boot side, reboot
parameter should be passed through inform partition.

Add Tizen reboot notifier for passing reboot parameter.

Change-Id: I5830dcf58ec6905b0bc382599aa9ff1251f817d8
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
2 years agodrm/vc4: Workaround for crtc scanout device problem
Hoegeun Kwon [Thu, 7 Sep 2017 07:24:56 +0000 (16:24 +0900)]
drm/vc4: Workaround for crtc scanout device problem

Currently, the crtc device does not start a scanout, the time of
vblank is always calculated as future value. As a workaround, always
change vpos to a positive number.

Change-Id: I02527a0cfbd03d7713fa992d8ee039ffc8e0c5de
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agoARM64: dts: bcm2710-rpi-3-b: add DT support for DRM relevant devices
KwangCheol Lee [Mon, 7 Aug 2017 07:33:36 +0000 (16:33 +0900)]
ARM64: dts: bcm2710-rpi-3-b: add DT support for DRM relevant devices

Add DTs to support the official RPI touchscreen LCD.

Change-Id: Ibf3b17bfe5d1f0bbe55f941018a489899e8ea9ef
Signed-off-by: KwangCheol Lee <kclee@dignsys.com>
2 years agoBCM270X: Enable the DSI panel node in the VC4 overlay.
Eric Anholt [Thu, 2 Jun 2016 22:09:35 +0000 (15:09 -0700)]
BCM270X: Enable the DSI panel node in the VC4 overlay.

Change-Id: I46fdcdb53b79bd4f0db5022a415f6d1b9faf28e9
Signed-off-by: Eric Anholt <eric@anholt.net>
2 years agoARM: dts: bcm2710-rpi-3-b: enable spi0 device node
Inki Dae [Tue, 5 Sep 2017 03:09:36 +0000 (12:09 +0900)]
ARM: dts: bcm2710-rpi-3-b: enable spi0 device node

Enable spi0 device node.

This patch is required to create spidev node which is used
by user space to control spi.

Change-Id: I8dec8288f6b35f628b178e0056d664b96f18ac4b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoARM: dts: bcm2710-rpi-3-b : Change audio node status as "okay"
Lee Hackseung [Thu, 10 Aug 2017 06:48:39 +0000 (15:48 +0900)]
ARM: dts: bcm2710-rpi-3-b : Change audio node status as "okay"

Start.elf uses dt overlay concept, so each node status can be
overlayed with dtparam=audio=on in config.txt but u-boot does not.
So, change status of on-board audio dt node as "okay" because dt
overlay concept on u-boot requires too huge effort.

Fixing dts file from arm will also change arm64 because arm64 dts
includes arm dts.

Change-Id: I73b3c807968c031ba046f44e937c6828ee7f0119
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
[jcsing.lee@samsung.com: modify commit message more clearly]
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
2 years agoARM64: dts: bcm2710-rpi-3-b: enable i2c1
Andi Shyti [Fri, 31 Mar 2017 06:20:27 +0000 (15:20 +0900)]
ARM64: dts: bcm2710-rpi-3-b: enable i2c1

i2c bus number 1 is mapped in the Raspberry Pi gpio array for
connecting through i2c external devices.

Change-Id: Ia8f72952f4aed1d737ab75c239ead25bb97d2e3c
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
2 years agoarm: dts: Add support for drm vc4 on RPI3
Hoegeun Kwon [Thu, 19 Jan 2017 04:49:54 +0000 (13:49 +0900)]
arm: dts: Add support for drm vc4 on RPI3

Fixed the DT status to operate drm vc4.

Change-Id: I06aa84303e1a7c10647ace3799ec09d08ca045eb
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2 years agonet: phy: lan87xx: Decrease phy polling rate
Phil Elwell [Thu, 3 Feb 2022 15:51:41 +0000 (15:51 +0000)]
net: phy: lan87xx: Decrease phy polling rate

Polling at 100Hz for 1.5s consumes quite a bit of kworker time with no
obvious benefit. Reduce that polling rate to ~6Hz.

To further save CPU and power, defer the next poll if no energy is
detected.

See: https://github.com/raspberrypi/linux/issues/4780

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2 years agodtoverlays: Correct field sizes in pcie-32bit-dma
Dave Stevenson [Thu, 3 Feb 2022 12:16:45 +0000 (12:16 +0000)]
dtoverlays: Correct field sizes in pcie-32bit-dma

Adding the dma-ranges to the overlay missed setting the field sizes,
so the compiler rightly flagged a warning.

https://github.com/raspberrypi/linux/issues/4848

Fixes: ee6a81c85402 "dtoverlay: Reduce size of PCIE IB window in pcie-32-dma overlay"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agoARM: dts: Permanently disable hdmi1 and ddc1 on CM4S
Phil Elwell [Wed, 2 Feb 2022 17:47:54 +0000 (17:47 +0000)]
ARM: dts: Permanently disable hdmi1 and ddc1 on CM4S

CM4S has no HDMI1 output, so it is advisable to disable the controller
and its I2C interface in software. This is ordinarily done by setting
their status properties to "disabled", but the vc4-kms-v3d(-pi4)
overlay enables both HDMIs and DDCs as part of the transfer of control
from the VPU.

Knobble the CM4S dts in such a way that the overlay applies
successfully but the hdmi1 and ddc1 nodes remain disabled by changing
the compatible string to something unrecognised.

See: https://github.com/raspberrypi/linux/issues/4857

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2 years agodtoverlay: Reduce size of PCIE IB window in pcie-32-dma overlay
Dave Stevenson [Thu, 3 Feb 2022 11:17:16 +0000 (11:17 +0000)]
dtoverlay: Reduce size of PCIE IB window in pcie-32-dma overlay

The PCIE inbound window is rounded up to a power of 2, so the default
of 3GB rounds up to 4GB starting at 0. This prohibits the MSI vector
sitting at 0x0_fffffffc, and causes warnings from some subsystems
(eg ahci) of a 64bit address on a 32bit configuration.

Reduce the window down to 2GB to avoid this issue.

https://github.com/raspberrypi/linux/issues/4848

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agooverlays: Add Geekworm mzp280 to vc4-kms-dpi-panel
Chris Morgan [Wed, 2 Feb 2022 16:43:32 +0000 (10:43 -0600)]
overlays: Add Geekworm mzp280 to vc4-kms-dpi-panel

Add support for the Geekworm mzp280 DPI panel to the generic
vc4-kms-dpi-panel overlay.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
2 years agooverlays: Add rotate property to vc4-kms-dpi-panel
Chris Morgan [Wed, 2 Feb 2022 16:42:00 +0000 (10:42 -0600)]
overlays: Add rotate property to vc4-kms-dpi-panel

Allow a user to specify the panel rotation in devicetree as 0, 90,
180, or 270 by setting a parameter.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
2 years agokeep disabled node hdmi1 in devicetree
Nicolai Buchwitz [Wed, 2 Feb 2022 15:18:52 +0000 (16:18 +0100)]
keep disabled node hdmi1 in devicetree

The second hdmi port on cm4s is disabled by default (default from
bcm2711-rpi.dtsi) and therefore it is not necessary to remove it in the
specific cm4s overlay (as done in 64328ab674dc3e3f0356d066916546f6b2876257)

2 years agoBluetooth: btusb: Add support for TP-Link UB500 Adapter
Nicholas Flintham [Thu, 30 Sep 2021 08:22:39 +0000 (09:22 +0100)]
Bluetooth: btusb: Add support for TP-Link UB500 Adapter

commit 4fd6d490796171bf786090fee782e252186632e4 upstream.

Add support for TP-Link UB500 Adapter (RTL8761B)

* /sys/kernel/debug/usb/devices
T:  Bus=01 Lev=02 Prnt=05 Port=01 Cnt=01 Dev#= 78 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2357 ProdID=0604 Rev= 2.00
S:  Manufacturer=
S:  Product=TP-Link UB500 Adapter
S:  SerialNumber=E848B8C82000
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms

Signed-off-by: Nicholas Flintham <nick@flinny.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2 years agoBluetooth: btusb: Add 0x0b05:0x190e Realtek 8761BU (ASUS BT500) device.
Joakim Tjernlund [Fri, 28 May 2021 15:26:45 +0000 (17:26 +0200)]
Bluetooth: btusb: Add 0x0b05:0x190e Realtek 8761BU (ASUS BT500) device.

commit 33404381c5e875cbd57eec6d9bbacd3b13b404c9 upstream.

T:  Bus=01 Lev=01 Prnt=01 Port=08 Cnt=04 Dev#= 18 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0b05 ProdID=190e Rev= 2.00
S:  Manufacturer=Realtek
S:  Product=ASUS USB-BT500
S:  SerialNumber=xxxxxxxx
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2 years agodrm/panel: simple: Remove custom handling of orientation
Dave Stevenson [Tue, 1 Feb 2022 12:24:51 +0000 (12:24 +0000)]
drm/panel: simple: Remove custom handling of orientation

Panel orientation is now handled by the drm_panel and
panel_bridge frameworks, so remove the custom handling.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agodrm/panel: Add and initialise an orientation field to drm_panel
Dave Stevenson [Tue, 1 Feb 2022 12:20:20 +0000 (12:20 +0000)]
drm/panel: Add and initialise an orientation field to drm_panel

Current usage of drm_connector_set_panel_orientation is from a panel's
get_modes call. However if the panel orientation property doesn't
exist on the connector at this point, then drm_mode_object triggers
WARNs as the connector is already registered.

Add an orientation variable to struct drm_panel and initialise it from
drm_panel_init.
panel_bridge_attach can then create the property before the connector
is registered.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agooverlays: README: Deprecate vc4-kms-kippah-7inch
Phil Elwell [Wed, 2 Feb 2022 09:11:20 +0000 (09:11 +0000)]
overlays: README: Deprecate vc4-kms-kippah-7inch

The vc4-kms-kippah-7inch overlay has been replaced by the container
overlay vc4-kms-dpi-panel, using the "kippah-7inch" parameter. The
original overlay has been retained for now to avoid breaking
existing installations, but that doesn't make it any less deprecated,
so update the README accordingly.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2 years agodrm/panel: simple: add Geekworm MZP280 Panel
Chris Morgan [Fri, 28 Jan 2022 23:42:12 +0000 (17:42 -0600)]
drm/panel: simple: add Geekworm MZP280 Panel

Add support for the Geekworm MZP280 Panel

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Maxime Ripard <maxime@cerno.tech>
2 years agodt-bindings: display: simple: add Geekworm MZP280 Panel
Chris Morgan [Fri, 28 Jan 2022 23:41:18 +0000 (17:41 -0600)]
dt-bindings: display: simple: add Geekworm MZP280 Panel

The Geekworm MZP280 panel is a 480x640 (portrait) panel with a
capacitive touch interface and a 40 pin header meant to interface
directly with the Raspberry Pi. The screen is 2.8 inches diagonally,
and there appear to be at least 4 distinct versions all with the same
panel timings.

Timings were derived from drivers posted on the github located here:
https://github.com/tianyoujian/MZDPI/tree/master/vga

Additional details about this panel family can be found here:
https://wiki.geekworm.com/2.8_inch_Touch_Screen_for_Pi_zero

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
2 years agodt-bindings: vendor-prefixes: Add Geekworm
Chris Morgan [Fri, 28 Jan 2022 23:40:50 +0000 (17:40 -0600)]
dt-bindings: vendor-prefixes: Add Geekworm

Add vendor prefix for Geekworm (https://geekworm.com).

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
2 years agodrm/vc4: dpi: Support DPI interface in mode3 for RGB565
Chris Morgan [Fri, 28 Jan 2022 23:39:54 +0000 (17:39 -0600)]
drm/vc4: dpi: Support DPI interface in mode3 for RGB565

Add support for the VC4 DPI driver to utilize DPI mode 3. This is
defined here as xxxRRRRRxxGGGGGGxxxBBBBB:
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#parallel-display-interface-dpi

This mode is required to use the Geekworm MZP280 DPI display.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agomedia: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
Chris Morgan [Fri, 28 Jan 2022 23:38:40 +0000 (17:38 -0600)]
media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI

Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm
MZP280 panel for the Raspberry Pi.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
2 years agomedia: uapi: Document format MEDIA_BUS_FMT_RGB565_1X24_CPADHI
Chris Morgan [Fri, 28 Jan 2022 23:37:43 +0000 (17:37 -0600)]
media: uapi: Document format MEDIA_BUS_FMT_RGB565_1X24_CPADHI

Add support for MEDIA_BUS_FMT_RGB565_1X24_CPADHI. This format is used
by the Geekworm MZP280 panel which interfaces with the Raspberry Pi.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
2 years agoMerge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y
Dom Cobley [Tue, 1 Feb 2022 13:12:49 +0000 (13:12 +0000)]
Merge remote-tracking branch 'stable/linux-5.10.y' into rpi-5.10.y

2 years agodtoverlays: Rework vc4-kms-dpi overlays to remove duplication
Dave Stevenson [Mon, 31 Jan 2022 17:25:19 +0000 (17:25 +0000)]
dtoverlays: Rework vc4-kms-dpi overlays to remove duplication

Removes all the common panel, dpi, and backlight configuration
from the individual vc4-kms-dpi-* files into vc4-kms-dpi.dtsi.

Creates a new vc4-kms-dpi-panel-overlay.dts for preconfigured
panels, with overrides to enable the different panel configurations.

Deprecates vc4-kms-dpi-at056tn53v1 as superceded by vc4-kms-dpi-panel.
vc4-kms-kippah-7inch not deprecated for now as it is likely to be
in wider use than at056tn53v1.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agodtoverlays: Correct [h|v]sync_invert config in vc4-kms-dpi-generic
Dave Stevenson [Fri, 21 Jan 2022 15:12:25 +0000 (15:12 +0000)]
dtoverlays: Correct [h|v]sync_invert config in vc4-kms-dpi-generic

Both the base node and override set these parameters to 0,
so it made no difference. The base node should have been 1.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agodtoverlays: Add pwm backlight option to vc4-kms-dpi-generic
Dave Stevenson [Fri, 21 Jan 2022 14:22:01 +0000 (14:22 +0000)]
dtoverlays: Add pwm backlight option to vc4-kms-dpi-generic

Adds the option of a PWM controlled backlight on a generic
DPI display.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agooverlays: Add spi0-0cs overlay
Phil Elwell [Mon, 31 Jan 2022 21:01:25 +0000 (21:01 +0000)]
overlays: Add spi0-0cs overlay

An overlay to enable SPI0 without claiming any chip select GPIOs.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2 years agodrm/vc4: Add DRM 210101010 RGB formats for hvs5.
Dave Stevenson [Mon, 31 Jan 2022 16:28:43 +0000 (16:28 +0000)]
drm/vc4: Add DRM 210101010 RGB formats for hvs5.

HVS5 supports the 210101010 RGB[A|X] formats, but they were
missing from the DRM to HVS mapping list, so weren't available.
Add them in.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 years agoPatching lan78xx for SOF_TIMESTAMPING_TX_SOFTWARE support
tiagofreire-pt [Sat, 29 Jan 2022 10:01:36 +0000 (10:01 +0000)]
Patching lan78xx for SOF_TIMESTAMPING_TX_SOFTWARE support

2 years agoi2c: bcm2835: Make clock-stretch timeout configurable
Alex Crawford [Fri, 28 Jan 2022 21:36:51 +0000 (13:36 -0800)]
i2c: bcm2835: Make clock-stretch timeout configurable

The default clock-stretch timeout is 35 mS, which works well for
SMBus, but there are some I2C devices which can stretch the clock even
longer. Rather than trying to prescribe a safe default for everyone,
allow the timeout to be configured.

Signed-off-by: Alex Crawford <raspberrypi/linux@code.acrawford.com>
2 years agooverlays: Add MAX30102 HR to i2c-sensor overlay
coldspark29 [Wed, 18 Aug 2021 11:41:04 +0000 (13:41 +0200)]
overlays: Add MAX30102 HR to i2c-sensor overlay

Add support for the MAX30102 heart rate and blood oxygen sensor to the
i2c-sensor overlay.

See: https://github.com/raspberrypi/linux/pull/4535

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2 years agoconfigs: Add CONFIG_MAX30102=m
coldspark29 [Wed, 18 Aug 2021 12:42:22 +0000 (14:42 +0200)]
configs: Add CONFIG_MAX30102=m

See: https://github.com/raspberrypi/linux/pull/4535

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2 years agoLinux 5.10.95 v5.10.95
Greg Kroah-Hartman [Sat, 29 Jan 2022 09:26:11 +0000 (10:26 +0100)]
Linux 5.10.95

Link: https://lore.kernel.org/r/20220127180258.131170405@linuxfoundation.org
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Tested-by: Fox Chen <foxhlchen@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agodrm/vmwgfx: Fix stale file descriptors on failed usercopy
Mathias Krause [Thu, 27 Jan 2022 08:34:19 +0000 (18:34 +1000)]
drm/vmwgfx: Fix stale file descriptors on failed usercopy

commit a0f90c8815706981c483a652a6aefca51a5e191c upstream.

A failing usercopy of the fence_rep object will lead to a stale entry in
the file descriptor table as put_unused_fd() won't release it. This
enables userland to refer to a dangling 'file' object through that still
valid file descriptor, leading to all kinds of use-after-free
exploitation scenarios.

Fix this by deferring the call to fd_install() until after the usercopy
has succeeded.

Fixes: c906965dee22 ("drm/vmwgfx: Add export fence to file descriptor support")
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agoselect: Fix indefinitely sleeping task in poll_schedule_timeout()
Jan Kara [Mon, 10 Jan 2022 18:19:23 +0000 (19:19 +0100)]
select: Fix indefinitely sleeping task in poll_schedule_timeout()

commit 68514dacf2715d11b91ca50d88de047c086fea9c upstream.

A task can end up indefinitely sleeping in do_select() ->
poll_schedule_timeout() when the following race happens:

  TASK1 (thread1)             TASK2                   TASK1 (thread2)
  do_select()
    setup poll_wqueues table
    with 'fd'
                              write data to 'fd'
                                pollwake()
                                  table->triggered = 1
                                                      closes 'fd' thread1 is
                                                        waiting for
    poll_schedule_timeout()
      - sees table->triggered
      table->triggered = 0
      return -EINTR
    loop back in do_select()

But at this point when TASK1 loops back, the fdget() in the setup of
poll_wqueues fails.  So now so we never find 'fd' is ready for reading
and sleep in poll_schedule_timeout() indefinitely.

Treat an fd that got closed as a fd on which some event happened.  This
makes sure cannot block indefinitely in do_select().

Another option would be to return -EBADF in this case but that has a
potential of subtly breaking applications that excercise this behavior
and it happens to work for them.  So returning fd as active seems like a
safer choice.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agoKVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU
David Matlack [Thu, 13 Jan 2022 23:30:17 +0000 (23:30 +0000)]
KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU

commit 7c8a4742c4abe205ec9daf416c9d42fd6b406e8e upstream.

When the TDP MMU is write-protection GFNs for page table protection (as
opposed to for dirty logging, or due to the HVA not being writable), it
checks if the SPTE is already write-protected and if so skips modifying
the SPTE and the TLB flush.

This behavior is incorrect because it fails to check if the SPTE
is write-protected for page table protection, i.e. fails to check
that MMU-writable is '0'.  If the SPTE was write-protected for dirty
logging but not page table protection, the SPTE could locklessly be made
writable, and vCPUs could still be running with writable mappings cached
in their TLB.

Fix this by only skipping setting the SPTE if the SPTE is already
write-protected *and* MMU-writable is already clear.  Technically,
checking only MMU-writable would suffice; a SPTE cannot be writable
without MMU-writable being set.  But check both to be paranoid and
because it arguably yields more readable code.

Fixes: 46044f72c382 ("kvm: x86/mmu: Support write protection for nesting in tdp MMU")
Cc: stable@vger.kernel.org
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220113233020.3986005-2-dmatlack@google.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agorcu: Tighten rcu_advance_cbs_nowake() checks
Paul E. McKenney [Fri, 17 Sep 2021 22:04:48 +0000 (15:04 -0700)]
rcu: Tighten rcu_advance_cbs_nowake() checks

commit 614ddad17f22a22e035e2ea37a04815f50362017 upstream.

Currently, rcu_advance_cbs_nowake() checks that a grace period is in
progress, however, that grace period could end just after the check.
This commit rechecks that a grace period is still in progress while
holding the rcu_node structure's lock.  The grace period cannot end while
the current CPU's rcu_node structure's ->lock is held, thus avoiding
false positives from the WARN_ON_ONCE().

As Daniel Vacek noted, it is not necessary for the rcu_node structure
to have a CPU that has not yet passed through its quiescent state.

Tested-by: Guillaume Morin <guillaume@morinfr.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agobnx2x: Invalidate fastpath HSI version for VFs
Manish Chopra [Tue, 25 Jan 2022 18:57:49 +0000 (10:57 -0800)]
bnx2x: Invalidate fastpath HSI version for VFs

commit 802d4d207e75d7208ff75adb712b556c1e91cf1c upstream

Commit 0a6890b9b4df ("bnx2x: Utilize FW 7.13.15.0.")
added validation for fastpath HSI versions for different
client init which was not meant for SR-IOV VF clients, which
resulted in firmware asserts when running VF clients with
different fastpath HSI version.

This patch along with the new firmware support in patch #1
fixes this behavior in order to not validate fastpath HSI
version for the VFs.

Fixes: 0a6890b9b4df ("bnx2x: Utilize FW 7.13.15.0.")
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: Alok Prasad <palok@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>