Laxman Dewangan | 0a8d3e2 | 2013-08-06 18:42:35 +0530 | [diff] [blame] | 1 | Palmas Pincontrol bindings |
| 2 | |
| 3 | The pins of Palmas device can be set on different option and provides |
| 4 | the configuration for Pull UP/DOWN, open drain etc. |
| 5 | |
| 6 | Required properties: |
| 7 | - compatible: It must be one of following: |
| 8 | - "ti,palmas-pinctrl" for Palma series of the pincontrol. |
| 9 | - "ti,tps65913-pinctrl" for Palma series device TPS65913. |
| 10 | - "ti,tps80036-pinctrl" for Palma series device TPS80036. |
| 11 | |
| 12 | Please refer to pinctrl-bindings.txt in this directory for details of the |
| 13 | common pinctrl bindings used by client devices, including the meaning of the |
| 14 | phrase "pin configuration node". |
| 15 | |
| 16 | Palmas's pin configuration nodes act as a container for an arbitrary number of |
| 17 | subnodes. Each of these subnodes represents some desired configuration for a |
| 18 | list of pins. This configuration can include the mux function to select on |
| 19 | those pin(s), and various pin configuration parameters, such as pull-up, |
| 20 | open drain. |
| 21 | |
| 22 | The name of each subnode is not important; all subnodes should be enumerated |
| 23 | and processed purely based on their content. |
| 24 | |
| 25 | Each subnode only affects those parameters that are explicitly listed. In |
| 26 | other words, a subnode that lists a mux function but no pin configuration |
| 27 | parameters implies no information about any pin configuration parameters. |
| 28 | Similarly, a pin subnode that describes a pullup parameter implies no |
| 29 | information about e.g. the mux function. |
| 30 | |
| 31 | Optional properties: |
| 32 | - ti,palmas-enable-dvfs1: Enable DVFS1. Configure pins for DVFS1 mode. |
| 33 | Selection primary or secondary function associated to I2C2_SCL_SCE, |
| 34 | I2C2_SDA_SDO pin/pad for DVFS1 interface |
| 35 | - ti,palmas-enable-dvfs2: Enable DVFS2. Configure pins for DVFS2 mode. |
| 36 | Selection primary or secondary function associated to GPADC_START |
| 37 | and SYSEN2 pin/pad for DVFS2 interface |
| 38 | |
| 39 | This binding uses the following generic properties as defined in |
| 40 | pinctrl-bindings.txt: |
| 41 | |
| 42 | Required: pins |
| 43 | Options: function, bias-disable, bias-pull-up, bias-pull-down, |
Laxman Dewangan | a047914 | 2013-10-02 17:07:12 +0530 | [diff] [blame] | 44 | drive-open-drain. |
Laxman Dewangan | 0a8d3e2 | 2013-08-06 18:42:35 +0530 | [diff] [blame] | 45 | |
| 46 | Note that many of these properties are only valid for certain specific pins. |
| 47 | See the Palmas device datasheet for complete details regarding which pins |
| 48 | support which functionality. |
| 49 | |
| 50 | Valid values for pin names are: |
| 51 | gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, gpio9, |
| 52 | gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, vac, powergood, |
| 53 | nreswarm, pwrdown, gpadc_start, reset_in, nsleep, enable1, enable2, |
| 54 | int. |
| 55 | |
| 56 | Valid value of function names are: |
| 57 | gpio, led, pwm, regen, sysen, clk32kgaudio, id, vbus_det, chrg_det, |
| 58 | vac, vacok, powergood, usb_psel, msecure, pwrhold, int, nreswarm, |
| 59 | simrsto, simrsti, low_vbat, wireless_chrg1, rcm, pwrdown, gpadc_start, |
| 60 | reset_in, nsleep, enable. |
| 61 | |
| 62 | There are 4 special functions: opt0, opt1, opt2 and opt3. If any of these |
| 63 | functions is selected then directly pins register will be written with 0, 1, 2 |
| 64 | or 3 respectively if it is valid for that pins or list of pins. |
| 65 | |
| 66 | Example: |
| 67 | palmas: tps65913 { |
| 68 | .... |
| 69 | pinctrl { |
| 70 | compatible = "ti,tps65913-pinctrl"; |
| 71 | ti,palmas-enable-dvfs1; |
| 72 | pinctrl-names = "default"; |
| 73 | pinctrl-0 = <&palmas_pins_state>; |
| 74 | |
| 75 | palmas_pins_state: pinmux { |
| 76 | gpio0 { |
| 77 | pins = "gpio0"; |
| 78 | function = "id"; |
| 79 | bias-pull-up; |
| 80 | }; |
| 81 | |
| 82 | vac { |
| 83 | pins = "vac"; |
| 84 | function = "vacok"; |
| 85 | bias-pull-down; |
| 86 | }; |
| 87 | |
| 88 | gpio5 { |
| 89 | pins = "gpio5"; |
| 90 | function = "opt0"; |
| 91 | drive-open-drain = <1>; |
| 92 | }; |
| 93 | }; |
| 94 | }; |
| 95 | .... |
| 96 | }; |