platform/kernel/linux-exynos.git
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>
5 years agoASoC: samsung: i2s: Define the parameters list for SAMSUNG_I2S_OPCLK
Sylwester Nawrocki [Mon, 12 Feb 2018 16:15:35 +0000 (17:15 +0100)]
ASoC: samsung: i2s: Define the parameters list for SAMSUNG_I2S_OPCLK

The SAMSUNG_I2S_OPCLK is not currently used by any card driver thus we can
safely change semantics of 'dir' argument of the I2S set_sysclk() callback.
Now an enumeration is exported instead of directly using register bit field
values.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: samsung: i2s: Prevent external abort on exynos5433 I2S1 access
Sylwester Nawrocki [Mon, 12 Feb 2018 16:15:34 +0000 (17:15 +0100)]
ASoC: samsung: i2s: Prevent external abort on exynos5433 I2S1 access

It seems both PCLK_I2S1 and SCLK_I2S1 clocks need to be enabled before
I2S1 control registers can be accessed on exynos5433. If SCLK clock
is disabled an exception is triggered. To fix this parent clock of
the RCLK_SRC clock is assigned to pri_dai->op_clk so required gate
clock is handled by the runtime PM ops.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: samsung: i2s: Ensure names of supplied clocks are unique
Sylwester Nawrocki [Mon, 12 Feb 2018 16:15:33 +0000 (17:15 +0100)]
ASoC: samsung: i2s: Ensure names of supplied clocks are unique

In order to support multiple instances of the I2S IP block the platform
device name is prepended to each clock registered by the driver.
The clock-output-names property is now not used, this should not cause
any issues as, for example, CDCLK clock is referenced through DT 'clocks'
property, not by name.

This change allows to have both I2S0 and I2S1 enabled simultaneously
on exynos5433 and working properly when #clock-cells property is specified
in respective DT nodes.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: samsung: clean makefile about inexistant files
Corentin Labbe [Mon, 29 Jan 2018 12:26:16 +0000 (12:26 +0000)]
ASoC: samsung: clean makefile about inexistant files

Clean makefile rules about inexistant files.
Thoses files were removed in commit a076d418235f ("ASoC: samsung: Drop AC97 drivers")

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_links
Jaechul Lee [Wed, 6 Sep 2017 01:04:14 +0000 (10:04 +0900)]
ASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_links

Add specific cpu_dai_name to dai_link because samsung i2s driver registers
two dais and components. Selecting one of them clearly is needed more
information like cpu_dai_name, of_node. The reason why the dai_links have
to use 'samsung-i2s' for cpu_dai is that 'samsung-i2s-sec' doesn't have a
capture functionality.

Without this code, cpu_dai will be selected the first one of the
component_list. For example, if I describe nothing to cpu_dai_name,
'samsung-i2s-sec' might be selected to HiFi Primay.

Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoASoC: samsung: i2s: Use specific name for i2s dais
Jaechul Lee [Wed, 6 Sep 2017 01:04:13 +0000 (10:04 +0900)]
ASoC: samsung: i2s: Use specific name for i2s dais

Add specific dais name when components are registered. Component and dai
name will follow their parent dev name, if the name isn't described.  In
case of this driver, each dais will have same name like '11440000.i2s0' by
fmt_single_name function.

The problem having same name is that TM2 machine driver can't detect
capture devices correctly. Machine driver doesn't know which one is proper
to use for cpu dai. The driver just selects to use 'samsung-i2c-sec' that
doesn't have capture functionality because the component of
samsung-i2s-sec is located in the first of the component_list.

I add dai name like 'samsung-i2s', 'samsung-i2s-sec' for each dais. The
reason why adding dai id to 1 is that it doesn't allow to use particular
dai name in case of when I use 0 for dai id.

Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 years agoi2c: exynos5: rework HSI2C_MASTER_ST_LOSE state handling
Andrzej Hajda [Tue, 27 Feb 2018 07:19:00 +0000 (08:19 +0100)]
i2c: exynos5: rework HSI2C_MASTER_ST_LOSE state handling

HSI2C_MASTER_ST_LOSE state is not documented properly, extensive tests
show that hardware is usually able to recover from this state without
interrupting the transfer. Moreover documentation says that
such state can be caused by slave clock stretching, and should not be
treated as an error during transaction. The only place it indicates
an error is just before starting transaction. In such case bus recovery
procedure should be performed - master should pulse SCL line nine times
and then send STOP condition, it can be repeated until SDA goes high.
The procedure can be performed using manual commands HSI2C_CMD_READ_DATA
and HSI2C_CMD_SEND_STOP.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
5 years agoi2c: exynos5: change internal transmission timeout to 100ms
Andrzej Hajda [Thu, 30 Nov 2017 14:30:05 +0000 (15:30 +0100)]
i2c: exynos5: change internal transmission timeout to 100ms

