drivers: soc: xilinx: Add support for ZynqMP PM driver
v6 cover drivers: soc: xilinx: Add support for ZynqMP PM driver
Add ZynqMP PM driver. PM driver provides power management support for ZynqMP.
v6:
- Rebased on top of
https://github.com/Xilinx/linux-xlnx/commits/zynqmp/soc
v5:
- Added Reviewed tag for dt bindings
v4:
- Minor fixes to address v3 review comments
v3:
- Updated DT bindings as per v2 review comments
v2:
- Rebased on top of latest firmware driver patch series
- Updated driver to use shared interrupt instead of mailbox
Jolly Shah (1):
firmware: xilinx: Implement ZynqMP power management APIs
Rajan Vaja (2):
dt-bindings: soc: Add ZynqMP PM bindings
drivers: soc: xilinx: Add ZynqMP PM driver
.../bindings/power/reset/xlnx,zynqmp-power.txt | 25 +++ drivers/firmware/xilinx/zynqmp.c | 29 ++++ drivers/soc/xilinx/Kconfig | 11 ++ drivers/soc/xilinx/Makefile | 1 + drivers/soc/xilinx/zynqmp_power.c | 178 +++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 20 +++ 6 files changed, 264 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt create mode 100644 drivers/soc/xilinx/zynqmp_power.c
Signature · 1 line
2.7.4
PATCH v6 1/3 dt-bindings: soc: Add ZynqMP PM bindings
From: Rajan Vaja <[email protected]>
Add documentation to describe Xilinx ZynqMP power management bindings.
--- .../bindings/power/reset/xlnx,zynqmp-power.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt
Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt new file +25 -0
@@ -0,0 +1,25 @@ +-------------------------------------------------------------------- +Device Tree Bindings for the Xilinx Zynq MPSoC Power Management +-------------------------------------------------------------------- +The zynqmp-power node describes the power management configurations. +It will control remote suspend/shutdown interfaces. + +Required properties: + - compatible: Must contain: "xlnx,zynqmp-power" + - interrupts: Interrupt specifier + +------- +Example +------- + +firmware { + zynqmp_firmware: zynqmp-firmware { + compatible = "xlnx,zynqmp-firmware"; + method = "smc"; + + zynqmp_power: zynqmp-power { + compatible = "xlnx,zynqmp-power"; + interrupts = <0 35 4>; + }; + }; +};
Signature · 1 line
2.7.4
PATCH v6 2/3 firmware: xilinx: Implement ZynqMP power management APIs
In reply to Jolly ShahAdd Xilinx ZynqMP firmware APIs to set suspend mode and inform firmware that master has initialized its own power management.
--- drivers/firmware/xilinx/zynqmp.c | 29 +++++++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 20 ++++++++++++++++++++ 2 files changed, 49 insertions(+)
drivers/firmware/xilinx/zynqmp.c +29 -0
@@ -507,6 +507,33 @@ static int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset,return ret; } +/** +* zynqmp_pm_init_finalize() - PM call to inform firmware that the caller +* master has initialized its own power management +* +* This API function is to be used for notify the power management controller +* about the completed power management initialization. +* +* Return: Returns status, either success or error+reason +*/ +static int zynqmp_pm_init_finalize (void ) +{ +return zynqmp_pm_invoke_fn (PM_PM_INIT_FINALIZE ,0 ,0 ,0 ,0 ,NULL ); +} + +/** +* zynqmp_pm_set_suspend_mode() - Set system suspend mode +* @mode: Mode to set for system suspend +* +* This API function is used to set mode of system suspend. +* +* Return: Returns status, either success or error+reason +*/ +static int zynqmp_pm_set_suspend_mode (u32 mode) +{ +return zynqmp_pm_invoke_fn (PM_SET_SUSPEND_MODE , mode,0 ,0 ,0 ,NULL ); +} +static const struct zynqmp_eemi_ops eemi_ops = { .get_api_version = zynqmp_pm_get_api_version, .query_data = zynqmp_pm_query_data,
@@ -522,6 +549,8 @@ static const struct zynqmp_eemi_ops eemi_ops = { .ioctl = zynqmp_pm_ioctl, .reset_assert = zynqmp_pm_reset_assert, .reset_get_status = zynqmp_pm_reset_get_status, + .init_finalize = zynqmp_pm_init_finalize, + .set_suspend_mode = zynqmp_pm_set_suspend_mode, };/**
include/linux/firmware/xlnx-zynqmp.h +20 -0
@@ -28,14 +28,23 @@/* SMC SIP service Call Function Identifier Prefix */ #define PM_SIP_SVC 0xC2000000#define PM_GET_TRUSTZONE_VERSION 0xa03 +#define PM_SET_SUSPEND_MODE 0xa02 +#define GET_CALLBACK_DATA 0xa01/* Number of 32bits values in payload */ #define PAYLOAD_ARG_CNT 4U +/* Number of arguments for a callback */ +#define CB_ARG_CNT 4 + +/* Payload size (consists of callback API ID + arguments) */ +#define CB_PAYLOAD_SIZE (CB_ARG_CNT + 1) +enum pm_api_id {PM_GET_API_VERSION =1 ,PM_RESET_ASSERT =17 ,PM_RESET_GET_STATUS , +PM_PM_INIT_FINALIZE =21 ,PM_IOCTL =34 ,PM_QUERY_DATA ,PM_CLOCK_ENABLE ,
@@ -208,6 +217,12 @@ enum zynqmp_pm_reset { ZYNQMP_PM_RESET_END = ZYNQMP_PM_RESET_PS_PL3 }; +enum zynqmp_pm_suspend_reason { +SUSPEND_POWER_REQUEST =201 , +SUSPEND_ALERT , +SUSPEND_SYSTEM_SHUTDOWN , +}; +/** * struct zynqmp_pm_query_data - PM query data * @qid: query ID
@@ -238,8 +253,13 @@ struct zynqmp_eemi_ops {int (*reset_assert)(const enum zynqmp_pm_reset reset,const enum zynqmp_pm_reset_action assert_flag);int (*reset_get_status)(const enum zynqmp_pm_reset reset,u32 *status); +int (*init_finalize)(void ); +int (*set_suspend_mode)(u32 mode); }; +int zynqmp_pm_invoke_fn (u32 pm_api_id,u32 arg0,u32 arg1, +u32 arg2,u32 arg3,u32 *ret_payload); +#if IS_REACHABLE (CONFIG_ARCH_ZYNQMP )const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops (void );#else
Signature · 1 line
2.7.4
PATCH v6 3/3 drivers: soc: xilinx: Add ZynqMP PM driver
In reply to Jolly ShahFrom: Rajan Vaja <[email protected]>
Add ZynqMP PM driver. PM driver provides power management support for ZynqMP.
--- drivers/soc/xilinx/Kconfig | 11 +++ drivers/soc/xilinx/Makefile | 1 + drivers/soc/xilinx/zynqmp_power.c | 178 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 drivers/soc/xilinx/zynqmp_power.c
drivers/soc/xilinx/Kconfig +11 -0
@@ -17,4 +17,15 @@ config XILINX_VCU To compile this driver as a module, choose M here: the module will be called xlnx_vcu. +config ZYNQMP_POWER + bool "Enable Xilinx Zynq MPSoC Power Management driver" + depends on PM && ARCH_ZYNQMP + default y + help + Say yes to enable power management support for ZyqnMP SoC. + This driver uses firmware driver as an interface for power + management request to firmware. It registers isr to handle + power management callbacks from firmware. + If in doubt, say N. + endmenu
drivers/soc/xilinx/Makefile +1 -0
@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_XILINX_VCU) += xlnx_vcu.o +obj-$(CONFIG_ZYNQMP_POWER) += zynqmp_power.o
drivers/soc/xilinx/zynqmp_power.c new file +178 -0
178 lines not on this page · raw message
Signature · 1 line
2.7.4
Sudeep Holla
NAKRe: [PATCH v6 3/3] drivers: soc: xilinx: Add ZynqMP PM driver
Quoted 186 lines · Jolly Shah
From: Rajan Vaja <[email protected]>
Add ZynqMP PM driver. PM driver provides power management support for ZynqMP.
Signed-off-by Rajan Vaja <[email protected]>Signed-off-by Jolly Shah <[email protected]>--- drivers/soc/xilinx/Kconfig | 11 +++ drivers/soc/xilinx/Makefile | 1 + drivers/soc/xilinx/zynqmp_power.c | 178 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 drivers/soc/xilinx/zynqmp_power.cdrivers/soc/xilinx/Kconfig +11
-0@@ -17,4 +17,15 @@ config XILINX_VCU To compile this driver as a module, choose M here: the module will be called xlnx_vcu. +config ZYNQMP_POWER + bool "Enable Xilinx Zynq MPSoC Power Management driver" + depends on PM && ARCH_ZYNQMP + default y + help + Say yes to enable power management support for ZyqnMP SoC. + This driver uses firmware driver as an interface for power + management request to firmware. It registers isr to handle + power management callbacks from firmware. + If in doubt, say N. + endmenudrivers/soc/xilinx/Makefile +1
-0@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_XILINX_VCU) += xlnx_vcu.o +obj-$(CONFIG_ZYNQMP_POWER) += zynqmp_power.odrivers/soc/xilinx/zynqmp_power.c new file +138
-0@@ -0,0 +1,178 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Xilinx Zynq MPSoC Power Management +* +* Copyright (C) 2014-2018 Xilinx, Inc. +* +* Davorin Mista <[email protected]> +* Jolly Shah <[email protected]> +* Rajan Vaja <[email protected]> +*/ + +#include <linux/mailbox_client.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/reboot.h> +#include <linux/suspend.h> + +#include <linux/firmware/xlnx-zynqmp.h> + +enum pm_suspend_mode { +PM_SUSPEND_MODE_FIRST =0 , +PM_SUSPEND_MODE_STD =PM_SUSPEND_MODE_FIRST , +PM_SUSPEND_MODE_POWER_OFF , +}; + +#define PM_SUSPEND_MODE_FIRST PM_SUSPEND_MODE_STD + +static const char *const suspend_modes[] = { + [PM_SUSPEND_MODE_STD ] ="standard" , + [PM_SUSPEND_MODE_POWER_OFF ] ="power-off" , +}; + +static enum pm_suspend_mode suspend_mode =PM_SUSPEND_MODE_STD ; + +enum pm_api_cb_id { +PM_INIT_SUSPEND_CB =30 , +PM_ACKNOWLEDGE_CB , +PM_NOTIFY_CB , +}; + +static void zynqmp_pm_get_callback_data (u32 *buf) +{ +zynqmp_pm_invoke_fn (GET_CALLBACK_DATA ,0 ,0 ,0 ,0 , buf); +} + +static irqreturn_t zynqmp_pm_isr (int irq,void *data) +{ +u32 payload[CB_PAYLOAD_SIZE ]; + +zynqmp_pm_get_callback_data (payload); + +/* First element is callback API ID, others are callback arguments */ +if (payload[0 ] ==PM_INIT_SUSPEND_CB ) { +switch (payload[1 ]) { +case SUSPEND_SYSTEM_SHUTDOWN : +orderly_poweroff (true); +break ; +case SUSPEND_POWER_REQUEST : +pm_suspend (PM_SUSPEND_MEM ); +break ; +default : +pr_err ("%s Unsupported InitSuspendCb reason " +"code %d\n" , __func__, payload[1 ]); + } + } + +return IRQ_HANDLED ; +} + +static ssize_t suspend_mode_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +char *s = buf; +int md; + +for (md =PM_SUSPEND_MODE_FIRST ; md <ARRAY_SIZE (suspend_modes); md++) +if (suspend_modes[md]) { +if (md == suspend_mode) + s +=sprintf (s,"[%s] " , suspend_modes[md]); +else + s +=sprintf (s,"%s " , suspend_modes[md]); + } + +/* Convert last space to newline */ +if (s != buf) + *(s -1 ) ='\n' ; +return (s - buf); +} + +static ssize_t suspend_mode_store (struct device *dev, +struct device_attribute *attr, +const char *buf,size_t count) +{ +int md, ret = -EINVAL ; +const struct zynqmp_eemi_ops *eemi_ops =zynqmp_pm_get_eemi_ops (); + +if (!eemi_ops || !eemi_ops->set_suspend_mode) +return ret; + +for (md =PM_SUSPEND_MODE_FIRST ; md <ARRAY_SIZE (suspend_modes); md++) +if (suspend_modes[md] && +sysfs_streq (suspend_modes[md], buf)) { + ret =0 ; +break ; + } + +if (!ret && md != suspend_mode) { + ret = eemi_ops->set_suspend_mode (md); +if (likely (!ret)) + suspend_mode = md; + } + +return ret ? ret : count; +} + +static DEVICE_ATTR_RW (suspend_mode); + +static int zynqmp_pm_probe (struct platform_device *pdev) +{ +int ret, irq; +u32 pm_api_version; + +const struct zynqmp_eemi_ops *eemi_ops =zynqmp_pm_get_eemi_ops (); + +if (!eemi_ops || !eemi_ops->get_api_version || !eemi_ops->init_finalize) +return -ENXIO ; + + eemi_ops->init_finalize (); + eemi_ops->get_api_version (&pm_api_version); + +/* Check PM API version number */ +if (pm_api_version <ZYNQMP_PM_VERSION ) +return -ENODEV ; + + irq =platform_get_irq (pdev,0 ); +if (irq <=0 ) +return -ENXIO ; +
drivers/soc/xilinx/zynqmp_power.c line 148
Quoted 10 lines
drivers/soc/xilinx/zynqmp_power.c new file +10
-0+ ret =devm_request_threaded_irq (&pdev->dev, irq,NULL , zynqmp_pm_isr, +IRQF_NO_SUSPEND |IRQF_ONESHOT , +dev_name (&pdev->dev), &pdev->dev); +if (ret) { +dev_err (&pdev->dev,"devm_request_threaded_irq '%d' failed " +"with %d\n" , irq, ret); +return ret; + } + + ret =sysfs_create_file (&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
NACK, if this is for system suspend/reset ? You can just use exiting sysfs, no need to create Xilinx specific new ones. Moreover you need to use PSCI to make sure higher ELs can do orderly suspend/shutdown.
--
Regards,
Sudeep
RE: [PATCH v6 3/3] drivers: soc: xilinx: Add ZynqMP PM driver
Hi Sudeep,
Quoted 221 lines
-----Original Message-----
From: Sudeep Holla <[email protected]>
Sent: Wednesday, January 30, 2019 2:13 AM
To: Jolly Shah <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Michal Simek <[email protected]>; [email protected]; [email protected]; Rajan Vaja <[email protected]>; [email protected]; linux-arm- [email protected]; [email protected]; Sudeep Holla <[email protected]>; Rajan Vaja <[email protected]>; Jolly Shah <[email protected]>
Subject: Re: [PATCH v6 3/3] drivers: soc: xilinx: Add ZynqMP PM driverQuoted 11 lines · Jolly Shah
From: Rajan Vaja <[email protected]>
Add ZynqMP PM driver. PM driver provides power management support for ZynqMP.
Signed-off-by Rajan Vaja <[email protected]>Signed-off-by Jolly Shah <[email protected]>--- drivers/soc/xilinx/Kconfig | 11 +++ drivers/soc/xilinx/Makefile | 1 + drivers/soc/xilinx/zynqmp_power.c | 178++++++++++++++++++++++++++++++++++++++
Review
Quoted 32 lines
3 files changed, 190 insertions(+) create mode 100644 drivers/soc/xilinx/zynqmp_power.cdrivers/soc/xilinx/Kconfig +11
-0@@ -17,4 +17,15 @@ config XILINX_VCU To compile this driver as a module, choose M here: the module will be called xlnx_vcu. +config ZYNQMP_POWER + bool "Enable Xilinx Zynq MPSoC Power Management driver" + depends on PM && ARCH_ZYNQMP + default y + help + Say yes to enable power management support for ZyqnMP SoC. + This driver uses firmware driver as an interface for power + management request to firmware. It registers isr to handle + power management callbacks from firmware. + If in doubt, say N. + endmenudrivers/soc/xilinx/Makefile +1
-0@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_XILINX_VCU) += xlnx_vcu.o +obj-$(CONFIG_ZYNQMP_POWER) += zynqmp_power.o(quoted diff) +0
-0
b/drivers/soc/xilinx/zynqmp_power.cQuoted 71 lines
new file mode 100644
index 0000000..771cb59drivers/soc/xilinx/zynqmp_power.c new file +66
-0@@ -0,0 +1,178 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Xilinx Zynq MPSoC Power Management +* +* Copyright (C) 2014-2018 Xilinx, Inc. +* +* Davorin Mista <[email protected]> +* Jolly Shah <[email protected]> +* Rajan Vaja <[email protected]> +*/ + +#include <linux/mailbox_client.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/reboot.h> +#include <linux/suspend.h> + +#include <linux/firmware/xlnx-zynqmp.h> + +enum pm_suspend_mode { +PM_SUSPEND_MODE_FIRST =0 , +PM_SUSPEND_MODE_STD =PM_SUSPEND_MODE_FIRST , +PM_SUSPEND_MODE_POWER_OFF , +}; + +#define PM_SUSPEND_MODE_FIRST PM_SUSPEND_MODE_STD + +static const char *const suspend_modes[] = { + [PM_SUSPEND_MODE_STD ] ="standard" , + [PM_SUSPEND_MODE_POWER_OFF ] ="power-off" , +}; + +static enum pm_suspend_mode suspend_mode =PM_SUSPEND_MODE_STD ; + +enum pm_api_cb_id { +PM_INIT_SUSPEND_CB =30 , +PM_ACKNOWLEDGE_CB , +PM_NOTIFY_CB , +}; + +static void zynqmp_pm_get_callback_data (u32 *buf) +{ +zynqmp_pm_invoke_fn (GET_CALLBACK_DATA ,0 ,0 ,0 ,0 , buf); +} + +static irqreturn_t zynqmp_pm_isr (int irq,void *data) +{ +u32 payload[CB_PAYLOAD_SIZE ]; + +zynqmp_pm_get_callback_data (payload); + +/* First element is callback API ID, others are callback arguments */ +if (payload[0 ] ==PM_INIT_SUSPEND_CB ) { +switch (payload[1 ]) { +case SUSPEND_SYSTEM_SHUTDOWN : +orderly_poweroff (true); +break ; +case SUSPEND_POWER_REQUEST : +pm_suspend (PM_SUSPEND_MEM ); +break ; +default : +pr_err ("%s Unsupported InitSuspendCb reason " +"code %d\n" , __func__, payload[1 ]); + } + } +drivers/soc/xilinx/zynqmp_power.c line 76
Quoted 10 lines
drivers/soc/xilinx/zynqmp_power.c new file +10
-0+return IRQ_HANDLED ; +} + +static ssize_t suspend_mode_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +char *s = buf; +int md; + + for (md = PM_SUSPEND_MODE_FIRST; md <
ARRAY_SIZE(suspend_modes); md++)Quoted 9 lines
drivers/soc/xilinx/zynqmp_power.c new file +9
-0+if (suspend_modes[md]) { +if (md == suspend_mode) + s +=sprintf (s,"[%s] " , suspend_modes[md]); +else + s +=sprintf (s,"%s " , suspend_modes[md]); + } + +/* Convert last space to newline */ +if (s != buf)drivers/soc/xilinx/zynqmp_power.c
Quoted 10 lines
drivers/soc/xilinx/zynqmp_power.c new file +10
-0+ *(s -1 ) ='\n' ; +return (s - buf); +} + +static ssize_t suspend_mode_store (struct device *dev, +struct device_attribute *attr, +const char *buf,size_t count) +{ +int md, ret = -EINVAL ; + const struct zynqmp_eemi_ops *eemi_ops =
zynqmp_pm_get_eemi_ops();drivers/soc/xilinx/zynqmp_power.c
Quoted 5 lines
drivers/soc/xilinx/zynqmp_power.c new file +5
-0+ +if (!eemi_ops || !eemi_ops->set_suspend_mode) +return ret; + + for (md = PM_SUSPEND_MODE_FIRST; md <
ARRAY_SIZE(suspend_modes); md++)Quoted 13 lines
drivers/soc/xilinx/zynqmp_power.c new file +13
-0+if (suspend_modes[md] && +sysfs_streq (suspend_modes[md], buf)) { + ret =0 ; +break ; + } + +if (!ret && md != suspend_mode) { + ret = eemi_ops->set_suspend_mode (md); +if (likely (!ret)) + suspend_mode = md; + } + +return ret ? ret : count;drivers/soc/xilinx/zynqmp_power.c
Quoted 10 lines
drivers/soc/xilinx/zynqmp_power.c new file +10
-0+} + +static DEVICE_ATTR_RW (suspend_mode); + +static int zynqmp_pm_probe (struct platform_device *pdev) +{ +int ret, irq; +u32 pm_api_version; + + const struct zynqmp_eemi_ops *eemi_ops =
zynqmp_pm_get_eemi_ops();Quoted 7 lines
drivers/soc/xilinx/zynqmp_power.c new file +2
-0+ + if (!eemi_ops || !eemi_ops->get_api_version || !eemi_ops-
init_finalize)drivers/soc/xilinx/zynqmp_power.c new file +4
-0+return -ENXIO ; + + eemi_ops->init_finalize (); + eemi_ops->get_api_version (&pm_api_version);drivers/soc/xilinx/zynqmp_power.c
Quoted 10 lines
drivers/soc/xilinx/zynqmp_power.c new file +10
-0+ +/* Check PM API version number */ +if (pm_api_version <ZYNQMP_PM_VERSION ) +return -ENODEV ; + + irq =platform_get_irq (pdev,0 ); +if (irq <=0 ) +return -ENXIO ; + + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
zynqmp_pm_isr,drivers/soc/xilinx/zynqmp_power.c
Quoted 9 lines
drivers/soc/xilinx/zynqmp_power.c new file +9
-0+IRQF_NO_SUSPEND |IRQF_ONESHOT , + dev_name(&pdev->dev), &pdev->dev); +if (ret) { +dev_err (&pdev->dev,"devm_request_threaded_irq '%d' failed " +"with %d\n" , irq, ret); +return ret; + } + + ret = sysfs_create_file(&pdev->dev.kobj,&dev_attr_suspend_mode.attr);
Quoted 4 lines
NACK, if this is for system suspend/reset ? You can just use exiting sysfs, no need to create Xilinx specific new ones. Moreover you need to use PSCI to make sure higher ELs can do orderly suspend/shutdown.
We have power off suspend mode which is not supported by existing sysfs and hence new one is needed. Suspend is handled through PSCI interface only.
Thanks,
Jolly Shah
Quoted 3 lines
--
Regards,
Sudeep
Re: [PATCH v6 3/3] drivers: soc: xilinx: Add ZynqMP PM driver
Quoted 9 lines · Jolly Shah
Quoted 5 lines
NACK, if this is for system suspend/reset ? You can just use exiting sysfs, no need to create Xilinx specific new ones. Moreover you need to use PSCI to make sure higher ELs can do orderly suspend/shutdown.
We have power off suspend mode which is not supported by existing sysfs and hence new one is needed. Suspend is handled through PSCI interface only.
I see only 2 cases supported SUSPEND_SYSTEM_SHUTDOWN and SUSPEND_POWER_REQUEST. Both are already support so my NACK still stands.
--
Regards,
Sudeep
RE: [PATCH v6 3/3] drivers: soc: xilinx: Add ZynqMP PM driver
Hi Sudeep,
Quoted 19 lines
-----Original Message-----
From: Sudeep Holla <[email protected]>
Sent: Friday, February 01, 2019 4:15 AM
To: Jolly Shah <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Michal Simek <[email protected]>; [email protected]; [email protected]; Rajan Vaja <[email protected]>; [email protected]; linux-arm- [email protected]; [email protected]
Subject: Re: [PATCH v6 3/3] drivers: soc: xilinx: Add ZynqMP PM driverQuoted 6 lines · Jolly Shah
Quoted 5 lines
NACK, if this is for system suspend/reset ? You can just use exiting sysfs, no need to create Xilinx specific new ones. Moreover you need to use PSCI to make sure higher ELs can do orderly suspend/shutdown.
Quoted 6 lines
Quoted 3 lines
We have power off suspend mode which is not supported by existing sysfs and hence new one is needed. Suspend is handled through PSCI interface only.
I see only 2 cases supported
SUSPEND_SYSTEM_SHUTDOWNandSUSPEND_POWER_REQUEST. Both are already support so my NACK still stands.
The 2 cases(SUSPEND_SYSTEM_SHUTDOWN and SUSPEND_POWER_REQUEST )in isr is for remote suspend. Sysfs is for self suspend and it supports PM_SUSPEND_MODE_STD and PM_SUSPEND_MODE_POWER_OFF(power off suspend).
Thanks,
Jolly Shah
Quoted 4 lines
--
Regards,
Sudeep
Michal Simek
AppliedQuoted 26 lines · Jolly Shah
Add ZynqMP PM driver. PM driver provides power management support for ZynqMP.
v6:
- Rebased on top of
https://github.com/Xilinx/linux-xlnx/commits/zynqmp/soc
v5:
- Added Reviewed tag for dt bindingsv4:
- Minor fixes to address v3 review commentsv3:
- Updated DT bindings as per v2 review commentsv2:
- Rebased on top of latest firmware driver patch series
- Updated driver to use shared interrupt instead of mailboxJolly Shah (1):
firmware: xilinx: Implement ZynqMP power management APIsRajan Vaja (2):
dt-bindings: soc: Add ZynqMP PM bindings
drivers: soc: xilinx: Add ZynqMP PM driver
Quoted 10 lines
.../bindings/power/reset/xlnx,zynqmp-power.txt | 25 +++ drivers/firmware/xilinx/zynqmp.c | 29 ++++ drivers/soc/xilinx/Kconfig | 11 ++ drivers/soc/xilinx/Makefile | 1 + drivers/soc/xilinx/zynqmp_power.c | 178 +++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 20 +++ 6 files changed, 264 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt create mode 100644 drivers/soc/xilinx/zynqmp_power.c
Applied.
Thanks,
Michal