aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/samsung (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-04-17soc: samsung: pm_domains: Deprecate support for clocksMarek Szyprowski1-89/+1
Handling of special clock operations on power domain on/off sequences has been moved to respective Exynos clock controller drivers, so there is no need to keep the duplicated (and conflicting) code in Exynos power domain driver. Mark clock related properties in Exynos power domain bindings as deprecated. This change has no inpact on backwards-compatibility, as the new drivers properly work with old DTBs (deprecated properties are ignored). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2018-04-13Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linuxLinus Torvalds1-0/+11
Pull clk updates from Stephen Boyd: "The large diff this time around is from the addition of a new clk driver for the TI Davinci family of SoCs. So far those clks have been supported with a custom implementation of the clk API in the arch port instead of in the CCF. With this driver merged we're one step closer to having a single clk API implementation. The other large diff is from the Amlogic clk driver that underwent some major surgery to use regmap. Beyond that, the biggest hitter is Samsung which needed some reworks to properly handle clk provider power domains and a bunch of PLL rate updates. The core framework was fairly quiet this round, just getting some cleanups and small fixes for some of the more esoteric features. And the usual set of driver non-critical fixes, cleanups, and minor additions are here as well. Core: - Rejig clk_ops::init() to be a little earlier for phase/accuracy ops - debugfs ops macroized to shave some lines of boilerplate code - Always calculate the phase instead of caching it in clk_get_phase() - More __must_check on bulk clk APIs New Drivers: - TI's Davinci family of SoCs - Intel's Stratix10 SoC - stm32mp157 SoC - Allwinner H6 CCU - Silicon Labs SI544 clock generator chip - Renesas R-Car M3-N and V3H SoCs - i.MX6SLL SoCs Removed Drivers: - ST-Ericsson AB8540/9540 Updates: - Mediatek MT2701 and MT7622 audsys support and MT2712 updates - STM32F469 DSI and STM32F769 sdmmc2 support - GPIO clks can sleep now - Spreadtrum SC9860 RTC clks - Nvidia Tegra MBIST workarounds and various minor fixes - Rockchip phase handling fixes and a memory leak plugged - Renesas drivers switch to readl/writel from clk_readl/clk_writel - Renesas gained CPU (Z/Z2) and watchdog support - Rockchip rk3328 display clks and rk3399 1.6GHz PLL support - Qualcomm PM8921 PMIC XO buffers - Amlogic migrates to regmap APIs - TI Keystone clk latching support - Allwinner H3 and H5 video clk fixes - Broadcom BCM2835 PLLs needed another bit to enable - i.MX6SX CKO mux fix and i.MX7D Video PLL divider fix - i.MX6UL/ULL epdc_podf support - Hi3798CV200 COMBPHY0 and USB2_OTG_UTMI and phase support for eMMC" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (233 commits) clk: davinci: add a reset lookup table for psc0 clk: imx: add clock driver for imx6sll dt-bindings: imx: update clock doc for imx6sll clk: imx: add new gate/gate2 wrapper funtion clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux clk: cs2000: set pm_ops in hibernate-compatible way clk: bcm2835: De-assert/assert PLL reset signal when appropriate clk: imx7d: Move clks_init_on before any clock operations clk: imx7d: Correct ahb clk parent select clk: imx7d: Correct dram pll type clk: imx7d: Add USB clock information clk: socfpga: stratix10: add clock driver for Stratix10 platform dt-bindings: documentation: add clock bindings information for Stratix10 clk: ti: fix flag space conflict with clkctrl clocks clk: uniphier: add additional ethernet clock lines for Pro4 clk: uniphier: add SATA clock control support clk: uniphier: add PCIe clock control support clk: Add driver for the si544 clock generator chip clk: davinci: Remove redundant dev_err calls clk: uniphier: add ethernet clock control support for PXs3 ...
2018-03-06clk: samsung: exynos5250: Move PD-dependent clocks to Exynos5 sub-CMUMarek Szyprowski1-0/+1
Clocks related to DISP1 block require special handling for power domain turn on/off sequences. Till now this was handled by Exynos power domain driver, but that approach was limited only to some special cases. This patch moves handling of those operations to clock controller driver. This gives more flexibility and allows fine tune values of some clock-specific registers. This patch moves handling of those mentioned clocks to Exynos5 sub-CMU driver instantiated from Exynos5250 driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2018-03-06clk: samsung: exynos5420: Move PD-dependent clocks to Exynos5 sub-CMUMarek Szyprowski1-0/+2
Clocks related to DISP, GSC and MFC blocks require special handling for power domain turn on/off sequences. Till now this was handled by Exynos power domain driver, but that approach was limited only to some special cases. This patch moves handling of those operations to clock controller driver. This gives more flexibility and allows fine tune values of some clock-specific registers. This patch moves handling of those mentioned clocks to Exynos5 sub-CMU driver instantiated from Exynos5420 driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2018-03-06soc: samsung: pm_domains: Add blacklisting clock handlingMarek Szyprowski1-0/+8
Handling of clock reparenting will be move to clock controller driver, so add possibility to blacklist clock handling on systems, where the clock controller already does all needed operations. This is needed to avoid potential deadlock on clock reparenting during power domain on/off procedure. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2018-02-13soc: samsung: pmu: Populate children syscon nodesKrzysztof Kozlowski1-0/+7
The syscon poweroff and restart nodes logically belong to the Power Management Unit so populate possible children. This also requires providing compatibles for Exynos5410 and Exynos7 so the PMU device and its children will be instantiated for them as well. Just like Exynos5433, these chipsets are not yet supported by the PMU driver. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
2018-01-03soc: samsung: Add SPDX license identifiersKrzysztof Kozlowski9-68/+43
Replace GPL license statements with SPDX GPL-2.0 license identifiers. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-10-08soc: samsung: Remove Exynos4212 related dead codeMarek Szyprowski3-22/+2
Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"), so there is no need to keep remaining dead code related to this SoC version. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-08-23Merge tag 'samsung-drivers-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/driversArnd Bergmann1-1/+1
Pull "Samsung soc drivers changes for v4.14" from Krzysztof Kozłowski: Conversion to kbasename from Rob Herring. * tag 'samsung-drivers-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: Use kbasename instead of open coding
2017-08-16soc: Convert to using %pOF instead of full_nameRob Herring1-4/+4
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Cc: Scott Wood <oss@buserror.net> Cc: Qiang Zhao <qiang.zhao@nxp.com> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Kukjin Kim <kgene@kernel.org> Cc: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-07-24soc: samsung: Use kbasename instead of open codingRob Herring1-1/+1
In preparation to not store the full path of nodes in full_name, use kbasename instead as it will work either with the full path or not. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-03-21soc: samsung: Do not build ARMv7 PMU drivers on ARMv8Krzysztof Kozlowski4-8/+29
The Exynos Power Management Unit (PMU) drivers contain quite large static arrays of register values necessary for given Exynos SoC to enter low power mode. All this data is useless for ARMv8 SoC like Exynos5433, because the image will not be shared between ARMv7 and ARMv8. Add additional Kconfig symbol for selecting the SoC-specific driver addons thus skipping the useless data in the final image (this is similar approach to chosen for Exynos clock controller drivers): - exynos-pmu driver will be compiled on both architectures ARMv7 and ARMv8, - additional driver_data for ARMv7 SoCs will not be built on ARMv8 and a macro will return NULL for them in of_device_id - this should be safe as these compatibles cannot match on ARMv7 and driver anyway handles NULL driver_data, - on ARMv8 compile only exynos-pmu driver which exposes the syscon-regmap for PMU address space. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
2017-02-07Merge tag 'samsung-drivers-soc-pm-domains-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/driversArnd Bergmann1-10/+14
Pull "soc: samsung: pm_domains for v4.11" from Krzysztof Kozłowski: Improve the PM domains driver for Exynos by displaying a user-friendly name of power domain. Till now, the name of node from DT was used which mostly is just "power-domain". We need more than that. * tag 'samsung-drivers-soc-pm-domains-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: pm_domains: Read domain name from the new label property soc: samsung: pm_domains: Remove message about failed memory allocation soc: samsung: pm_domains: Remove unused name field soc: samsung: pm_domains: Use full names in subdomains registration log
2017-01-31soc: samsung: pm_domains: Read domain name from the new label propertyMarek Szyprowski1-2/+10
Device tree nodes for each power domain should use generic "power-domain" name, so using it as a domain name doesn't give much benefits. This patch adds support for human readable names defined in 'label' property. Such names are visible to userspace and makes debugging much easier. When no 'label' property is found, driver keeps using the name constructed from full node name. Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-31soc: samsung: pm_domains: Remove message about failed memory allocationMarek Szyprowski1-2/+0
Memory subsystem already prints message about failed memory allocation, there is no need to do it in the drivers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-31soc: samsung: pm_domains: Remove unused name fieldMarek Szyprowski1-4/+2
Name is now in generic pm domain structure, so there is no need to duplicate it in private data. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-31soc: samsung: pm_domains: Use full names in subdomains registration logMarek Szyprowski1-2/+2
Device tree none name for each power domain should be "power-domain", so use a bit more descriptive full node name in messages about subdomain registration. This way the following meaningless message: power-domain has as child subdomain: power-domain. is changed to a bit more meaningful one: /soc/power-domain@105c40a0 has as child subdomain: /soc/power-domain@105c4020. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-27soc: samsung: pmu: Remove duplicated define for ARM_L2_OPTION registerKrzysztof Kozlowski2-3/+3
The register ARM_L2_OPTION (0x2608 in Exynos4 and Exynos5 PMU) was defined twice. Both names were used in the Exynos542x code. Simplify this. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-27soc: samsung: pm_domains: Add new Exynos5433 compatibleChanwoo Choi1-0/+7
Add a new compatible string for Exynos5433 because it uses the 0xf value instead of 0x7 for domain on/off registers. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-26soc: samsung: pmu: Add dummy support for Exynos5433 SoCMarek Szyprowski1-2/+4
Add compatible for Exynos5433 SoC, so the driver will bind and let other drivers to use PMU regmap. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-20soc: samsung: pmu: Remove messages for failed memory allocationMarek Szyprowski1-3/+1
Memory subsystem already prints message about failed memory allocation, there is no need to do it in the driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-20soc: samsung: pmu: Use of_device_get_match_data helperMarek Szyprowski1-5/+2
Replace custom code with generic helper to retrieve driver data. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-01-20soc: samsung: pmu: Provide global function to get PMU regmapMarek Szyprowski1-0/+11
PMU is something like a SoC wide service, so add a helper function to get PMU regmap. This will be used by other Exynos device drivers. This way it can be avoided to model this dependency in device tree (as phandles to PMU node) for almost every device in the SoC. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2016-09-13ARM: EXYNOS: Remove calls to of_genpd_get_from_provider()Jon Hunter1-15/+8
Update the EXYNOS PM domain code to use the of_genpd_add_subdomain() and remove any calls to of_genpd_get_from_provider(). Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-08-01Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds5-2/+252
Pull ARM SoC driver updates from Olof Johansson: "Driver updates for ARM SoCs. A slew of changes this release cycle. The reset driver tree, that we merge through arm-soc for historical reasons, is also sizable this time around. Among the changes: - clps711x: Treewide changes to compatible strings, merged here for simplicity. - Qualcomm: SCM firmware driver cleanups, move to platform driver - ux500: Major cleanups, removal of old mach-specific infrastructure. - Atmel external bus memory driver - Move of brcmstb platform to the rest of bcm - PMC driver updates for tegra, various fixes and improvements - Samsung platform driver updates to support 64-bit Exynos platforms - Reset controller cleanups moving to devm_reset_controller_register() APIs - Reset controller driver for Amlogic Meson - Reset controller driver for Hisilicon hi6220 - ARM SCPI power domain support" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (100 commits) ARM: ux500: consolidate base platform files ARM: ux500: move soc_id driver to drivers/soc ARM: ux500: call ux500_setup_id later ARM: ux500: consolidate soc_device code in id.c ARM: ux500: remove cpu_is_u* helpers ARM: ux500: use CLK_OF_DECLARE() ARM: ux500: move l2x0 init to .init_irq mfd: db8500 stop passing around platform data ASoC: ab8500-codec: remove platform data based probe ARM: ux500: move ab8500_regulator_plat_data into driver ARM: ux500: remove unused regulator data soc: raspberrypi-power: add CONFIG_OF dependency firmware: scpi: add CONFIG_OF dependency video: clps711x-fb: Changing the compatibility string to match with the smallest supported chip input: clps711x-keypad: Changing the compatibility string to match with the smallest supported chip pwm: clps711x: Changing the compatibility string to match with the smallest supported chip serial: clps711x: Changing the compatibility string to match with the smallest supported chip irqchip: clps711x: Changing the compatibility string to match with the smallest supported chip clocksource: clps711x: Changing the compatibility string to match with the smallest supported chip clk: clps711x: Changing the compatibility string to match with the smallest supported chip ...
2016-07-06soc: samsung: pmu: Constify arrays with PMU dataKrzysztof Kozlowski2-2/+2
Arrays storing values for Power Management Unit for given sleep mode can be made const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2016-05-30soc: samsung: pm_domains: Enable COMPILE_TEST for build coverageKrzysztof Kozlowski2-1/+5
Introduce a platform selectable symbol EXYNOS_PM_DOMAINS which can be also toggled on by COMPILE_TEST for some build coverage. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2016-05-30soc: samsung: pm_domains: Prepare for supporting ARMv8 ExynosKrzysztof Kozlowski1-6/+28
The ARMv8 Exynos family (Exynos5433 and Exynos7420) uses different value (0xf instead of 0x7) for controlling the power domain on/off registers (both for control and for status). Choose the value depending on the compatible. This prepares the driver for supporting ARMv8 SoCs. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-05-30ARM: EXYNOS: Move pm_domains driver to drivers/soc/samsungKrzysztof Kozlowski2-0/+224
Exynos PM domains driver does not have mach-specific dependencies so it can be safely moved out of arm/mach-exynos to drivers/soc. This in future will allow re-using it on ARM64 boards. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-02-25drivers: soc: samsung: Enable COMPILE_TESTKrzysztof Kozlowski1-6/+6
Get some build coverage of Exynos PMU driver. It depends on asm/cputype.h so its compilation is limited to ARM architectures. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
2016-02-25drivers: soc: Add support for Exynos PMU driverPankaj Dubey8-0/+1072
This patch moves Exynos PMU driver implementation from "arm/mach-exynos" to "drivers/soc/samsung". This driver is mainly used for setting misc bits of register from PMU IP of Exynos SoC which will be required to configure before Suspend/Resume. Currently all these settings are done in "arch/arm/mach-exynos/pmu.c" but moving ahead for ARM64 based SoC support, there is a need of this PMU driver in driver/* folder. This driver uses existing DT binding information and there should be no functionality change in the supported platforms. Signed-off-by: Amit Daniel Kachhap <amitdanielk@gmail.com> [tested on Peach-Pi (Exynos5880)] Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> [for testing on Trats2 (Exynos4412) and Odroid XU3 (Exynos5422)] Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> [k.kozlowski: Rebased, add necessary infrastructure for building and selecting drivers/soc because original patchset was on top of movement SROMc to drivers/soc] Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>