xref: /linux/Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt (revision 0898782247ae533d1f4e47a06bc5d4870931b284)
1ad2db351SJoshua Henderson* Microchip PIC32 Pin Controller
2ad2db351SJoshua Henderson
3ad2db351SJoshua HendersonPlease refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and
4ad2db351SJoshua Henderson../interrupt-controller/interrupts.txt for generic information regarding
5ad2db351SJoshua Hendersonpin controller, GPIO, and interrupt bindings.
6ad2db351SJoshua Henderson
7ad2db351SJoshua HendersonPIC32 'pin configuration node' is a node of a group of pins which can be
8*d6e561dfSGeert Uytterhoevenused for a specific device or function. This node represents configurations of
9ad2db351SJoshua Hendersonpins, optional function, and optional mux related configuration.
10ad2db351SJoshua Henderson
11ad2db351SJoshua HendersonRequired properties for pin controller node:
12ad2db351SJoshua Henderson - compatible: "microchip,pic32mada-pinctrl"
13ad2db351SJoshua Henderson - reg: Address range of the pinctrl registers.
14ad2db351SJoshua Henderson - clocks: Clock specifier (see clock bindings for details)
15ad2db351SJoshua Henderson
16ad2db351SJoshua HendersonRequired properties for pin configuration sub-nodes:
17ad2db351SJoshua Henderson - pins: List of pins to which the configuration applies.
18ad2db351SJoshua Henderson
19ad2db351SJoshua HendersonOptional properties for pin configuration sub-nodes:
20ad2db351SJoshua Henderson----------------------------------------------------
21ad2db351SJoshua Henderson - function: Mux function for the specified pins.
22ad2db351SJoshua Henderson - bias-pull-up: Enable weak pull-up.
23ad2db351SJoshua Henderson - bias-pull-down: Enable weak pull-down.
24ad2db351SJoshua Henderson - input-enable: Set the pin as an input.
25ad2db351SJoshua Henderson - output-low: Set the pin as an output level low.
26ad2db351SJoshua Henderson - output-high: Set the pin as an output level high.
27ad2db351SJoshua Henderson - microchip,digital: Enable digital I/O.
28ad2db351SJoshua Henderson - microchip,analog: Enable analog I/O.
29ad2db351SJoshua Henderson
30ad2db351SJoshua HendersonExample:
31ad2db351SJoshua Henderson
32ad2db351SJoshua Hendersonpic32_pinctrl: pinctrl@1f801400{
33ad2db351SJoshua Henderson	#address-cells = <1>;
34ad2db351SJoshua Henderson	#size-cells = <1>;
35ad2db351SJoshua Henderson	compatible = "microchip,pic32mzda-pinctrl";
36ad2db351SJoshua Henderson	reg = <0x1f801400 0x400>;
3782cc37f6SPurna Chandra Mandal	clocks = <&rootclk PB1CLK>;
38ad2db351SJoshua Henderson
39ad2db351SJoshua Henderson	pinctrl_uart2: pinctrl_uart2 {
40ad2db351SJoshua Henderson		uart2-tx {
41ad2db351SJoshua Henderson			pins = "G9";
42ad2db351SJoshua Henderson			function = "U2TX";
43ad2db351SJoshua Henderson			microchip,digital;
44ad2db351SJoshua Henderson			output-low;
45ad2db351SJoshua Henderson		};
46ad2db351SJoshua Henderson		uart2-rx {
47ad2db351SJoshua Henderson			pins = "B0";
48ad2db351SJoshua Henderson			function = "U2RX";
49ad2db351SJoshua Henderson			microchip,digital;
50ad2db351SJoshua Henderson			input-enable;
51ad2db351SJoshua Henderson		};
52ad2db351SJoshua Henderson	};
53ad2db351SJoshua Henderson};
54ad2db351SJoshua Henderson
55ad2db351SJoshua Hendersonuart2: serial@1f822200 {
56ad2db351SJoshua Henderson	compatible = "microchip,pic32mzda-uart";
57ad2db351SJoshua Henderson	reg = <0x1f822200 0x50>;
58ad2db351SJoshua Henderson	pinctrl-names = "default";
59ad2db351SJoshua Henderson	pinctrl-0 = <&pinctrl_uart2>;
60ad2db351SJoshua Henderson};
61