platform/kernel/linux-starfive.git
7 months agoMedia:wave5: wave5 v4l2 driver support gst/ffmpeg 95/299595/2
Som Qin [Thu, 9 Feb 2023 02:31:40 +0000 (10:31 +0800)]
Media:wave5: wave5 v4l2 driver support gst/ffmpeg

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 3f710b8fa137 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel
 - update sifive cache function name properly and add guard for its config option]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ib264712e893c737a28c42a566607b7a55d7f7117

7 months agoMedia:wave5: set default format for display_fmt 94/299594/2
Som Qin [Thu, 12 Jan 2023 01:16:41 +0000 (09:16 +0800)]
Media:wave5: set default format for display_fmt

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 6d80c00e9258 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ic0f74bf12580e72ba3209c766e8d167c204702c5

7 months agomedia: add wave511 v4l2 support for starfive platfrom 93/299593/2
Som Qin [Thu, 22 Dec 2022 07:33:22 +0000 (15:33 +0800)]
media: add wave511 v4l2 support for starfive platfrom

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit a76c4f273c26 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I170dd61340d2da9155dda478e570828347c5bdaf

7 months agomedia: chips-media: wave5: Add wave5 driver to maintainers file 92/299592/2
Robert Beckett [Wed, 7 Dec 2022 12:13:50 +0000 (13:13 +0100)]
media: chips-media: wave5: Add wave5 driver to maintainers file

