pwrap.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. MediaTek PMIC Wrapper Driver
  2. This document describes the binding for the MediaTek PMIC wrapper.
  3. On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface
  4. is not directly visible to the CPU, but only through the PMIC wrapper
  5. inside the SoC. The communication between the SoC and the PMIC can
  6. optionally be encrypted. Also a non standard Dual IO SPI mode can be
  7. used to increase speed.
  8. IP Pairing
  9. on MT8135 the pins of some SoC internal peripherals can be on the PMIC.
  10. The signals of these pins are routed over the SPI bus using the pwrap
  11. bridge. In the binding description below the properties needed for bridging
  12. are marked with "IP Pairing". These are optional on SoCs which do not support
  13. IP Pairing
  14. Required properties in pwrap device node.
  15. - compatible:
  16. "mediatek,mt8135-pwrap" for MT8135 SoCs
  17. "mediatek,mt8173-pwrap" for MT8173 SoCs
  18. - interrupts: IRQ for pwrap in SOC
  19. - reg-names: Must include the following entries:
  20. "pwrap": Main registers base
  21. "pwrap-bridge": bridge base (IP Pairing)
  22. - reg: Must contain an entry for each entry in reg-names.
  23. - reset-names: Must include the following entries:
  24. "pwrap"
  25. "pwrap-bridge" (IP Pairing)
  26. - resets: Must contain an entry for each entry in reset-names.
  27. - clock-names: Must include the following entries:
  28. "spi": SPI bus clock
  29. "wrap": Main module clock
  30. - clocks: Must contain an entry for each entry in clock-names.
  31. Optional properities:
  32. - pmic: Mediatek PMIC MFD is the child device of pwrap
  33. See the following for child node definitions:
  34. Documentation/devicetree/bindings/mfd/mt6397.txt
  35. Example:
  36. pwrap: pwrap@1000f000 {
  37. compatible = "mediatek,mt8135-pwrap";
  38. reg = <0 0x1000f000 0 0x1000>,
  39. <0 0x11017000 0 0x1000>;
  40. reg-names = "pwrap", "pwrap-bridge";
  41. interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
  42. resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
  43. <&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
  44. reset-names = "pwrap", "pwrap-bridge";
  45. clocks = <&clk26m>, <&clk26m>;
  46. clock-names = "spi", "wrap";
  47. pmic {
  48. compatible = "mediatek,mt6397";
  49. };
  50. };