forked from luck/tmp_suning_uos_patched
d36377c6eb
Misc driver updates for platforms, many of them power related. - Rockchip adds power domain support for rk3066 and rk3188 - Amlogic adds a power measurement driver - Allwinner adds SRAM support for three platforms (F1C100, H5, A64 C1) - Wakeup and ti-sysc (platform bus) fixes for OMAP/DRA7 - Broadcom fixes suspend/resume with Thumb2 kernels, and improves stability of a handful of firmware/platform interfaces - PXA completes their conversion to dmaengine framework - Renesas does a bunch of PM cleanups across many platforms - Tegra adds support for suspend/resume on T186/T194, which includes some driver cleanups and addition of wake events - Tegra also adds a driver for memory controller (EMC) on Tegra2 - i.MX tweaks power domain bindings, and adds support for i.MX8MQ in GPC - Atmel adds identifiers and LPDDR2 support for a new SoC, SAM9X60 + misc cleanups across several platforms -----BEGIN PGP SIGNATURE----- iQJDBAABCAAtFiEElf+HevZ4QCAJmMQ+jBrnPN6EHHcFAlwqd4APHG9sb2ZAbGl4 b20ubmV0AAoJEIwa5zzehBx3HXoP/icWJTGrbf9R6T7r0RWB3xeV8ouTPMM8YM5C 6wD4LkkjgZ16Hz/ellJ0Oug77LdnJ/ZI7jH2u0IcKRXr4sL94hEo11jAJLLtCHpt rGiItMuEDMhNFcAK/yREI6FtRqjNZhsTuR+gkcjzMnGLCaTA1+RwQNdugH0hh0fF z8C6tjN+fRIeS0wInBzR/402GcgRU0DIJrr0kmklS0u6tc2QW24ffv8ymvMiVO46 l8VemmdxVZsBU2iehraPy6mSXsyTm04dNTuHnrIw3nE3kTJF7jMvpqI/euU1eZl6 6EzrrCym8nC66IlqhHMBB427PK8sRqJTqwqSXO6e90AqiK4H2bMovXKiob/Psq+e yWqPOrAr8YBLqTgauvCzVm/xneT5rZM4N0BYhOk172Uk52qenNWDnqHj41A4CMSM /id3L1cHs5nf2qwuMncXvLX+Y2vO2n6cMmF8cDRLu592OBZRcVepUM0xoaSdZScv LJsP3jH3RRcY3L2rf7bY2Mitp48bDgZMZdw/viSHsFS+SVr225uNFALFDQ9kNEoZ 2d9i9IvC7xOMhdVAX03U7DuRcpKXBPcv+arA57PiVvR4M1HeU7VvD4ayP5loVX2J GoDIKiPQitAsOKzyPyZ5Jw04lxio3xZbrbmmVzEH8uKWIV5omdiMnSrFsEfduRCT rU+Mqe2j =yEX2 -----END PGP SIGNATURE----- Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "Misc driver updates for platforms, many of them power related. - Rockchip adds power domain support for rk3066 and rk3188 - Amlogic adds a power measurement driver - Allwinner adds SRAM support for three platforms (F1C100, H5, A64 C1) - Wakeup and ti-sysc (platform bus) fixes for OMAP/DRA7 - Broadcom fixes suspend/resume with Thumb2 kernels, and improves stability of a handful of firmware/platform interfaces - PXA completes their conversion to dmaengine framework - Renesas does a bunch of PM cleanups across many platforms - Tegra adds support for suspend/resume on T186/T194, which includes some driver cleanups and addition of wake events - Tegra also adds a driver for memory controller (EMC) on Tegra2 - i.MX tweaks power domain bindings, and adds support for i.MX8MQ in GPC - Atmel adds identifiers and LPDDR2 support for a new SoC, SAM9X60 and misc cleanups across several platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits) ARM: at91: add support in soc driver for new SAM9X60 ARM: at91: add support in soc driver for LPDDR2 SiP memory: omap-gpmc: Use of_node_name_eq for node name comparisons bus: ti-sysc: Check for no-reset and no-idle flags at the child level ARM: OMAP2+: Check also the first dts child for hwmod flags soc: amlogic: meson-clk-measure: Add missing REGMAP_MMIO dependency soc: imx: gpc: Increase GPC_CLK_MAX to 7 soc: renesas: rcar-sysc: Fix power domain control after system resume soc: renesas: rcar-sysc: Merge PM Domain registration and linking soc: renesas: rcar-sysc: Remove rcar_sysc_power_{down,up}() helpers soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} dt-bindings: sram: sunxi: Add compatible for the A64 SRAM C1 dt-bindings: sram: sunxi: Add bindings for the H5 with SRAM C1 dt-bindings: sram: Add Allwinner suniv F1C100s soc: sunxi: sram: Add support for the H5 SoC system control soc: sunxi: sram: Enable EMAC clock access for H3 variant soc: imx: gpcv2: add support for i.MX8MQ SoC soc: imx: gpcv2: move register access table to domain data soc: imx: gpcv2: prefix i.MX7 specific defines dmaengine: pxa: make the filter function internal ...
253 lines
6.1 KiB
C
253 lines
6.1 KiB
C
/*
|
|
* Copyright (c) 2010 Google, Inc
|
|
* Copyright (c) 2014 NVIDIA Corporation
|
|
*
|
|
* Author:
|
|
* Colin Cross <ccross@google.com>
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#ifndef __SOC_TEGRA_PMC_H__
|
|
#define __SOC_TEGRA_PMC_H__
|
|
|
|
#include <linux/reboot.h>
|
|
|
|
#include <soc/tegra/pm.h>
|
|
|
|
struct clk;
|
|
struct reset_control;
|
|
|
|
bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
|
|
int tegra_pmc_cpu_power_on(unsigned int cpuid);
|
|
int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
|
|
|
|
/*
|
|
* powergate and I/O rail APIs
|
|
*/
|
|
|
|
#define TEGRA_POWERGATE_CPU 0
|
|
#define TEGRA_POWERGATE_3D 1
|
|
#define TEGRA_POWERGATE_VENC 2
|
|
#define TEGRA_POWERGATE_PCIE 3
|
|
#define TEGRA_POWERGATE_VDEC 4
|
|
#define TEGRA_POWERGATE_L2 5
|
|
#define TEGRA_POWERGATE_MPE 6
|
|
#define TEGRA_POWERGATE_HEG 7
|
|
#define TEGRA_POWERGATE_SATA 8
|
|
#define TEGRA_POWERGATE_CPU1 9
|
|
#define TEGRA_POWERGATE_CPU2 10
|
|
#define TEGRA_POWERGATE_CPU3 11
|
|
#define TEGRA_POWERGATE_CELP 12
|
|
#define TEGRA_POWERGATE_3D1 13
|
|
#define TEGRA_POWERGATE_CPU0 14
|
|
#define TEGRA_POWERGATE_C0NC 15
|
|
#define TEGRA_POWERGATE_C1NC 16
|
|
#define TEGRA_POWERGATE_SOR 17
|
|
#define TEGRA_POWERGATE_DIS 18
|
|
#define TEGRA_POWERGATE_DISB 19
|
|
#define TEGRA_POWERGATE_XUSBA 20
|
|
#define TEGRA_POWERGATE_XUSBB 21
|
|
#define TEGRA_POWERGATE_XUSBC 22
|
|
#define TEGRA_POWERGATE_VIC 23
|
|
#define TEGRA_POWERGATE_IRAM 24
|
|
#define TEGRA_POWERGATE_NVDEC 25
|
|
#define TEGRA_POWERGATE_NVJPG 26
|
|
#define TEGRA_POWERGATE_AUD 27
|
|
#define TEGRA_POWERGATE_DFD 28
|
|
#define TEGRA_POWERGATE_VE2 29
|
|
#define TEGRA_POWERGATE_MAX TEGRA_POWERGATE_VE2
|
|
|
|
#define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D
|
|
|
|
/**
|
|
* enum tegra_io_pad - I/O pad group identifier
|
|
*
|
|
* I/O pins on Tegra SoCs are grouped into so-called I/O pads. Each such pad
|
|
* can be used to control the common voltage signal level and power state of
|
|
* the pins of the given pad.
|
|
*/
|
|
enum tegra_io_pad {
|
|
TEGRA_IO_PAD_AUDIO,
|
|
TEGRA_IO_PAD_AUDIO_HV,
|
|
TEGRA_IO_PAD_BB,
|
|
TEGRA_IO_PAD_CAM,
|
|
TEGRA_IO_PAD_COMP,
|
|
TEGRA_IO_PAD_CONN,
|
|
TEGRA_IO_PAD_CSIA,
|
|
TEGRA_IO_PAD_CSIB,
|
|
TEGRA_IO_PAD_CSIC,
|
|
TEGRA_IO_PAD_CSID,
|
|
TEGRA_IO_PAD_CSIE,
|
|
TEGRA_IO_PAD_CSIF,
|
|
TEGRA_IO_PAD_CSIG,
|
|
TEGRA_IO_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|
|
TEGRA_IO_PAD_SDMMC1,
|
|
TEGRA_IO_PAD_SDMMC1_HV,
|
|
TEGRA_IO_PAD_SDMMC2,
|
|
TEGRA_IO_PAD_SDMMC2_HV,
|
|
TEGRA_IO_PAD_SDMMC3,
|
|
TEGRA_IO_PAD_SDMMC3_HV,
|
|
TEGRA_IO_PAD_SDMMC4,
|
|
TEGRA_IO_PAD_SOC_GPIO10,
|
|
TEGRA_IO_PAD_SOC_GPIO12,
|
|
TEGRA_IO_PAD_SOC_GPIO13,
|
|
TEGRA_IO_PAD_SOC_GPIO53,
|
|
TEGRA_IO_PAD_SPI,
|
|
TEGRA_IO_PAD_SPI_HV,
|
|
TEGRA_IO_PAD_SYS_DDC,
|
|
TEGRA_IO_PAD_UART,
|
|
TEGRA_IO_PAD_UART4,
|
|
TEGRA_IO_PAD_UART5,
|
|
TEGRA_IO_PAD_UFS,
|
|
TEGRA_IO_PAD_USB0,
|
|
TEGRA_IO_PAD_USB1,
|
|
TEGRA_IO_PAD_USB2,
|
|
TEGRA_IO_PAD_USB3,
|
|
TEGRA_IO_PAD_USB_BIAS,
|
|
TEGRA_IO_PAD_AO_HV,
|
|
};
|
|
|
|
/* deprecated, use TEGRA_IO_PAD_{HDMI,LVDS} instead */
|
|
#define TEGRA_IO_RAIL_HDMI TEGRA_IO_PAD_HDMI
|
|
#define TEGRA_IO_RAIL_LVDS TEGRA_IO_PAD_LVDS
|
|
|
|
#ifdef CONFIG_SOC_TEGRA_PMC
|
|
int tegra_powergate_is_powered(unsigned int id);
|
|
int tegra_powergate_power_on(unsigned int id);
|
|
int tegra_powergate_power_off(unsigned int id);
|
|
int tegra_powergate_remove_clamping(unsigned int id);
|
|
|
|
/* Must be called with clk disabled, and returns with clk enabled */
|
|
int tegra_powergate_sequence_power_up(unsigned int id, struct clk *clk,
|
|
struct reset_control *rst);
|
|
|
|
int tegra_io_pad_power_enable(enum tegra_io_pad id);
|
|
int tegra_io_pad_power_disable(enum tegra_io_pad id);
|
|
|
|
/* deprecated, use tegra_io_pad_power_{enable,disable}() instead */
|
|
int tegra_io_rail_power_on(unsigned int id);
|
|
int tegra_io_rail_power_off(unsigned int id);
|
|
|
|
enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
|
|
void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
|
|
void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
|
|
|
|
#else
|
|
static inline int tegra_powergate_is_powered(unsigned int id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_powergate_power_on(unsigned int id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_powergate_power_off(unsigned int id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_powergate_remove_clamping(unsigned int id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_powergate_sequence_power_up(unsigned int id,
|
|
struct clk *clk,
|
|
struct reset_control *rst)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_io_pad_power_enable(enum tegra_io_pad id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_io_pad_power_disable(enum tegra_io_pad id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_io_pad_get_voltage(enum tegra_io_pad id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_io_rail_power_on(unsigned int id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline int tegra_io_rail_power_off(unsigned int id)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
|
|
{
|
|
return TEGRA_SUSPEND_NONE;
|
|
}
|
|
|
|
static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
|
|
{
|
|
}
|
|
|
|
static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
|
|
{
|
|
}
|
|
|
|
#endif /* CONFIG_SOC_TEGRA_PMC */
|
|
|
|
#endif /* __SOC_TEGRA_PMC_H__ */
|