Mediatek PMIC Wrapper
Schema identifier ($id): "http://devicetree.org/schemas/soc/mediatek/mediatek,pwrap.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Flora Fu <flora.fu@mediatek.com>", "Alexandre Mergnat <amergnat@baylibre.com>"
On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface is not directly visible to the CPU, but only through the PMIC wrapper inside the SoC. The communication between the SoC and the PMIC can optionally be encrypted. Also a non standard Dual IO SPI mode can be used to increase speed. IP Pairing On MT8135 the pins of some SoC internal peripherals can be on the PMIC. The signals of these pins are routed over the SPI bus using the pwrap bridge. In the binding description below the properties needed for bridging are marked with "IP Pairing". These are optional on SoCs which do not support IP Pairing
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Allowed values (
enum):"mediatek,mt2701-pwrap","mediatek,mt6765-pwrap","mediatek,mt6779-pwrap","mediatek,mt6795-pwrap","mediatek,mt6797-pwrap","mediatek,mt6873-pwrap","mediatek,mt7622-pwrap","mediatek,mt8135-pwrap","mediatek,mt8173-pwrap","mediatek,mt8183-pwrap","mediatek,mt8186-pwrap","mediatek,mt8195-pwrap","mediatek,mt8365-pwrap","mediatek,mt8516-pwrap"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"mediatek,mt8186-pwrap","mediatek,mt8195-pwrap"Item 2
Exact value (
const):"syscon"
Rule 3
Array item rules (
items)Item 1
Allowed values (
enum):"mediatek,mt8188-pwrap","mediatek,mt8189-pwrap"Item 2
Exact value (
const):"mediatek,mt8195-pwrap"Item 3
Exact value (
const):"syscon"
reg — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
PMIC wrapper registers
Item 2
IP pairing registers
reg-names — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"pwrap"
Item 2
Exact value (
const):"pwrap-bridge"
interrupts — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Minimum number of items (minItems): 2
Array item rules (items) #
Item 1
SPI bus clock
Item 2
Main module clock
Item 3
System module clock
Item 4
Timer module clock
clock-names — required here #
Minimum number of items (minItems): 2
Array item rules (items) #
Item 1
Exact value (
const):"spi"
Item 2
Exact value (
const):"wrap"
Item 3
Exact value (
const):"sys"
Item 4
Exact value (
const):"tmr"
resets — not listed as required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
PMIC wrapper reset
Item 2
IP pairing reset
reset-names — not listed as required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"pwrap"
Item 2
Exact value (
const):"pwrap-bridge"
power-domains — not listed as required here #
Maximum number of items (maxItems): 1
pmic — not listed as required here #
Value type (type): "object"
Required in this object (required): "compatible", "reg", "reg-names", "interrupts", "clocks", "clock-names"
Requirements triggered by another property (dependentRequired): { resets: "reset-names" }
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"mediatek,mt8365-pwrap"When the condition matches (
then) #Properties and child nodes (
properties)
clocks— not listed as required hereMinimum number of items (
minItems):4
clock-names— not listed as required hereMinimum number of items (
minItems):4
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"mediatek,mt8173-pwrap"When the condition matches (
then) #Properties and child nodes (
properties)
power-domains— not listed as required here
true— No constraints added by this property rule.When the condition does not match (
else) #Properties and child nodes (
properties)
power-domains— not listed as required here
false— Not permitted by this property rule.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/mt8135-resets.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
pwrap@1000f000 {
compatible = "mediatek,mt8135-pwrap";
reg = <0 0x1000f000 0 0x1000>,
<0 0x11017000 0 0x1000>;
reg-names = "pwrap", "pwrap-bridge";
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk26m>, <&clk26m>;
clock-names = "spi", "wrap";
resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
<&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
reset-names = "pwrap", "pwrap-bridge";
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)