18c2ecf20Sopenharmony_ciVIA VT8500 and Wondermedia WM8xxx-series pinmux/gpio controller 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThese SoCs contain a combined Pinmux/GPIO module. Each pin may operate as 48c2ecf20Sopenharmony_cieither a GPIO in, GPIO out or as an alternate function (I2C, SPI etc). 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciRequired properties: 78c2ecf20Sopenharmony_ci- compatible: "via,vt8500-pinctrl", "wm,wm8505-pinctrl", "wm,wm8650-pinctrl", 88c2ecf20Sopenharmony_ci "wm8750-pinctrl" or "wm,wm8850-pinctrl" 98c2ecf20Sopenharmony_ci- reg: Should contain the physical address of the module's registers. 108c2ecf20Sopenharmony_ci- interrupt-controller: Marks the device node as an interrupt controller. 118c2ecf20Sopenharmony_ci- #interrupt-cells: Should be two. 128c2ecf20Sopenharmony_ci- gpio-controller: Marks the device node as a GPIO controller. 138c2ecf20Sopenharmony_ci- #gpio-cells : Should be two. The first cell is the pin number and the 148c2ecf20Sopenharmony_ci second cell is used to specify optional parameters. 158c2ecf20Sopenharmony_ci bit 0 - active low 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciPlease refer to ../gpio/gpio.txt for a general description of GPIO bindings. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciPlease refer to pinctrl-bindings.txt in this directory for details of the 208c2ecf20Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning of the 218c2ecf20Sopenharmony_ciphrase "pin configuration node". 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciEach pin configuration node lists the pin(s) to which it applies, and one or 248c2ecf20Sopenharmony_cimore of the mux functions to select on those pin(s), and pull-up/down 258c2ecf20Sopenharmony_ciconfiguration. Each subnode only affects those parameters that are explicitly 268c2ecf20Sopenharmony_cilisted. In other words, a subnode that lists only a mux function implies no 278c2ecf20Sopenharmony_ciinformation about any pull configuration. Similarly, a subnode that lists only 288c2ecf20Sopenharmony_cia pull parameter implies no information about the mux function. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciRequired subnode-properties: 318c2ecf20Sopenharmony_ci- wm,pins: An array of cells. Each cell contains the ID of a pin. 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ciOptional subnode-properties: 348c2ecf20Sopenharmony_ci- wm,function: Integer, containing the function to mux to the pin(s): 358c2ecf20Sopenharmony_ci 0: GPIO in 368c2ecf20Sopenharmony_ci 1: GPIO out 378c2ecf20Sopenharmony_ci 2: alternate 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci- wm,pull: Integer, representing the pull-down/up to apply to the pin(s): 408c2ecf20Sopenharmony_ci 0: none 418c2ecf20Sopenharmony_ci 1: down 428c2ecf20Sopenharmony_ci 2: up 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciEach of wm,function and wm,pull may contain either a single value which 458c2ecf20Sopenharmony_ciwill be applied to all pins in wm,pins, or one value for each entry in 468c2ecf20Sopenharmony_ciwm,pins. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciExample: 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci pinctrl: pinctrl { 518c2ecf20Sopenharmony_ci compatible = "wm,wm8505-pinctrl"; 528c2ecf20Sopenharmony_ci reg = <0xD8110000 0x10000>; 538c2ecf20Sopenharmony_ci interrupt-controller; 548c2ecf20Sopenharmony_ci #interrupt-cells = <2>; 558c2ecf20Sopenharmony_ci gpio-controller; 568c2ecf20Sopenharmony_ci #gpio-cells = <2>; 578c2ecf20Sopenharmony_ci }; 58