Commit 18dfc0bf authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Kevin Hilman
Browse files

dt-bindings: power: meson-ee-pwrc: add support for Meson8/8b/8m2



The power domains on the 32-bit Meson8/Meson8b/Meson8m2 SoCs are very
similar to what G12A still uses. The (known) differences are:
- Meson8 doesn't use any reset lines at all
- Meson8b and Meson8m2 use the same reset lines, which are different
  from what the 64-bit SoCs use
- there is no "vapb" clock on the older SoCs
- amlogic,ao-sysctrl cannot point to the whole AO sysctrl region but
  only the power management related registers

Add a new compatible string and adjust clock and reset line expectations
for each SoC.

Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200515204709.1505498-2-martin.blumenstingl@googlemail.com
parent 8f3d9f35
Loading
Loading
Loading
Loading
+59 −15
Original line number Diff line number Diff line
@@ -23,13 +23,19 @@ description: |+
properties:
  compatible:
    enum:
      - amlogic,meson8-pwrc
      - amlogic,meson8b-pwrc
      - amlogic,meson8m2-pwrc
      - amlogic,meson-g12a-pwrc
      - amlogic,meson-sm1-pwrc

  clocks:
    minItems: 2
    minItems: 1
    maxItems: 2

  clock-names:
    minItems: 1
    maxItems: 2
    items:
      - const: vpu
      - const: vapb
@@ -37,6 +43,51 @@ properties:
  resets:
    minItems: 11

  reset-names:
    minItems: 11

  "#power-domain-cells":
    const: 1

  amlogic,ao-sysctrl:
    description: phandle to the AO sysctrl node
    allOf:
      - $ref: /schemas/types.yaml#/definitions/phandle

allOf:
  - if:
      properties:
        compatible:
          enum:
            - amlogic,meson8b-pwrc
            - amlogic,meson8m2-pwrc
    then:
      properties:
        reset-names:
          items:
            - const: dblk
            - const: pic_dc
            - const: hdmi_apb
            - const: hdmi_system
            - const: venci
            - const: vencp
            - const: vdac
            - const: vencl
            - const: viu
            - const: venc
            - const: rdma
      required:
        - resets
        - reset-names

  - if:
      properties:
        compatible:
          enum:
            - amlogic,meson-g12a-pwrc
            - amlogic,meson-sm1-pwrc
    then:
      properties:
        reset-names:
          items:
            - const: viu
@@ -50,21 +101,14 @@ properties:
            - const: vdi6
            - const: vencl
            - const: vid_lock

  "#power-domain-cells":
    const: 1

  amlogic,ao-sysctrl:
    description: phandle to the AO sysctrl node
    allOf:
      - $ref: /schemas/types.yaml#/definitions/phandle
      required:
        - resets
        - reset-names

required:
  - compatible
  - clocks
  - clock-names
  - resets
  - reset-names
  - "#power-domain-cells"
  - amlogic,ao-sysctrl

+13 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */
/*
 * Copyright (c) 2019 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
 */

#ifndef _DT_BINDINGS_MESON8_POWER_H
#define _DT_BINDINGS_MESON8_POWER_H

#define PWRC_MESON8_VPU_ID			0
#define PWRC_MESON8_ETHERNET_MEM_ID		1
#define PWRC_MESON8_AUDIO_DSP_MEM_ID		2

#endif /* _DT_BINDINGS_MESON8_POWER_H */