xref: /OK3568_Linux_fs/u-boot/doc/device-tree-bindings/gpio/altera_pio.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunAltera GPIO controller bindings
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- compatible:
5*4882a593Smuzhiyun  - "altr,pio-1.0"
6*4882a593Smuzhiyun- reg: Physical base address and length of the controller's registers.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunOptional properties:
9*4882a593Smuzhiyun- altr,gpio-bank-width: Width of the GPIO bank. This defines how many pins the
10*4882a593Smuzhiyun  GPIO device has. Ranges between 1-32. Optional and defaults to 32 if not
11*4882a593Smuzhiyun  specified.
12*4882a593Smuzhiyun- gpio-bank-name: bank name attached to this device.
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunExample:
15*4882a593Smuzhiyun
16*4882a593Smuzhiyunuser_led_pio_8out: gpio@0x4cc0 {
17*4882a593Smuzhiyun	compatible = "altr,pio-1.0";
18*4882a593Smuzhiyun	reg = <0x00004cc0 0x00000010>;
19*4882a593Smuzhiyun	resetvalue = <255>;
20*4882a593Smuzhiyun	altr,gpio-bank-width = <8>;
21*4882a593Smuzhiyun	#gpio-cells = <2>;
22*4882a593Smuzhiyun	gpio-controller;
23*4882a593Smuzhiyun	gpio-bank-name = "led";
24*4882a593Smuzhiyun};
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunIn this example, the gpio can be accessed as led[0..7] using gpio command of
27*4882a593Smuzhiyunu-boot.
28*4882a593Smuzhiyun==> gpio clear led0
29