About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / devicetree / bindings / pinctrl / renesas,pfc-pinctrl.txt




Custom Search

Based on kernel version 3.13. Page generated on 2014-01-20 22:01 EST.

1	* Renesas Pin Function Controller (GPIO and Pin Mux/Config)
2	
3	The Pin Function Controller (PFC) is a Pin Mux/Config controller. On SH7372,
4	SH73A0, R8A73A4 and R8A7740 it also acts as a GPIO controller.
5	
6	
7	Pin Control
8	-----------
9	
10	Required Properties:
11	
12	  - compatible: should be one of the following.
13	    - "renesas,pfc-r8a73a4": for R8A73A4 (R-Mobile APE6) compatible pin-controller.
14	    - "renesas,pfc-r8a7740": for R8A7740 (R-Mobile A1) compatible pin-controller.
15	    - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller.
16	    - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
17	    - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
18	    - "renesas,pfc-sh7372": for SH7372 (SH-Mobile AP4) compatible pin-controller.
19	    - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
20	
21	  - reg: Base address and length of each memory resource used by the pin
22	    controller hardware module.
23	
24	Optional properties:
25	
26	  - #gpio-range-cells: Mandatory when the PFC doesn't handle GPIO, forbidden
27	    otherwise. Should be 3.
28	
29	The PFC node also acts as a container for pin configuration nodes. Please refer
30	to pinctrl-bindings.txt in this directory for the definition of the term "pin
31	configuration node" and for the common pinctrl bindings used by client devices.
32	
33	Each pin configuration node represents a desired configuration for a pin, a
34	pin group, or a list of pins or pin groups. The configuration can include the
35	function to select on those pin(s) and pin configuration parameters (such as
36	pull-up and pull-down).
37	
38	Pin configuration nodes contain pin configuration properties, either directly
39	or grouped in child subnodes. Both pin muxing and configuration parameters can
40	be grouped in that way and referenced as a single pin configuration node by
41	client devices.
42	
43	A configuration node or subnode must reference at least one pin (through the
44	pins or pin groups properties) and contain at least a function or one
45	configuration parameter. When the function is present only pin groups can be
46	used to reference pins.
47	
48	All pin configuration nodes and subnodes names are ignored. All of those nodes
49	are parsed through phandles and processed purely based on their content.
50	
51	Pin Configuration Node Properties:
52	
53	- renesas,pins : An array of strings, each string containing the name of a pin.
54	- renesas,groups : An array of strings, each string containing the name of a pin
55	  group.
56	
57	- renesas,function: A string containing the name of the function to mux to the
58	  pin group(s) specified by the renesas,groups property
59	
60	  Valid values for pin, group and function names can be found in the group and
61	  function arrays of the PFC data file corresponding to the SoC
62	  (drivers/pinctrl/sh-pfc/pfc-*.c)
63	
64	The pin configuration parameters use the generic pinconf bindings defined in
65	pinctrl-bindings.txt in this directory. The supported parameters are
66	bias-disable, bias-pull-up and bias-pull-down.
67	
68	
69	GPIO
70	----
71	
72	On SH7372, SH73A0, R8A73A4 and R8A7740 the PFC node is also a GPIO controller
73	node.
74	
75	Required Properties:
76	
77	  - gpio-controller: Marks the device node as a gpio controller.
78	
79	  - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
80	    cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
81	    GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
82	
83	The syntax of the gpio specifier used by client nodes should be the following
84	with values derived from the SoC user manual.
85	
86	  <[phandle of the gpio controller node]
87	   [pin number within the gpio controller]
88	   [flags]>
89	
90	On other mach-shmobile platforms GPIO is handled by the gpio-rcar driver.
91	Please refer to Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
92	for documentation of the GPIO device tree bindings on those platforms.
93	
94	
95	Examples
96	--------
97	
98	Example 1: SH73A0 (SH-Mobile AG5) pin controller node
99	
100		pfc: pfc@e6050000 {
101			compatible = "renesas,pfc-sh73a0";
102			reg = <0xe6050000 0x8000>,
103			      <0xe605801c 0x1c>;
104			gpio-controller;
105			#gpio-cells = <2>;
106		};
107	
108	Example 2: A GPIO LED node that references a GPIO
109	
110		#include <dt-bindings/gpio/gpio.h>
111	
112		leds {
113			compatible = "gpio-leds";
114			led1 {
115				gpios = <&pfc 20 GPIO_ACTIVE_LOW>;
116			};
117		};
118	
119	Example 3: KZM-A9-GT (SH-Mobile AG5) default pin state hog and pin control maps
120	           for the MMCIF and SCIFA4 devices
121	
122		&pfc {
123			pinctrl-0 = <&scifa4_pins>;
124			pinctrl-names = "default";
125	
126			mmcif_pins: mmcif {
127				mux {
128					renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
129					renesas,function = "mmc0";
130				};
131				cfg {
132					renesas,groups = "mmc0_data8_0";
133					renesas,pins = "PORT279";
134					bias-pull-up;
135				};
136			};
137	
138			scifa4_pins: scifa4 {
139				renesas,groups = "scifa4_data", "scifa4_ctrl";
140				renesas,function = "scifa4";
141			};
142		};
143	
144	Example 4: KZM-A9-GT (SH-Mobile AG5) default pin state for the MMCIF device
145	
146		&mmcif {
147			pinctrl-0 = <&mmcif_pins>;
148			pinctrl-names = "default";
149	
150			bus-width = <8>;
151			vmmc-supply = <&reg_1p8v>;
152			status = "okay";
153		};
Hide Line Numbers
About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.