Exynos-I2C uses default timeout of 1 second for the whole transaction,
including re-transmissions due to arbitration lost errors (-EAGAIN).
To allow re-transmissions driver's internal timeout should be significantly
lower, 100ms seems to be good candidate.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
5 years agoARM: exynos_defconfig: Enable CONFIG_EXYNOS_IOMMU
Shuah Khan [Tue, 12 Dec 2017 21:31:10 +0000 (14:31 -0700)]
ARM: exynos_defconfig: Enable CONFIG_EXYNOS_IOMMU

EXYNOS_IOMMU is disabled in exynos_defconfig since it was known to cause
boot failures on Exynos Chromebooks. The recommendation was for IOMMU to
be enabled manually on systems as needed.

A recent exynos_drm change added a warning message when EXYNOS_IOMMU is
disabled. It is necessary to enable it to avoid the warning messages.
A few initial tests have shown that enabling EXYNOS_IOMMU might be safe
on Exynos Chrome-books.

Due to some other changes in the order of operations during boot
process, power domains are initialized very early and because of the
temporary lack of devices (which are not yet added to the system), are
turned off.

This practically stops FIMD for scanning framebuffer very early during
boot, before IOMMU gets initialized and "solves" the issue, which was
the reason to disable Exynos IOMMU by default on Exynos Snow Chromebooks.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
[krzk: Extend message with Marek Szyprowski's explanation]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: exynos_defconfig: Enable missing drivers for supported Exynos boards
Marek Szyprowski [Thu, 30 Nov 2017 09:10:03 +0000 (10:10 +0100)]
ARM: exynos_defconfig: Enable missing drivers for supported Exynos boards

Enable following drivers for recently merged devices:
- perf events and ARM PMU (Performance Measurement Unit) driver for all
  Exynos boards
- CEC and S5P CEC driver for all Exynos4 and Exynos5 boards with HDMI
- Sii9234 DRM HDMI-MHL bridge for Trats2
- dedicated Odroid ASoC machine driver for Odroid XU3/XU4

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Fix typo in MSCL clock controller unit address of Exynos5433
Krzysztof Kozlowski [Wed, 20 Dec 2017 19:27:02 +0000 (20:27 +0100)]
arm64: dts: exynos: Fix typo in MSCL clock controller unit address of Exynos5433

Fix typo in unit address of MSCL clock controller (the reg entry is
correct) of Exynso5433.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Use lower case hex addresses in node unit addresses
Krzysztof Kozlowski [Wed, 20 Dec 2017 19:27:01 +0000 (20:27 +0100)]
arm64: dts: exynos: Use lower case hex addresses in node unit addresses

Convert all hex addresses in node unit addresses to lower case to
fix warnings like:
    arch/arm64/boot/dts/exynos/exynos5433-tm2e.dtb: Warning (simple_bus_reg):
      Node /soc/video-scaler@13C00000 simple-bus unit address format error, expected "13c00000"

Conversion was done using sed:
    $ sed -e 's/@\([a-zA-Z0-9_-]*\) {/@\L\1 {/' -i arch/arm64/boot/dts/exynos/*.dts*

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
5 years agoarm64: dts: exynos: Increase bus frequency for MHL chip
Andrzej Hajda [Fri, 1 Dec 2017 11:33:51 +0000 (12:33 +0100)]
arm64: dts: exynos: Increase bus frequency for MHL chip

sii8620 supports 1 MHz clock, it allows faster transmissions and according
to extensive tests allows to mitigate some obscure bugs in I2C client
logic of the chip.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add remaining power domains to Exynos5433 SoC
Marek Szyprowski [Wed, 29 Nov 2017 11:26:38 +0000 (12:26 +0100)]
arm64: dts: exynos: Add remaining power domains to Exynos5433 SoC

This patch adds support for G2D, G3D, CAM0, CAM1, ISP, HVEC power domains
to Exynos5433 SoCs. Currently only clock controllers for those domains are
defined. CAM1 is a parent of CAM0 power domain and CAM0 is a parent of ISP
power domain.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add AUD power domain to Exynos5433 SoC
Marek Szyprowski [Wed, 29 Nov 2017 11:26:37 +0000 (12:26 +0100)]
arm64: dts: exynos: Add AUD power domain to Exynos5433 SoC

This patch adds support for AUD power domain to Exynos5433 SoCs, which
contains following devices: a clock controller, a pin controller, LPASS
module, I2S controller, ADMA PL330 engine and UART #3 device.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add MFC power domain to Exynos 5433 SoC
Marek Szyprowski [Wed, 29 Nov 2017 11:26:36 +0000 (12:26 +0100)]
arm64: dts: exynos: Add MFC power domain to Exynos 5433 SoC

This patch adds support for MFC power domain to Exynos 5433 SoCs, which
contains following devices: a clock controller, MFC codec device and its
SYSMMUs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add MSCL power domain to Exynos 5433 SoC
Marek Szyprowski [Wed, 29 Nov 2017 11:26:35 +0000 (12:26 +0100)]
arm64: dts: exynos: Add MSCL power domain to Exynos 5433 SoC

This patch adds support for MSCL power domain to Exynos 5433 SoCs, which
contains following devices: a clock controller, JPEG codec device and its
SYSMMU.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add DISP power domain to Exynos 5433 SoC
Marek Szyprowski [Wed, 29 Nov 2017 11:26:34 +0000 (12:26 +0100)]
arm64: dts: exynos: Add DISP power domain to Exynos 5433 SoC

This patch adds support for DISP power domain to Exynos 5433 SoCs, which
contains following devices: a clock controller, two display controllers
(DECON and DECON TV), their SYSMMUs, MIC, DSI and HDMI video devices.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add GSCL power domain to Exynos 5433 SoC
Marek Szyprowski [Wed, 29 Nov 2017 11:26:33 +0000 (12:26 +0100)]
arm64: dts: exynos: Add GSCL power domain to Exynos 5433 SoC

This patch adds support for GSCL power domain to Exynos 5433 SoCs, which
contains following devices: a clock controller, three GSCL video scalers and
their SYSMMUs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add support for S3FWRN5 NFC chip to TM2(e) boards
Marek Szyprowski [Wed, 29 Nov 2017 11:13:20 +0000 (12:13 +0100)]
arm64: dts: exynos: Add support for S3FWRN5 NFC chip to TM2(e) boards

Add device tree node with S3FWRN5 NFC chip to TM2(e) boards. The chip is
connected through HS-I2C bus #4.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
[mszyprow: rebased onto v4.15-rc1, moved node to exynos5433-tm2-common.dtsi,
 rephrased commit message]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoarm64: dts: exynos: Add CPU performance counters to Exynos5433 boards
Marek Szyprowski [Thu, 23 Nov 2017 14:34:31 +0000 (15:34 +0100)]
arm64: dts: exynos: Add CPU performance counters to Exynos5433 boards

Enable support for ARM Performance Monitoring Units available in
Cortex-A53 and Cortex-A57 CPU cores for Exynos5433 SoCs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Use lower case hex addresses in node unit addresses
Krzysztof Kozlowski [Thu, 14 Dec 2017 20:54:30 +0000 (21:54 +0100)]
ARM: dts: exynos: Use lower case hex addresses in node unit addresses

Convert all hex addresses in node unit addresses to lower case to fix warnings
like:
    arch/arm/boot/dts/exynos5422-odroidhc1.dtb: Warning (simple_bus_reg):
      Node /soc/nocp@10CA1000 simple-bus unit address format error, expected "10ca1000"

Conversion was done using sed:

    $ sed -e 's/@\([a-zA-Z0-9_-]*\) {/@\L\1 {/' -i arch/arm/boot/dts/exynos*.dts*

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Add nodes for True Random Number Generator
Łukasz Stelmach [Tue, 12 Dec 2017 12:09:02 +0000 (13:09 +0100)]
ARM: dts: exynos: Add nodes for True Random Number Generator

Add nodes for the True Random Number Generator found in Samsung Exynos
5250+ SoCs.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Add DT nodes for PRNG in Exynos5 SoCs
Łukasz Stelmach [Mon, 11 Dec 2017 08:54:15 +0000 (09:54 +0100)]
ARM: dts: exynos: Add DT nodes for PRNG in Exynos5 SoCs

Add nodes for Pseudo Random Number Generator in dts files describing
Exynos5 chips.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Add G3D power domain to Exynos5250
Marek Szyprowski [Fri, 8 Dec 2017 14:53:56 +0000 (15:53 +0100)]
ARM: dts: exynos: Add G3D power domain to Exynos5250

Add support for G3D power domain, which contains ARM Mali-600MP
graphics accelerator device (not yet instantiated).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: dts: exynos: Add audio power domain to Exynos5250
Marek Szyprowski [Fri, 8 Dec 2017 14:53:55 +0000 (15:53 +0100)]
ARM: dts: exynos: Add audio power domain to Exynos5250

Audio power domain includes following hardware modules: Pin controller
for GPZ bank, AudioSS clock controller and three Exynos I2S controller.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>