153 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/soc/mediatek/mediatek,pwrap.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Mediatek PMIC Wrapper8 9maintainers:10 - Flora Fu <flora.fu@mediatek.com>11 - Alexandre Mergnat <amergnat@baylibre.com>12 13description:14 On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface15 is not directly visible to the CPU, but only through the PMIC wrapper16 inside the SoC. The communication between the SoC and the PMIC can17 optionally be encrypted. Also a non standard Dual IO SPI mode can be18 used to increase speed.19 20 IP Pairing21 22 On MT8135 the pins of some SoC internal peripherals can be on the PMIC.23 The signals of these pins are routed over the SPI bus using the pwrap24 bridge. In the binding description below the properties needed for bridging25 are marked with "IP Pairing". These are optional on SoCs which do not support26 IP Pairing27 28properties:29 compatible:30 oneOf:31 - items:32 - enum:33 - mediatek,mt2701-pwrap34 - mediatek,mt6765-pwrap35 - mediatek,mt6779-pwrap36 - mediatek,mt6795-pwrap37 - mediatek,mt6797-pwrap38 - mediatek,mt6873-pwrap39 - mediatek,mt7622-pwrap40 - mediatek,mt8135-pwrap41 - mediatek,mt8173-pwrap42 - mediatek,mt8183-pwrap43 - mediatek,mt8186-pwrap44 - mediatek,mt8195-pwrap45 - mediatek,mt8365-pwrap46 - mediatek,mt8516-pwrap47 - items:48 - enum:49 - mediatek,mt8186-pwrap50 - mediatek,mt8195-pwrap51 - const: syscon52 - items:53 - enum:54 - mediatek,mt8188-pwrap55 - const: mediatek,mt8195-pwrap56 - const: syscon57 58 reg:59 minItems: 160 items:61 - description: PMIC wrapper registers62 - description: IP pairing registers63 64 reg-names:65 minItems: 166 items:67 - const: pwrap68 - const: pwrap-bridge69 70 interrupts:71 maxItems: 172 73 clocks:74 minItems: 275 items:76 - description: SPI bus clock77 - description: Main module clock78 - description: System module clock79 - description: Timer module clock80 81 clock-names:82 minItems: 283 items:84 - const: spi85 - const: wrap86 - const: sys87 - const: tmr88 89 resets:90 minItems: 191 items:92 - description: PMIC wrapper reset93 - description: IP pairing reset94 95 reset-names:96 minItems: 197 items:98 - const: pwrap99 - const: pwrap-bridge100 101 pmic:102 type: object103 104required:105 - compatible106 - reg107 - reg-names108 - interrupts109 - clocks110 - clock-names111 112dependentRequired:113 resets: [reset-names]114 115allOf:116 - if:117 properties:118 compatible:119 contains:120 const: mediatek,mt8365-pwrap121 then:122 properties:123 clocks:124 minItems: 4125 126 clock-names:127 minItems: 4128 129additionalProperties: false130 131examples:132 - |133 #include <dt-bindings/interrupt-controller/irq.h>134 #include <dt-bindings/interrupt-controller/arm-gic.h>135 #include <dt-bindings/reset/mt8135-resets.h>136 137 soc {138 #address-cells = <2>;139 #size-cells = <2>;140 pwrap@1000f000 {141 compatible = "mediatek,mt8135-pwrap";142 reg = <0 0x1000f000 0 0x1000>,143 <0 0x11017000 0 0x1000>;144 reg-names = "pwrap", "pwrap-bridge";145 interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;146 clocks = <&clk26m>, <&clk26m>;147 clock-names = "spi", "wrap";148 resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,149 <&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;150 reset-names = "pwrap", "pwrap-bridge";151 };152 };153