1
0

dt-bindings: clock: Convert microchip,pic32mzda-clk to DT schema

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250630232652.3701007-1-robh@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
Rob Herring (Arm)
2025-06-30 18:26:51 -05:00
committed by Stephen Boyd
parent 1a25e13de6
commit ce2930aefb
2 changed files with 45 additions and 39 deletions

View File

@@ -1,39 +0,0 @@
Microchip PIC32 Clock Controller Binding
----------------------------------------
Microchip clock controller is consists of few oscillators, PLL, multiplexer
and few divider modules.
This binding uses common clock bindings.
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
Required properties:
- compatible: shall be "microchip,pic32mzda-clk".
- reg: shall contain base address and length of clock registers.
- #clock-cells: shall be 1.
Optional properties:
- microchip,pic32mzda-sosc: shall be added only if platform has
secondary oscillator connected.
Example:
rootclk: clock-controller@1f801200 {
compatible = "microchip,pic32mzda-clk";
reg = <0x1f801200 0x200>;
#clock-cells = <1>;
/* optional */
microchip,pic32mzda-sosc;
};
The clock consumer shall specify the desired clock-output of the clock
controller (as defined in [2]) by specifying output-id in its "clock"
phandle cell.
[2] include/dt-bindings/clock/microchip,pic32-clock.h
For example for UART2:
uart2: serial@2 {
compatible = "microchip,pic32mzda-uart";
reg = <>;
interrupts = <>;
clocks = <&rootclk PB2CLK>;
};

View File

@@ -0,0 +1,45 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/microchip,pic32mzda-clk.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip PIC32MZDA Clock Controller
maintainers:
- Purna Chandra Mandal <purna.mandal@microchip.com>
description:
Microchip clock controller consists of a few oscillators, PLL, multiplexer
and divider modules.
properties:
compatible:
const: microchip,pic32mzda-clk
reg:
maxItems: 1
'#clock-cells':
const: 1
microchip,pic32mzda-sosc:
description: Presence of secondary oscillator.
type: boolean
required:
- compatible
- reg
- "#clock-cells"
additionalProperties: false
examples:
- |
clock-controller@1f801200 {
compatible = "microchip,pic32mzda-clk";
reg = <0x1f801200 0x200>;
#clock-cells = <1>;
/* optional */
microchip,pic32mzda-sosc;
};