imx8Quad Max SNVS access for Linux drivers

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx8Quad Max SNVS access for Linux drivers

757 次查看
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?

 

 

标记 (1)
0 项奖励
回复
4 回复数

741 次查看
flobro
Contributor IV

device registry?

0 项奖励
回复

718 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Yes, In device tree.

Regards

0 项奖励
回复

715 次查看
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 项奖励
回复

743 次查看
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 项奖励
回复