diff options
author | Peng Fan <peng.fan@nxp.com> | 2018-10-18 14:28:29 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2018-10-22 12:59:01 +0200 |
commit | d526f340f702b338389f1b858cdd114fffbcd7b5 (patch) | |
tree | 71d337a025f984a5c01b76c1c362cf6ea5750241 /arch/arm/include | |
parent | 38b6686f05d4609334b5796bc352ec01d54c5eb4 (diff) | |
download | u-boot-d526f340f702b338389f1b858cdd114fffbcd7b5.tar.gz |
power: Add power domain driver for i.MX8
Add the power domain DM driver for i.MX8, that it depends on the DTB
power domain trees to generate the power domain provider devices. Users
need to add power domain trees with property "compatible = "nxp,imx8-pd";"
When power on a PD device, the driver will power on its ancestor PD
devices in power domain tree.
When power off a PD device, the driver will check its child PD devices
first. Only if all child PD devices are off, then power off the current PD
device. Then the driver checks sibling PD devices. If sibling PD devices
are off, then it will power off parent PD device.
There is no counter maintained in this driver, but a state to hold current
on/off state. So the request and free functions are empty.
The power domain implementation in i.MX8 DTB set the "#power-domain-cells"
to 0, so there is no ID binding with each PD device. We don't use "id"
variable in struct power_domain. At the same time, we have to set of_xlate
to empty to bypass standard of_xlate in uclass driver.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/arch-imx8/power-domain.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-imx8/power-domain.h b/arch/arm/include/asm/arch-imx8/power-domain.h new file mode 100644 index 0000000000..1396008877 --- /dev/null +++ b/arch/arm/include/asm/arch-imx8/power-domain.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2017 NXP + */ + +#ifndef _ASM_ARCH_IMX8_POWER_DOMAIN_H +#define _ASM_ARCH_IMX8_POWER_DOMAIN_H + +#include <asm/arch/sci/types.h> + +struct imx8_power_domain_platdata { + sc_rsrc_t resource_id; +}; + +#endif |