Skip to content

Commit 048f71f

Browse files
parakabroonie
authored andcommitted
spi: migrate mt7621 text bindings to YAML
SoC MT7621 SPI bindings used text format, so migrate them to YAML. There are some additions to the binding that were not in the original file. This binding is used in MT7621 and MT7628a Ralink SoCs. To properly match both dts nodes in tree we need to add to the schema 'clocks', 'clock-names' and 'reset-names'. Both 'clock-names' and 'reset-names' use 'spi' as string so maintain that as const in the schema. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20220927031929.807070-1-sergio.paracuellos@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent aa69dc6 commit 048f71f

File tree

2 files changed

+61
-26
lines changed

2 files changed

+61
-26
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/ralink,mt7621-spi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
maintainers:
8+
- Sergio Paracuellos <sergio.paracuellos@gmail.com>
9+
10+
title: Mediatek MT7621/MT7628 SPI controller
11+
12+
allOf:
13+
- $ref: /schemas/spi/spi-controller.yaml#
14+
15+
properties:
16+
compatible:
17+
const: ralink,mt7621-spi
18+
19+
reg:
20+
maxItems: 1
21+
22+
clocks:
23+
maxItems: 1
24+
25+
clock-names:
26+
const: spi
27+
28+
resets:
29+
maxItems: 1
30+
31+
reset-names:
32+
const: spi
33+
34+
required:
35+
- compatible
36+
- reg
37+
- resets
38+
- "#address-cells"
39+
- "#size-cells"
40+
41+
unevaluatedProperties: false
42+
43+
examples:
44+
- |
45+
#include <dt-bindings/clock/mt7621-clk.h>
46+
#include <dt-bindings/reset/mt7621-reset.h>
47+
48+
spi@b00 {
49+
compatible = "ralink,mt7621-spi";
50+
reg = <0xb00 0x100>;
51+
clocks = <&sysc MT7621_CLK_SPI>;
52+
clock-names = "spi";
53+
resets = <&sysc MT7621_RST_SPI>;
54+
reset-names = "spi";
55+
56+
#address-cells = <1>;
57+
#size-cells = <0>;
58+
59+
pinctrl-names = "default";
60+
pinctrl-0 = <&spi_pins>;
61+
};

Documentation/devicetree/bindings/spi/spi-mt7621.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)