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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/microchip,pic32mzda-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip PIC32 Pin Controller
maintainers:
- Linus Walleij <linusw@kernel.org>
description:
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 configurations of
pins, optional function, and optional mux related configuration.
properties:
compatible:
const: microchip,pic32mzda-pinctrl
reg:
maxItems: 1
clocks:
maxItems: 1
$defs:
pin-node:
type: object
allOf:
- $ref: /schemas/pinctrl/pincfg-node.yaml#
- $ref: /schemas/pinctrl/pinmux-node.yaml#
properties:
pins:
description: List of pins to which the configuration applies.
items:
type: string
minItems: 1
function: true
bias-pull-up: true
bias-pull-down: true
input-enable: true
output-low: true
output-high: true
microchip,digital:
description: Enable digital I/O.
type: boolean
microchip,analog:
description: Enable analog I/O.
type: boolean
required:
- pins
unevaluatedProperties: false
additionalProperties:
oneOf:
- additionalProperties:
$ref: '#/$defs/pin-node'
- $ref: '#/$defs/pin-node'
required:
- compatible
- reg
- clocks
examples:
- |
#include <dt-bindings/clock/microchip,pic32-clock.h>
#include <dt-bindings/interrupt-controller/irq.h>
pic32_pinctrl: pinctrl@1f801400 {
compatible = "microchip,pic32mzda-pinctrl";
reg = <0x1f801400 0x400>;
clocks = <&rootclk PB1CLK>;
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>;
interrupts = <145 IRQ_TYPE_LEVEL_HIGH>,
<146 IRQ_TYPE_LEVEL_HIGH>,
<147 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&rootclk PB2CLK>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
};
|