mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
dt-bindings: pinctrl: microchip,pic32mzda-pinctrl: Convert to DT schema
Convert Microchip PIC32 Pin Controller devicetree binding from legacy text format to DT schema. Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
committed by
Linus Walleij
parent
9e48545582
commit
daa12f3a63
@@ -1,60 +0,0 @@
|
||||
* 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 configurations 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 = <&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>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_uart2>;
|
||||
};
|
||||
@@ -0,0 +1,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>;
|
||||
};
|
||||
Reference in New Issue
Block a user