Add the Chips&Media wave5 encoder/decoder driver to the maintainers file

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
[sw0312.kim: cherry-pick the commit c6cf2b7965b0 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I4c08a4a6be0ea4f4b9900e58ad7522914f65246a

7 months agodt-bindings: media: wave5: add yaml devicetree bindings 91/299591/2
Robert Beckett [Wed, 7 Dec 2022 12:13:49 +0000 (13:13 +0100)]
dt-bindings: media: wave5: add yaml devicetree bindings

Add bindings for the wave5 chips&media codec driver

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
[sw0312.kim: cherry-pick the commit cd9148ef1b14 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I754cbc1e881b7ee8ff6a9c3da15cfc3f5900d1b0

7 months agomedia: chips-media: wave5: Add TODO file 90/299590/2
Nas Chung [Wed, 7 Dec 2022 12:13:48 +0000 (13:13 +0100)]
media: chips-media: wave5: Add TODO file

Add a TODO file with remaining elements to be improved/added.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
[sw0312.kim: cherry-pick the commit b9ab65a219e6 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I5249e0f04859224e17b3a1d7702093eedaf000ca

7 months agomedia: chips-media: wave5: Add the v4l2 layer 89/299589/2
Nas Chung [Wed, 7 Dec 2022 12:13:47 +0000 (13:13 +0100)]
media: chips-media: wave5: Add the v4l2 layer

Add the decoder and encoder implementing the v4l2
API. This patch also adds the Makefile and the VIDEO_WAVE_VPU config

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
[sw0312.kim: cherry-pick the commit 8f188e8db60e from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ia41bd9e4afd79fb415fd69722f3c488575ea6958

7 months agomedia: chips-media: wave5: Add vpuapi layer 88/299588/2
Nas Chung [Wed, 7 Dec 2022 12:13:46 +0000 (13:13 +0100)]
media: chips-media: wave5: Add vpuapi layer

Add the vpuapi layer of the wave5 codec driver.
This layer is used to configure the hardware according
to the parameters.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
[sw0312.kim: cherry-pick the commit 20c1678a8e65 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I7e95e00738cc2176138c494c9929dcf5f1250eae

7 months agomedia: platform: chips-media: Move Coda to separate folder 87/299587/2
Sebastian Fricke [Wed, 7 Dec 2022 12:13:45 +0000 (13:13 +0100)]
media: platform: chips-media: Move Coda to separate folder

Prepare the folder structure for a second Chips&Media driver.
Move the Coda driver to a sub-directory.

Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
[sw0312.kim: cherry-pick the commit b98dc9cf7754 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I27c82d2154c69aae68c423cc2d2a152ca6efa8b6

8 months agoRISCV: config: Build NBD into the kernel 98/298098/1 accepted/tizen/unified/riscv/20230919.144752
Łukasz Stelmach [Thu, 31 Aug 2023 11:30:45 +0000 (13:30 +0200)]
RISCV: config: Build NBD into the kernel

NBD may be used to mount root file system. To avoid problems with
delivering nbd.ko module to ramdisk, build the driver into the kernel.

Change-Id: I28002a736a8b9ecd06ed6d5ea964899d173bd30d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
8 months agoRISCV: config: Disable legacy PTY device nodes 51/298051/1 accepted/tizen/unified/riscv/20230903.234425
Łukasz Stelmach [Wed, 30 Aug 2023 19:19:33 +0000 (21:19 +0200)]
RISCV: config: Disable legacy PTY device nodes

Don't create ttyXX and ptyXX device nodes. Modern software uses /dev/ptmx
and /dev/pts/* nodes.

Change-Id: Ie0303e41ef4262642c59510027d134004385474b
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
8 months agoRISCV: config: tizen_visionfive2: Enable MT7601U as module 76/297976/1 accepted/tizen/unified/riscv/20230831.014911
Seung-Woo Kim [Tue, 29 Aug 2023 10:06:16 +0000 (19:06 +0900)]
RISCV: config: tizen_visionfive2: Enable MT7601U as module

Enable CONFIG_MT7601U to support mediatek 7601 wireless dongle,
This driver requires the firmware, mt7601u.bin.

Change-Id: If1b07960f03afaad952af6efae8637b61e5cecd6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 months agoWORKAROUND: usb: cdns3: Restore onchip memory reservation 88/297788/1 accepted/tizen/unified/riscv/20230828.003411
Seung-Woo Kim [Thu, 24 Aug 2023 08:02:26 +0000 (17:02 +0900)]
WORKAROUND: usb: cdns3: Restore onchip memory reservation

Restore onchip meory reservation of disable in_ep when hw
configuration is not done as a workaround.
Without restoring, disabling and re-enabling eps causes
check failure of onchip memory reseration size.

This fixes usb communication failure of ffs_func_set_alt()
calling usb_ep_disable() and usb_ep_enable() for all ep.

Note: for non workaround, it should calculate exact reservation
size from ep type and usb speed and should restore out_ep memory
reservation when there is no more enabled out_ep.

Change-Id: Ifca0052f96fd777036e01b9ddb7ae6af54bba911
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 months agoRISCV: config: tizen_visionfive2: Enable basic nls codepages 71/297671/1 accepted/tizen/unified/riscv/20230823.111001
Seung-Woo Kim [Tue, 22 Aug 2023 11:14:47 +0000 (20:14 +0900)]
RISCV: config: tizen_visionfive2: Enable basic nls codepages

To support mount fat partition without module, enable basic nls
codepages including iso8859-1, ascii, utf8.

Change-Id: Ib9c1318068c2d6d445ee592f1dc5cc3be70136cd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 months agousb: gadget: f_fs: Limit the maximum length of data transferring 07/297607/1 accepted/tizen/unified/riscv/20230822.054229
Dongwoo Lee [Mon, 21 Aug 2023 11:25:43 +0000 (20:25 +0900)]
usb: gadget: f_fs: Limit the maximum length of data transferring

When the ffs daemons request transfer with large size buffer, the usb
subsystems below cannot filled the buffer at once and then the request
is stalled in f_fs_epfile_io function. In order to prevent this
situation, this limits maximum length of data as PAGE_SIZE.

Change-Id: Ib84b3493a56b21f33a07cf0533f8df71580b7540
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
8 months agoRISCV: config: tizen_visionfive2: Enable USB_CDNS3_STARFIVE_EXTCON 51/297451/1 accepted/tizen/unified/riscv/20230821.094308
Seung-Woo Kim [Fri, 18 Aug 2023 09:58:29 +0000 (18:58 +0900)]
RISCV: config: tizen_visionfive2: Enable USB_CDNS3_STARFIVE_EXTCON

Enable CONFIG_USB_CDNS3_STARFIVE_EXTCON to suuport usb gadget
functionality from Tizen.

Change-Id: I2b0cd4e6c34ec6a30d9d41100876ab27d5733de2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 months agousb: cdns3-starfive: Add extcon usb gadget state with always connected 36/297436/2
Seung-Woo Kim [Fri, 18 Aug 2023 06:34:10 +0000 (15:34 +0900)]
usb: cdns3-starfive: Add extcon usb gadget state with always connected

Add extcon usb gadget state and set usb gadget state as connected.

The cdns3-starfive usb c port in visionfive2 board only has usb
d-/d+ lines and vbus and ground lines are used for power supply.
Because of the H/W limitation, it is not possible to detect usb
c port connected state.

In Tizen, deviced configures usb gadget functions only with the
usb connected state, so, to support usb gadget functionality,
the usb state should be set.

Change-Id: I3e3a25a726c7205b3d9a5fd96d8557562bfda81f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
8 months agoRISCV: configs: Change a default cpufreq governor to SCHEDUTIL 22/297422/1 accepted/tizen/unified/riscv/20230818.105219
Jaehoon Chung [Fri, 18 Aug 2023 04:31:42 +0000 (13:31 +0900)]
RISCV: configs: Change a default cpufreq governor to SCHEDUTIL

Change a default cpufreq governor from ondemand to schedutil.

Change-Id: I4d681ddbb0926e40fee8433f5f2924478c56fd0e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 months agoclk: starfive: jh7110-sys: Set PLL0 rate to 1.5GHz 21/297421/1
Jaehoon Chung [Fri, 18 Aug 2023 04:19:55 +0000 (13:19 +0900)]
clk: starfive: jh7110-sys: Set PLL0 rate to 1.5GHz

Set PLL0 rate to 1.5GHz. Change the parent of cpu_root clock
and the divider of cpu_core before setting.

This patch is taken from patch that was posted on mailing.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
Change-Id: Ib418a6321555c045effcb0580e0c91d80a7a2043
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoRISCV: dts: starfive: Increase CMA range from 512MB to 768MB 14/297014/2 accepted/tizen/unified/riscv/20230809.081413
Hoegeun Kwon [Wed, 9 Aug 2023 02:17:00 +0000 (11:17 +0900)]
RISCV: dts: starfive: Increase CMA range from 512MB to 768MB

In UHD resolution, there are many cases where alloc fail due to lack
of CMA capacity. Increase CMA range to prevent cma_alloc failed.

Change-Id: I6b0c355b773b08d09381e738329b986113982768
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoRISCV: dts: starfive: Fix the property of memory 79/296979/1 accepted/tizen/unified/riscv/20230809.013305
Jaehoon Chung [Tue, 8 Aug 2023 05:18:43 +0000 (14:18 +0900)]
RISCV: dts: starfive: Fix the property of memory

Current is getting the memory size from devicetree node.
Until supporting eeprom, it needs to use the memory node.

After applied this patch, Visionfive2 is showing 8GiB.

Change-Id: Ic96c2a7d373b9fccee830f3e34bbd9a2d6a3d6c3
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoRISCV: config: Enable MEDIA_SUPPORT_FILTER and enable only usb camera configs 99/296699/1 accepted/tizen/unified/riscv/20230804.122129
Seung-Woo Kim [Thu, 3 Aug 2023 02:00:55 +0000 (11:00 +0900)]
RISCV: config: Enable MEDIA_SUPPORT_FILTER and enable only usb camera configs

Enable MEDIA_SUPPORT_FILTER to filter out unnecessary media
configs and enable only usb camera configs including gspca module.

Change-Id: Idcd217d10821467562a53a57c3783897b4363d5f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoRISCV: config: Enable RAM and NBD block devices 91/296591/1 accepted/tizen/unified/riscv/20230803.004140
Łukasz Stelmach [Tue, 1 Aug 2023 13:03:49 +0000 (15:03 +0200)]
RISCV: config: Enable RAM and NBD block devices

Devices are supported on VisionFive2. Enable them on QEMU to use the
same boot procedures on both targets.

Change-Id: I210141b471d718fec4286a7bb516751226756f96
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
9 months agodrm/verisilicon: vs_dc: Fix to disable interrupt on probe 54/296554/1 accepted/tizen/unified/riscv/20230802.014257
Hoegeun Kwon [Tue, 1 Aug 2023 02:30:40 +0000 (11:30 +0900)]
drm/verisilicon: vs_dc: Fix to disable interrupt on probe

There is a case where interrupt enable is set in decon req before
decon probe is completed. There is a problem that a kernel panic
occurs if an interrupt is executed before the decon is bound. Disable
interrupts before registering interrupts. Also, irq generated when the
interrupt state is disabled is ignored.

Change-Id: I8b3571b006031c28349e1647f2d9a5c508ca6235
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agosoc: sifive: ccache: Add delay after flush 82/296382/1 accepted/tizen/unified/riscv/20230730.231938
Hoegeun Kwon [Wed, 26 Jul 2023 11:32:55 +0000 (20:32 +0900)]
soc: sifive: ccache: Add delay after flush

Problems with cache flush at resolutions exceeding FUD and with inno
hdmi driver. It runs a cache flush and requires a delay. So add delay
after cache flush.

Change-Id: Id8b1398dcce04851577912e6c1dfd4a2b580a043
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agogpu: drm: verisilicon: Fix potential Null pointer dereference 42/296342/2
Jaehoon Chung [Wed, 26 Jul 2023 01:50:50 +0000 (10:50 +0900)]
gpu: drm: verisilicon: Fix potential Null pointer dereference

It can be the poential NULL pointer dereference.

[    3.749753] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
[    3.750873] starfive display-subsystem: bound 29400000.dc8200 (ops 0xffffffff812c3bc8)
[    3.758534] Oops [#1]
[    3.758538] Modules linked in:
[    3.758547] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.39-riscv-visionfive2 #1
[    3.758555] Hardware name: StarFive VisionFive 2 v1.3B (DT)
[    3.758560] epc : dc_isr+0x22/0x60
[    3.766483] innohdmi-starfive 29590000.hdmi: inno hdmi bind begin
[    3.768725]  ra : dc_isr+0x22/0x60
[    3.768734] epc : ffffffff806db7ee ra : ffffffff806db7ee sp : ffffffff81a03bf0
[    3.768741]  gp : ffffffff81c6a158 tp : ffffffff81a17900 t0 : 0000000000046000
[    3.771834] innohdmi-starfive 29590000.hdmi: supply hdmi_1p8 not found, using dummy regulator

Change-Id: I4a7c1f656f1d45c2fc183f2c2976a11e0b2816c1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoRevert "riscv: fix riscv64 unrecognized opcode build error" 30/296330/1
Jaehoon Chung [Tue, 25 Jul 2023 21:32:45 +0000 (06:32 +0900)]
Revert "riscv: fix riscv64 unrecognized opcode build error"

Since using gcc13 to build Tizen RISCV, this patch doesn't need anymore.
This reverts commit e6c19c8fe08eb4375c7f5da1d7004ae4c533d615.

Change-Id: Iea9421a0c53ac3f9a9d9a8942dbf5a1521b91665

9 months agopackaging: Update stable version to 6.1.39 accepted/tizen/unified/riscv/20230725.071352
Jaehoon Chung [Mon, 26 Jun 2023 04:15:12 +0000 (13:15 +0900)]
packaging: Update stable version to 6.1.39

Update stable version to 6.1.39.

Change-Id: I0092fc745e6e968afa777d0fb409fc1f20d5e840
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agobuild: Change module image size from 32M to 20M
Jaehoon Chung [Tue, 18 Jul 2023 21:58:59 +0000 (06:58 +0900)]
build: Change module image size from 32M to 20M

Change module image size from 32M to 20M.
In ks file, partitions size is using to 20M. If created to 30M, it will
be failed on build system.

So to check correct size, change module image size to 20M.

Change-Id: I89cb828269e15f2162febacaf2f22386849b0f22
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agodrm/verisilicon: Add cache flush feature when dmabuf sync
Hoegeun Kwon [Mon, 17 Jul 2023 07:38:34 +0000 (16:38 +0900)]
drm/verisilicon: Add cache flush feature when dmabuf sync

Add cache flush for gem memory. Cache flushing is done when the
dmabuf sync ioctl is called.

Change-Id: I8663a391b18bb10f69007bd631fec492c0e347b2
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agogpu: drm: img: Fix to check fence list instead of fence count
Hoegeun Kwon [Mon, 17 Jul 2023 09:06:27 +0000 (18:06 +0900)]
gpu: drm: img: Fix to check fence list instead of fence count

In order to generate a reserve fences, we check to see if there is a
fence list instead of fence count.

Change-Id: Ibd45c154610221dd7bcd4de96570fc00066457c8
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoRISCV: config: Enable img gpu config
Hoegeun Kwon [Thu, 13 Jul 2023 09:49:56 +0000 (18:49 +0900)]
RISCV: config: Enable img gpu config

Enable Imagination PoerVR GPU driver defconfig.

Change-Id: If8e8b51fe59a367a0981f65b5cc7b3f44f9a8782
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agogpu: drm: img: Fix to use iterator instead of list
Hoegeun Kwon [Fri, 7 Jul 2023 02:16:18 +0000 (11:16 +0900)]
gpu: drm: img: Fix to use iterator instead of list

Change the dma fence management method from list to iterator method.
Also the fences have to added individually on each other driver. So
dma_resv_add_fence does not add a fence, but dma_resv_reserve_fences
is used to add it.

Change-Id: I4c87608b9878e218fe0ae5cc5acb564c1f9d5db9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agogpu: drm: img: Fix to use jh71xx_pmu header
Hoegeun Kwon [Fri, 7 Jul 2023 04:13:14 +0000 (13:13 +0900)]
gpu: drm: img: Fix to use jh71xx_pmu header

Fix to use jh71xx_pmu header and sifive_flush64_range.

Change-Id: I9ad7d5f3de347be0f26ceb4633b0125d2a6480ef
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agosoc: starfive: Add feature for hw event masks
Hoegeun Kwon [Fri, 7 Jul 2023 04:11:35 +0000 (13:11 +0900)]
soc: starfive: Add feature for hw event masks

Add hw event masks off feature for use with other drives.

Change-Id: I5b8862cd50b35f0b8ceed770d95a5c17bde8b12c
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Walker Chen <walker.chen@linux.starfivetech.com>
9 months agogpu: drm: img: Fix PVRSRV device initialization time
Hoegeun Kwon [Tue, 4 Jul 2023 08:38:52 +0000 (17:38 +0900)]
gpu: drm: img: Fix PVRSRV device initialization time

If the initialization time is a probe, the problem of not loading the
firmware occurs. Fix the initialization time to open time.

Change-Id: I1372230fdbe754845146eacd7bbb7b4e248c2c4f
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/GPU: Add support Imagination PowerVR GPU driver v1.17
shanlong.li [Wed, 5 Jul 2023 02:25:22 +0000 (11:25 +0900)]
drm/GPU: Add support Imagination PowerVR GPU driver v1.17

Add support Imagination PowerVR GPU driver with starfive JH7110. This
driver is from [1], and the imported patch list[2]. We modified
driver compatible and clock in the device-tree to fix kernel v6.1.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
  b9049f928d30 gpu: drm: img: disable PDUMP
  092482e4811e driver:GPU: adjust interface sequence 1. add axi disable interface 2. adjust the interface order between clk and
  b320e5501342 gpu:driver: fix up hibernation resume problem
  0dea95655224 driver:gpu: add gpu runtime pm
  0381e221bc0d driver:gpu: gpu driver change to release
  6ccc2d8209d9 driver:GPU:set the gpu frequency to 594Mhz
  d81e5fcbcccc driver:gpu: gpu driver upgrade to 1.17
  18a68c90c061 Add Wayland with GPU support.
  e4d3672cccbe driver:GPU: use pm runtime interface
  4c34123a3d81 driver:GPU: Using the GPU driver release version
  1ed4d6d30d92 driver:GPU: Disable apm to resolve pvrdebug -dd suspension  error
  13e336d5b5ae driver:GPU: adjust ClockSpeed to 409.6MHz
  c2a828350549 driver:GPU: fix compile warnings
  2ba6ee6d00df driver:GPU: add gpu driver

Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
Change-Id: I8ac4ba0038e8ba48c48d615f8700c49c7ff706b9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoRISCV: dts: starfive: Change wr/rd_osr_lmt value from 4 to 0xf
Jaehoon Chung [Wed, 12 Jul 2023 02:08:29 +0000 (11:08 +0900)]
RISCV: dts: starfive: Change wr/rd_osr_lmt value from 4 to 0xf

Change wr/rd_osr_lmt value from 4 to 0xf.
When value is using to 4, ethernet Rx Performance is decreasing.

Vendor kernel(v5.15) is using its value as 0xf.

The below is iperf result.
- Using to 4   - Rx is 45MBits/sec, Tx is 980MBits/sec
- Using to 0xf - Rx is 750MBits/sec, Tx is 930Mbits/sec

Change-Id: Ie6763a00ec2795e43bdbae2f224638732c789490
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoRISCV: dts: starfive: Add driver-strength relevant to motorcomm
Jaehoon Chung [Tue, 11 Jul 2023 07:08:42 +0000 (16:08 +0900)]
RISCV: dts: starfive: Add driver-strength relevant to motorcomm

Add driver-strength relevant to motrcomm phy driver.

This patch is based on the below commit.
https://github.com/SaminGuo/linux/commit/ebd75b0007b235a4a9dc9163d08820b4b9fdfc9f

Change-Id: I0bcbea398019671ef550c053171826bb4978849d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agonet: phy: motorcomm: Add pad drive strength cfg support
Samin Guo [Tue, 25 Apr 2023 10:43:29 +0000 (18:43 +0800)]
net: phy: motorcomm: Add pad drive strength cfg support

The motorcomm phy (YT8531) supports the ability to adjust the drive
strength of the rx_clk/rx_data, and the default strength may not be
suitable for all boards. So add configurable options to better match
the boards.(e.g. StarFive VisionFive 2)

Original commit: https://github.com/SaminGuo/linux/commit/3732faf2239b77478022246b9ac62902ec30c2c6

Change-Id: Ic805273b769f3ee47eab4aec1c16c6633d466ac8
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agosoc: sifive: ccache: Fix to use soc starfive jh7110 addr
Hoegeun Kwon [Tue, 11 Jul 2023 06:51:37 +0000 (15:51 +0900)]
soc: sifive: ccache: Fix to use soc starfive jh7110 addr

Fix to use jh7110 address when using jh110 soc.

Change-Id: Id282ec6f67b73336f89118f4e3446e953a27f270
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agosound: soc: ac108: Remove unused function and fix fallthrough warning
Jaehoon Chung [Thu, 6 Jul 2023 06:24:59 +0000 (15:24 +0900)]
sound: soc: ac108: Remove unused function and fix fallthrough warning

Fix the unused-function and implicit-fallthrough warning.

Change-Id: I84b7203c3ca864ecb89c562058037dd0630e5c25
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoBluetooth: Fix build warning
Hoegeun Kwon [Tue, 4 Jul 2023 08:34:52 +0000 (17:34 +0900)]
Bluetooth: Fix build warning

Occur build warning for unused variable, Fix warning

  net/bluetooth/hci_event.c: In function ‘process_adv_report’:
  net/bluetooth/hci_event.c:6470:7: warning: unused variable ‘match’ [-Wunused-variable]
    bool match;
         ^~~~~
  net/bluetooth/hci_event.c:6469:26: warning: unused variable ‘d’ [-Wunused-variable]
    struct discovery_state *d = &hdev->discovery;

Change-Id: I5c6778aea827e6d138009541991409834ea9cc07
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agopackaging: Update build required openssl version from 1.1 to 3
Jaehoon Chung [Mon, 3 Jul 2023 05:32:15 +0000 (14:32 +0900)]
packaging: Update build required openssl version from 1.1 to 3

Openssl 1.1.1 is supported until September 2023, so Tizen 8.0 upgrades
Openssl 3.0.x. To meet this, change build required openssl version. Also
required with pkgconfig.

Change-Id: Ia66aa62a7ddb6517b83d89d4b87fe6cebb452e46
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agoperf cpumap: Make counter as unsigned ints
Khem Raj [Mon, 23 Jan 2023 21:04:10 +0000 (13:04 -0800)]
perf cpumap: Make counter as unsigned ints

These are loop counters which is inherently unsigned. Therefore make
them unsigned. Moreover it also fixes alloc-size-larger-than
error with gcc-13, where malloc can be called with (-1) due to tmp_len
being an int type.

Fixes
| cpumap.c:366:20: error: argument 1 range [1844674406511961702418446744073709551612] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
|   366 |         tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu));
|       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Upstream-Status: Submitted [https://lore.kernel.org/linux-perf-users/20230123211310.127532-1-raj.khem@gmail.com/T/#u]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Change-Id: I7ecc661339efd49179dd4c1823f4969cee0b0515
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agopwm: pwm-starfive-ptc: Fix imcompatible poiter type
Jaehoon Chung [Mon, 26 Jun 2023 03:48:44 +0000 (12:48 +0900)]
pwm: pwm-starfive-ptc: Fix imcompatible poiter type

The get_state of pwm_ops is 'int' type, but starfive_pwm_ptc_get_state
function is 'void' type.
It needs to fix correct pointer type.

Change-Id: I8560bb1c0d9571fc0d4e66aa593d257e474f033f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
9 months agodrm/verisilicon: Add Innosilicon HDMI driver
Keith Zhao [Wed, 21 Jun 2023 08:23:10 +0000 (17:23 +0900)]
drm/verisilicon: Add Innosilicon HDMI driver

Add support Innosilicon HDMI driver of starfive JH7110. This driver is
from [1]. We modified to select and use stable inno_hdmi driver or
mainline posted hdmi driver.

[1] https://github.com/starfive-tech/linux

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
Change-Id: I5c72e2d9fe7cc9f231926f624f459547d73e0f1e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/verisilicon: hdmi: Add feature to check cea mode
Hoegeun Kwon [Wed, 21 Jun 2023 05:59:01 +0000 (14:59 +0900)]
drm/verisilicon: hdmi: Add feature to check cea mode

There is a problem with output for modes that are not supported, and
due to this, the hdmi sound is not played. Add feature to check cea
mode.

Change-Id: I55e3daa4e6e98f6df26bf91de84c099077e7f339
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoASoC: SOC: Fix fmt with dai naming
Hoegeun Kwon [Tue, 20 Jun 2023 10:10:44 +0000 (19:10 +0900)]
ASoC: SOC: Fix fmt with dai naming

Kernel v6.y does not support the legacy_dai_naming format, so there is
a problem that i2s does not work due to dai_name. Fix that issue.

Change-Id: I9aae5c683b4b5d803c12959ca2994e8cc3e6c577
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoRISCV: dts: starfive: Add hdmi audio snd card
Hoegeun Kwon [Tue, 20 Jun 2023 07:54:22 +0000 (16:54 +0900)]
RISCV: dts: starfive: Add hdmi audio snd card

Add HDMI audio snd-card, The snd-card1 is use i2s and hdmi.

Change-Id: I64102445ffad0a072d5d8f62a886bbc9945fd1f1
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/verisilicon: hdmi: Add audio_init feature
Hoegeun Kwon [Wed, 21 Jun 2023 06:47:35 +0000 (15:47 +0900)]
drm/verisilicon: hdmi: Add audio_init feature

Add hdmi_audio_init to use audio in hdmi driver.

Change-Id: If878ee4ee4a1665d91a34ef4f5c5f6d2ab60840e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/verisilicon: hdmi: Add support audio hdmi driver
Xingyu Wu [Mon, 19 Jun 2023 08:57:37 +0000 (17:57 +0900)]
drm/verisilicon: hdmi: Add support audio hdmi driver

Add support hdmi audio driver of starfive JH7110. This driver is from
[1], and the imported patch list[2]. We modified to use struct
starfive_hmdi instead of struct inno_hdmi also added to use
legacy_dai_naming.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
  5bec3220a8be drm:verisilicon:hdmi-audio:Adjust when to configure registers
  5a302a7a25fe gpu:drm:Add audio function in inno hdmi

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Change-Id: Iae0ec57f2cf588c7ca177f7e284968ca9e68c674
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/verisilicon: hdmi: Fix to timming for hdmi_setup
Hoegeun Kwon [Wed, 14 Jun 2023 08:06:14 +0000 (17:06 +0900)]
drm/verisilicon: hdmi: Fix to timming for hdmi_setup

When changing the mode, a problem occurs because we try to write a
value to reg in a state that is not resumed after suspend. Move the
timing of writing values to reg to enable.

Change-Id: I49db485e947c164129b1412cdff2a16d6306895e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoRISCV: config: Enable sifive flush config
Hoegeun Kwon [Tue, 13 Jun 2023 10:40:25 +0000 (19:40 +0900)]
RISCV: config: Enable sifive flush config

Enable SIFIVE_CCACHE and SIFIVE_FLUSH configuration.

Change-Id: I008c302e89896a0ea14f065365526e4b490b5af2
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/verisilicon: Add starfive_flush_dcache
Hoegeun Kwon [Tue, 13 Jun 2023 10:39:30 +0000 (19:39 +0900)]
drm/verisilicon: Add starfive_flush_dcache

There is a problem that the garbage cache value comes out when the
screen is displayed. Flush the cache by adding the flush feature.
The feature referred to v5.15 kernel.

Change-Id: I183eb0c1640c17b5ac27dcb1ce82555a5c651571
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agosoc: sifive: ccache: Add flush feature
Hoegeun Kwon [Thu, 8 Jun 2023 11:26:29 +0000 (20:26 +0900)]
soc: sifive: ccache: Add flush feature

Add the ccache flush feature applied to kernel v5.15.
This feature flushes the garbage cache when output the screen.

Change-Id: I855fd37416f028f6d7c9b9e1459462e4da7e1740
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agoRISCV: config: Enable starfive drm and hdmi config
Hoegeun Kwon [Tue, 13 Jun 2023 07:41:20 +0000 (16:41 +0900)]
RISCV: config: Enable starfive drm and hdmi config

Enable DRM_VERISILICON and STARFIVE_HDMI configuration.

Change-Id: If26c6c98b84d3e9cddbc6b696e8332882b9f3b31
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/verisilicon: Fix to build error for drm hdmi
Hoegeun Kwon [Tue, 13 Jun 2023 07:38:32 +0000 (16:38 +0900)]
drm/verisilicon: Fix to build error for drm hdmi

Modify for the 6.1 kernel interface.

Change-Id: I24b652c2c1ab102649586c3cdb6eca63256dc3ce
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
9 months agodrm/verisilicon: Add starfive hdmi driver
Keith Zhao [Tue, 13 Jun 2023 06:19:56 +0000 (15:19 +0900)]
drm/verisilicon: Add starfive hdmi driver

Add HDMI dirver for StarFive SoC JH7110.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I328dcf0c0adf7bc2817675278034d6a2520a536b

9 months agodrm/verisilicon: Add verisilicon dc controller driver
Keith Zhao [Tue, 13 Jun 2023 04:54:30 +0000 (13:54 +0900)]
drm/verisilicon: Add verisilicon dc controller driver

Add DC8200 display controller driver for StarFive JH7110 SoC.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I6efc987c092249e1eff2cd5a12cd32c4ed83056c

9 months agodrm/verisilicon: Add drm plane funcs
Keith Zhao [Tue, 13 Jun 2023 04:45:44 +0000 (13:45 +0900)]
drm/verisilicon: Add drm plane funcs

Implement plane functions for the DRM driver.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I0b0680590b3f301afc316565c7321015d2177745

9 months agoidrm/verisilicon: Add drm crtc funcs
Keith Zhao [Tue, 13 Jun 2023 04:44:19 +0000 (13:44 +0900)]
idrm/verisilicon: Add drm crtc funcs

Add crtc driver which implements crtc related operation functions.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I63d0234a3ac985f7f7c74c0dc3b679add2c12759

9 months agodrm/verisilicon: Add mode config funcs
Keith Zhao [Tue, 13 Jun 2023 04:42:33 +0000 (13:42 +0900)]
drm/verisilicon: Add mode config funcs

Add mode setting functions for JH7110 SoC.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I42ab5eaf511a339a9e13e47e395ea47eb1f3c0fd

9 months agodrm/verisilicon: Add gem driver for JH7110 SoC
Keith Zhao [Tue, 13 Jun 2023 04:40:16 +0000 (13:40 +0900)]
drm/verisilicon: Add gem driver for JH7110 SoC

This patch implements gem related APIs for JH7100 SoC.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Ic2a60aacc4fc1d7aa83cb663fe689053e5dd0040

9 months agodrm/verisilicon: Add basic drm driver
Keith Zhao [Tue, 13 Jun 2023 04:33:50 +0000 (13:33 +0900)]
drm/verisilicon: Add basic drm driver

Add a basic platform driver of the DRM driver for JH7110 SoC.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I58d5b12467e87355175f24ed02ff5c675df7e7d8

9 months agoriscv: dts: starfive: jh7110: add dc&hdmi controller node
Keith Zhao [Tue, 13 Jun 2023 04:28:34 +0000 (13:28 +0900)]
riscv: dts: starfive: jh7110: add dc&hdmi controller node

Add the dc controller and hdmi node for the Starfive JH7110 SoC.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I66e234aaa823baee37f211b36b661716ff8af483

9 months agodt-bindings: display: Add yamls for JH7110 display subsystem
Keith Zhao [Tue, 13 Jun 2023 04:21:44 +0000 (13:21 +0900)]
dt-bindings: display: Add yamls for JH7110 display subsystem

Add bindings for JH7110 display subsystem which
has a display controller verisilicon dc8200
and an HDMI interface.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Icb7b9d267d6e8545556acf92a1adf84d3ad2e248

9 months agopackaging: Setup with source0 name
Seung-Woo Kim [Fri, 16 Jun 2023 01:54:18 +0000 (10:54 +0900)]
packaging: Setup with source0 name

In packaging spec, source0 name is different from package name,
so setup also needs to be with source0 name explictly. Do setup
with source0 name.

Change-Id: I3400c7aa131ec2561745386f903de2e47fd9aab7
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
9 months agoBluetooth: Add LE connection parameter update
Anuj Jain [Fri, 6 Jan 2023 09:59:24 +0000 (15:29 +0530)]
Bluetooth: Add LE connection parameter update

Add support for BT_LE_CONN_PARAM in l2cap socket.

Change-Id: I2ed693da26ba2d3464b9997bf1880c6c136055cd
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoBluetooth : fix build error
Hoegeun Kwon [Fri, 14 Oct 2022 07:02:19 +0000 (16:02 +0900)]
Bluetooth : fix build error

Update device name on remote_name_event, Fix interface define for
build error.

Change-Id: I59df4a7e30f9a83a0efdce516b2a325cb3b0983b
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoBluetooth: Fix the potential crash issue
DoHyun Pyun [Thu, 4 Jul 2019 00:18:21 +0000 (09:18 +0900)]
Bluetooth: Fix the potential crash issue

There is a logic error in the event function. We should
check the callback function's parameter before calling.

Change-Id: I06a4a8c50317e5ec4ae8fe35e4b788105e090196
Fixes: bde01c80dd51 ("Bluetooth: Set le data length command and event")
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoBluetooth: Set le data length command and event
Sudha Bheemanna [Fri, 16 Sep 2016 10:07:22 +0000 (15:37 +0530)]
Bluetooth: Set le data length command and event

Sets the data length for the le data packet with in the
advised limits. MGMT command and event are added to handle
the setting of data length.

Change-Id: Ia5c2167743cc9a29190e5631973e9d52d41caa1d
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoBluetooth: Read host suggested default le data length
Sudha Bheemanna [Fri, 16 Sep 2016 07:24:31 +0000 (12:54 +0530)]
Bluetooth: Read host suggested default le data length

This patch adds MGMT command and code for supporting reading
default le data length value set at the controller.

Change-Id: I2b81982dc26ed5af4a8f8a3d3913db5d64625260
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoBluetooth: Write host suggested default le data length
Sudha Bheemanna [Fri, 16 Sep 2016 06:39:57 +0000 (12:09 +0530)]
Bluetooth: Write host suggested default le data length

This patch adds MGMT command and code for supporting write
default le data length command to the controller.

Change-Id: I3d2c8b622b7913a3ed542342e3ba8076c30dc279
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoBluetooth: Read LE Max data length command
Sudha Bheemanna [Fri, 16 Sep 2016 05:08:30 +0000 (10:38 +0530)]
Bluetooth: Read LE Max data length command

This patch adds the MGMT command and code to support reading
the maximum data length supported command for LE.

Change-Id: I4dc0041f2070de2ccb6a4164c8823612863c941e
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoBluetooth: Fix IPSP connection callback event issue.
h.sandeep [Fri, 16 Sep 2016 09:15:24 +0000 (14:45 +0530)]
Bluetooth: Fix IPSP connection callback event issue.

This patch fixes the IPSP connection callback event issue
between kernel and bluez layer.

Change-Id: Ia4d625aa8a6dbc9da89a7d9f12308af9c90d0594
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months 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>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>