From patchwork Sat Jun 13 08:38:05 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: 11602667 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 9591190 for ; Sat, 13 Jun 2020 08:38:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D66D206D7 for ; Sat, 13 Jun 2020 08:38:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OQEpnLJe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726478AbgFMIiZ (ORCPT ); Sat, 13 Jun 2020 04:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbgFMIiS (ORCPT ); Sat, 13 Jun 2020 04:38:18 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D45C9C03E96F; Sat, 13 Jun 2020 01:38:17 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id t18so12172653wru.6; Sat, 13 Jun 2020 01:38:17 -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=KMwtoTNUI28nDU2ZNynxUBCVybVSXc4H+bikAufJJoI=; b=OQEpnLJeim+oYmKxADUZC5+zmj8cjqiDaA/Ta15Q44HnduM+tYEohwBrn3wS6qECWP KaNU3q9QCljnlvyeG0JqefNC6ZDDSI4kMsacYCHbkPyjol+EHtj0jQEB4NGbMdqZhgGU IA8XlLRl5UGwCEr4bl4/2WirKOPtHs+cWA+VeiWdxbvvAh7wWHKsR1ZNlEnp/DQJqtnK vkJzV7bWOqAizgCHQo3xj+6gOyAptFRakI25kktWl4k3GgfU/kD5Dslv2K03Oj5iWsVb jyFiYdpNapuiJYcGfWUU35ApImIFJwGBS2M/5RlcfPgH1aS/PjE7pWOuDNYklUPmDjWA CDGQ== 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=KMwtoTNUI28nDU2ZNynxUBCVybVSXc4H+bikAufJJoI=; b=bttGzsGi62z/pqJ6lCjKOnyzH+hpMn6aUtfm01pg1dYk7C7T1hZiRHJGG5IDrRILZK Uhg3gwvNif+HeBrKngO5W9d9OItmOUF5QWcVOJbOwq1RLWiUaljGCsHRegVRsuYJlnvn AtkXL27/Xzm7qcm4N63sbxS8xMtk5VNwwe819teC6zDFsf+6pBqHRNnSmh55cyHMkGkl lJlTWyM//Ui/spZK9bsw18cfy+zn+5zk7zPjoCzI1hgq7CejMGY1x9yiR9wyMO0OW7S9 XaUduvig4uCtQcryDf0QN5uEfd/NV+qv09n2MA+mzg4ntLmA73UPCjGb/Ti2syGo4yii njEw== X-Gm-Message-State: AOAM5301aOf3DWwy3j1IvbFNIgamvY15Hn9hCx2OvzmuuEmRW1ImoTRM WU/GRX1ap9QC/xf9IqJWL+o= X-Google-Smtp-Source: ABdhPJyBz2rR60dS0eu3cpo5vlFxae8B4lUE53GJGvYuszlEXHDGMdrScL3Rn7sKzsRgRXLGyBF2fg== X-Received: by 2002:a5d:604b:: with SMTP id j11mr18694000wrt.193.1592037496476; Sat, 13 Jun 2020 01:38:16 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:16 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 1/9] mips: bmips: select ARCH_HAS_RESET_CONTROLLER Date: Sat, 13 Jun 2020 10:38:05 +0200 Message-Id: <20200613083813.2027186-2-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org This allows to add reset controllers support. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v4: no changes v3: no changes v2: no changes arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 26c63e8161f0..4721ec4e3408 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -227,6 +227,7 @@ config ATH79 config BMIPS_GENERIC bool "Broadcom Generic BMIPS kernel" + select ARCH_HAS_RESET_CONTROLLER select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL select ARCH_HAS_PHYS_TO_DMA select BOOT_RAW From patchwork Sat Jun 13 08:38:06 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: 11602669 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 C0B6213B1 for ; Sat, 13 Jun 2020 08:38:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A570C206D7 for ; Sat, 13 Jun 2020 08:38:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CFNp8ETd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726484AbgFMIi0 (ORCPT ); Sat, 13 Jun 2020 04:38:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbgFMIiT (ORCPT ); Sat, 13 Jun 2020 04:38:19 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4E5DC08C5C1; Sat, 13 Jun 2020 01:38:18 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id l10so12141353wrr.10; Sat, 13 Jun 2020 01:38:18 -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=CX1RIcH3HdMjMnLFfkKPZsJHlG2/s8A7XrV4W8n9VPI=; b=CFNp8ETd9NAmbscrrN+YWTmQ2KNIFm2RxB6atk62gux18g68TZP/SAJRDqP7d9MI/k /7Ff4vvA+dkpTIRyPpl4y4uy8pUI/BzO66kpq6W7MdTbhj6Zprm4zMSxpodpUHPBDVz+ 2bp9nA6Vr7bSqZOv7M+fC+S6iuNTLFCEX0Gii4o8cfbha15jEWqZA2whV8/X7Sy7kqSu bdjA2t0PWfcB0TQdCnalvRhY27fWVUmi0ndvknDeHk4SdZFwSF1e8sCNjd1kk2pmhbGE ULUOJWkjtZDFLdK/dClEgbC9WH0h7RhtuqeIZtVtxfEBGsoBrPZOEHW1h+PHVVZuGLQQ Pgqw== 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=CX1RIcH3HdMjMnLFfkKPZsJHlG2/s8A7XrV4W8n9VPI=; b=L1wDH/yNVydfOcIrII/nJxcJAMngZSJEbHLi8dopGc7vCNn39YcoUqps4rPbZSfm3M RqMCXHVN0RuTc4A0rrgnbuZHb788KM8onnUr6ShJ8/R66NEgjc3vu4jAA9ZikBdmA6D8 u8rddHKDCGFEIlJ4fzJyH1t+4pwdrNc9rR/eaob17cfiY1qsz0+4UcLtmk8s2p5vu4IL NxepWmaaNqL8ikFO+K0OnKt5iEMbobsDQd6kTeIUX4lNqT2LKvPWQvnStmZp32ILHfnU WxHAjZ6h3jp2eHJKIgwddzhYn/eHUvzDxpRM4pT5Veo48dXMBgOxTu9Z72bYOpP0rCaz 5Pmw== X-Gm-Message-State: AOAM531ZOA24QAsP77/+Ptf25fzUwXhP6u19wGOqZGRlH05STmRfDqsI uiQFfoAyyWwDdGRZh8zffVk= X-Google-Smtp-Source: ABdhPJyUh98iuiJKtdU+KImpPrZCEOEPu/mQk5U44H+jrNGXTJfiCEfRJq4uhdPVv+aUe34Esus9MA== X-Received: by 2002:adf:a491:: with SMTP id g17mr20087920wrb.132.1592037497537; Sat, 13 Jun 2020 01:38:17 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:17 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 2/9] dt-bindings: reset: add BCM6345 reset controller bindings Date: Sat, 13 Jun 2020 10:38:06 +0200 Message-Id: <20200613083813.2027186-3-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add device tree binding documentation for BCM6345 reset controller. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli --- v4: change license and fix maxItems. v3: no changes v2: no changes .../bindings/reset/brcm,bcm6345-reset.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml diff --git a/Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml b/Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml new file mode 100644 index 000000000000..560cf6522cb8 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/reset/brcm,bcm6345-reset.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: BCM6345 reset controller + +description: This document describes the BCM6345 reset controller. + +maintainers: + - Álvaro Fernández Rojas + +properties: + compatible: + const: brcm,bcm6345-reset + + reg: + maxItems: 1 + + "#reset-cells": + const: 1 + +required: + - compatible + - reg + - "#reset-cells" + +additionalProperties: false + +examples: + - | + reset-controller@10000010 { + compatible = "brcm,bcm6345-reset"; + reg = <0x10000010 0x4>; + #reset-cells = <1>; + }; From patchwork Sat Jun 13 08:38:07 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: 11602683 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 DE77890 for ; Sat, 13 Jun 2020 08:39:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1EE3208C3 for ; Sat, 13 Jun 2020 08:39:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JOjb31zl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbgFMIjM (ORCPT ); Sat, 13 Jun 2020 04:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgFMIiU (ORCPT ); Sat, 13 Jun 2020 04:38:20 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06293C08C5C2; Sat, 13 Jun 2020 01:38:20 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id c71so9913389wmd.5; Sat, 13 Jun 2020 01:38:19 -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=fGn8OGVIJlouJS3ntIMD902vMimxRcaD/4IsI9LdMpE=; b=JOjb31zlCxXUgL7PRhpEtJfI8SMi/wybpfDWlIcrFAbl+9Zcm5mbwHVlNY+EhzBuYA Hj+/BshoYLonHps3/8k0jK5uHA5gloBfHIUFyQpnIm48j1/nYBi8oO4P4V4sfPzGAtT2 XsIo8LkbXBfmU53ECYIwy7L4tRc9tZ2yQ0sfEKXx4qSA/a6OoGPQsBI4tuulrEtN+/JX Uu+n6dGV7fnqXcwKSPewSeyBlpATYMgmyz9rQcYbGIHf+muL0T/shZqUftiuxvGD84BB PIf6+dtzTbU7w71WoUIS8Opnm0sMcNMv5WiPPEjDPmWPOE461DDOTZYmyjMDfb+hSRni gqGw== 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=fGn8OGVIJlouJS3ntIMD902vMimxRcaD/4IsI9LdMpE=; b=TrX+PCSjmvCJv4Zaayw2NUJfX5CFBIC9O5WDNe132vgYmfyNF6AH7RYVhSWC+YEN8s /cNn+9Q7jnLFyOfUYP4ODd3w5qsrTQJY67PTMTCUfKH7O64FU4W2fXpnnmz6AZL9Dr2L jD6skRG+H/FCXPwY1tEvz+LTtiQE7hsc9lpBQsqGi8X3KY7mjt6728VfkOJFz/D0CzyH g4Mg+CNPpSYElDRiZ6yz+fOGFkOuQxAVMqH0IlPUOIdcgdw4k1aPVrrTW8VXDCzMn+kx yMvamcZ+5D8a7J1QgCk7etTZa978fqNr6w4sYi8wOVwSK2urpmHBOip3HqQCSFvuu2XG H2aQ== X-Gm-Message-State: AOAM530ypFHy4i9xf0f+p2fGvC6APfIBLthPDivmDKI5P8Mhu2KG/AaL dRyTg/txrurWR+T9rJF8eqM= X-Google-Smtp-Source: ABdhPJzveJqegEvqPHYDXyaN+v2lTmwi70HcJbL9xbCNay/XPFmHoSTbfVX/KOhn9UE6RYpWbvvDDw== X-Received: by 2002:a1c:2b86:: with SMTP id r128mr3132951wmr.13.1592037498581; Sat, 13 Jun 2020 01:38:18 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:18 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 3/9] reset: add BCM6345 reset controller driver Date: Sat, 13 Jun 2020 10:38:07 +0200 Message-Id: <20200613083813.2027186-4-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add support for resetting blocks through the Linux reset controller subsystem for BCM63xx SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli --- v4: no changes. v3: using reset-simple isn't possible since sleeping after performing the reset is also needed. v2: add compatibility to reset-simple instead of adding a new driver. drivers/reset/Kconfig | 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-bcm6345.c | 135 ++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 drivers/reset/reset-bcm6345.c diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index d9efbfd29646..9f1da978cef6 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -41,6 +41,13 @@ config RESET_BERLIN help This enables the reset controller driver for Marvell Berlin SoCs. +config RESET_BCM6345 + bool "BCM6345 Reset Controller" + depends on BMIPS_GENERIC || COMPILE_TEST + default BMIPS_GENERIC + help + This enables the reset controller driver for BCM6345 SoCs. + config RESET_BRCMSTB tristate "Broadcom STB reset controller" depends on ARCH_BRCMSTB || COMPILE_TEST diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile index 249ed357c997..e642aae42f0f 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/ obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o obj-$(CONFIG_RESET_ATH79) += reset-ath79.o obj-$(CONFIG_RESET_AXS10X) += reset-axs10x.o +obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o obj-$(CONFIG_RESET_BERLIN) += reset-berlin.o obj-$(CONFIG_RESET_BRCMSTB) += reset-brcmstb.o obj-$(CONFIG_RESET_BRCMSTB_RESCAL) += reset-brcmstb-rescal.o diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c new file mode 100644 index 000000000000..6c9238762ee5 --- /dev/null +++ b/drivers/reset/reset-bcm6345.c @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * BCM6345 Reset Controller Driver + * + * Copyright (C) 2020 Álvaro Fernández Rojas + */ + +#include +#include +#include +#include +#include +#include + +#define BCM6345_RESET_NUM 32 +#define BCM6345_RESET_SLEEP_MIN_US 10000 +#define BCM6345_RESET_SLEEP_MAX_US 20000 + +struct bcm6345_reset { + struct reset_controller_dev rcdev; + void __iomem *base; + spinlock_t lock; +}; + +static void bcm6345_reset_update(struct reset_controller_dev *rcdev, + unsigned long id, bool assert) +{ + struct bcm6345_reset *bcm6345_reset = + container_of(rcdev, struct bcm6345_reset, rcdev); + unsigned long flags; + uint32_t val; + + spin_lock_irqsave(&bcm6345_reset->lock, flags); + val = __raw_readl(bcm6345_reset->base); + if (assert) + val &= ~BIT(id); + else + val |= BIT(id); + __raw_writel(val, bcm6345_reset->base); + spin_unlock_irqrestore(&bcm6345_reset->lock, flags); +} + +static int bcm6345_reset_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + bcm6345_reset_update(rcdev, id, true); + + return 0; +} + +static int bcm6345_reset_deassert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + bcm6345_reset_update(rcdev, id, false); + + return 0; +} + +static int bcm6345_reset_reset(struct reset_controller_dev *rcdev, + unsigned long id) +{ + bcm6345_reset_update(rcdev, id, true); + usleep_range(BCM6345_RESET_SLEEP_MIN_US, + BCM6345_RESET_SLEEP_MAX_US); + + bcm6345_reset_update(rcdev, id, false); + usleep_range(BCM6345_RESET_SLEEP_MIN_US, + BCM6345_RESET_SLEEP_MAX_US); + + return 0; +} + +static int bcm6345_reset_status(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct bcm6345_reset *bcm6345_reset = + container_of(rcdev, struct bcm6345_reset, rcdev); + + return !(__raw_readl(bcm6345_reset->base) & BIT(id)); +} + +static struct reset_control_ops bcm6345_reset_ops = { + .assert = bcm6345_reset_assert, + .deassert = bcm6345_reset_deassert, + .reset = bcm6345_reset_reset, + .status = bcm6345_reset_status, +}; + +static int __init bcm6345_reset_probe(struct platform_device *pdev) +{ + struct bcm6345_reset *bcm6345_reset; + struct resource *res; + int err; + + bcm6345_reset = devm_kzalloc(&pdev->dev, + sizeof(*bcm6345_reset), GFP_KERNEL); + if (!bcm6345_reset) + return -ENOMEM; + + platform_set_drvdata(pdev, bcm6345_reset); + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + bcm6345_reset->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(bcm6345_reset->base)) + return PTR_ERR(bcm6345_reset->base); + + spin_lock_init(&bcm6345_reset->lock); + bcm6345_reset->rcdev.ops = &bcm6345_reset_ops; + bcm6345_reset->rcdev.owner = THIS_MODULE; + bcm6345_reset->rcdev.of_node = pdev->dev.of_node; + bcm6345_reset->rcdev.of_reset_n_cells = 1; + bcm6345_reset->rcdev.nr_resets = BCM6345_RESET_NUM; + + err = devm_reset_controller_register(&pdev->dev, + &bcm6345_reset->rcdev); + if (err) + return err; + + return 0; +} + +static const struct of_device_id bcm6345_reset_of_match[] = { + { .compatible = "brcm,bcm6345-reset" }, + { }, +}; + +static struct platform_driver bcm6345_reset_driver = { + .probe = bcm6345_reset_probe, + .driver = { + .name = "bcm6345-reset", + .of_match_table = bcm6345_reset_of_match, + .suppress_bind_attrs = true, + }, +}; +builtin_platform_driver(bcm6345_reset_driver); From patchwork Sat Jun 13 08:38:08 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: 11602677 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 194BA13B1 for ; Sat, 13 Jun 2020 08:38:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F395F20882 for ; Sat, 13 Jun 2020 08:38:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WgjSWbIw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbgFMIiv (ORCPT ); Sat, 13 Jun 2020 04:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726468AbgFMIiZ (ORCPT ); Sat, 13 Jun 2020 04:38:25 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0747CC08C5C3; Sat, 13 Jun 2020 01:38:21 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id h5so12183697wrc.7; Sat, 13 Jun 2020 01:38:20 -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=c3LSxS5y9C3iZjIgZQHWu/m3qHf45XIGKZnAz+FSDeE=; b=WgjSWbIwDGFRtvWR/rcwO1/4rnZJxpSaityxQH4xSg4cvMCBz+hZYMLNJ7TQijbbNT N6lONhXyxL6IgHwAQHWZ4ytigf/g34U2GnMkugi8ltIaobS5nKbtEMPqUhx/P6TNL+jN z4zp2+PQ9E5r1IgN7kVIqAiPodKDeV9qB9anDQJm4PdDxDOXojb5jEguLRdzJatSeSoA JRqktpdQb+zhM4IN03KNnfedfw+rztjkvO9/f/sEAXkN4Nc/Yrhe/EyYL0hgJ5WqqGCF u16OwlVxZhKSPBZkEy8fd4/+I25xjrBwY2U/9QJahcsM/vwuj09D0LKzF0EhBvIgTjwY M/+Q== 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=c3LSxS5y9C3iZjIgZQHWu/m3qHf45XIGKZnAz+FSDeE=; b=LVNiQ2J848XrMJIaW7iY2T6VIj8uvkmcoDvBYrBeUYZBJJE1cow+NTBgPKWZoN/BYA HwZa5fOAZeRk3kYtsuSK88xOXBUkznTZkEQqA8u9C6Lhyii5woEEDgvXKSfa6/KrQfui iXq8Eaum1qSEbmELB1FwwkWscmNk07qkimQyxoRzI2PQgL8vaDekbnkAAThkR9wD/t/v Ad+KdmaEViu2ghJ7J1BzjCOK1/H1cW0S73im44qRLKexSUFUtcjB3TckxhCTRVGMjr8D Zmryn8KEO1N3vZLzznZ+2o2YicvX13M5NOCIk1XIRQ/le2253bASj4DIhi/CcZ8AguIh REpg== X-Gm-Message-State: AOAM533gINxdprlKCYu1T8zPK6Oy8t0WATRAppZXMXhuekSf6vMq08b7 ON1AFw0gU76vf7sw7DC5T5o= X-Google-Smtp-Source: ABdhPJzv87O22EmB+aVOPqgmkyvXjpXoSYIBAIJzjW3OnpbpgVzrNUzK4aELEOhhcqfql5nB1z+YEQ== X-Received: by 2002:a5d:44cf:: with SMTP id z15mr19988367wrr.164.1592037499613; Sat, 13 Jun 2020 01:38:19 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:19 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 4/9] mips: bmips: dts: add BCM6328 reset controller support Date: Sat, 13 Jun 2020 10:38:08 +0200 Message-Id: <20200613083813.2027186-5-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org BCM6328 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v4: no changes. v3: add reset controller definitions header file. v2: no changes. arch/mips/boot/dts/brcm/bcm6328.dtsi | 6 ++++++ include/dt-bindings/reset/bcm6328-reset.h | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 include/dt-bindings/reset/bcm6328-reset.h diff --git a/arch/mips/boot/dts/brcm/bcm6328.dtsi b/arch/mips/boot/dts/brcm/bcm6328.dtsi index af860d06def6..590118cf5c12 100644 --- a/arch/mips/boot/dts/brcm/bcm6328.dtsi +++ b/arch/mips/boot/dts/brcm/bcm6328.dtsi @@ -57,6 +57,12 @@ clkctl: clock-controller@10000004 { #clock-cells = <1>; }; + periph_rst: reset-controller@10000010 { + compatible = "brcm,bcm6345-reset"; + reg = <0x10000010 0x4>; + #reset-cells = <1>; + }; + periph_intc: interrupt-controller@10000020 { compatible = "brcm,bcm6345-l1-intc"; reg = <0x10000020 0x10>, diff --git a/include/dt-bindings/reset/bcm6328-reset.h b/include/dt-bindings/reset/bcm6328-reset.h new file mode 100644 index 000000000000..0f3df87d47af --- /dev/null +++ b/include/dt-bindings/reset/bcm6328-reset.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_RESET_BCM6328_H +#define __DT_BINDINGS_RESET_BCM6328_H + +#define BCM6328_RST_SPI 0 +#define BCM6328_RST_EPHY 1 +#define BCM6328_RST_SAR 2 +#define BCM6328_RST_ENETSW 3 +#define BCM6328_RST_USBS 4 +#define BCM6328_RST_USBH 5 +#define BCM6328_RST_PCM 6 +#define BCM6328_RST_PCIE_CORE 7 +#define BCM6328_RST_PCIE 8 +#define BCM6328_RST_PCIE_EXT 9 +#define BCM6328_RST_PCIE_HARD 10 + +#endif /* __DT_BINDINGS_RESET_BCM6328_H */ From patchwork Sat Jun 13 08:38:09 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: 11602675 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 B97A8618 for ; Sat, 13 Jun 2020 08:38:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0B3E208A9 for ; Sat, 13 Jun 2020 08:38:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qF4kJ7+L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726562AbgFMIiv (ORCPT ); Sat, 13 Jun 2020 04:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726398AbgFMIiZ (ORCPT ); Sat, 13 Jun 2020 04:38:25 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 490AEC08C5C4; Sat, 13 Jun 2020 01:38:22 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id l10so12141438wrr.10; Sat, 13 Jun 2020 01:38:22 -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=bwRH+WewBBOgjeSjhH56GmNfI8dMvNqDHN6W9LzpbZE=; b=qF4kJ7+LfhZMBG0mCibMo9k+UD50J8hjjmGfF554Lmv832Brqm1Owwmn9u/3k7b+i6 nMG5ArxXCvw3fXyUU4oDuljVMkrFUrAQbPf8WWlKVcZuF3y/FOKkR1y/JjZfPaJ2nho6 kZtSQvAV1ZUptqZ9qu2aKHaaggNCcva6tgL9bConAC++B2x6LH18TqGlSxrvsyE1BbrV Guvt/ZMacvI7DWLvGA5pwxJf+sjvKE/CGhORcWfnMPsEdsuuALrRoCD8N+nrTOD7gI4a Sum76L0ogA+1M6/MuQEfplCIlKLIIFDLEBq5fJ+omkIDY+gEw9TSOSbk8w27vD47HxG8 0YhQ== 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=bwRH+WewBBOgjeSjhH56GmNfI8dMvNqDHN6W9LzpbZE=; b=MuQybFff7lQGbsjhkZzsI5z1xCtStzZHSGQhhIIn5rcu+MzrwRhM+u/S0TJcD1e4K7 vjxuOxU4nzImGWEDeY9/fNROPEmg9nWUgX6AnnHDPQ2XTjG6V2aXrkQGkl/+GgIHp+eb O88+JvF68+3BJKMtWmoG08h/SY9R2A2lit99ozZN44CNBbbXfNeEOHvjUmqT3oIqwiji 1Gb3O/YrBQh2+m1Z/d6KzGymseTy9ZZpcj50MtOEmdR7V1ALEp4AeKAIglbqpAp/DlGN LV867xRYKANwqNARvrBsdBvrVsa408ZDdOVU3xRPE5RoqfbnVluASaJ0jaTuzsPAy5OK zoJw== X-Gm-Message-State: AOAM530pt/A+ym/+RxxyHyxKlLzGcqaFoy4OxcOypORiEUF6VIHceMDk YSsGVI8PVsnvMeunJatYocA= X-Google-Smtp-Source: ABdhPJzvf3nHWRQsMwb1wAeIlUVhjn70Wkp+4gJQ/K5DRHBkBc/IkGuO1WXYKMVVnw4RtGkHXfU9Sw== X-Received: by 2002:a5d:4ec3:: with SMTP id s3mr20201335wrv.103.1592037500807; Sat, 13 Jun 2020 01:38:20 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:20 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 5/9] mips: bmips: dts: add BCM6358 reset controller support Date: Sat, 13 Jun 2020 10:38:09 +0200 Message-Id: <20200613083813.2027186-6-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org BCM6358 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v4: no changes. v3: add reset controller definitions header file. v2: no changes. arch/mips/boot/dts/brcm/bcm6358.dtsi | 6 ++++++ include/dt-bindings/reset/bcm6358-reset.h | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 include/dt-bindings/reset/bcm6358-reset.h diff --git a/arch/mips/boot/dts/brcm/bcm6358.dtsi b/arch/mips/boot/dts/brcm/bcm6358.dtsi index f21176cac038..9d93e7f5e6fc 100644 --- a/arch/mips/boot/dts/brcm/bcm6358.dtsi +++ b/arch/mips/boot/dts/brcm/bcm6358.dtsi @@ -82,6 +82,12 @@ periph_intc: interrupt-controller@fffe000c { interrupts = <2>, <3>; }; + periph_rst: reset-controller@fffe0034 { + compatible = "brcm,bcm6345-reset"; + reg = <0xfffe0034 0x4>; + #reset-cells = <1>; + }; + leds0: led-controller@fffe00d0 { #address-cells = <1>; #size-cells = <0>; diff --git a/include/dt-bindings/reset/bcm6358-reset.h b/include/dt-bindings/reset/bcm6358-reset.h new file mode 100644 index 000000000000..bda62ef84f5a --- /dev/null +++ b/include/dt-bindings/reset/bcm6358-reset.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_RESET_BCM6358_H +#define __DT_BINDINGS_RESET_BCM6358_H + +#define BCM6358_RST_SPI 0 +#define BCM6358_RST_ENET 2 +#define BCM6358_RST_MPI 3 +#define BCM6358_RST_EPHY 6 +#define BCM6358_RST_SAR 7 +#define BCM6358_RST_USBH 12 +#define BCM6358_RST_PCM 13 +#define BCM6358_RST_ADSL 14 + +#endif /* __DT_BINDINGS_RESET_BCM6358_H */ From patchwork Sat Jun 13 08:38:10 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: 11602679 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 F34C5618 for ; Sat, 13 Jun 2020 08:39:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2F33207FF for ; Sat, 13 Jun 2020 08:39:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ncNs2J9A" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbgFMIiu (ORCPT ); Sat, 13 Jun 2020 04:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbgFMIiZ (ORCPT ); Sat, 13 Jun 2020 04:38:25 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 429F2C08C5C5; Sat, 13 Jun 2020 01:38:23 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id j198so10491189wmj.0; Sat, 13 Jun 2020 01:38:23 -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=66G4WD3xEE6C4hSbqDUrv41NEzv9wNmeNrUJJ6vnwas=; b=ncNs2J9ALpRzB3pGJOwV+Nb2lbphf+F0bt3EQpJjgLalppTlj+Tshmln8tpixojc/L 4aZDOBDao+rGD2MW0ftExo3XOHWqMxLUnNUaSiThk/QYi0CZRrkE7XMwHi6j4Nx3PnP/ mFaCCClFWRRKmOU5sMqBt7gHiQLOg+bFqoeQyFEbClYg+zcxtcKpkot/ecvz7EvZEcim 2jsfjaYtu2a3BOZz8ntlQbf/F+WVWIT+ODZqtKfN7EukooUyDWF4OL4wkGCb3RlrCxEy S2XylRdeYYJqoiz/7MyFsFhOhpsr4k5zJmOamSvo7pIHFZPljk4nxe3+JpBpWMsqGlS7 jLkg== 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=66G4WD3xEE6C4hSbqDUrv41NEzv9wNmeNrUJJ6vnwas=; b=lNKTGk1E634A15/UtV0A1T77oeaWKeBtkdKEBNthorUyg+2y/roVFol8RmMeHPY069 nz2Q1Fstx83iKOZxRgdtRE6nmUipura5BZojegfIZAXJF0W38bJ4xt8ZhRnqYhDfzawF /SWOS2AC6Fvwk9Id1Kp+CTVMOkmTYcZ6XX2T8xyftJ4qhE56ry2lrbs/u9bXNiVGHuXt Z7qqkVdBSweF3o1yEcS9AEClwREkwfiq37Qy4kPYQ3kaKCgnrz2ZbzT9seX4v39SS59E 722yezw1xdGTzjflz7VYfHY4yLi9PjLzUHthXCB+jHCD9G98juEBEBwPLpgIsdQD0LVw 5X1w== X-Gm-Message-State: AOAM531i/5A36H0DPOXuxE5tGcyjFriCeyagjDw86JzM0XMUvKjrCJPV aBhbAmBZejbmxwyr26q0/RU= X-Google-Smtp-Source: ABdhPJyssR4epn5nzbs+vNIfBV5/qjfCCkT2N1cB+HmCSNRfIAYE9hkzSttEOeMEj21zF4NsnqeJPA== X-Received: by 2002:a05:600c:2259:: with SMTP id a25mr3118313wmm.32.1592037501903; Sat, 13 Jun 2020 01:38:21 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:21 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 6/9] mips: bmips: dts: add BCM6362 reset controller support Date: Sat, 13 Jun 2020 10:38:10 +0200 Message-Id: <20200613083813.2027186-7-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org BCM6362 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v4: no changes. v3: add reset controller definitions header file. v2: no changes. arch/mips/boot/dts/brcm/bcm6362.dtsi | 6 ++++++ include/dt-bindings/reset/bcm6362-reset.h | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 include/dt-bindings/reset/bcm6362-reset.h diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi index 8ae6981735b8..443af6b4c838 100644 --- a/arch/mips/boot/dts/brcm/bcm6362.dtsi +++ b/arch/mips/boot/dts/brcm/bcm6362.dtsi @@ -70,6 +70,12 @@ reboot: syscon-reboot@10000008 { mask = <0x1>; }; + periph_rst: reset-controller@10000010 { + compatible = "brcm,bcm6345-reset"; + reg = <0x10000010 0x4>; + #reset-cells = <1>; + }; + periph_intc: interrupt-controller@10000020 { compatible = "brcm,bcm6345-l1-intc"; reg = <0x10000020 0x10>, diff --git a/include/dt-bindings/reset/bcm6362-reset.h b/include/dt-bindings/reset/bcm6362-reset.h new file mode 100644 index 000000000000..7ebb0546e0ab --- /dev/null +++ b/include/dt-bindings/reset/bcm6362-reset.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_RESET_BCM6362_H +#define __DT_BINDINGS_RESET_BCM6362_H + +#define BCM6362_RST_SPI 0 +#define BCM6362_RST_IPSEC 1 +#define BCM6362_RST_EPHY 2 +#define BCM6362_RST_SAR 3 +#define BCM6362_RST_ENETSW 4 +#define BCM6362_RST_USBD 5 +#define BCM6362_RST_USBH 6 +#define BCM6362_RST_PCM 7 +#define BCM6362_RST_PCIE_CORE 8 +#define BCM6362_RST_PCIE 9 +#define BCM6362_RST_PCIE_EXT 10 +#define BCM6362_RST_WLAN_SHIM 11 +#define BCM6362_RST_DDR_PHY 12 +#define BCM6362_RST_FAP 13 +#define BCM6362_RST_WLAN_UBUS 14 + +#endif /* __DT_BINDINGS_RESET_BCM6362_H */ From patchwork Sat Jun 13 08:38:11 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: 11602671 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 30E6C618 for ; Sat, 13 Jun 2020 08:38:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 189E320882 for ; Sat, 13 Jun 2020 08:38:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D6WEl9vJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbgFMIif (ORCPT ); Sat, 13 Jun 2020 04:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbgFMIi0 (ORCPT ); Sat, 13 Jun 2020 04:38:26 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52AEEC03E96F; Sat, 13 Jun 2020 01:38:24 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id p5so12140304wrw.9; Sat, 13 Jun 2020 01:38:24 -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=yIcnaA2Be+ha33Bm41qIm56ItaMQsBiond6OOoKoOVI=; b=D6WEl9vJQBr1BP2V2AE6tOOg7FwYY+dewsN15o7pAQsSsvNezW2QNWUe+ntGxyR+pq jP8baFSVoYuM0JXbOMMUjea/Cap0c7aJXc1MnwzH4XvbRVuqzoBZLblldcfsyW9TZ0vg xnEm0F0rhErRzfsymy2f1KT28St2/te9srGfJ8uO7CXlD6/EC9PUYrNnLTXWIc6p/AdI IXS47Oh+VuRvgnPoRtFqmxqzBIVQwKgdDmpYt+aDATFqL31f/hc8W+gQBqxKXILOabFf +1Cj3dFNL2M4Vh7Gzekj8Hp+iVs24ZJoaBoZfGineCdwD3Oo7mZKmb7eIk8JZJbSdJXr ewHQ== 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=yIcnaA2Be+ha33Bm41qIm56ItaMQsBiond6OOoKoOVI=; b=kve+ZXHaa1PrV9rqZ42EdpnPu/dMoOBGPB8XcLIR3kNrycIyGwkMiWbw5JVkReoS8q SmywwqDdFlQbjaRXa1ahs71+XUxuCLgN3nMLE2ugtwiq5zy6SAlrkKJj3T1isNePz8+m GJtf99HOTBcxekWkDIDoffxnAxOo7T8FaF+BDNu3Eyffa+MYUJg6CDu0sX4cc5fGelIq sKh9ZvU2VKEutC0Ebg/8Ncqhhn7tDkbK2P1QCAkXXaoNIQN8TY15hvkEfRZeOI+lV5vD vIQOxa60duZehcUcu3uDLJPnlApw2ipwyoySSD/9brIuAy4em9qPD4wI4yqevwmkTtM7 GRLg== X-Gm-Message-State: AOAM532ZVbddp7elqetRZ1peeH8mYdsK3EEmbn2crmNteFCQrZWO86fm ueBRLrAQ2xb7YmmZhFeVWfk= X-Google-Smtp-Source: ABdhPJwtdCUUrZuHdxAJ2iQBBj7mtUIuFFiC5ahs9x6bUpZvN/pZtYGc7Oz1iHYi6iLBUaeZGk441A== X-Received: by 2002:a5d:6acf:: with SMTP id u15mr20039712wrw.277.1592037502961; Sat, 13 Jun 2020 01:38:22 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:22 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 7/9] mips: bmips: dts: add BCM6368 reset controller support Date: Sat, 13 Jun 2020 10:38:11 +0200 Message-Id: <20200613083813.2027186-8-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org BCM6368 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v4: no changes. v3: add reset controller definitions header file. v2: no changes. arch/mips/boot/dts/brcm/bcm6368.dtsi | 6 ++++++ include/dt-bindings/reset/bcm6368-reset.h | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 include/dt-bindings/reset/bcm6368-reset.h diff --git a/arch/mips/boot/dts/brcm/bcm6368.dtsi b/arch/mips/boot/dts/brcm/bcm6368.dtsi index 449c167dd892..52c19f40b9cc 100644 --- a/arch/mips/boot/dts/brcm/bcm6368.dtsi +++ b/arch/mips/boot/dts/brcm/bcm6368.dtsi @@ -70,6 +70,12 @@ reboot: syscon-reboot@10000008 { mask = <0x1>; }; + periph_rst: reset-controller@10000010 { + compatible = "brcm,bcm6345-reset"; + reg = <0x10000010 0x4>; + #reset-cells = <1>; + }; + periph_intc: interrupt-controller@10000020 { compatible = "brcm,bcm6345-l1-intc"; reg = <0x10000020 0x10>, diff --git a/include/dt-bindings/reset/bcm6368-reset.h b/include/dt-bindings/reset/bcm6368-reset.h new file mode 100644 index 000000000000..c81d8eb6d173 --- /dev/null +++ b/include/dt-bindings/reset/bcm6368-reset.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_RESET_BCM6368_H +#define __DT_BINDINGS_RESET_BCM6368_H + +#define BCM6368_RST_SPI 0 +#define BCM6368_RST_MPI 3 +#define BCM6368_RST_IPSEC 4 +#define BCM6368_RST_EPHY 6 +#define BCM6368_RST_SAR 7 +#define BCM6368_RST_SWITCH 10 +#define BCM6368_RST_USBD 11 +#define BCM6368_RST_USBH 12 +#define BCM6368_RST_PCM 13 + +#endif /* __DT_BINDINGS_RESET_BCM6368_H */ From patchwork Sat Jun 13 08:38:12 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: 11602681 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 2A40213B1 for ; Sat, 13 Jun 2020 08:39:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07459207FF for ; Sat, 13 Jun 2020 08:39:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MCYZVX2E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726482AbgFMIiu (ORCPT ); Sat, 13 Jun 2020 04:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgFMIi0 (ORCPT ); Sat, 13 Jun 2020 04:38:26 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 592ADC08C5C1; Sat, 13 Jun 2020 01:38:25 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id h5so12183808wrc.7; Sat, 13 Jun 2020 01:38:25 -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=MTL3mFHal5gyxBhhw5JCJ323TJpZOzIoxk/BoxVrxCY=; b=MCYZVX2EAkbpny5bY7kxIY34pcojF5sb9zpRxh6YzqOm7hJ/H2vj/yWe/tTMBvWtvX TwpTB0C/YbyxPtR/sQ2pumYFJGlYOxKTvhWWGV+y3MO2kXE6VFgSp+5A9RAjT/c2416B 0LCigbvkjbLx6MetPf9E04BVRC8YTbUfoqljs3JqyAM7dsaSHMQgkHjjipV36qVZ54GC QHeVhZyTc+m4QKaJvCkGHaHMyHnsckpmnupImvb/VrfYuHIRxJHiWeaZbr6sNNgWHyRN Cts4oBkfTbIE4wElxd2Fw/lkmqlaIdSm2dhmAh6uPZs+qgiwoxMU6lbpPuOZAWHmjv4d RiYA== 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=MTL3mFHal5gyxBhhw5JCJ323TJpZOzIoxk/BoxVrxCY=; b=VD9rbMX8keqypgRkhVyp52KqZz9/14Pcv+hgN3bxXyv41AZJQ+cpDmmuXGId+/ageO DZCQQi5DzxCrkXw70psHn0ZhFlVuPWXVz1fgsQU/jcMOvAeT0d1yvgWDoA3zzPA5z9Hn MILH9FEufTlnBruJNkuQauiF3+X9/TJ0m/MHJhTaEk7+jJ7MBmkfoCnByCPf0j60jjdf V0f5b53dnofP5Qk10GK/5ybRGWIU5CJqAPetfCpc8EClkEZAPJSL0h66vvX1olskMu1E kP7xeSGtgg2GOUu5nvlwIkJAy2K1Z93yAOSQQb9YHtj5VjLc34e0oYlJRb8TpEjNfq7N xMIg== X-Gm-Message-State: AOAM532gOtPA7TaTfqVKjwyfEBmzF3XCnoO6Qom4hrXoPYfnodxVLpWM ggLiGDM6rbw3xop3HLrDjko= X-Google-Smtp-Source: ABdhPJyat4YhdE/eqJ8RyMfkVugG2EQZt0Wl8ol9rGNYgpNSJgQriqbOLJBmoHRghoP/toHgANblIQ== X-Received: by 2002:adf:dc42:: with SMTP id m2mr20152781wrj.342.1592037503975; Sat, 13 Jun 2020 01:38:23 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:23 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 8/9] mips: bmips: dts: add BCM63268 reset controller support Date: Sat, 13 Jun 2020 10:38:12 +0200 Message-Id: <20200613083813.2027186-9-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org BCM63268 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v4: no changes. v3: add new path with BCM63268 reset controller support. arch/mips/boot/dts/brcm/bcm63268.dtsi | 6 +++++ include/dt-bindings/reset/bcm63268-reset.h | 26 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 include/dt-bindings/reset/bcm63268-reset.h diff --git a/arch/mips/boot/dts/brcm/bcm63268.dtsi b/arch/mips/boot/dts/brcm/bcm63268.dtsi index beec24145af7..0150da7e3905 100644 --- a/arch/mips/boot/dts/brcm/bcm63268.dtsi +++ b/arch/mips/boot/dts/brcm/bcm63268.dtsi @@ -70,6 +70,12 @@ reboot: syscon-reboot@10000008 { mask = <0x1>; }; + periph_rst: reset-controller@10000010 { + compatible = "brcm,bcm6345-reset"; + reg = <0x10000010 0x4>; + #reset-cells = <1>; + }; + periph_intc: interrupt-controller@10000020 { compatible = "brcm,bcm6345-l1-intc"; reg = <0x10000020 0x20>, diff --git a/include/dt-bindings/reset/bcm63268-reset.h b/include/dt-bindings/reset/bcm63268-reset.h new file mode 100644 index 000000000000..6a6403a4c2d5 --- /dev/null +++ b/include/dt-bindings/reset/bcm63268-reset.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_RESET_BCM63268_H +#define __DT_BINDINGS_RESET_BCM63268_H + +#define BCM63268_RST_SPI 0 +#define BCM63268_RST_IPSEC 1 +#define BCM63268_RST_EPHY 2 +#define BCM63268_RST_SAR 3 +#define BCM63268_RST_ENETSW 4 +#define BCM63268_RST_USBS 5 +#define BCM63268_RST_USBH 6 +#define BCM63268_RST_PCM 7 +#define BCM63268_RST_PCIE_CORE 8 +#define BCM63268_RST_PCIE 9 +#define BCM63268_RST_PCIE_EXT 10 +#define BCM63268_RST_WLAN_SHIM 11 +#define BCM63268_RST_DDR_PHY 12 +#define BCM63268_RST_FAP0 13 +#define BCM63268_RST_WLAN_UBUS 14 +#define BCM63268_RST_DECT 15 +#define BCM63268_RST_FAP1 16 +#define BCM63268_RST_PCIE_HARD 17 +#define BCM63268_RST_GPHY 18 + +#endif /* __DT_BINDINGS_RESET_BCM63268_H */ From patchwork Sat Jun 13 08:38:13 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: 11602673 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 95FFA90 for ; Sat, 13 Jun 2020 08:38:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E29320882 for ; Sat, 13 Jun 2020 08:38:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fmrFdlgy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726408AbgFMIif (ORCPT ); Sat, 13 Jun 2020 04:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbgFMIi0 (ORCPT ); Sat, 13 Jun 2020 04:38:26 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55A7CC08C5C6; Sat, 13 Jun 2020 01:38:26 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id e1so12183901wrt.5; Sat, 13 Jun 2020 01:38:26 -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=apYVJSQOoJKr8S1F9QvI20+pzas9FiQWtNSclf0VUoQ=; b=fmrFdlgyfSMnhLqDRle25xuMZlGWzMOlLlpmgdL2Tesm0amr/j/QqXDvakzHGN3/zg NxQbm3+ZzPS5IByW5CfYG2NmHXH98ol0bRwBuVuOTFJmGUTgFIye+Bdfb3Ingc5ELngC VnTFIPk5rIDofQyGzLzO+skndlmVLb6OGIH9wosd5fumwDxMCeFZm1l6qshPQ3MydTCE azeHtjXyTo77vPdA1r4OuFKreaw0P26ww4fzKXjDfDIndJhB6SRfec/YxvhviBIG8bQ5 HQXFw88yz7wkKc1d3Fy+c08pO8Te0uDj3BoYrO5o6XuZv76+CLtPYK/QkwRkXor7yd0h 3DcA== 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=apYVJSQOoJKr8S1F9QvI20+pzas9FiQWtNSclf0VUoQ=; b=smnw4vgQchwSf9Gtx/vESqPRSMJ0DjaYu2j6Dd263IEIhVk7ALWeTyVglB6fEz6bNy Xp2OVB7pXXUai4yc0kloib8z5UafeI3f2yzcCz3+IUDO5XSYIGoPVjDFjMx3VV5GH7dF /Z8RUWLaYZAY2Q97Dr3cMbDTEr2OcLf/PtgRbBP6spUtT5yLS+h/MmtlzNITtZAhok2U UsLgLqoh8CRPp/grCKBt0tfK5yfRb7z7dG9DhPTMAnUOLXWWKY3Kut34Y0B0R5RuIESf VESQLRJq8yjaF/HgGGWZXrHtmm2CajRxiyLT/C/pIUTq9lLlNnFTPIMZzFhSDoxmn+zq lbcw== X-Gm-Message-State: AOAM53084Ed1njUP0wg06sX4IcWN68Mhj6EXUU3+EaKxiYlqwOIvbf9+ j7/ay2ri9CsRoQqJGopM5q4= X-Google-Smtp-Source: ABdhPJzKFMTe9TbdDDotFUYRLGdmb4BqnL+vzwjnUVAEX0u5odeK+eW2Dm5Qc/m3kXhxlJFKsVUEXA== X-Received: by 2002:adf:fd81:: with SMTP id d1mr19395675wrr.96.1592037504995; Sat, 13 Jun 2020 01:38:24 -0700 (PDT) Received: from skynet.lan (168.red-88-20-188.staticip.rima-tde.net. [88.20.188.168]) by smtp.gmail.com with ESMTPSA id l17sm11622704wmi.3.2020.06.13.01.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 01:38:24 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: p.zabel@pengutronix.de, robh+dt@kernel.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, jonas.gorski@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v4 9/9] mips: bmips: add BCM6318 reset controller definitions Date: Sat, 13 Jun 2020 10:38:13 +0200 Message-Id: <20200613083813.2027186-10-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200613083813.2027186-1-noltari@gmail.com> References: <20200610172859.466334-1-noltari@gmail.com> <20200613083813.2027186-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org BCM6318 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli --- v4: no changes. v3: add new path with BCM6318 reset controller definitions. include/dt-bindings/reset/bcm6318-reset.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/dt-bindings/reset/bcm6318-reset.h diff --git a/include/dt-bindings/reset/bcm6318-reset.h b/include/dt-bindings/reset/bcm6318-reset.h new file mode 100644 index 000000000000..f4fef7bfb06d --- /dev/null +++ b/include/dt-bindings/reset/bcm6318-reset.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __DT_BINDINGS_RESET_BCM6318_H +#define __DT_BINDINGS_RESET_BCM6318_H + +#define BCM6318_RST_SPI 0 +#define BCM6318_RST_EPHY 1 +#define BCM6318_RST_SAR 2 +#define BCM6318_RST_ENETSW 3 +#define BCM6318_RST_USBD 4 +#define BCM6318_RST_USBH 5 +#define BCM6318_RST_PCIE_CORE 6 +#define BCM6318_RST_PCIE 7 +#define BCM6318_RST_PCIE_EXT 8 +#define BCM6318_RST_PCIE_HARD 9 +#define BCM6318_RST_ADSL 10 +#define BCM6318_RST_PHYMIPS 11 +#define BCM6318_RST_HOSTMIPS 11 + +#endif /* __DT_BINDINGS_RESET_BCM6318_H */