platform/kernel/linux-exynos.git
5 years agofimc-is: Replace hard coded PMU register access with regmap calls
Marek Szyprowski [Fri, 7 Aug 2015 08:36:26 +0000 (10:36 +0200)]
fimc-is: Replace hard coded PMU register access with regmap calls

Change-Id: Ifa9cccbbe68ff937c5ade1539592f5db0876edfb
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Read fimc-lite and csis regs and irqs from dt
Marek Szyprowski [Fri, 7 Aug 2015 08:36:35 +0000 (10:36 +0200)]
fimc-is: Read fimc-lite and csis regs and irqs from dt

Change-Id: I94a94d3e85c640cdec3f20289e97cb450e359252
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Remove unused code
Marek Szyprowski [Thu, 6 Aug 2015 13:21:55 +0000 (15:21 +0200)]
fimc-is: Remove unused code

 - remove unused sensor driver code
 - remove dead code for non-Exynos5433 SoCs
 - remove USE_OWN_FAULT_HANDLER support
 - remove ENABLE_CLOCK_GATE support
 - remove ENABLE_DVFS support
 - remove completely dead code
 - remove unused conditional code
 - remove pm qos support
 - remove ncp6335b support (unused)

Change-Id: Ibf4ca12f72642da12082f0d1bccd37b9eda04962
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Add code from arch/arm/mach-exynos and missing headers
Marek Szyprowski [Thu, 6 Aug 2015 13:24:20 +0000 (15:24 +0200)]
fimc-is: Add code from arch/arm/mach-exynos and missing headers

Change-Id: I15d16161f1d1f036bd4a0f359f40b94b4cf08e99
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Initial import from SM-N910 Android LL release code
Marek Szyprowski [Thu, 6 Aug 2015 13:20:55 +0000 (15:20 +0200)]
fimc-is: Initial import from SM-N910 Android LL release code

Import fimc-is driver from SM-N910C_LL_Opensource (verified 32-bit
Android kernel) from opensource.samsung.com

Change-Id: I62eec9bc33a21c5742d2c5d5f79facfcb1ec59c9
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agospi: spi-s3c64xx: Add support for Exynos5433 ISP SPI controllers
Sylwester Nawrocki [Thu, 12 Apr 2018 15:02:00 +0000 (17:02 +0200)]
spi: spi-s3c64xx: Add support for Exynos5433 ISP SPI controllers

This patch adds support for the Exynos5433 ISP SPI devices. An additional
code performing the SPI controller's software reset is added to ensure
proper operation as the controller is also used by the FIMC-IS firmware.

Change-Id: I4c4e8d7b032e1068bb77411a5f19d8d3f17df3eb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Add DT property for byte swapping control
Sylwester Nawrocki [Thu, 12 Apr 2018 14:39:57 +0000 (16:39 +0200)]
spi: spi-s3c64xx: Add DT property for byte swapping control

Enabling this feature is required for the FIMC-IS subsystem driver.

Change-Id: I331f69eb5b41429449939ae5f05ee07a30f3405e
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Allow higher transfer lengths in polling IO mode
Sylwester Nawrocki [Thu, 12 Apr 2018 14:08:27 +0000 (16:08 +0200)]
spi: spi-s3c64xx: Allow higher transfer lengths in polling IO mode

Some variants of the SPI controller have no DMA support, in such case
SPI transfers longer than the FIFO length are not currently properly handled
by the driver. Fix it by doing multiple transfers in the s3c64xx_spi_transfer_one()
function if the SPI transfer length exceeds the FIFO size.

Change-Id: I6a21a72f40a52237ebe3c1f3037153e27f7392fb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Fix indentation in the register offset definitions
Sylwester Nawrocki [Thu, 12 Apr 2018 13:59:24 +0000 (15:59 +0200)]
spi: spi-s3c64xx: Fix indentation in the register offset definitions

Change-Id: I52f8ea378c45379ef36fa3753eec39a558a68f92
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Do not ignore timeout errors in polling I/O mode
Sylwester Nawrocki [Thu, 12 Apr 2018 13:57:17 +0000 (15:57 +0200)]
spi: spi-s3c64xx: Do not ignore timeout errors in polling I/O mode

Currently timeout errors in polling I/O mode transfer are silently ignored.
Fix it by returning an error when we time out waiting on the RX FIFO level
to reach the transfer length.

Change-Id: I39d663204880bb5a9c4d092c020912055078416c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Drop unused enable_datapath() function argument
Sylwester Nawrocki [Thu, 12 Apr 2018 13:36:37 +0000 (15:36 +0200)]
spi: spi-s3c64xx: Drop unused enable_datapath() function argument

The spi pointer argument is not used now so remove it. While at it a s3c64xx_
prefix is added to the function name.

Change-Id: I2b7016af73834808268314cbcfbaec4b36558e22
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Remove unused s3c64xx_spi_hwinit() function argument
Sylwester Nawrocki [Thu, 12 Apr 2018 13:27:47 +0000 (15:27 +0200)]
spi: spi-s3c64xx: Remove unused s3c64xx_spi_hwinit() function argument

The channel argument is not used and anyway it could be retrieved from
the passed driver data structure.

Change-Id: Ib89885dd2e0d80e7ca97a1c15fb69f11f55a8740
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Remove unused driver data structure tgl_spi field
Sylwester Nawrocki [Thu, 12 Apr 2018 13:21:46 +0000 (15:21 +0200)]
spi: spi-s3c64xx: Remove unused driver data structure tgl_spi field

The tgl_spi pointer is now unused so remove it.

Change-Id: Iedfa3e5e39bac27aa4f6ec467578635d99d01b1e
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agoi2c: i2c-s3c2410: Add quirks for Exynos5433 ISP I2C
Marek Szyprowski [Thu, 30 Jul 2015 10:35:18 +0000 (12:35 +0200)]
i2c: i2c-s3c2410: Add quirks for Exynos5433 ISP I2C

This is required to ensure proper operation of the ISP I2C controller
from the Linux driver and the FIMC-IS firmware level.

