Skip to content

Commit f85fa31

Browse files
Sowjanya Komatinenithierryreding
authored andcommitted
dt-bindings: soc: tegra-pmc: Add Tegra PMC clock bindings
Tegra PMC has 3 clocks clk_out_1, clk_out_2, and clk_out_3. This patch documents PMC clock bindings and adds a header defining Tegra PMC clock ids. Tested-by: Dmitry Osipenko <[email protected]> Reviewed-by: Dmitry Osipenko <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sowjanya Komatineni <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 39faeba commit f85fa31

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ properties:
4040
Must contain an entry for each entry in clock-names.
4141
See ../clocks/clocks-bindings.txt for details.
4242

43+
'#clock-cells':
44+
const: 1
45+
description:
46+
Tegra PMC has clk_out_1, clk_out_2, and clk_out_3.
47+
Consumer of PMC clock should specify the desired clock by having
48+
the clock ID in its "clocks" phandle cell with pmc clock provider.
49+
See include/dt-bindings/soc/tegra-pmc.h for the list of Tegra PMC
50+
clock IDs.
51+
4352
'#interrupt-cells':
4453
const: 2
4554
description:
@@ -296,6 +305,7 @@ required:
296305
- reg
297306
- clock-names
298307
- clocks
308+
- '#clock-cells'
299309

300310
dependencies:
301311
"nvidia,suspend-mode": ["nvidia,core-pwr-off-time", "nvidia,cpu-pwr-off-time"]
@@ -307,12 +317,14 @@ examples:
307317
308318
#include <dt-bindings/clock/tegra210-car.h>
309319
#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
320+
#include <dt-bindings/soc/tegra-pmc.h>
310321
311322
tegra_pmc: pmc@7000e400 {
312323
compatible = "nvidia,tegra210-pmc";
313324
reg = <0x0 0x7000e400 0x0 0x400>;
314325
clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
315326
clock-names = "pclk", "clk32k_in";
327+
#clock-cells = <1>;
316328
317329
nvidia,invert-interrupt;
318330
nvidia,suspend-mode = <0>;

include/dt-bindings/soc/tegra-pmc.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/*
3+
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
4+
*/
5+
6+
#ifndef _DT_BINDINGS_SOC_TEGRA_PMC_H
7+
#define _DT_BINDINGS_SOC_TEGRA_PMC_H
8+
9+
#define TEGRA_PMC_CLK_OUT_1 0
10+
#define TEGRA_PMC_CLK_OUT_2 1
11+
#define TEGRA_PMC_CLK_OUT_3 2
12+
13+
#define TEGRA_PMC_CLK_MAX 3
14+
15+
#endif /* _DT_BINDINGS_SOC_TEGRA_PMC_H */

0 commit comments

Comments
 (0)