cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
oabril
Visitor
Visitor
8,012 Views
Registered: ‎07-17-2015

AXI GPIO missing in /sys/class/gpio/

Hi,

 

I'm tryng to use a AXI gpio in my system but it doesn't show in the /sys/class/gpio/, this is what i'm doing:

 

Kernels (Xilinx 3.14 and Petalinux 3.17)

Compiled and Build with "make ARCH=arm xilinx_zynq_defconfig" and "make ARCH=arm UIMAGE_LOADADDR=0x8000 uImage"

 

Device tree:

Axi Gpio node added:

 

/ {
amba_pl: amba_pl {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges ;
axi_gpio_0: gpio@41200000 {
#gpio-cells = <2>;
compatible = "xlnx,xps-gpio-1.00.a";
gpio-controller ;
reg = <0x41200000 0x10000>;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x1>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x00000000>;
xlnx,dout-default-2 = <0x00000000>;
xlnx,gpio-width = <0x8>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
};
};

 

Then, when the system starts with the 3.17 kernel it hangs at the beggining, the 3.14 kernel works, but when i try to find the amba gpio i doesn't show in "/sys/class/gpio".

 

If i search in the system i found in "/sys/devices/soc0/amba_pl" the axi definition.

 

Can anybody guide me to know the way to install in the system the gpio?

 

I just dont really understand how to do it.

 

Thanks

0 Kudos
3 Replies
7,698 Views
Registered: ‎09-25-2015

I've the same problem! No help?

0 Kudos
vanmierlo
Mentor
Mentor
7,686 Views
Registered: ‎06-10-2008

I have no direct answer, but can confirm that it does work with petalinux 2015.2.1 with a generated devicetree. Petalinux 2015.2.1 comes with a 3.19 kernel.

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
7,676 Views
Registered: ‎09-10-2008

Did you generate a new FSBL to go along with the h/w design (along with a new Boot.bin) on the SD card?

 

Petalinux helps you do all this more easily but it can be done outside of Petalinux easily also.

 

It sounds like the PL did not get enabled to me (clock, reset, level converter) if I'm remembering right.

 

You should see that using devmem from the Linux command line (without the GPIO in the device tree so it boots ok) will also hang the system.

 

Thanks

John

 

0 Kudos