imx8Quad Max SNVS access for Linux drivers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8Quad Max SNVS access for Linux drivers

754 Views
flobro
Contributor IV

Trying to use snvs_pwrkey driver in drivers/input/input/keyboard/

kernel 5.10.72

There appears to be no snvs entries in the device tree to setup access to SNVS_HPSR (status register).

Is this possible (old kernel) or is there some other magic for the driver to access the SNVS status register?

 

 

Tags (1)
0 Kudos
Reply
4 Replies

738 Views
flobro
Contributor IV

device registry?

0 Kudos
Reply

715 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Yes, In device tree.

Regards

0 Kudos
Reply

712 Views
flobro
Contributor IV

Can you point to an example of a device tree entry for this? I have the entry for imx8MP:

snvs: snvs@30370000 {
				compatible = "fsl,sec-v4.0-mon","syscon", "simple-mfd";
				reg = <0x30370000 0x10000>;

				snvs_rtc: snvs-rtc-lp {
					compatible = "fsl,sec-v4.0-mon-rtc-lp";
					regmap =<&snvs>;
					offset = <0x34>;
					interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
						     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&clk IMX8MP_CLK_SNVS_ROOT>;
					clock-names = "snvs-rtc";
				};

				snvs_pwrkey: snvs-powerkey {
					compatible = "fsl,sec-v4.0-pwrkey";
					regmap = <&snvs>;
					interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&clk IMX8MP_CLK_SNVS_ROOT>;
					clock-names = "snvs-pwrkey";
					linux,keycode = <KEY_POWER>;
					wakeup-source;
					status = "disabled";
				};
			};

and I tried to modify it for "quad Max ", but it does not work (plus snvs is at address zero) so I thinking that I must access the SNVS status via scfw API in Linux...

 

Also I do not think "stick it in the device tree" is an acceptable answer.

0 Kudos
Reply

740 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You can add this to the device registry, since NXP don't have a similar application to show. The SVNS is used for security, and SNVS mode is different from sleep mode, GPIO states are not preserved.

Regards

0 Kudos
Reply