Change-Id: If845cf516fb8aa29a0e6b1b1533208b63fecdc69
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agoclk: samsung: exynos5433: Update definitions of ISP, CAM{0,1} domain clocks
Marek Szyprowski [Fri, 7 Aug 2015 10:35:28 +0000 (12:35 +0200)]
clk: samsung: exynos5433: Update definitions of ISP, CAM{0,1} domain clocks

This patch adds CLK_IS_CRITICAL and CLK_IGNORE_UNUSED flags to some camera
subsystem clocks to keep them always enabled, until handling of these clocks
is added to the driver.

Change-Id: I8db5d90b21d59e20a6b8461021fac68b0ddfa780
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agoclk: samsung: exynos5433: Add ISP, CAM{0,1} domain clocks
Sylwester Nawrocki [Wed, 18 Feb 2015 16:35:08 +0000 (17:35 +0100)]
clk: samsung: exynos5433: Add ISP, CAM{0,1} domain clocks

Add definitions of clocks required by fimc-is driver.

Change-Id: Icc5be29c30a54d04f692af0aa20353304297baf8
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agodrm: exynos: add support for prime vmap to exynos gem
Marek Szyprowski [Thu, 29 Mar 2018 10:35:51 +0000 (12:35 +0200)]
drm: exynos: add support for prime vmap to exynos gem

Change-Id: I9399ba024f2cc6e61c3b463071aef700ad4c9bed
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / PCI: exynos: remove __init macro from exynos_pcie_probe()
Seung-Woo Kim [Mon, 16 Apr 2018 06:32:11 +0000 (15:32 +0900)]
LOCAL / PCI: exynos: remove __init macro from exynos_pcie_probe()

