Skip to content

Commit 727b05e

Browse files
ConchuODpalmer-dabbelt
authored andcommitted
dt-bindings: memory-controllers: add canaan k210 sram controller
The k210 U-Boot port has been using the clocks defined in the devicetree to bring up the board's SRAM, but this violates the dt-schema. As such, move the clocks to a dedicated node with the same compatible string & document it. Signed-off-by: Conor Dooley <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 5ec8854 commit 727b05e

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/memory-controllers/canaan,k210-sram.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Canaan K210 SRAM memory controller
8+
9+
description:
10+
The Canaan K210 SRAM memory controller is responsible for the system's 8 MiB
11+
of SRAM. The controller is initialised by the bootloader, which configures
12+
its clocks, before OS bringup.
13+
14+
maintainers:
15+
- Conor Dooley <[email protected]>
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- canaan,k210-sram
21+
22+
clocks:
23+
minItems: 1
24+
items:
25+
- description: sram0 clock
26+
- description: sram1 clock
27+
- description: aisram clock
28+
29+
clock-names:
30+
minItems: 1
31+
items:
32+
- const: sram0
33+
- const: sram1
34+
- const: aisram
35+
36+
required:
37+
- compatible
38+
- clocks
39+
- clock-names
40+
41+
additionalProperties: false
42+
43+
examples:
44+
- |
45+
#include <dt-bindings/clock/k210-clk.h>
46+
memory-controller {
47+
compatible = "canaan,k210-sram";
48+
clocks = <&sysclk K210_CLK_SRAM0>,
49+
<&sysclk K210_CLK_SRAM1>,
50+
<&sysclk K210_CLK_AI>;
51+
clock-names = "sram0", "sram1", "aisram";
52+
};

0 commit comments

Comments
 (0)