mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-20 22:25:23 +00:00
dt-bindings: regulator: Convert mp886x to json-schema
Convert the mp886x binding to DT schema format using json-schema. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200827150640.267f6edc@xhacker.debian Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
02f8eaab0c
commit
fd24adf887
2 changed files with 61 additions and 31 deletions
|
@ -1,31 +0,0 @@
|
||||||
Monolithic Power Systems MP8867/MP8869 voltage regulator
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible: Must be one of the following.
|
|
||||||
"mps,mp8867"
|
|
||||||
"mps,mp8869"
|
|
||||||
- reg: I2C slave address.
|
|
||||||
- enable-gpios: enable gpios.
|
|
||||||
- mps,fb-voltage-divider: An array of two integers containing the resistor
|
|
||||||
values R1 and R2 of the feedback voltage divider in kilo ohms.
|
|
||||||
|
|
||||||
Optional properties:
|
|
||||||
- mps,switch-frequency-hz: The valid switch frequency in Hertz. Available values
|
|
||||||
are: 500000, 750000, 1000000, 1250000, 1500000
|
|
||||||
|
|
||||||
Any property defined as part of the core regulator binding, defined in
|
|
||||||
./regulator.txt, can also be used.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
vcpu: regulator@62 {
|
|
||||||
compatible = "mps,mp8869";
|
|
||||||
regulator-name = "vcpu";
|
|
||||||
regulator-min-microvolt = <700000>;
|
|
||||||
regulator-max-microvolt = <850000>;
|
|
||||||
regulator-always-on;
|
|
||||||
regulator-boot-on;
|
|
||||||
enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;
|
|
||||||
mps,fb-voltage-divider = <80 240>;
|
|
||||||
reg = <0x62>;
|
|
||||||
};
|
|
61
Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
Normal file
61
Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/regulator/mps,mp886x.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Monolithic Power Systems MP8867/MP8869 voltage regulator
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Jisheng Zhang <jszhang@kernel.org>
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: regulator.yaml#
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
enum:
|
||||||
|
- mps,mp8867
|
||||||
|
- mps,mp8869
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
enable-gpios:
|
||||||
|
description: GPIO to enable/disable the regulator.
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
mps,fb-voltage-divider:
|
||||||
|
description: An array of two integers containing the resistor
|
||||||
|
values R1 and R2 of the feedback voltage divider in kilo ohms.
|
||||||
|
$ref: "/schemas/types.yaml#/definitions/uint32-array"
|
||||||
|
maxItems: 2
|
||||||
|
|
||||||
|
mps,switch-frequency-hz:
|
||||||
|
description: The valid switch frequency in Hertz.
|
||||||
|
enum: [500000, 750000, 1000000, 1250000, 1500000]
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- enable-gpios
|
||||||
|
- mps,fb-voltage-divider
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
i2c {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
regulator@62 {
|
||||||
|
compatible = "mps,mp8869";
|
||||||
|
regulator-name = "vcpu";
|
||||||
|
regulator-min-microvolt = <800000>;
|
||||||
|
regulator-max-microvolt = <1150000>;
|
||||||
|
enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;
|
||||||
|
mps,fb-voltage-divider = <80 240>;
|
||||||
|
reg = <0x62>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
Loading…
Add table
Reference in a new issue