From patchwork Wed Jun 10 16:32:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 11598305 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 48FC31391 for ; Wed, 10 Jun 2020 16:33:25 +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 26E4E20734 for ; Wed, 10 Jun 2020 16:33:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nUtOY6YQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mU/hjbec" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26E4E20734 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=UpBmE0dHpdCNxZKfmFZJiydFSbdJX4F2x5Ajq7YN2J0=; b=nUtOY6YQepZ2xQ 2a+8/zQpJXmM5hgsWz//UWUdnqavD1QxrQcxybGJvF8Z2ySjWSovlRY4NbYI9UwSLDoN55RClu5p5 Q4iL0EZfcOL4oMrukHxcVuXLa8YSRqexj57EPaDsfDNEOuLfE4lJ+ZpTH3hFIKSJvdEEQ/aiLTjZP f4ixDglLe/7b9l2+z2+J986N14Zu0EHTii6h6sNhwwmchD+Muspx01HXQHlU5DKnvR1P4/dPHxIj4 DAdbatUFObkwPXvY7QL9o7b+amBjaYPwGcTTmg9ZvOELNec0QnkZrFykalB0mvM1Jc4kB158/iQXr aY1QW5/yMhZwupQWR+vQ==; 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 1jj3fB-0000Pa-Fm; Wed, 10 Jun 2020 16:33:17 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jj3ez-0000Fp-Sw for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2020 16:33:07 +0000 Received: by mail-wr1-x432.google.com with SMTP id y17so2984091wrn.11 for ; Wed, 10 Jun 2020 09:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nuTrMyPkP8MX6Ctw/wkm1vrkYcKiiG7dPPujumR0X/U=; b=mU/hjbecbmsx+TmGH/jpg89IQXVoFggdbi7MB1DbtKv3rXmOMSi+0mRs6ISX9LAxby zEhc3wG4392ERUyjTlV+hqk/v+scR7Usc3i1x4BuVrMX/fs99Ten8MeOWoqe+NENf61B u7BiCBjgoNYSaM/cnJvhe5HssaYn/7kNEk0sfrqbhYzB62DKLoqdfK9PSl5fw7imbtVP 9YpgANzvLUh2sT/lrBJn0K9QSstXqSpcCOqW/gXqjMDKh1qXoX4ym707+xGhKf3hkZxS +aCIWiazh/8fABSt8hBsF+zgzSJz/CwVn6ky9ukWq3nuKhTwyLKA0l8KitiEFnSFRNrN Ni4A== 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=nuTrMyPkP8MX6Ctw/wkm1vrkYcKiiG7dPPujumR0X/U=; b=GUIYb9VzUCFVaVlPTCOHsPVJHdufb1UU0T4KD5nZm2HW5ZkpPdU8swnHq0ehLsqrH0 gwq1mvrMVrunvTD1XnjS/1/oUROD9dtRCaV9fa7H4OFGPNAbYlhpn4nD8ZxpcqpXDMgi 4b2c7Lh8ieIG6gIdfpjBwx+cEatXPCITNl5EtkcrRcYlfPQ804YmZ6+eKFkEoGyPE2Ec cdHtZblCmgFCAbwjYL6wDlPU23lyDx9h0MBGPkSm1/SNnAw5/+Pkik+A2ljJBSgvX/4I gCOAFqdc5XT+PlEgNWjWn047QIGhDXs/5mlpw8fGjC8fY3wmf6vRZRTaGsf6gSJsM8i2 1x8w== X-Gm-Message-State: AOAM532/+6r/XOxm0Ealmo3rT8hU2oW2znzBIg/aIyxmNS12QlU2DkOu tCn2aJbNctKLaPIjdf/rs9w= X-Google-Smtp-Source: ABdhPJy6FeF0fIzTTPvA7eNZR972kcMsDLstcxKXuRRBGYYZhynPqZ29GEHX9kxA1ZspIZQi8jgSZQ== X-Received: by 2002:adf:a1d3:: with SMTP id v19mr4609426wrv.245.1591806784588; Wed, 10 Jun 2020 09:33:04 -0700 (PDT) Received: from skynet.lan (28.red-83-49-61.dynamicip.rima-tde.net. [83.49.61.28]) by smtp.gmail.com with ESMTPSA id t7sm414430wrq.41.2020.06.10.09.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 09:33:04 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: hauke@hauke-m.de, zajec5@gmail.com, tsbogend@alpha.franken.de, robh+dt@kernel.org, f.fainelli@gmail.com, jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding Date: Wed, 10 Jun 2020 18:32:56 +0200 Message-Id: <20200610163301.461160-2-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610163301.461160-1-noltari@gmail.com> References: <20200609105244.4014823-1-noltari@gmail.com> <20200610163301.461160-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200610_093305_931473_E3523BB9 X-CRM114-Status: GOOD ( 10.26 ) 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:432 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [noltari[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli --- v2: Add separate YAML file. .../bindings/soc/bcm/brcm,bcm63xx-power.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml new file mode 100644 index 000000000000..804d8b31679e --- /dev/null +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/brcm/brcm,bcm63xx-power.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: BCM63xx power domain driver + +maintainers: + - Álvaro Fernández Rojas + +description: | + BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller + to enable/disable certain components in order to save power. + +properties: + compatible: + items: + - enum: + - brcm,bcm6318-power-controller + - brcm,bcm6328-power-controller + - brcm,bcm6362-power-controller + - brcm,bcm63268-power-controller + + reg: + maxItems: 1 + + #power-domain-cells: + const: 1 + +required: + - compatible + - reg + - #power-domain-cells + +additionalProperties: false + +examples: + - | + periph_pwr: power-controller@10001848 { + compatible = "brcm,bcm6328-power-controller"; + reg = <0x10001848 0x4>; + #power-domain-cells = <1>; + }; From patchwork Wed Jun 10 16:32:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 11598315 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 36B6814E3 for ; Wed, 10 Jun 2020 16:33:48 +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 EDE432072F for ; Wed, 10 Jun 2020 16:33:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DUXDqsHE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EbHwwmxY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EDE432072F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=y3IaZx9ctie9oNq+7hKPjXcXIGLrxlTddWa2c9AnwFU=; b=DUXDqsHEjtKd1X CQWT7b73Ac2qLOy7b72J5F+5KVTWH7YlIbaVesvaIhsP7d7wIh5jD6nha/gII+wM9nA+57hcOOiis XqPYFyygohMaYy3ddQE10mQKafP80aKpN1zqPPJh8Q2pACxfmhEQcq/ZYma8skWi8A87s3I1MYdMw wfb/b5+f4rSP0Sv4j2FnAFU5J4ZnarZ0owOTt7DxT7AEvKvElcopRKTSp1plH7fAGaOubfhbtUDZt coBNylsH4Kbv0OLx9ECMEuO37ojZIjm9iATvle5r2ZtnMjEvNruYEFN327dVkj3uVN/W32KgmikRP zaM8SHkX0nX61qhwo7Tw==; 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 1jj3fc-0000oc-Hi; Wed, 10 Jun 2020 16:33:44 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jj3f0-0000GE-Tn for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2020 16:33:08 +0000 Received: by mail-wr1-x441.google.com with SMTP id l11so3027725wru.0 for ; Wed, 10 Jun 2020 09:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8yi/gY3pbWHmPAVksg2if5LxnnJAebye20EywiAtIn4=; b=EbHwwmxYTdSvBxXziI9tZ1YN9CF/Y4OmEo6ZFjjLIR0iCFTaYh0hpx0vWL/3uoBjL6 Ej2K7IcFPyMfkBf2mbUs5hExdq6QewYnxhG08Y9km6OP8kOf8Sgy5R9MfQP8vbkffW3s A9hoJpIzWVyZ0UyD4dUjEEgQ1wMuCMg8ntQzo35hkmdzuM+1hWKxud1OfDaBT8PlozPA PNj5jclrDQjLwfnBv8e9pBhMpPO47lBNxFNo6qxGi37S77Svr8FV349tm/SN3ELHCFk2 S5C/Br4m2jTyL7D4YaiZQIZSSFcmJGLinNH8kuv3C7s8yi94e9lBOSF7KDiBWxwlJxdH JjwQ== 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=8yi/gY3pbWHmPAVksg2if5LxnnJAebye20EywiAtIn4=; b=EchJ2sXOP5Tvrg3QzBMggo18ujcp1ELJqAr6VxkhNIp/5gxCYa77xxgYfscFAzEp6B 5zoRVOzzwXrwJ5IAMLDDOWfSi9AhitsU/bXDe+cjhN6py8EiDHZ+4Fd+8DFcvm3b2BBH H5Tj7Pc2lAgukWGswejcsrptqhFzyjb64cVSvyBpDau8lRkoMSaSZWHZtF0ijzjIZFiw vGo5aUjWk5UnJaDxOz/4Ts7xYV/JgLu0luG5VycwbCIDAtUr5EIgjnUqjwVBUUoWFCvo /uTttNBH/n/1Pu504ItXVPagaQUync0by/Q5xFdSqcQ8AwqG+GeAg/7cWdZnvER27W+o IrjQ== X-Gm-Message-State: AOAM531QTqMaAZ7fYDmUNrCfB+HmGdGo1UQdsL5EuJB6POCrOFJDkeuI IP7mjArbWFPzS4Jp6wsE9rI= X-Google-Smtp-Source: ABdhPJz5AZUR01ZQEVImzJkJeKSOySv1Gl8Y7BtaiGK0ph9StAiy5CqqsyTlh5eCjzvmIBtTGIuBBQ== X-Received: by 2002:adf:dd06:: with SMTP id a6mr4801776wrm.142.1591806785567; Wed, 10 Jun 2020 09:33:05 -0700 (PDT) Received: from skynet.lan (28.red-83-49-61.dynamicip.rima-tde.net. [83.49.61.28]) by smtp.gmail.com with ESMTPSA id t7sm414430wrq.41.2020.06.10.09.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 09:33:05 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: hauke@hauke-m.de, zajec5@gmail.com, tsbogend@alpha.franken.de, robh+dt@kernel.org, f.fainelli@gmail.com, jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/6] soc: bcm: add BCM63xx power domain driver Date: Wed, 10 Jun 2020 18:32:57 +0200 Message-Id: <20200610163301.461160-3-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610163301.461160-1-noltari@gmail.com> References: <20200609105244.4014823-1-noltari@gmail.com> <20200610163301.461160-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200610_093306_989923_AF034C3A X-CRM114-Status: GOOD ( 16.88 ) 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:441 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [noltari[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas --- v2: Introduce bcm63xx folder in drivers/soc/bcm and update MAINTAINERS. MAINTAINERS | 1 + drivers/soc/bcm/Kconfig | 10 + drivers/soc/bcm/Makefile | 1 + drivers/soc/bcm/bcm63xx/Kconfig | 12 + drivers/soc/bcm/bcm63xx/Makefile | 2 + drivers/soc/bcm/bcm63xx/bcm63xx-power.c | 374 ++++++++++++++++++++++++ 6 files changed, 400 insertions(+) create mode 100644 drivers/soc/bcm/bcm63xx/Kconfig create mode 100644 drivers/soc/bcm/bcm63xx/Makefile create mode 100644 drivers/soc/bcm/bcm63xx/bcm63xx-power.c diff --git a/MAINTAINERS b/MAINTAINERS index 77a3fa5e3edd..e9ba7b955d5f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3442,6 +3442,7 @@ F: arch/mips/bmips/* F: arch/mips/boot/dts/brcm/bcm*.dts* F: arch/mips/include/asm/mach-bmips/* F: arch/mips/kernel/*bmips* +F: drivers/soc/bcm/bcm63xx F: drivers/irqchip/irq-bcm63* F: drivers/irqchip/irq-bcm7* F: drivers/irqchip/irq-brcmstb* diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig index 648e32693b7e..24f92a6e882a 100644 --- a/drivers/soc/bcm/Kconfig +++ b/drivers/soc/bcm/Kconfig @@ -22,6 +22,15 @@ config RASPBERRYPI_POWER This enables support for the RPi power domains which can be enabled or disabled via the RPi firmware. +config SOC_BCM63XX + bool "Broadcom 63xx SoC drivers" + depends on BMIPS_GENERIC || COMPILE_TEST + help + Enables drivers for the Broadcom 63xx series of chips. + Drivers can be enabled individually within this menu. + + If unsure, say N. + config SOC_BRCMSTB bool "Broadcom STB SoC drivers" depends on ARM || ARM64 || BMIPS_GENERIC || COMPILE_TEST @@ -33,6 +42,7 @@ config SOC_BRCMSTB If unsure, say N. +source "drivers/soc/bcm/bcm63xx/Kconfig" source "drivers/soc/bcm/brcmstb/Kconfig" endmenu diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile index d92268a829a9..7bc90e0bd773 100644 --- a/drivers/soc/bcm/Makefile +++ b/drivers/soc/bcm/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_BCM2835_POWER) += bcm2835-power.o obj-$(CONFIG_RASPBERRYPI_POWER) += raspberrypi-power.o +obj-$(CONFIG_SOC_BCM63XX) += bcm63xx/ obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/ diff --git a/drivers/soc/bcm/bcm63xx/Kconfig b/drivers/soc/bcm/bcm63xx/Kconfig new file mode 100644 index 000000000000..16f648a6c70a --- /dev/null +++ b/drivers/soc/bcm/bcm63xx/Kconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-only +if SOC_BCM63XX + +config BCM63XX_POWER + bool "BCM63xx power domain driver" + depends on BMIPS_GENERIC || (COMPILE_TEST && OF) + select PM_GENERIC_DOMAINS if PM + help + This enables support for the BCM63xx power domains controller on + BCM6318, BCM6328, BCM6362 and BCM63268 SoCs. + +endif # SOC_BCM63XX diff --git a/drivers/soc/bcm/bcm63xx/Makefile b/drivers/soc/bcm/bcm63xx/Makefile new file mode 100644 index 000000000000..0710d5e018cc --- /dev/null +++ b/drivers/soc/bcm/bcm63xx/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_BCM63XX_POWER) += bcm63xx-power.o diff --git a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c new file mode 100644 index 000000000000..b6e51b721f09 --- /dev/null +++ b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c @@ -0,0 +1,374 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * BCM63xx Power Domain Controller Driver + * + * Copyright (C) 2020 Álvaro Fernández Rojas + */ + +#include +#include +#include +#include +#include +#include + +struct bcm63xx_power_dev { + struct generic_pm_domain genpd; + struct bcm63xx_power *power; + uint32_t mask; +}; + +struct bcm63xx_power { + void __iomem *base; + spinlock_t lock; + struct bcm63xx_power_dev *dev; + struct genpd_onecell_data genpd_data; + struct generic_pm_domain **genpd; +}; + +struct bcm63xx_power_data { + const char * const name; + uint8_t bit; + unsigned int flags; +}; + +static int bcm63xx_power_get_state(struct bcm63xx_power_dev *pmd, bool *is_on) +{ + struct bcm63xx_power *power = pmd->power; + + if (!pmd->mask) { + *is_on = false; + return -EINVAL; + } + + *is_on = !(__raw_readl(power->base) & pmd->mask); + + return 0; +} + +static int bcm63xx_power_set_state(struct bcm63xx_power_dev *pmd, bool on) +{ + struct bcm63xx_power *power = pmd->power; + unsigned long flags; + uint32_t val; + + if (!pmd->mask) + return -EINVAL; + + spin_lock_irqsave(&power->lock, flags); + val = __raw_readl(power->base); + if (on) + val &= ~pmd->mask; + else + val |= pmd->mask; + __raw_writel(val, power->base); + spin_unlock_irqrestore(&power->lock, flags); + + return 0; +} + +static int bcm63xx_power_on(struct generic_pm_domain *genpd) +{ + struct bcm63xx_power_dev *pmd = container_of(genpd, + struct bcm63xx_power_dev, genpd); + + return bcm63xx_power_set_state(pmd, true); +} + +static int bcm63xx_power_off(struct generic_pm_domain *genpd) +{ + struct bcm63xx_power_dev *pmd = container_of(genpd, + struct bcm63xx_power_dev, genpd); + + return bcm63xx_power_set_state(pmd, false); +} + +static int bcm63xx_power_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; + struct resource *res; + const struct bcm63xx_power_data *entry, *table; + struct bcm63xx_power *power; + unsigned int ndom; + uint8_t max_bit = 0; + int ret; + + power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); + if (!power) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + power->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(power->base)) + return PTR_ERR(power->base); + + table = of_device_get_match_data(dev); + if (!table) + return -EINVAL; + + power->genpd_data.num_domains = 0; + ndom = 0; + for (entry = table; entry->name; entry++) { + max_bit = max(max_bit, entry->bit); + ndom++; + } + + if (!ndom) + return -ENODEV; + + power->genpd_data.num_domains = max_bit + 1; + + power->dev = devm_kcalloc(dev, power->genpd_data.num_domains, + sizeof(struct bcm63xx_power_dev), + GFP_KERNEL); + if (!power->dev) + return -ENOMEM; + + power->genpd = devm_kcalloc(dev, power->genpd_data.num_domains, + sizeof(struct generic_pm_domain *), + GFP_KERNEL); + if (!power->genpd) + return -ENOMEM; + + power->genpd_data.domains = power->genpd; + + ndom = 0; + for (entry = table; entry->name; entry++) { + struct bcm63xx_power_dev *pmd = &power->dev[ndom]; + bool is_on; + + pmd->power = power; + pmd->mask = BIT(entry->bit); + pmd->genpd.name = entry->name; + pmd->genpd.flags = entry->flags; + + ret = bcm63xx_power_get_state(pmd, &is_on); + if (ret) + dev_warn(dev, "unable to get current state for %s\n", + pmd->genpd.name); + + pmd->genpd.power_on = bcm63xx_power_on; + pmd->genpd.power_off = bcm63xx_power_off; + + pm_genpd_init(&pmd->genpd, NULL, !is_on); + power->genpd[entry->bit] = &pmd->genpd; + + ndom++; + } + + spin_lock_init(&power->lock); + + ret = of_genpd_add_provider_onecell(np, &power->genpd_data); + if (ret) { + dev_err(dev, "failed to register genpd driver: %d\n", ret); + return ret; + } + + dev_info(dev, "registered %u power domains\n", ndom); + + return 0; +} + +static const struct bcm63xx_power_data bcm6318_power_domains[] = { + { + .name = "pcie", + .bit = 0, + }, { + .name = "usb", + .bit = 1, + }, { + .name = "ephy0", + .bit = 2, + }, { + .name = "ephy1", + .bit = 3, + }, { + .name = "ephy2", + .bit = 4, + }, { + .name = "ephy3", + .bit = 5, + }, { + .name = "ldo2p5", + .bit = 6, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + .name = "ldo2p9", + .bit = 7, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + .name = "sw1p0", + .bit = 8, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + .name = "pad", + .bit = 9, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + /* sentinel */ + }, +}; + +static const struct bcm63xx_power_data bcm6328_power_domains[] = { + { + .name = "adsl2-mips", + .bit = 0, + }, { + .name = "adsl2-phy", + .bit = 1, + }, { + .name = "adsl2-afe", + .bit = 2, + }, { + .name = "sar", + .bit = 3, + }, { + .name = "pcm", + .bit = 4, + }, { + .name = "usbd", + .bit = 5, + }, { + .name = "usbh", + .bit = 6, + }, { + .name = "pcie", + .bit = 7, + }, { + .name = "robosw", + .bit = 8, + }, { + .name = "ephy", + .bit = 9, + }, { + /* sentinel */ + }, +}; + +static const struct bcm63xx_power_data bcm6362_power_domains[] = { + { + .name = "sar", + .bit = 0, + }, { + .name = "ipsec", + .bit = 1, + }, { + .name = "mips", + .bit = 2, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + .name = "dect", + .bit = 3, + }, { + .name = "usbh", + .bit = 4, + }, { + .name = "usbd", + .bit = 5, + }, { + .name = "robosw", + .bit = 6, + }, { + .name = "pcm", + .bit = 7, + }, { + .name = "periph", + .bit = 8, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + .name = "adsl-phy", + .bit = 9, + }, { + .name = "gmii-pads", + .bit = 10, + }, { + .name = "fap", + .bit = 11, + }, { + .name = "pcie", + .bit = 12, + }, { + .name = "wlan-pads", + .bit = 13, + }, { + /* sentinel */ + }, +}; + +static const struct bcm63xx_power_data bcm63268_power_domains[] = { + { + .name = "sar", + .bit = 0, + }, { + .name = "ipsec", + .bit = 1, + }, { + .name = "mips", + .bit = 2, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + .name = "dect", + .bit = 3, + }, { + .name = "usbh", + .bit = 4, + }, { + .name = "usbd", + .bit = 5, + }, { + .name = "robosw", + .bit = 6, + }, { + .name = "pcm", + .bit = 7, + }, { + .name = "periph", + .bit = 8, + .flags = GENPD_FLAG_ALWAYS_ON, + }, { + .name = "vdsl-phy", + .bit = 9, + }, { + .name = "vdsl-mips", + .bit = 10, + }, { + .name = "fap", + .bit = 11, + }, { + .name = "pcie", + .bit = 12, + }, { + .name = "wlan-pads", + .bit = 13, + }, { + /* sentinel */ + }, +}; + +static const struct of_device_id bcm63xx_power_of_match[] = { + { + .compatible = "brcm,bcm6318-power-controller", + .data = &bcm6318_power_domains, + }, { + .compatible = "brcm,bcm6328-power-controller", + .data = &bcm6328_power_domains, + }, { + .compatible = "brcm,bcm6362-power-controller", + .data = &bcm6362_power_domains, + }, { + .compatible = "brcm,bcm63268-power-controller", + .data = &bcm63268_power_domains, + }, { + /* sentinel */ + } +}; + +static struct platform_driver bcm63xx_power_driver = { + .driver = { + .name = "bcm63xx-power-controller", + .of_match_table = bcm63xx_power_of_match, + }, + .probe = bcm63xx_power_probe, +}; +builtin_platform_driver(bcm63xx_power_driver); From patchwork Wed Jun 10 16:32:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 11598319 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 AC62B14E3 for ; Wed, 10 Jun 2020 16:34:20 +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 7E0532070B for ; Wed, 10 Jun 2020 16:34:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BFjMheNM"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OJA8GCOg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E0532070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=dnahb2yu7MrCkBb9n+jOCudUa3zAyx2l5DXyCSBH1P8=; b=BFjMheNMV4pLFP qWDLexmtc9lAbhNnlPmeoLEgrSa2XvMM1VgvO+p167+JDwzxKDlZIZpL1/fWNVGCu/LBaqL919VC2 Vhd6G5a2n2ucD3KRJzj0l/UF8yz4yccphGFEKayBtc0ES0UVjP+izd3Urr8uiNm02u6sa0OsgsPwp x5Qt0IbHfmnMir32vwZ7qXl/yI/GEAEegcltnVMGdeIxNGNUDEZPx0aiRxUa0wLfcELT/PdtzHtzu CVDRGJhB0k4J4HLut2S3CCtjnTOM2Oed6U/pkXx0sED/3SdB4r7aHa6ttBRzo5M8a7efychaKGiLQ r30JSH1NphCrRGXFEFZA==; 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 1jj3g9-0001KJ-5e; Wed, 10 Jun 2020 16:34:17 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jj3f3-0000GX-5l for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2020 16:33:10 +0000 Received: by mail-wr1-x42c.google.com with SMTP id r7so3025990wro.1 for ; Wed, 10 Jun 2020 09:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mgTl/QDxn4TQmCxa1B/g2WIYRwMAAuGhWmdBVwlNgB0=; b=OJA8GCOgm3W1T6mRWRrRuvk2UsIKp/aq80UWD815Q6ZWn14+pma3Rscmqr6+MHJ5Jt qBJhWZ8Hq2qmtzUHSBUAA7XSzcQD2IkVvXJRyYkbowAl+4jfDsSdEQt5MjZTDSjnl8J7 z/oh+2P66Ld/PoDOmILlenK/i6sO/nbg2aanxeDJVJFd8Adg6efF1U2X+AUlkHSB8O4O T/luR9FTh09CI+sWOC3gYv/t0wRbMsNf4uUR/PSIk2ntp0HZssNFiJH2nIgAgpzSexR6 VVM177a+md6mRQyUTwbovSl9aIcRSl4ctQutF+3u066KyAkI0LHdcayiYY6I1W15Y573 FqCw== 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=mgTl/QDxn4TQmCxa1B/g2WIYRwMAAuGhWmdBVwlNgB0=; b=GJuvm8S8Yx2uxaQiiI1byKys+E1dTIO96C5nJynDpl3Qf1AmTJM48SADB0xRXs0yJj 5nH9usXbBEY+JVcAOintmHUO9oYZvqkMGRnYVKlxAzFtPyH25g6OCW4Oi3y1hLMw3UFZ eSNVRE3sEPM3zwkaUM+xI+sJ1AZC9MhGpGVqUN7P+C/FqXa/O9YunIjdSnVounOIjMye 6h84W5BQq4XFoJakPv2dNj3kzempllCbAIxbud8I8bACdHl1wuUrXkryFtvARN6g8hP3 xGJe8DykXoLlrXSWI4ncBuFZXpeafeoATZWs/OFuQ3TDcp+iizAc6QP+WMTV8FkmioBP UyqQ== X-Gm-Message-State: AOAM533+jt6LobnK/vGmLcpipEnMJpDtsVkm3C3zD/qfGEAC++NE0C+r /ljUehvQ9WRTPkiwO7wNf18= X-Google-Smtp-Source: ABdhPJyqjB6h1TfK5ilab4XOCrY+QpxKWAdqvFNqQCCEKtzYTj5baWJwDG77NOl0Ts3HMp9/GrKZ3Q== X-Received: by 2002:a5d:4a0d:: with SMTP id m13mr4925299wrq.12.1591806786682; Wed, 10 Jun 2020 09:33:06 -0700 (PDT) Received: from skynet.lan (28.red-83-49-61.dynamicip.rima-tde.net. [83.49.61.28]) by smtp.gmail.com with ESMTPSA id t7sm414430wrq.41.2020.06.10.09.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 09:33:06 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: hauke@hauke-m.de, zajec5@gmail.com, tsbogend@alpha.franken.de, robh+dt@kernel.org, f.fainelli@gmail.com, jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/6] mips: bmips: dts: add BCM6328 power domain support Date: Wed, 10 Jun 2020 18:32:58 +0200 Message-Id: <20200610163301.461160-4-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610163301.461160-1-noltari@gmail.com> References: <20200609105244.4014823-1-noltari@gmail.com> <20200610163301.461160-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200610_093309_234864_9D092EA6 X-CRM114-Status: GOOD ( 11.51 ) 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:42c listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [noltari[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org BCM6328 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v2: Add dt-bindings header files. arch/mips/boot/dts/brcm/bcm6328.dtsi | 6 ++++++ include/dt-bindings/soc/bcm6328-pm.h | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 include/dt-bindings/soc/bcm6328-pm.h diff --git a/arch/mips/boot/dts/brcm/bcm6328.dtsi b/arch/mips/boot/dts/brcm/bcm6328.dtsi index af860d06def6..1f9edd710392 100644 --- a/arch/mips/boot/dts/brcm/bcm6328.dtsi +++ b/arch/mips/boot/dts/brcm/bcm6328.dtsi @@ -110,6 +110,12 @@ leds0: led-controller@10000800 { status = "disabled"; }; + periph_pwr: power-controller@10001848 { + compatible = "brcm,bcm6328-power-controller"; + reg = <0x10001848 0x4>; + #power-domain-cells = <1>; + }; + ehci: usb@10002500 { compatible = "brcm,bcm6328-ehci", "generic-ehci"; reg = <0x10002500 0x100>; diff --git a/include/dt-bindings/soc/bcm6328-pm.h b/include/dt-bindings/soc/bcm6328-pm.h new file mode 100644 index 000000000000..557e1a69b7f7 --- /dev/null +++ b/include/dt-bindings/soc/bcm6328-pm.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_BMIPS_BCM6328_PM_H +#define __DT_BINDINGS_BMIPS_BCM6328_PM_H + +#define BCM6328_POWER_DOMAIN_ADSL2_MIPS 0 +#define BCM6328_POWER_DOMAIN_ADSL2_PHY 1 +#define BCM6328_POWER_DOMAIN_ADSL2_AFE 2 +#define BCM6328_POWER_DOMAIN_SAR 3 +#define BCM6328_POWER_DOMAIN_PCM 4 +#define BCM6328_POWER_DOMAIN_USBD 5 +#define BCM6328_POWER_DOMAIN_USBH 6 +#define BCM6328_POWER_DOMAIN_PCIE 7 +#define BCM6328_POWER_DOMAIN_ROBOSW 8 +#define BCM6328_POWER_DOMAIN_EPHY 9 + +#endif /* __DT_BINDINGS_BMIPS_BCM6328_PM_H */ From patchwork Wed Jun 10 16:32:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 11598317 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 034CE1391 for ; Wed, 10 Jun 2020 16:34:07 +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 88BA52070B for ; Wed, 10 Jun 2020 16:34:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aWs3WAF5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N4VymObg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88BA52070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=K+vDbg64kIYjpToEQHHxIhkfIRZWPx60yziD3iCC6EE=; b=aWs3WAF5d78Jiz uYtZME3b0ZLPXl9XBSfoYdZ7+b7o7dMuqzCEFo1zUPWZjyQ/mjLz5OX40jLF9sws5lSSKvs49J2TI Zyr/pvfjKMQCEY8j+XcTL5THmdVKDfHSjnWuTkikOSe1P3YrqoHJt8cek43mEkH5nL/eSUalSDaLh YsiXYoKPJok2Pu0flE5hKW0cy8GHJ/pZc7mlpe2yrSCT+CwlSGm8XUcqNpuJUCks9M+JmfrV+dt98 xjCrB5aESgt0oJIvz8GOkekn2Mh+4E22+RJmxLBChACuWq6fk5E5cQf971DtqoiN2odOom4I7pJkR VHsTu5yS0g4VXB74Sf9Q==; 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 1jj3fp-00011n-Vm; Wed, 10 Jun 2020 16:33:58 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jj3f3-0000Gy-EQ for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2020 16:33:10 +0000 Received: by mail-wr1-x430.google.com with SMTP id p5so2983291wrw.9 for ; Wed, 10 Jun 2020 09:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jah2m/tEOh9h0lymAwcC6WmsIFSaB8GDDwM5FtbgkHw=; b=N4VymObgfYu2zZKNYXEI88esUcP9IhzhU3xqsVmB9hjQ8OBsso8lc7kJ89e1KOp9ja xvyMMgEzZWKm14PmAlkivRoQdxIPdig2cplPPYQrD7nBnPklXw8SXw+EmkM4Yj9khTDK BDg9hPx9MYQa4tVKzrttuXCTTjVgkd+yMc98sQeDqM4fzJHWovsnpfnPHPb6M4aUo7Jo 0RQargXjtvYF86ViSkoEytVIKAguMC12g8ntsHOswAZdGEGf+ejPeeuTd7kS9SyotoZY 6hwYsN7YYec6yudTlcKtJGwu4AwO0VF2H5R+yTx3iH+XjZ4wpoGoGR4k+pizlt8iE2c0 62Wg== 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=jah2m/tEOh9h0lymAwcC6WmsIFSaB8GDDwM5FtbgkHw=; b=EK0IcDK6J8sBU0o5uTLL6L9aTbVrxgEWq0Tw5u/EAvFDz5TrIxgtr5XXlJmb2Vqvn4 kNd394CbTVZrF5nu6y9BUsnGzjqnpwai/1TUj/uxQjLpcMdR1ceEJNHZdqOHsgyqNtrB WDGAA3CAJ/WXJkeXPZplmSXMlRY2oHnWTtvjGahUcCTrmhNFgN2dg3iNSMRvA4GdXdO1 yXbWpElYN4thUSrxoqeIL1YiZbarHf52UBXtuPV9xzVgmeyHCeROZvjdmshHX6dJVOfQ PTuL9g0USnsEg6aGgkKv6JL/DvbIzgaLs+BXfER8LUtvBVKSiVhmOLb/yt1ShIst+0YF bcuQ== X-Gm-Message-State: AOAM531t5FxEcHFyNLPo9lCYzT3tBHO8+i1HQKyLJyO4PtLlFQPx6J6+ 7Vevt3EC4chWAcM5bVigieY= X-Google-Smtp-Source: ABdhPJzSLEhfPNTqRJ0JaCbauvlFPsvfjLp4AGNeB5lQTlHyUvPC6crt280vKGWhpZvvRWmXIsFdIQ== X-Received: by 2002:a05:6000:4c:: with SMTP id k12mr4580024wrx.215.1591806787731; Wed, 10 Jun 2020 09:33:07 -0700 (PDT) Received: from skynet.lan (28.red-83-49-61.dynamicip.rima-tde.net. [83.49.61.28]) by smtp.gmail.com with ESMTPSA id t7sm414430wrq.41.2020.06.10.09.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 09:33:07 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: hauke@hauke-m.de, zajec5@gmail.com, tsbogend@alpha.franken.de, robh+dt@kernel.org, f.fainelli@gmail.com, jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/6] mips: bmips: dts: add BCM6362 power domain support Date: Wed, 10 Jun 2020 18:32:59 +0200 Message-Id: <20200610163301.461160-5-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610163301.461160-1-noltari@gmail.com> References: <20200609105244.4014823-1-noltari@gmail.com> <20200610163301.461160-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200610_093309_496484_01F8088A X-CRM114-Status: GOOD ( 11.60 ) 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:430 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [noltari[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org BCM6362 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v2: Add dt-bindings header files. arch/mips/boot/dts/brcm/bcm6362.dtsi | 6 ++++++ include/dt-bindings/soc/bcm6362-pm.h | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 include/dt-bindings/soc/bcm6362-pm.h diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi index 8ae6981735b8..c98f9111e3c8 100644 --- a/arch/mips/boot/dts/brcm/bcm6362.dtsi +++ b/arch/mips/boot/dts/brcm/bcm6362.dtsi @@ -108,6 +108,12 @@ uart1: serial@10000120 { status = "disabled"; }; + periph_pwr: power-controller@10001848 { + compatible = "brcm,bcm6362-power-controller"; + reg = <0x10001848 0x4>; + #power-domain-cells = <1>; + }; + leds0: led-controller@10001900 { #address-cells = <1>; #size-cells = <0>; diff --git a/include/dt-bindings/soc/bcm6362-pm.h b/include/dt-bindings/soc/bcm6362-pm.h new file mode 100644 index 000000000000..d087ba63c7a1 --- /dev/null +++ b/include/dt-bindings/soc/bcm6362-pm.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_BMIPS_BCM6362_PM_H +#define __DT_BINDINGS_BMIPS_BCM6362_PM_H + +#define BCM6362_POWER_DOMAIN_SAR 0 +#define BCM6362_POWER_DOMAIN_IPSEC 1 +#define BCM6362_POWER_DOMAIN_MIPS 2 +#define BCM6362_POWER_DOMAIN_DECT 3 +#define BCM6362_POWER_DOMAIN_USBH 4 +#define BCM6362_POWER_DOMAIN_USBD 5 +#define BCM6362_POWER_DOMAIN_ROBOSW 6 +#define BCM6362_POWER_DOMAIN_PCM 7 +#define BCM6362_POWER_DOMAIN_PERIPH 8 +#define BCM6362_POWER_DOMAIN_ADSL_PHY 9 +#define BCM6362_POWER_DOMAIN_GMII_PADS 10 +#define BCM6362_POWER_DOMAIN_FAP 11 +#define BCM6362_POWER_DOMAIN_PCIE 12 +#define BCM6362_POWER_DOMAIN_WLAN_PADS 13 + +#endif /* __DT_BINDINGS_BMIPS_BCM6362_PM_H */ From patchwork Wed Jun 10 16:33:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 11598321 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 BC6E61391 for ; Wed, 10 Jun 2020 16:34:43 +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 7D6692070B for ; Wed, 10 Jun 2020 16:34:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="N2Sx2gWh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bZcNGl3V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D6692070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=iYRsYG1OFauEj+iJ95daL0X8gmT2Pmiyy4a/L7FiWCc=; b=N2Sx2gWhuSzWFR iSt8kaf1J4ZCz0qaPDgqGzbAwj8Qs5YK0JJ3kRDmFlaB1Pn2DAKkTbuKNujigx1DuwdEpw/HQw72M nAh4RU06GkI9yXO72FElbhLqfdh0l0+VeVq6xGnAgWSNRUZMUVM2j+BHDLN82hB35dIFYfFwp0TYE y8ZmyolCKBFIqemWVFteM7JRnlaZ0ylN1TQ7/7sl2ytDZXn1vxYl8C3Zok2Z9O1HTZkgFizRi7/fu MFVAMbFAsIG1Cre0dtyGbwziY5k6FnDawAXKfaexj5W7fq57LFsiGvPhJracHxxNEyPuB0R0hbdkX wZnauWIdumsjxcqkH0yw==; 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 1jj3gR-0001XA-Nb; Wed, 10 Jun 2020 16:34:35 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jj3f5-0000IB-Bg for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2020 16:33:12 +0000 Received: by mail-wr1-x42f.google.com with SMTP id r7so3026156wro.1 for ; Wed, 10 Jun 2020 09:33:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PdAC7nSmr9OcvsOrg8mrZI5Ne82Ui94dUn7AYElcx+A=; b=bZcNGl3VEEqJ3YNGmR+Nv9+88gyP4/H/paKxnh18Rrlj/66kxMouAyChn+kHPQONvc qd+Wi6/9zcUPBHINkgf8jukNJdL/2FTfdS4gBfiq9Q4d2vghjxyn4ZrYW2W5XSA0LjWI PfJzTLvNZC+Q0NVXAOxEz9oCubG+bF96wlnpAvCE3LA7tnc6uORuXVU4nkYczhxBJ9CY qK9zM/AJArWCULUocJeyfdf90WIk1r6wvbAjgiuBxW6PKFS9ugxRbBCvgI9UfguVnYX0 9BBVaQz5XuU81RtnAGeD1eEf9vTa1Iw1I0viJh7DY1fzCYTMjuaAGbA1StiMt33Gtcu+ xmkA== 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=PdAC7nSmr9OcvsOrg8mrZI5Ne82Ui94dUn7AYElcx+A=; b=OFmb+IuiDLJfNG2F2Q1pNWbKd3hguPqHoRNmVYTfnRWpxpuz+rfmrrWB/0xoyPnBR3 OLfHPPyhPgEzElXwhm0ynTrveerCO/1KAX11TpfbKkbCZAP7M70sOg0jlrEsUOiFBgTJ p2u0USC/WReBFTEccFlBw/DDqWCJ3GX/83tTuYeZfBGKsK2zVWpr/9jhj4bRQ69DZxK6 20XmQ8gpKGND5xbu1yobi8PwUr/Byvj3+XAqCTTPiyJxmOVKL3JSYw/EQk7r9giVgb5P BhsRUTxj1yKvS2DgGH+UshqJB21aqgLv0lffsTARTRJ27/lZmKvEel/7xMt/6ynB0Ifv NHYg== X-Gm-Message-State: AOAM531uKWyrW9IzT6FG+D7u+9tRu53JCbR9DSOll13g9hiX1IOLVp2o fNc667ZCG/DRKL9aM7s4dqg= X-Google-Smtp-Source: ABdhPJz4wCusR0P+cPejtgrMS05sa8pvJxH+wOk9udLYOQpH3KEq84gS9fl7rpb016xQy3I4DhRxLQ== X-Received: by 2002:adf:f988:: with SMTP id f8mr5035336wrr.81.1591806788834; Wed, 10 Jun 2020 09:33:08 -0700 (PDT) Received: from skynet.lan (28.red-83-49-61.dynamicip.rima-tde.net. [83.49.61.28]) by smtp.gmail.com with ESMTPSA id t7sm414430wrq.41.2020.06.10.09.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 09:33:08 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: hauke@hauke-m.de, zajec5@gmail.com, tsbogend@alpha.franken.de, robh+dt@kernel.org, f.fainelli@gmail.com, jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/6] mips: bmips: dts: add BCM63268 power domain support Date: Wed, 10 Jun 2020 18:33:00 +0200 Message-Id: <20200610163301.461160-6-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610163301.461160-1-noltari@gmail.com> References: <20200609105244.4014823-1-noltari@gmail.com> <20200610163301.461160-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200610_093311_436258_AAB62366 X-CRM114-Status: GOOD ( 11.80 ) 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:42f listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [noltari[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org BCM63268 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas --- v2: Add support for BCM63268 too. arch/mips/boot/dts/brcm/bcm63268.dtsi | 6 ++++++ include/dt-bindings/soc/bcm63268-pm.h | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 include/dt-bindings/soc/bcm63268-pm.h diff --git a/arch/mips/boot/dts/brcm/bcm63268.dtsi b/arch/mips/boot/dts/brcm/bcm63268.dtsi index beec24145af7..5acb49b61867 100644 --- a/arch/mips/boot/dts/brcm/bcm63268.dtsi +++ b/arch/mips/boot/dts/brcm/bcm63268.dtsi @@ -117,6 +117,12 @@ leds0: led-controller@10001900 { status = "disabled"; }; + periph_pwr: power-controller@1000184c { + compatible = "brcm,bcm6328-power-controller"; + reg = <0x1000184c 0x4>; + #power-domain-cells = <1>; + }; + ehci: usb@10002500 { compatible = "brcm,bcm63268-ehci", "generic-ehci"; reg = <0x10002500 0x100>; diff --git a/include/dt-bindings/soc/bcm63268-pm.h b/include/dt-bindings/soc/bcm63268-pm.h new file mode 100644 index 000000000000..84ded53a732f --- /dev/null +++ b/include/dt-bindings/soc/bcm63268-pm.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_BMIPS_BCM63268_PM_H +#define __DT_BINDINGS_BMIPS_BCM63268_PM_H + +#define BCM63268_POWER_DOMAIN_SAR 0 +#define BCM63268_POWER_DOMAIN_IPSEC 1 +#define BCM63268_POWER_DOMAIN_MIPS 2 +#define BCM63268_POWER_DOMAIN_DECT 3 +#define BCM63268_POWER_DOMAIN_USBH 4 +#define BCM63268_POWER_DOMAIN_USBD 5 +#define BCM63268_POWER_DOMAIN_ROBOSW 6 +#define BCM63268_POWER_DOMAIN_PCM 7 +#define BCM63268_POWER_DOMAIN_PERIPH 8 +#define BCM63268_POWER_DOMAIN_VDSL_PHY 9 +#define BCM63268_POWER_DOMAIN_VDSL_MIPS 10 +#define BCM63268_POWER_DOMAIN_FAP 11 +#define BCM63268_POWER_DOMAIN_PCIE 12 +#define BCM63268_POWER_DOMAIN_WLAN_PADS 13 + +#endif /* __DT_BINDINGS_BMIPS_BCM63268_PM_H */ From patchwork Wed Jun 10 16:33:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 11598323 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 80B3614E3 for ; Wed, 10 Jun 2020 16:34:55 +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 1831F2070B for ; Wed, 10 Jun 2020 16:34:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="c87v2eZW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eukpjncH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1831F2070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=jzeEQWXlvEpgOQtEuKOStwbniOJyrwuyP3rjdWDASiI=; b=c87v2eZWoU883d 17SEmeZxuo1Qi4cI60R+1VAY8u8GJxV/fhN2umiyPs31BAISX5giEg6wGc9xIntiNSkO0/XHiGp02 vAhwM/BFdr56BDFS4bvUYBGI7pZUJwrX1wO8UB4SP13Cpyc1hH02PzceeYEwR5L+2UVKIRbinN7eu mZuZBrdPt3jmduZWrh54lzq/30l35r06o3X+nvgoamqOZwYPHKWfd4MWDZSI+Nc68SlEw7SkwE1zm AmEdJi0yFdGXHhJNbapZvfi05IRAAigCkZB32NrJ2ZM78d7NxhlgAVvCkOfwdo9b06fYRETiZVyUB u9nW5PsQGdVYPoNXAC5A==; 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 1jj3gh-0001nu-IY; Wed, 10 Jun 2020 16:34:51 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jj3f6-0000Jm-S4 for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2020 16:33:14 +0000 Received: by mail-wm1-x336.google.com with SMTP id l17so2425996wmj.0 for ; Wed, 10 Jun 2020 09:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fqwKTvqJkGg3U39QHZ2bKv0DfMfv0d599Yf7DOdzpvw=; b=eukpjncHy/Z2w4gkNI7k+0tLZ6Ll2oFh7hiKhksiX9cQXuPjsjvZGSz3ypxGgD43fn 5QlWh82VBRBB2RZw2vPHWEARMYAHknyofH4axCdXpSPI+9Bkd7mYX7Gl5KS9MyWKJPm3 f+UzP46peTVtPgyuXNg5HcUhhrWiwoUpkcHp48cINjBG957UlFJr7t7gq1L+9BcesOaD Yw+XJlUQXSw7ILVvpYwEJ8PvOYejEjnfZvNqG5JkJkJIj2CICW2051lReK5MDHuVnfPH jOpzyl7wKj3RoAKsYkNPNC0SNOz7WUbHciux4YDazXKQo6a2MYvqllIBbcyEpQ7uE2im gG9w== 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=fqwKTvqJkGg3U39QHZ2bKv0DfMfv0d599Yf7DOdzpvw=; b=pwsY9c0J6w7WrWIXU5yxuQ1VS0uOlBMBOrBSeaIDZs5J0pCA5DhSdlgUmPwoJ+8DOr NtbH53VZbwAWTZEHP9XvyiyzRCeJhNAPgbr62OFZPr41p5r7lCKiKAqz077B34gkP8Ne vE9vp0Scd1tn9DFr5ZXmURPVpiayhSjz1j+0sgZFS0m38quH4cta52kaodJqZ+f4+6tM snmk1DQXvaJPL9AVuYwywHe+asnHJavNZlvFAx/zao0SwBfVozhCI4bm7hBT0kf+DsE6 DtFFE2FiBG6lXM5OLfds/uNi2ksfodpF8UxlsFn4teoTre74KzxyUQIhFUh4FSVCgNS+ iwCg== X-Gm-Message-State: AOAM531oACtb0xhXCchmCU1JEPRDRGbLjADC52EkR8+ccq8tv053yE44 AEgK3gFpNccDjnEL3tAMpbI= X-Google-Smtp-Source: ABdhPJwQCzIsG/5U9juTnJBM31DCeYFKjsEV0nQc2jBejOEFCSljh/P504f6d2eyDzSXr4iDGY5RQw== X-Received: by 2002:a1c:c3d7:: with SMTP id t206mr4051918wmf.69.1591806789797; Wed, 10 Jun 2020 09:33:09 -0700 (PDT) Received: from skynet.lan (28.red-83-49-61.dynamicip.rima-tde.net. [83.49.61.28]) by smtp.gmail.com with ESMTPSA id t7sm414430wrq.41.2020.06.10.09.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 09:33:09 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: hauke@hauke-m.de, zajec5@gmail.com, tsbogend@alpha.franken.de, robh+dt@kernel.org, f.fainelli@gmail.com, jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 6/6] mips: bmips: add BCM6318 power domain definitions Date: Wed, 10 Jun 2020 18:33:01 +0200 Message-Id: <20200610163301.461160-7-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610163301.461160-1-noltari@gmail.com> References: <20200609105244.4014823-1-noltari@gmail.com> <20200610163301.461160-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200610_093312_978280_D9926362 X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. 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:336 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [noltari[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org BCM6318 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas --- v2: Add BCM6318 dt-bindings header file. include/dt-bindings/soc/bcm6318-pm.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/dt-bindings/soc/bcm6318-pm.h diff --git a/include/dt-bindings/soc/bcm6318-pm.h b/include/dt-bindings/soc/bcm6318-pm.h new file mode 100644 index 000000000000..05931dce8333 --- /dev/null +++ b/include/dt-bindings/soc/bcm6318-pm.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_BMIPS_BCM6318_PM_H +#define __DT_BINDINGS_BMIPS_BCM6318_PM_H + +#define BCM6318_POWER_DOMAIN_PCIE 0 +#define BCM6318_POWER_DOMAIN_USB 1 +#define BCM6318_POWER_DOMAIN_EPHY0 2 +#define BCM6318_POWER_DOMAIN_EPHY1 3 +#define BCM6318_POWER_DOMAIN_EPHY2 4 +#define BCM6318_POWER_DOMAIN_EPHY3 5 +#define BCM6318_POWER_DOMAIN_LDO2P5 6 +#define BCM6318_POWER_DOMAIN_LDO2P9 7 +#define BCM6318_POWER_DOMAIN_SW1P0 8 +#define BCM6318_POWER_DOMAIN_PAD 9 + +#endif /* __DT_BINDINGS_BMIPS_BCM6318_PM_H */