Skip to content

Commit bd348ca

Browse files
SFxingyuwuConchuOD
authored andcommitted
dt-bindings: clock: Add StarFive JH7110 PLL clock generator
Add bindings for the PLL clock generator on the JH7110 RISC-V SoC. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
1 parent 06c2afb commit bd348ca

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: StarFive JH7110 PLL Clock Generator
8+
9+
description:
10+
These PLLs are high speed, low jitter frequency synthesizers in the JH7110.
11+
Each PLL works in integer mode or fraction mode, with configuration
12+
registers in the sys syscon. So the PLLs node should be a child of
13+
SYS-SYSCON node.
14+
The formula for calculating frequency is
15+
Fvco = Fref * (NI + NF) / M / Q1
16+
17+
maintainers:
18+
- Xingyu Wu <xingyu.wu@starfivetech.com>
19+
20+
properties:
21+
compatible:
22+
const: starfive,jh7110-pll
23+
24+
clocks:
25+
maxItems: 1
26+
description: Main Oscillator (24 MHz)
27+
28+
'#clock-cells':
29+
const: 1
30+
description:
31+
See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
32+
33+
required:
34+
- compatible
35+
- clocks
36+
- '#clock-cells'
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
clock-controller {
43+
compatible = "starfive,jh7110-pll";
44+
clocks = <&osc>;
45+
#clock-cells = <1>;
46+
};

include/dt-bindings/clock/starfive,jh7110-crg.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#ifndef __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
77
#define __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
88

9+
/* PLL clocks */
10+
#define JH7110_PLLCLK_PLL0_OUT 0
11+
#define JH7110_PLLCLK_PLL1_OUT 1
12+
#define JH7110_PLLCLK_PLL2_OUT 2
13+
#define JH7110_PLLCLK_END 3
14+
915
/* SYSCRG clocks */
1016
#define JH7110_SYSCLK_CPU_ROOT 0
1117
#define JH7110_SYSCLK_CPU_CORE 1

0 commit comments

Comments
 (0)