summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt
blob: 4b5efa51bec75be9d4cb845e7618b75ea27c66e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
* Microchip PIC32 Pin Controller

Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and
../interrupt-controller/interrupts.txt for generic information regarding
pin controller, GPIO, and interrupt bindings.

PIC32 'pin configuration node' is a node of a group of pins which can be
used for a specific device or function. This node represents configuraions of
pins, optional function, and optional mux related configuration.

Required properties for pin controller node:
 - compatible: "microchip,pic32mada-pinctrl"
 - reg: Address range of the pinctrl registers.
 - clocks: Clock specifier (see clock bindings for details)

Required properties for pin configuration sub-nodes:
 - pins: List of pins to which the configuration applies.

Optional properties for pin configuration sub-nodes:
----------------------------------------------------
 - function: Mux function for the specified pins.
 - bias-pull-up: Enable weak pull-up.
 - bias-pull-down: Enable weak pull-down.
 - input-enable: Set the pin as an input.
 - output-low: Set the pin as an output level low.
 - output-high: Set the pin as an output level high.
 - microchip,digital: Enable digital I/O.
 - microchip,analog: Enable analog I/O.

Example:

pic32_pinctrl: pinctrl@1f801400{
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "microchip,pic32mzda-pinctrl";
	reg = <0x1f801400 0x400>;
	clocks = <&PBCLK1>;

	pinctrl_uart2: pinctrl_uart2 {
		uart2-tx {
			pins = "G9";
			function = "U2TX";
			microchip,digital;
			output-low;
		};
		uart2-rx {
			pins = "B0";
			function = "U2RX";
			microchip,digital;
			input-enable;
		};
	};
};

uart2: serial@1f822200 {
	compatible = "microchip,pic32mzda-uart";
	reg = <0x1f822200 0x50>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
};
OpenPOWER on IntegriCloud