xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pinctrl/pinctrl-rk805.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunPincontrol driver for RK805 Power management IC.
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRK805 has 2 pins which can be configured as GPIO output only.
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunPlease refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
6*4882a593Smuzhiyunfor details of the common pinctrl bindings used by client devices,
7*4882a593Smuzhiyunincluding the meaning of the phrase "pin configuration node".
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunOptional Pinmux properties:
10*4882a593Smuzhiyun--------------------------
11*4882a593SmuzhiyunFollowing properties are required if default setting of pins are required
12*4882a593Smuzhiyunat boot.
13*4882a593Smuzhiyun- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.
14*4882a593Smuzhiyun- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
15*4882a593Smuzhiyun		<pinctrl-bindings.txt>.
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunThe pin configurations are defined as child of the pinctrl states node. Each
18*4882a593Smuzhiyunsub-node have following properties:
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunRequired properties:
21*4882a593Smuzhiyun------------------
22*4882a593Smuzhiyun- #gpio-cells: Should be two. The first cell is the pin number and the
23*4882a593Smuzhiyun  second is the GPIO flags.
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun- gpio-controller: Marks the device node as a GPIO controller.
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun- pins: List of pins. Valid values of pins properties are: gpio0, gpio1.
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunFirst 2 properties must be added in the RK805 PMIC node, documented in
30*4882a593SmuzhiyunDocumentation/devicetree/bindings/mfd/rk808.txt
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunOptional properties:
33*4882a593Smuzhiyun-------------------
34*4882a593SmuzhiyunFollowing are optional properties defined as pinmux DT binding document
35*4882a593Smuzhiyun<pinctrl-bindings.txt>. Absence of properties will leave the configuration
36*4882a593Smuzhiyunon default.
37*4882a593Smuzhiyun	function,
38*4882a593Smuzhiyun	output-low,
39*4882a593Smuzhiyun	output-high.
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunValid values for function properties are: gpio.
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunTheres is also not customised properties for any GPIO.
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunExample:
46*4882a593Smuzhiyun--------
47*4882a593Smuzhiyunrk805: rk805@18 {
48*4882a593Smuzhiyun	compatible = "rockchip,rk805";
49*4882a593Smuzhiyun	...
50*4882a593Smuzhiyun	gpio-controller;
51*4882a593Smuzhiyun	#gpio-cells = <2>;
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun	pinctrl-names = "default";
54*4882a593Smuzhiyun	pinctrl-0 = <&pmic_int_l>, <&rk805_default>;
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun	rk805_default: pinmux {
57*4882a593Smuzhiyun		gpio01 {
58*4882a593Smuzhiyun			pins = "gpio0", "gpio1";
59*4882a593Smuzhiyun			function = "gpio";
60*4882a593Smuzhiyun			output-high;
61*4882a593Smuzhiyun		};
62*4882a593Smuzhiyun	};
63*4882a593Smuzhiyun};
64