Skip to contentSkip to conversation

arm64: dts: fsl: imx8mq: enable the svns power key

PATCH In review Angus Ainslie (Purism) 2 participants 3 messages May 28, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: fsl: imx8mq: enable the svns power key

Add the snvs power key.

---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +9 -0
index 45d10d8efd14..5f93fd9662ae 100644
@@ -8,6 +8,7 @@
 #include <dt-bindings/power/imx8mq-power.h>
 #include <dt-bindings/reset/imx8mq-reset.h>
 #include <dt-bindings/gpio/gpio.h>
+#include "dt-bindings/input/input.h"
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/thermal/thermal.h>
 #include "imx8mq-pinfunc.h"
@@ -463,6 +464,14 @@
 					interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
 						<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
 				};
+
+				snvs_pwrkey: snvs-powerkey {
+					compatible = "fsl,sec-v4.0-pwrkey";
+					regmap = <&snvs>;
+					interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+					linux,keycode = <KEY_POWER>;
+					wakeup-source;
+				};
 			};
 
 			clk: clock-controller@30380000 {
Signature · 1 line
2.17.1
#1 lore raw

Hi Angus,

Am Dienstag, den 28.05.2019, 05:44 -0700 schrieb Angus Ainslie (Purism):

Quoted 29 lines

Add the snvs power key.

Quoted 1 line

---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 9 +++++++++

 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +2 -0
index 45d10d8efd14..5f93fd9662ae 100644
@@ -8,6 +8,7 @@
  #include <dt-bindings/power/imx8mq-power.h>
  #include <dt-bindings/reset/imx8mq-reset.h>
  #include <dt-bindings/gpio/gpio.h>
+#include "dt-bindings/input/input.h"
  #include <dt-bindings/interrupt-controller/arm-gic.h>
  #include <dt-bindings/thermal/thermal.h>
  #include "imx8mq-pinfunc.h"
@@ -463,6 +464,14 @@
 >  					interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
 >  						<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
 >  				};
+
 > +				snvs_pwrkey: snvs-powerkey {
 > +					compatible = "fsl,sec-v4.0-pwrkey";
 > +					regmap = <&snvs>;
Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +2 -0
+					interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+					linux,keycode = <KEY_POWER>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi line 473

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+					wakeup-source;

Not all i.MX8MQ systems will have this functionality wired up at the board level, so this node needs to be disabled by default. The existing
i.MX6 and i.MX7 DTs seem to get this wrong.

Regards,
Lucas

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+				};
Quoted 1 line

  };

Quoted 1 line
Quoted 1 line

  clk: clock-controller@30380000 {

#2 lore raw

Hi Lucas,

Quoted 27 lines · Lucas Stach

Hi Angus,

Am Dienstag, den 28.05.2019, 05:44 -0700 schrieb Angus Ainslie (Purism):

Quoted 24 lines

Add the snvs power key.

Quoted 1 line

---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 9 +++++++++

 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +2 -0
index 45d10d8efd14..5f93fd9662ae 100644
@@ -8,6 +8,7 @@
  #include <dt-bindings/power/imx8mq-power.h>
  #include <dt-bindings/reset/imx8mq-reset.h>
  #include <dt-bindings/gpio/gpio.h>
+#include "dt-bindings/input/input.h"
  #include <dt-bindings/interrupt-controller/arm-gic.h>
  #include <dt-bindings/thermal/thermal.h>
  #include "imx8mq-pinfunc.h"
@@ -463,6 +464,14 @@
 >  					interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
 >  						<GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
 >  				};
+
Quoted 11 lines

arch/arm64/boot/dts/freescale/imx8mq.dtsi line 473

Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
 > +				snvs_pwrkey: snvs-powerkey {
 > +					compatible = "fsl,sec-v4.0-pwrkey";
 > +					regmap = <&snvs>;
Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +2 -0
+					interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+					linux,keycode = <KEY_POWER>;
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+					wakeup-source;

Not all i.MX8MQ systems will have this functionality wired up at the board level, so this node needs to be disabled by default. The existing
i.MX6 and i.MX7 DTs seem to get this wrong.

Ok I'll fix that for the next rev.

Thanks
Angus

Quoted 7 lines

Regards,
Lucas

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+				};
Quoted 1 line

  };

Quoted 1 line
Quoted 1 line

  clk: clock-controller@30380000 {