From patchwork Fri Apr 17 19:08:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11496021 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45AD915AB for ; Fri, 17 Apr 2020 19:09:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BFF120780 for ; Fri, 17 Apr 2020 19:09:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="REGAbLpU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="X/vV81ld" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BFF120780 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HBc/Ei2JKcWIMtDBrA3EsUo2O7nrGhv9alMNel5aVi0=; b=REGAbLpUA+yO4h CtVUdwo2svADP3/Dfpm1O5rS4fGym8nB8kqCOh6npv5KQQomtnho6fpSrO7B2ARePIwHdmWUIaDmO sQd8YRaAPnB5mNxHsiJqZDviyvdIuCnBUZcH1DPq7ZtTih44gQzEjpuHaWsZkQPHPfRW8Q7upB1wF xHufMv6WsTfoSFweY5qrGwDYSnleLGPSr/4fZO/ukvfRZ3Xnv5q7D9rDJn99gSLsFkbgsaOSqwr7t PI1SdiMSZl580pSJUombbjk+Bm5GCeDrinGRm58ab4BD3gq7ZZfx4eFjLX8PxcIonBFz2AzujKTlY d7PujFnKg1L7LgAApktg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPWMP-0002T4-7L; Fri, 17 Apr 2020 19:09:09 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPWM0-00024w-16; Fri, 17 Apr 2020 19:08:46 +0000 Received: by mail-wr1-x442.google.com with SMTP id b11so4277005wrs.6; Fri, 17 Apr 2020 12:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d7toYxcHEl8iaWER3ZlC9JRifsVMdDzRalye45CJVzA=; b=X/vV81ld6aX8iOfd6EBTWFdYDsUkRAv5VbWiyJLuN2n6qvsyvf+siW7gcPKuFYUZjV dINlrbrxg3TldmDOV+osKfVUv4y/jiqMX3o+CVsPft30H3clB+VVpxDmIjbD5RpPoEQq vEpLEiVqnmAaSIDcdjM5wMHVNpymJYJW7qpx9RDbY2t8ZUlLM//JDNZ9UaXnRBFafceI a9AANq6ofLYjY0CCFNl5Yy18yur4Um7FmgGjIB6/U7thSkDjPMEchUbap8+u9K0f9+8j HU1cIBm/dRplGGP2p514mZci0z/naifFDJmTHJVGn9vSKoMA2FuSEWGmLey1QmfWBD84 xpfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d7toYxcHEl8iaWER3ZlC9JRifsVMdDzRalye45CJVzA=; b=pyhnC1dJ/5+a4XrLQ41pKdgeBz0vZA/HAu4wB6F4lpdR9a8iv5aTsz3b0g7jdW9RN1 Sp+eMLiPGSbd/wsuXj9CQDRSTj4w6+mXc8KqVuojAKnZJDxDv8tUaUKE5CdNShIDgx8k HuLiHvU1bO6PO8PtZP2UnjatOLzG047cnHxb0gVFyquS43TmIM7kqv27Q65QvsQvtn7K W+94L0FLc4Eer5UNxfFA3o7RXqqMvxzvWlLksTMtkiddmbHPcIB9CAonL+Mliooh2TAz CH4ScjRfliEdQOGdyFqUx8idpPCppmqzt80fwD15OXRLGLFRpqJSStW8inONT07v2c2o k+rA== X-Gm-Message-State: AGi0Pubb74PcJyFFiTELnoym8ngKOBe5dPq1Ds3n0rIHEktk2fP8VeyB GrLqSiBhB4yshcKjzdvIdIDC5o+bXLg= X-Google-Smtp-Source: APiQypLiWbVAQam5qXO040+ZMNoB7DJ7i6qLa2IMuFLeKPMH2DWEfFa6GMS2cppkLOnQjdi14lMr4g== X-Received: by 2002:a5d:4a4b:: with SMTP id v11mr5267702wrs.32.1587150522537; Fri, 17 Apr 2020 12:08:42 -0700 (PDT) Received: from localhost.localdomain (p200300F137142E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3714:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id q17sm8722220wmj.45.2020.04.17.12.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2020 12:08:42 -0700 (PDT) From: Martin Blumenstingl To: robh+dt@kernel.org, khilman@baylibre.com, narmstrong@baylibre.com, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: power: meson-ee-pwrc: add support for Meson8/8b/8m2 Date: Fri, 17 Apr 2020 21:08:22 +0200 Message-Id: <20200417190825.1363345-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200417190825.1363345-1-martin.blumenstingl@googlemail.com> References: <20200417190825.1363345-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200417_120844_066007_4DA76EF3 X-CRM114-Status: GOOD ( 13.24 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [martin.blumenstingl[at]googlemail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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: Martin Blumenstingl --- .../bindings/power/amlogic,meson-ee-pwrc.yaml | 75 ++++++++++++++----- include/dt-bindings/power/meson8-power.h | 13 ++++ 2 files changed, 71 insertions(+), 17 deletions(-) create mode 100644 include/dt-bindings/power/meson8-power.h diff --git a/Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml b/Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml index 6c6079fe1351..a0e4cf143b9c 100644 --- a/Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml +++ b/Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml @@ -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,20 +43,6 @@ properties: resets: minItems: 11 - reset-names: - items: - - const: viu - - const: venc - - const: vcbus - - const: bt656 - - const: rdma - - const: venci - - const: vencp - - const: vdac - - const: vdi6 - - const: vencl - - const: vid_lock - "#power-domain-cells": const: 1 @@ -59,12 +51,61 @@ properties: 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 + - const: venc + - const: vcbus + - const: bt656 + - const: rdma + - const: venci + - const: vencp + - const: vdac + - const: vdi6 + - const: vencl + - const: vid_lock + required: + - resets + - reset-names + required: - compatible - clocks - clock-names - - resets - - reset-names - "#power-domain-cells" - amlogic,ao-sysctrl diff --git a/include/dt-bindings/power/meson8-power.h b/include/dt-bindings/power/meson8-power.h new file mode 100644 index 000000000000..dd8b2ddb82a7 --- /dev/null +++ b/include/dt-bindings/power/meson8-power.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */ +/* + * Copyright (c) 2019 Martin Blumenstingl + */ + +#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 */