cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
301 Views
Registered: ‎10-10-2018

ZCU102 - Linux fixed-regulator over an AXI GPIO

Hello,

I'm using a zcu102 to control an external module using a fixedregulator driver linked with an axi gpio.

I want to control this signal gpio over a fixedregulator linux driver but failed to do that.

This is my dts :

/ {
en-regulator: regulator@0 {
			compatible = "regulator-fixed";
			regulator-name = "en-regulator";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
			gpios = <&gpio_pl4 0 1 1>;
			regulator-boot-on;
		};
}
amba_pl@0 {
      gpio_pl4:gpio@a002f000 {
			#gpio-cells = <0x3>;
			clock-names = "s_axi_aclk";
			clocks = <0x44>;
			compatible = "xlnx,xps-gpio-1.00.a";
			gpio-controller;
			reg = <0x0 0xa002f000 0x0 0x1000>;
			xlnx,all-inputs = <0x0>;
			xlnx,all-inputs-2 = <0x0>;
			xlnx,all-outputs = <0x0>;
			xlnx,all-outputs-2 = <0x0>;
			xlnx,dout-default = <0x0>;
			xlnx,dout-default-2 = <0x0>;
			xlnx,gpio-width = <0x3>;
			xlnx,gpio2-width = <0x20>;
			xlnx,interrupt-present = <0x0>;
			xlnx,is-dual = <0x0>;
			xlnx,tri-default = <0xffffffff>;
			xlnx,tri-default-2 = <0xffffffff>;
			linux,phandle = <0x45>;
			phandle = <0x45>;
		};
};

Can you help me what I have to set in gpio field in my regulator . I want to use pin 0 from this gpio pl side.

Thanks 

0 Kudos
2 Replies
Highlighted
276 Views
Registered: ‎07-23-2019

 

A linux driver to toggle a pin? 

Now I understand why software grows exponentially in size while features barely change.

0 Kudos
Highlighted
Contributor
Contributor
270 Views
Registered: ‎10-10-2018

Hi @archangel-lightworks ,

Yes. Linux fixed-regulator is a driver to control the gpio State to be able to be controlled from another driver to enable disable gpio.

In my case, I have to configure sdhci driver to use this fixed regulator driver to control the fixed regulator to enable/disable the external module.

Do you have any idea on haw to use it ?

Thanks

0 Kudos