Commit 8dbdf23a authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Rob Herring

dt-bindings: mmc: Convert UniPhier SD controller to json-schema

Convert the UniPhier SD controller binding to DT schema format.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 7ebec905
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/mmc/socionext,uniphier-sd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: UniPhier SD/SDIO/eMMC controller
maintainers:
- Masahiro Yamada <yamada.masahiro@socionext.com>
properties:
compatible:
description: version 2.91, 3.1, 3.1.1, respectively
enum:
- socionext,uniphier-sd-v2.91
- socionext,uniphier-sd-v3.1
- socionext,uniphier-sd-v3.1.1
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
reset-names:
description: |
There are three reset signals at maximum
host: mandatory for all variants
bridge: exist only for version 2.91
hw: optional. exist if eMMC hw reset line is available
oneOf:
- const: host
- items:
- const: host
- const: bridge
- items:
- const: host
- const: hw
- items:
- const: host
- const: bridge
- const: hw
resets:
minItems: 1
maxItems: 3
allOf:
- $ref: mmc-controller.yaml
- if:
properties:
compatible:
contains:
const: socionext,uniphier-sd-v2.91
then:
properties:
reset-names:
contains:
const: bridge
else:
properties:
reset-names:
not:
contains:
const: bridge
required:
- compatible
- reg
- interrupts
- clocks
- reset-names
- resets
examples:
- |
sd: mmc@5a400000 {
compatible = "socionext,uniphier-sd-v2.91";
reg = <0x5a400000 0x200>;
interrupts = <0 76 4>;
pinctrl-names = "default", "uhs";
pinctrl-0 = <&pinctrl_sd>;
pinctrl-1 = <&pinctrl_sd_uhs>;
clocks = <&mio_clk 0>;
reset-names = "host", "bridge";
resets = <&mio_rst 0>, <&mio_rst 3>;
dma-names = "rx-tx";
dmas = <&dmac 4>;
bus-width = <4>;
cap-sd-highspeed;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
};
UniPhier SD/eMMC controller
Required properties:
- compatible: should be one of the following:
"socionext,uniphier-sd-v2.91" - IP version 2.91
"socionext,uniphier-sd-v3.1" - IP version 3.1
"socionext,uniphier-sd-v3.1.1" - IP version 3.1.1
- reg: offset and length of the register set for the device.
- interrupts: a single interrupt specifier.
- clocks: a single clock specifier of the controller clock.
- reset-names: should contain the following:
"host" - mandatory for all versions
"bridge" - should exist only for "socionext,uniphier-sd-v2.91"
"hw" - should exist if eMMC hw reset line is available
- resets: a list of reset specifiers, corresponding to the reset-names
Optional properties:
- pinctrl-names: if present, should contain the following:
"default" - should exist for all instances
"uhs" - should exist for SD instance with UHS support
- pinctrl-0: pin control state for the default mode
- pinctrl-1: pin control state for the UHS mode
- dma-names: should be "rx-tx" if present.
This property can exist only for "socionext,uniphier-sd-v2.91".
- dmas: a single DMA channel specifier
This property can exist only for "socionext,uniphier-sd-v2.91".
- bus-width: see mmc.txt
- cap-sd-highspeed: see mmc.txt
- cap-mmc-highspeed: see mmc.txt
- sd-uhs-sdr12: see mmc.txt
- sd-uhs-sdr25: see mmc.txt
- sd-uhs-sdr50: see mmc.txt
- cap-mmc-hw-reset: should exist if reset-names contains "hw". see mmc.txt
- non-removable: see mmc.txt
Example:
sd: sdhc@5a400000 {
compatible = "socionext,uniphier-sd-v2.91";
reg = <0x5a400000 0x200>;
interrupts = <0 76 4>;
pinctrl-names = "default", "uhs";
pinctrl-0 = <&pinctrl_sd>;
pinctrl-1 = <&pinctrl_sd_uhs>;
clocks = <&mio_clk 0>;
reset-names = "host", "bridge";
resets = <&mio_rst 0>, <&mio_rst 3>;
dma-names = "rx-tx";
dmas = <&dmac 4>;
bus-width = <4>;
cap-sd-highspeed;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment