Thomas Chou | fb1a4bf | 2015-10-21 21:33:45 +0800 | [diff] [blame] | 1 | Altera GPIO controller bindings |
| 2 | |
| 3 | Required properties: |
| 4 | - compatible: |
| 5 | - "altr,pio-1.0" |
| 6 | - reg: Physical base address and length of the controller's registers. |
| 7 | |
| 8 | Optional properties: |
| 9 | - altr,gpio-bank-width: Width of the GPIO bank. This defines how many pins the |
| 10 | GPIO device has. Ranges between 1-32. Optional and defaults to 32 if not |
| 11 | specified. |
| 12 | - gpio-bank-name: bank name attached to this device. |
| 13 | |
| 14 | Example: |
| 15 | |
| 16 | user_led_pio_8out: gpio@0x4cc0 { |
| 17 | compatible = "altr,pio-1.0"; |
| 18 | reg = <0x00004cc0 0x00000010>; |
| 19 | resetvalue = <255>; |
| 20 | altr,gpio-bank-width = <8>; |
| 21 | #gpio-cells = <2>; |
| 22 | gpio-controller; |
| 23 | gpio-bank-name = "led"; |
| 24 | }; |
| 25 | |
| 26 | In this example, the gpio can be accessed as led[0..7] using gpio command of |
| 27 | u-boot. |
| 28 | ==> gpio clear led0 |