After the commit 7051bc3056ba ("LOCAL / pci: dwc: pci-exynos:
support the pci of exynos5433"), exynos_pcie_probe() is no more
called from context started from subsys_initcall() and it makes
section mismatch in reference to .init.text:exynos_pcie_probe().
Remove __init macro from exynos_pcie_probe() to remove the
section mismatch.

Change-Id: Ic2c4eceb3ae33a78482f5beb02bf1ec42d01aa78
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoLOCAL / net: rfkill: bcm: block unused function bt_lpm_wake()
Seung-Woo Kim [Mon, 16 Apr 2018 06:18:34 +0000 (15:18 +0900)]
LOCAL / net: rfkill: bcm: block unused function bt_lpm_wake()

The commit a59dded59516 ("LOCAL / net: rfkill: adapt to mainline
API/framework changes") blocks bluetooth low power mode feature
which requires bluetooth hci core modification but bt_lpm_wake()
function remains unused. Block the unused function to fix build
warning.

Change-Id: I91afca0435b1399d481d8d8b2130b83e8de7bba0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years ago[LOCAL] base/firmware: return -EPROBE_DEFER until rootfs is available
Marek Szyprowski [Fri, 30 Mar 2018 06:12:30 +0000 (08:12 +0200)]
[LOCAL] base/firmware: return -EPROBE_DEFER until rootfs is available

Return -EPROBE_DEFER for request_firmware*() until root filesystem is
mounted. This allows to have wifi drivers build into the kernel, but
the firmware files shipped on the root filesystem.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic9545c6bf0e007bc1d130e80ac1e5e2b0009ffbd

5 years agoarm64: configs: tizen_tm2_defconfig: enable BRCMFMAC driver for wifi
Marek Szyprowski [Tue, 13 Mar 2018 11:59:44 +0000 (12:59 +0100)]
arm64: configs: tizen_tm2_defconfig: enable BRCMFMAC driver for wifi

Change-Id: Ib351bded23805288e8436a93bb2edb3e76ef567a
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoarm64: configs: tizen_tm2_config: enable the PCIe and PHY
Jaehoon Chung [Mon, 12 Mar 2018 04:16:30 +0000 (13:16 +0900)]
arm64: configs: tizen_tm2_config: enable the PCIe and PHY

Enable the PCIe and PHY configurations.

Change-Id: Ib84bc517a6373a0ee22a6a14d6741f22914ff5bc
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / pci: quirks: add the fixup for Samsung SoC
Jaehoon Chung [Wed, 21 Mar 2018 09:41:46 +0000 (18:41 +0900)]
LOCAL / pci: quirks: add the fixup for Samsung SoC

If Device id is 0xa5e3 in Samsung SoC, it doesn't support the MSI.
To disable the msi feature, add the fixup data.

Change-Id: I4620ac8b36be173bd5d7b26539bd6c6b6a76625f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / arm64: dts: exynos5433-tm2-common: add the extra pcie property
Jaehoon Chung [Wed, 4 Apr 2018 02:22:42 +0000 (11:22 +0900)]
LOCAL / arm64: dts: exynos5433-tm2-common: add the extra pcie property

Add the specific property of tm2.
Remove the duplicated initiailzation gpio pins.

Change-Id: I2416ef7cb6d3e43c6dbe9377d89dbeec0fa7c564
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / arm64: dts: exynos5433: add the pice node
Jaehoon Chung [Mon, 12 Mar 2018 03:51:21 +0000 (12:51 +0900)]
LOCAL / arm64: dts: exynos5433: add the pice node

Add the nodes relevant to pcie.
PCIe is used the WiFi interface. So also add the nodes relevant to wlan
in exynos5433-pinctrl.dtsi.

Change-Id: I2aed23349ed1ad216f497cd233daa40c6660f161
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / phy: samsung: phy-exynos-pcie: support the exynos5433 pcie for phy
Jaehoon Chung [Wed, 20 Dec 2017 11:57:25 +0000 (20:57 +0900)]
LOCAL / phy: samsung: phy-exynos-pcie: support the exynos5433 pcie for phy

This is to support the exynos5433 SoCs for PCIe. (WIP)

Change-Id: Ie6a018023789544a330cdaf6b13380a114af2d3f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / PCI: exynos: clean the codes to reuse some functions
Jaehoon Chung [Fri, 29 Dec 2017 05:21:39 +0000 (14:21 +0900)]
LOCAL / PCI: exynos: clean the codes to reuse some functions

Clean the codes to reuse some functions.

Change-Id: I7a47538f96c96f9989613ffd56c6e0fa9eda69dd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / pci: dwc: pci-exynos: support the pci of exynos5433
Jaehoon Chung [Mon, 12 Mar 2018 02:30:23 +0000 (11:30 +0900)]
LOCAL / pci: dwc: pci-exynos: support the pci of exynos5433

Support the Exynos5433 PCIe.

Change-Id: I99fd5ab10d851cfa46e5050702e9427b88db58b0
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / pci: dwc: pci-exynos: change Kconfig dependency
Jaehoon Chung [Fri, 9 Mar 2018 10:51:13 +0000 (19:51 +0900)]
LOCAL / pci: dwc: pci-exynos: change Kconfig dependency

Current PCI EXYNOS has the dependency with SOC_EXYNOS5440.
It's changed to ARCH_EXYNOS from SOC_EXYNOS5440, because other SoCs
needs to use this driver.

Change-Id: I4a04ac1ee76d5ac2efca6b0e1a5af086f8098e78
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agodrm/exynos: update minor version
Inki Dae [Thu, 29 Mar 2018 08:33:25 +0000 (17:33 +0900)]
drm/exynos: update minor version

Updated minor version according to IPPv2 support.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I0e46e7c45010845586790efdf12675ee9f5652a3

5 years agodrm/exynos: gsc: Add limited support for ARGB8888 format
Marek Szyprowski [Mon, 19 Mar 2018 10:06:57 +0000 (11:06 +0100)]
drm/exynos: gsc: Add limited support for ARGB8888 format

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I88bac208fc1c7d1e753eeddb22143f95c2d52c64

5 years agodrm/exynos: gsc: relax limits for exynos5433 variant
Marek Szyprowski [Fri, 2 Mar 2018 14:00:48 +0000 (15:00 +0100)]
drm/exynos: gsc: relax limits for exynos5433 variant

It turned out that GSC module is able to process images with less strict
alignment.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I27c92b877225744df7295341463aa48c5be169ee

5 years agodrm/exynos: ipp: Move buffer setup to separate function
Marek Szyprowski [Mon, 26 Mar 2018 13:09:48 +0000 (15:09 +0200)]
drm/exynos: ipp: Move buffer setup to separate function

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I57d31254f3f7c677ee350c83f732a674e7f6d557

5 years agodrm/exynos: ipp: Fix support for image rotation and buffer offset
Marek Szyprowski [Fri, 30 Mar 2018 06:16:59 +0000 (08:16 +0200)]
drm/exynos: ipp: Fix support for image rotation and buffer offset

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4bf6b571d845f000ae3b2502bb37ae12b0cfabf7

5 years agotizen_tm2_defconfig: enable TM2 sensorhub driver
Marek Szyprowski [Fri, 23 Mar 2018 12:28:29 +0000 (13:28 +0100)]
tizen_tm2_defconfig: enable TM2 sensorhub driver

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoARM64: dts: exynos: Add support for TM2(e) SensorHUB and GPS devices
Marek Szyprowski [Fri, 23 Mar 2018 09:36:09 +0000 (10:36 +0100)]
ARM64: dts: exynos: Add support for TM2(e) SensorHUB and GPS devices

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / sensors: build fix after porting to v4.14 kernel
Marek Szyprowski [Fri, 23 Mar 2018 12:08:15 +0000 (13:08 +0100)]
LOCAL / sensors: build fix after porting to v4.14 kernel

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / sensors: add sensor_core and drivers for TM2
Jaewon Kim [Tue, 24 Feb 2015 04:54:15 +0000 (13:54 +0900)]
LOCAL / sensors: add sensor_core and drivers for TM2

Add BCM 4773 sensorhub and max86902 HRM and UV sensor drivers from v4.1
Tizen kernel. This is a squashed version of the following commits:

LOCAL / sensors: add sensor_core driver

This patch adds to support "/sys/class/sensors" node.
sensors node shared with sensorhub driver and
each sensor for TIZEN platform. So, sensorhub driver merged with
this sensors driver.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
LOCAL / sensors: add max86902 HRM and UV sensor driver

This patch adds max86902 HRM(Heart Rate Monitor) and
UV(Ultraviolet Ray) sensor driver.
This driver supports via sensors core driver.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
sensors: stm_rinato: Kconfig: remove unused YAS532 driver configuration

The STM sensorhub doesn't have the yas532 compass sensor driver.
Remove it from the related configuration file.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: stm_rinato: Kconfig: remove unused SHTC1 driver configuration

The STM sensorhub doesn't have the shtc1 compass sensor driver.
Remove it from the related configuration file.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: Kconfig: move the ssp and ssp_sensorhub in upper directory

The CONFIG_SSP and SENSORS_SSP_SENSORHUB are flags not strictly
related to the STM sensorhub. Put them outside from the
stm_rinato directory to an upper level to be ready to relate to
other sensorhubs.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: add support for the BCM 4773 sensorhub

The Broadcom BCM4773 is a microcontroller that works as a
sensorhub. It's placed in between sensors and AP.

It's connected to the AP through SPI bus and has support for
a range of sensors:

 - icm20610
 - yas532
 - bmp182
 - tmg399x
 - mobeam

The config file provides a "choice" option in order to choose
between different targets, S333 and TM2(e).

The BCM4773 it can handle GPS and the gps driver is the main
entry point to the sensorhub driver as an SPI device.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: brcm: bbdpl2: add new version (v2) of the BCM4773 sensorhub

Commit, "sensors: add support for the BCM 4773 sensorhub" has
added support for the BCM4773. Since then the firmware interface
has been updated to a new version: version 2.

Add the second version of the BCM4773 sensorhub and rename the
previous version configuration flags to VER1.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
sensors: brcm: use non atomic sleeps instead of atomic delays

Do not use mdelay in non atomic contexts, use the appropriate
*sleep functions instead.

mdelay should be used only in atomic contexts, out from atomic it
keeps looping over the CPU wasting unnecessary resources.

Replace the mdelay's with:

 - usleep_range for 10us - 20ms delays,
 - msleep for over 20ms

Reported-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: sensorhub_brcm: fix for compatibility

For 32bit compatibility, compat_ioctl should be registered. Also,
32bit built IOCTL value is different from 64bit, then it should be
considered. So this fixes for compatibility with compat_ioctl.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
sensors: brcm: fix not to send commands to not initialized mcu

The suspend and resume errors happen when sensorhub mcu was not
initialized. So it needs to check the sensorhub mcu state.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: brcm: bbdpl2: fix log messages to info level with new line

This patch fixes log messages to info level and adds new line
character to log messages.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
sensors: brcm: Remove wake_lock to fix the suspend issue

Even if TM2 doesn't use the wake_lock feature, the brcm sensor
drivers used the wake_lock and the the count of GPS interrupt
of brcm sensor is too much. The too much interrupt causes the
pending of reading the 'sys/power/wakeup_count' and then failed
to enter the suspend state by user-process.

This patch removes the wake_lock code to fix the suspend issue.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[remove rinato driver, add missing wakelock.h]

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / sec_sysfs: sec_class driver
Jaewon Kim [Tue, 24 Feb 2015 05:06:12 +0000 (14:06 +0900)]
LOCAL / sec_sysfs: sec_class driver

sec_sysfs driver create sysfs node and device in "/dev/class/sec/".
It is used for TIZEN platform specific drivers.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
5 years agotizen_tm2_defconfig: enable rfkill-bcm driver
Marek Szyprowski [Tue, 20 Mar 2018 13:53:13 +0000 (14:53 +0100)]
tizen_tm2_defconfig: enable rfkill-bcm driver

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoARM64: dts: exynos: Enable serial 3 and rfkill-bcm for BT support
Marek Szyprowski [Tue, 20 Mar 2018 08:21:52 +0000 (09:21 +0100)]
ARM64: dts: exynos: Enable serial 3 and rfkill-bcm for BT support

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / net: rfkill: adapt to mainline API/framework changes
Marek Szyprowski [Tue, 20 Mar 2018 08:38:38 +0000 (09:38 +0100)]
LOCAL / net: rfkill: adapt to mainline API/framework changes

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / net: rfkill: add rfkill-bcm driver
Beomho Seo [Thu, 26 Feb 2015 08:08:59 +0000 (17:08 +0900)]
LOCAL / net: rfkill: add rfkill-bcm driver

This patch add rfkill-bcm driver for specific control Broadcom bluetooth
chip. This is based rfkill-gpio driver. This driver control on/off
Broadcom bluetooth chip, handle interrupt and notify.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
LOCAL / net: rfkill: Fix irq trigger

This patch fix wrong irq trigger.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
LOCAL / net: rfkill: rfkill-bcm: Change correctly compatible

This patch changes the compatible to using prefix-vendor and bluetooth
chip name.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
LOCAL / net: rfkill: rfkill-bcm: Add hci registered flag

This patch add hci registered flag for handling abnormal interrupt
signal.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoARM: configs: add tizen_odroid_defconfig
Marek Szyprowski [Tue, 20 Mar 2018 13:14:47 +0000 (14:14 +0100)]
ARM: configs: add tizen_odroid_defconfig

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoARM: dts: exynos: Add usb-gpio-extcon support for dual-role operation for OdroidXU3
Dongwoo Lee [Fri, 23 Jun 2017 06:50:36 +0000 (15:50 +0900)]
ARM: dts: exynos: Add usb-gpio-extcon support for dual-role operation for OdroidXU3

This patch enables dual-role support of dwc3 by adding
usb-gpio-extcon driver.

Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
[mszyprow: added XU3lite support, rephrased commit subject]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoRevert "pinctrl: samsung: Add LPDDR3_PAD_RETENTION to top domain"
Marek Szyprowski [Tue, 20 Mar 2018 13:39:55 +0000 (14:39 +0100)]
Revert "pinctrl: samsung: Add LPDDR3_PAD_RETENTION to top domain"

This reverts commit 15fdfc13e005f7b8adb252eab5d03830a45eaf59.
It breaks ARM Exynos builds.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoRevert "soc: samsung: pmu: Add the PMU data of exynos5433 to support low-power state"
Marek Szyprowski [Tue, 20 Mar 2018 12:43:52 +0000 (13:43 +0100)]
Revert "soc: samsung: pmu: Add the PMU data of exynos5433 to support low-power state"

This reverts commit 932a23cc8835867017747fc3bdbe8a460fe55974.
It breaks ARM Exynos builds.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoRevert "soc: samsung: Add generic power-management driver for Exynos"
Marek Szyprowski [Tue, 20 Mar 2018 12:43:24 +0000 (13:43 +0100)]
Revert "soc: samsung: Add generic power-management driver for Exynos"

This reverts commit c5d72878df67345efecfd86820030ea4835c9c2f.
It breaks ARM Exynos builds.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoRevert "soc: samsung: pm: Add support for suspend-to-ram of Exynos5433"
Marek Szyprowski [Tue, 20 Mar 2018 12:43:11 +0000 (13:43 +0100)]
Revert "soc: samsung: pm: Add support for suspend-to-ram of Exynos5433"

This reverts commit 1f4846014401dda74ae79cb56961bcff24648803.
It breaks ARM Exynos builds.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agotizen_tm2_defconfig: enable proper touchkey driver
Marek Szyprowski [Mon, 12 Mar 2018 14:58:35 +0000 (15:58 +0100)]
tizen_tm2_defconfig: enable proper touchkey driver

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoarm64: dts: exynos: Add flash led dt node for TM2 board
Ingi Kim [Mon, 11 Dec 2017 05:15:38 +0000 (14:15 +0900)]
arm64: dts: exynos: Add flash led dt node for TM2 board

This patch adds Kinetic ktd2692 flash led device node for TM2 board.

Signed-off-by: Ingi Kim <ingi2.kim@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agomedia: s5p-mfc: Add support for V4L2_MEMORY_DMABUF type
Marek Szyprowski [Fri, 20 Oct 2017 09:33:47 +0000 (11:33 +0200)]
media: s5p-mfc: Add support for V4L2_MEMORY_DMABUF type

MFC driver supports only MMAP operation mode mainly due to the hardware
restrictions of the addresses of the DMA buffers (MFC v5 hardware can
access buffers only in 128MiB memory region starting from the base address
of its firmware). When IOMMU is available, this requirement is easily
fulfilled even for the buffers located anywhere in the memory - typically
by mapping them in the DMA address space as close as possible to the
firmware. Later hardware revisions don't have this limitations at all.

The second limitation of the MFC hardware related to the memory buffers
is constant buffer address. Once the hardware has been initialized for
operation on given buffer set, the addresses of the buffers cannot be
changed.

With the above assumptions, a limited support for USERPTR and DMABUF
operation modes can be added. The main requirement is to have all buffers
known when starting hardware. This has been achieved by postponing
hardware initialization once all the DMABUF or USERPTR buffers have been
queued for the first time. Once then, buffers cannot be modified to point
to other memory area.

This patch also removes unconditional USERPTR operation mode from encoder
video node, because it doesn't work with v5 MFC hardware without IOMMU
being enabled.

In case of MFC v5 a bidirectional queue flag has to be enabled as a
workaround of the strange hardware behavior - MFC performs a few writes
to source data during the operation.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
[mszyprow: adapted to v4.14 code base, rewrote and extended commit message,
 added checks for changing buffer addresses, added bidirectional queue
 flags and comments]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoPCI: exynos: Remove deprecated PHY initialization code
Jaehoon Chung [Wed, 27 Dec 2017 09:43:27 +0000 (18:43 +0900)]
PCI: exynos: Remove deprecated PHY initialization code

Exynos platforms have a PCI PHY driver in the PHY framework that can be
used by the PCI host bridge drivers to initialize and manage the PHY.

Remove the deprecated PHY initialization code in the Exynos PCI host
bridge driver by updating the driver to use the PHY framework API;
modify the DT binding documentation accordingly.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
5 years agommc: dw_mmc: exynos: fix the suspend/resume issue for exynos5433
Jaehoon Chung [Fri, 9 Mar 2018 06:10:21 +0000 (15:10 +0900)]
mmc: dw_mmc: exynos: fix the suspend/resume issue for exynos5433

Before enabling the clock, dwmmc exynos driver is trying to access the
register. Then the kernel panic can be occurred.

Change-Id: I99a859ab167307eede06dba52a15138424254fa1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoPM / devfreq: Define the constant governor name
Chanwoo Choi [Mon, 23 Oct 2017 01:32:12 +0000 (10:32 +0900)]
PM / devfreq: Define the constant governor name

Prior to that, the devfreq device uses the governor name when adding
the itself. In order to prevent the mistake used the wrong governor name,
this patch defines the governor name as a constant and then uses them
instead of using the string directly.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
5 years agoPM / devfreq: Remove unneeded conditional statement
Chanwoo Choi [Mon, 23 Oct 2017 01:32:11 +0000 (10:32 +0900)]
PM / devfreq: Remove unneeded conditional statement

The freq_table array of each devfreq device is always not NULL.
In result, it is unneeded to check whether profile->freq_table
is NULL or not.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoPM / devfreq: Show the all available frequencies
Chanwoo Choi [Mon, 23 Oct 2017 01:32:10 +0000 (10:32 +0900)]
PM / devfreq: Show the all available frequencies

The commit a76caf55e5b35 ("thermal: Add devfreq cooling") allows
the devfreq device to use the cooling device. When the cooling down
are required, the devfreq_cooling.c disables the OPP entry with
the dev_pm_opp_disable(). In result, 'available_frequencies'[1]
sysfs node never came to show the all available frequencies.
[1] /sys/class/devfreq/.../available_frequencies

So, this patch uses the 'freq_table' in the 'struct devfreq_dev_profile'
in order to show the all available frequencies.
- If 'freq_table' is NULL, devfreq core initializes them by using OPP values.
- If 'freq_table' is initialized, devfreq core just uses the 'freq_table'.

And this patch adds some comment about the sort way of 'freq_table'.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoPM / devfreq: Change return type of devfreq_set_freq_table()
Chanwoo Choi [Mon, 23 Oct 2017 01:32:09 +0000 (10:32 +0900)]
PM / devfreq: Change return type of devfreq_set_freq_table()

This patch changes the return type of devfreq_set_freq_table()
from 'void' to 'int' in order to check whether it fails or not.

And This patch just removes the 'devfreq' prefix and the description
of function. Because the helper functions are only used by the devfreq.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoPM / devfreq: Use the available min/max frequency
Chanwoo Choi [Mon, 23 Oct 2017 01:32:08 +0000 (10:32 +0900)]
PM / devfreq: Use the available min/max frequency

The commit a76caf55e5b35 ("thermal: Add devfreq cooling") is able
to disable OPP as a cooling device. In result, both update_devfreq()
and {min|max}_freq_show() have to consider the 'opp->available'
status of each OPP.

So, this patch adds the 'scaling_{min|max}_freq' to struct devfreq
in order to indicate the available mininum and maximum frequency
by adjusting OPP interface such as dev_pm_opp_{disable|enable}().
The 'scaling_{min|max}_freq' are used for on both update_devfreq()
and {min|max}_freq_show().

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoRevert "PM / devfreq: Add show_one macro to delete the duplicate code"
Chanwoo Choi [Mon, 23 Oct 2017 01:32:07 +0000 (10:32 +0900)]
Revert "PM / devfreq: Add show_one macro to delete the duplicate code"

This reverts commit 3104fa3081126c9bda35793af5f335d0ee0d5818.

The {min|max}_freq_show() show the stored value of the struct devfreq.
But, if the drivers/thermal/devfreq_cooling.c disables the specific
frequency value, {min|max}_freq_show() have to check this situation
before showing the stored value. So, this patch revert the macro
in order to add the additional codes.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoPM / devfreq: Set min/max_freq when adding the devfreq device
Chanwoo Choi [Mon, 23 Oct 2017 01:32:06 +0000 (10:32 +0900)]
PM / devfreq: Set min/max_freq when adding the devfreq device

Prior to that, the min/max_freq of the devfreq device are always zero
before the user changes the min/max_freq through sysfs entries.
It might make the confusion for the min/max_freq.

This patch initializes the available min/max_freq by using the OPP
during adding the devfreq device.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoLOCAL / tools: add tools for making the image and build script
Chanwoo Choi [Fri, 6 Jan 2017 07:28:07 +0000 (16:28 +0900)]
LOCAL / tools: add tools for making the image and build script

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoLOCAL / arm64: dts: TM2: Add tizen-tm2.its file for using the u-boot
Chanwoo Choi [Fri, 6 Jan 2017 08:15:28 +0000 (17:15 +0900)]
LOCAL / arm64: dts: TM2: Add tizen-tm2.its file for using the u-boot

This patch just adds the .its file for TM2/TM2E. This file is used for
u-boot bootloader.

Change-Id: I177fcc9ae7e83b795dcfe7d151804de6e598d91d
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agopinctrl: samsung: Add LPDDR3_PAD_RETENTION to top domain
Chanwoo Choi [Thu, 11 Jan 2018 02:42:32 +0000 (11:42 +0900)]
pinctrl: samsung: Add LPDDR3_PAD_RETENTION to top domain

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoarm64: dts: exynos: Add cpu topology information for Exynos5433 SoC
Chanwoo Choi [Tue, 2 Jan 2018 02:23:20 +0000 (11:23 +0900)]
arm64: dts: exynos: Add cpu topology information for Exynos5433 SoC

Add the 'cpu-map' for the cpu topology information of Exynos5433
which has the following two clusters.
- cluster0 contains the four LITTLE cores (cpu0-3).
- cluster1 contains the four big cores (cpu4-7).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoarm64: dts: exynos: Add cpu_suspend property of PSCI for exynos5433
Chanwoo Choi [Tue, 29 Aug 2017 01:09:16 +0000 (10:09 +0900)]
arm64: dts: exynos: Add cpu_suspend property of PSCI for exynos5433

The ARM64 Exynos5433 supports PSCI(Power State Coordinate Interface)[1] v0.1.
When PSCI v0.1 is used, the device-tree should contain the specific entry
point such as cpu_suspend. Add the 'cpu_suspend' property in order to
support the cpuidle and suspend execution on Exynos5433 SoC.

The 'cpu_suspend' of psci is originally intended for use in idle subsystems.
Although the cpuidle and suspend-to-RAM framework have separate routine
in order to enter the low-power state, PSCI v0.1 doesn't support
the separate the entry point such as 'system_suspend' on PSCI v1.0.

So, the 'cpu_suspend' of PSCI v0.1 on Exynos5433 is used for both
cpuidle and suspend-to-RAM.

[1] http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoarm64: dts: exynos: Add iRAM device-tree node for Exynos5433
Chanwoo Choi [Tue, 9 Jan 2018 06:23:04 +0000 (15:23 +0900)]
arm64: dts: exynos: Add iRAM device-tree node for Exynos5433

Add the iRAM device-tree node of Exynos5433 which defines the memory map
of iRAM as following and it is used for suspend.
- address: 0x0202_0000 ~ 0x3000_0000

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agosoc: samsung: pm: Add support for suspend-to-ram of Exynos5433
Chanwoo Choi [Mon, 8 Jan 2018 06:24:51 +0000 (15:24 +0900)]
soc: samsung: pm: Add support for suspend-to-ram of Exynos5433

Add the specific exynos_pm_data instance for Exynos5433 in order to
support the suspend-to-ram. Exynos5433 SoC need to write the 'cpu_resume'
poiter address and the specific magic number for suspend mode.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agosoc: samsung: Add generic power-management driver for Exynos
Chanwoo Choi [Fri, 9 Mar 2018 07:17:12 +0000 (16:17 +0900)]
soc: samsung: Add generic power-management driver for Exynos

To enter suspend, Exynos SoC requires the some machine dependent procedures.
Introduce the generic power-management driver to support those requirements
and generic interface for power state management.

Change-Id: I585b9538e50f27310b860a8ccbc3776dec756a6a
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agosoc: samsung: pmu: Add the PMU data of exynos5433 to support low-power state
Chanwoo Choi [Tue, 9 Jan 2018 06:20:32 +0000 (15:20 +0900)]
soc: samsung: pmu: Add the PMU data of exynos5433 to support low-power state

Add the PMU (Power Management Unit) data of exynos5433 SoC
in order to support the various power modes. Each power mode has
the different value for reducing the power-consumption.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoclk: samsung: exynos5433: Add clock flag to support suspend-to-ram
Chanwoo Choi [Fri, 22 Dec 2017 03:16:21 +0000 (12:16 +0900)]
clk: samsung: exynos5433: Add clock flag to support suspend-to-ram

Add the CLK_IS_CRITICAL and CLK_IGNORE_UNUSED flag
to some clocks in order to avoid the hang-out in the suspend mode.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agodefconfig: add tizen_tm2_defconfig
Marek Szyprowski [Fri, 2 Mar 2018 15:47:33 +0000 (16:47 +0100)]
defconfig: add tizen_tm2_defconfig

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / ARM64: mm: increase default coherent pool size to 2 MiB
Marek Szyprowski [Wed, 7 Mar 2018 11:39:43 +0000 (12:39 +0100)]
LOCAL / ARM64: mm: increase default coherent pool size to 2 MiB

xhci drivers use a lot coherent allocations and default 256 KiB is
sometimes not enough to register xhci usb host properly.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / temporary workaround for i2s/prepare_lock deadlock
Marek Szyprowski [Wed, 7 Mar 2018 11:31:50 +0000 (12:31 +0100)]
LOCAL / temporary workaround for i2s/prepare_lock deadlock

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / GPU: ARM: Update MALI MIDGARD driver to v4.14 kernel base
Marek Szyprowski [Mon, 5 Mar 2018 14:55:25 +0000 (15:55 +0100)]
LOCAL / GPU: ARM: Update MALI MIDGARD driver to v4.14 kernel base

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / GPU: ARM: add MALI R12P0_04REL0 drivers
Marek Szyprowski [Mon, 5 Mar 2018 14:53:32 +0000 (15:53 +0100)]
LOCAL / GPU: ARM: add MALI R12P0_04REL0 drivers

Copy 12p0_04rel0 midgard MALI driver from linux-exynos v4.1 Tizen kernel.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / ARM: dts: exynos: Add MALI MIDGARD device to Exynos5433
Marek Szyprowski [Mon, 5 Mar 2018 14:54:44 +0000 (15:54 +0100)]
LOCAL / ARM: dts: exynos: Add MALI MIDGARD device to Exynos5433

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / mmc: dw_mmc: exynos: skip the specific sample value
Jaehoon Chung [Wed, 6 May 2015 08:05:44 +0000 (17:05 +0900)]
LOCAL / mmc: dw_mmc: exynos: skip the specific sample value

When card is tuning, skip the specific value(0x4).
This patch is workaround.
Until find the optimal solution and root problem, use this workaround.

Change-Id: I60881de6294eab9ba4a2cbf363c3a082987350a3
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / clocksource: arm_arch_timer: Don't register clockevent for Per-CPU
Chanwoo Choi [Tue, 19 Sep 2017 09:12:52 +0000 (18:12 +0900)]
LOCAL / clocksource: arm_arch_timer: Don't register clockevent for Per-CPU

The arm64 architecture enabled the arm_arch_timer always
even if arm_arch_timer is not stable. When Exynos5433 uses the
arm_arch_timer, it fails to enable/disble the secondary cpu.

To fix the hotplug issue of secondary cpu, if Exynos's MCT timer
is enabled, arm_arch_timer doesn't register the clockevent for Per-CPU.

Change-Id: Ia41f9c13889c4637391168dbc828a0bdbc7cdfff
Reported-by: Wook Song <wook16.song@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoLOCAL / clocksource/ arch_timer: Use phy timer instead of virt timer
Chanwoo Choi [Fri, 9 Sep 2016 08:22:47 +0000 (17:22 +0900)]
LOCAL / clocksource/ arch_timer: Use phy timer instead of virt timer

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoARM64: dts: exynos: Add mem-2-mem Scaler devices
Andrzej Pietrasiewicz [Tue, 17 Oct 2017 10:35:00 +0000 (12:35 +0200)]
ARM64: dts: exynos: Add mem-2-mem Scaler devices

There are two Scaler devices in Exynos5433 SoCs. Add nodes for them and
their SYSMMU controllers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
ARM64: dts: exynos: Add Scaler device to MSCL power domain

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoARM: dts: exynos: Add mem-2-mem Scaler devices
Andrzej Pietrasiewicz [Thu, 28 Sep 2017 10:28:38 +0000 (12:28 +0200)]
ARM: dts: exynos: Add mem-2-mem Scaler devices

There are 3 scaler devices in Exynos5420 SoCs, all are a part of MSCL
power domain. MSCL power domain and SYSMMU controllers (two per each
scaler device) have been already added to exynos5420.dtsi earlier,
so bind them to newly added devices.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agodrm/exynos: Add driver for Exynos Scaler module
Andrzej Pietrasiewicz [Thu, 9 Nov 2017 08:11:54 +0000 (09:11 +0100)]
drm/exynos: Add driver for Exynos Scaler module

Exynos Scaler is a hardware module, which processes graphic data fetched
from memory and transfers the resultant dato another memory buffer.
Graphics data can be up/down-scaled, rotated, flipped and converted color
space. Scaler hardware modules are a part of Exynos5420 and newer Exynos
SoCs.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agodrm/exynos: fimc: Convert driver to IPP v2 core API
Marek Szyprowski [Thu, 9 Nov 2017 08:11:53 +0000 (09:11 +0100)]
drm/exynos: fimc: Convert driver to IPP v2 core API

This patch adapts Exynos DRM FIMC driver to new IPP v2 core API.
The side effect of this conversion is a switch to driver component API
to register properly in the Exynos DRM core.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agodrm/exynos: gsc: Convert driver to IPP v2 core API
Marek Szyprowski [Thu, 9 Nov 2017 08:11:52 +0000 (09:11 +0100)]
drm/exynos: gsc: Convert driver to IPP v2 core API

This patch adapts Exynos DRM GScaler driver to new IPP v2 core API.
The side effect of this conversion is a switch to driver component API
to register properly in the Exynos DRM core. During the conversion
driver has been adapted to support more specific compatible strings
to distinguish between Exynos5250 and Exynos5420 (different hardware
limits). Support for Exynos5433 variant has been added too
(different limits table, removed dependency on ARCH_EXYNOS5).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agodrm/exynos: rotator: Convert driver to IPP v2 core API
Marek Szyprowski [Thu, 9 Nov 2017 08:11:51 +0000 (09:11 +0100)]
drm/exynos: rotator: Convert driver to IPP v2 core API

This patch adapts Exynos DRM rotator driver to new IPP v2 core API.
The side effect of this conversion is a switch to driver component API
to register properly in the Exynos DRM core.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agodrm/exynos: ipp: Add IPP v2 framework
Marek Szyprowski [Thu, 9 Nov 2017 08:11:50 +0000 (09:11 +0100)]
drm/exynos: ipp: Add IPP v2 framework

This patch adds Exynos IPP v2 subsystem and userspace API.

New userspace API is focused ONLY on memory-to-memory image processing.
The two remainging IPP operation modes (framebuffer writeback and
local-path output with image processing) can be implemented using
standard DRM features: writeback connectors and additional DRM planes with
scaling features.

V2 IPP userspace API is not compatible with old IPP ioctls. This is a
significant change, but the old IPP subsystem in mainline Linux kernel was
partially disfunctional anyway and not used in any open-source project.

V2 IPP userspace API is based on stateless approach, which much better fits
to memory-to-memory image processing model. It also provides support for
all image formats, which are both already defined in DRM API and supported
by the existing IPP hardware modules.

The API consists of the following ioctls:
- DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES: to enumerate all available image
  processing modules,
- DRM_IOCTL_EXYNOS_IPP_GET_CAPS: to query capabilities and supported image
  formats of given IPP module,
- DRM_IOCTL_EXYNOS_IPP_GET_LIMITS: to query hardware limitiations for
  selected image format of given IPP module,
- DRM_IOCTL_EXYNOS_IPP_COMMIT: to perform operation described by the
  provided structures (source and destination buffers, operation rectangle,
  transformation, etc).

The proposed userspace API is extensible. In the future more advanced image
processing operations can be defined to support for example blending.

Userspace API is fully functional also on DRM render nodes, so it is not
limited to the root/privileged client.

Internal driver API also has been completely rewritten. New IPP core
performs all possible input validation, checks and object life-time
control. The drivers can focus only on writing configuration to hardware
registers. Stateless nature of DRM_IOCTL_EXYNOS_IPP_COMMIT ioctl simplifies
the driver API. Minimal driver needs to provide a single callback for
starting processing and an array with supported image formats.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
5 years agoInput: stmfts - force async driver probe to avoid 2s delay on boot
Marek Szyprowski [Wed, 7 Mar 2018 10:20:18 +0000 (11:20 +0100)]
Input: stmfts - force async driver probe to avoid 2s delay on boot

Executing stmfts_power_on() function lasts over 2 seconds, what
significantly slows down the boot process if driver is compiled in.
Avoid this delay by forcing this driver to be probed asynchronously.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agodrm/bridge/sii8620: use micro-USB cable detection logic to detect MHL
Maciej Purski [Tue, 27 Feb 2018 07:11:34 +0000 (08:11 +0100)]
drm/bridge/sii8620: use micro-USB cable detection logic to detect MHL

Currently MHL chip must be turned on permanently to detect MHL cable. It
duplicates micro-USB controller's (MUIC) functionality and consumes
unnecessary power. Lets use extcon attached to MUIC to enable MHL chip
only if it detects MHL cable.

Signed-off-by: Maciej Purski <m.purski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoextcon: add possibility to get extcon device by OF node
Andrzej Hajda [Tue, 27 Feb 2018 07:11:33 +0000 (08:11 +0100)]
extcon: add possibility to get extcon device by OF node

Since extcon property is not allowed in DT, extcon subsystem requires
another way to get extcon device. Lets try the simplest approach - get
edev by of_node.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agodt-bindings: add bindings for Samsung micro-USB 11-pin connector
Andrzej Hajda [Tue, 27 Feb 2018 07:11:30 +0000 (08:11 +0100)]
dt-bindings: add bindings for Samsung micro-USB 11-pin connector

Samsung micro-USB 11-pin connector beside standard micro-USB pins,
has pins dedicated to route MHL traffic.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agodt-bindings: add bindings for USB physical connector
Andrzej Hajda [Tue, 27 Feb 2018 07:11:29 +0000 (08:11 +0100)]
dt-bindings: add bindings for USB physical connector

These bindings allow to describe most known standard USB connectors
and it should be possible to extend it if necessary.
USB connectors, beside USB can be used to route other protocols,
for example UART, Audio, MHL. In such case every device passing data
through the connector should have appropriate graph bindings.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoarm64: dts: exynos: add OF graph between MHL and USB connector
Andrzej Hajda [Tue, 27 Feb 2018 07:11:32 +0000 (08:11 +0100)]
arm64: dts: exynos: add OF graph between MHL and USB connector

OF graph describes MHL data lanes between MHL and respective USB
connector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: add micro-USB connector node to TM2 platforms
Andrzej Hajda [Tue, 27 Feb 2018 07:11:31 +0000 (08:11 +0100)]
arm64: dts: exynos: add micro-USB connector node to TM2 platforms

Since USB connector bindings are available we can describe it on TM2(e).

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Add missing interrupts property to PMIC on Trats board
Marek Szyprowski [Mon, 26 Feb 2018 14:45:41 +0000 (15:45 +0100)]
ARM: dts: exynos: Add missing interrupts property to PMIC on Trats board

PMIC node requires external interrupts for proper operation, but property
defining them was missing. This was probably caused by a limited support
for interrupts from more than one parent, which was not possible to define
when support for this board was added. Fix this by adding
'interrupt-extended' property and properly define interrupt lines for PMIC
node.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Cleanup power domain nodes in exynos3250.dtsi
Marek Szyprowski [Wed, 21 Feb 2018 10:25:15 +0000 (11:25 +0100)]
ARM: dts: exynos: Cleanup power domain nodes in exynos3250.dtsi

Device nodes in device tree should use generic names, so rename
all existing power domains to "power-domain". To keep readable domain
names in debug logs, use label property, which has been introduce by
commit b13b2330aab5 ("soc: samsung: pm_domains: Read domain name from
the new label property");

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Add support for HDMI audio on Exynos 5433 TM2 board
Sylwester Nawrocki [Mon, 12 Feb 2018 16:31:47 +0000 (17:31 +0100)]
ARM: dts: exynos: Add support for HDMI audio on Exynos 5433 TM2 board

This patch updates the sound node of the exynos5433-tm2 board
and adds clock tree configuration in order to support HDMI sound.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Update I2S0 device node in exynos5433
Sylwester Nawrocki [Mon, 12 Feb 2018 16:31:46 +0000 (17:31 +0100)]
ARM: dts: exynos: Update I2S0 device node in exynos5433

The i2s0 node name is changed to a more generic "i2s" and missing
(optional) properties are added. The #sound-dai-cells property is
required for HDMI audio support on TM2 board.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Add I2S1 device node to exynos5433
Sylwester Nawrocki [Mon, 12 Feb 2018 16:31:45 +0000 (17:31 +0100)]
ARM: dts: exynos: Add I2S1 device node to exynos5433

Add DT node for the second I2S controller available
on Exynos 5433 SoC.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoASoC: samsung: Add support for HDMI audio on TM2 board
Sylwester Nawrocki [Mon, 12 Feb 2018 16:15:37 +0000 (17:15 +0100)]
ASoC: samsung: Add support for HDMI audio on TM2 board

This patch defines I2S1 - HDMI DAI link and implements related
hw_params callback. The AUD PLL frequency is configured through
the CLK_SCLK_I2S1 leaf clock, the exynos5433 clock tree
definitions are updated in a separate patch.

The device tree parsing part is changed is a way it supports older
DTBs with just a single CPU DAI specified, without the HDMI link.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>