From patchwork Wed Jun 17 10:50:33 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: 11609671 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 5FFEA618 for ; Wed, 17 Jun 2020 10:51:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4881E214DB for ; Wed, 17 Jun 2020 10:51:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YmmcEJ3h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726698AbgFQKuu (ORCPT ); Wed, 17 Jun 2020 06:50:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbgFQKur (ORCPT ); Wed, 17 Jun 2020 06:50:47 -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 7C8FCC06174E; Wed, 17 Jun 2020 03:50:46 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id x13so1823965wrv.4; Wed, 17 Jun 2020 03:50:46 -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=C4Sw+ku1MqKilMAFTEguDMUmQ05C8NzwMHl0BLvSaNE=; b=YmmcEJ3hQtla6uNTskErX2TD7VcfgHy+wQZ0JCD7KqUNavM44SudtRUKHZI1/NKWOt lKA3P9ZmqdvVIjVka/mRNP8eLvEsJuARZoG+gqoI/0CzRUd7iVQpucinbJ+tbbqtIV31 zj8KwsKYSpwrDMjP8Eez0Emn6qwIf4xmbD31dPXkkAoUza/vn+W34GsOugW6w+sycqvd kbTsnWBcg8Uek8SLl9oTQPthkCBXznR3Z7Qy0pDqdqn6DhRGehvr+SY2Wgs5/BkjTV+2 jsCUGAk5t9Gjn093+bKEyM8aJD3ZEGVYTZBPvIyjFFIvR6lzZlSa++uaCQKhKsNivXre AXmQ== 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=C4Sw+ku1MqKilMAFTEguDMUmQ05C8NzwMHl0BLvSaNE=; b=Yco87Tslxkbl6xAT/n7GfndOVxCkwPjAXC865oZQ4MSd+S3vWKOyXU4Ln51GM0xJhH NQ3t/mBEWPo50AMZT5vKDH3YX2kCmPONipddULgmz3L4Cbz7ihFiKQEz+8kCUGHctIqU ukzdba+gKhZ/l2T6yJcvldXim6fo4J9QiX0graAR1iKlulTn0ZEOLSO3MQbvuk3nB3AK +vnmAaKjsx71Tun1HQtFPrftGaU5Y3vpuKFjENwYT6eeGDOXGCD4SZHVEgNBh12luCSt crZP1/LzXDQOb6gzcdZhe1UlNgLClHRstIw2SPh/uy8HLZrbYC+trQsvWNmZ3Wp9GOzu XmGg== X-Gm-Message-State: AOAM531h+J0pnDd7CyD1Y+K+7dapCBhrJQvWqha2hK4iGE2mySJ6GbNQ l8g8Eqj9EnlwsfIoZfvTVfU= X-Google-Smtp-Source: ABdhPJwld4HcBvXosm3C0F0QdYdKEMx3pgK9e7R3B5obH3S3RCvOsc8k0CrUBVGRF3j/yvuThTH2uQ== X-Received: by 2002:a5d:484b:: with SMTP id n11mr7902838wrs.356.1592391045161; Wed, 17 Jun 2020 03:50:45 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:44 -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 v7 1/9] mips: bmips: select ARCH_HAS_RESET_CONTROLLER Date: Wed, 17 Jun 2020 12:50:33 +0200 Message-Id: <20200617105042.3824116-2-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 --- v7: no changes v6: no changes v5: no changes 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 6fee1a133e9d..b1840119cb64 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 Wed Jun 17 10:50:34 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: 11609675 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 737FB618 for ; Wed, 17 Jun 2020 10:51:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A730214DB for ; Wed, 17 Jun 2020 10:51:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g7L/xEGV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbgFQKva (ORCPT ); Wed, 17 Jun 2020 06:51:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgFQKur (ORCPT ); Wed, 17 Jun 2020 06:50:47 -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 65C18C061573; Wed, 17 Jun 2020 03:50:47 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id b6so1798083wrs.11; Wed, 17 Jun 2020 03:50:47 -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=qQJgp5b20r5k0LA/LVVPpe+99DLC0mJjRrQE7xjRrQQ=; b=g7L/xEGV+EKnA5f9Z5rXhGpZID7ctLiQoraF/ztZa9a69HCsJTPWahi6B5pa9xegSU jXbyE8Nq6WJPG/EWU0iCwrRMQUA/zGf7RTWzl7sY6b7vo2gE3NiCUbJ39H9MxW/uueHk F7jfTIWIgns/ZQOefWjsFNgKMmh3/K29WV1tjZ9fYroAdgUiDQK//ucQXgG74xi0NdAX pqLSDpo5ACmkVcxUl6Hd5jK99m79ccLLj6EBmwn39dJHFklBtzeTe5lrZfYq/8KA1OAa Wggpgc+Kg0zi6lm1HW9t3Lr12zp3q+g1jO5Gvgf9RDpxHCKb6ovbQZNLGLCpsCoNeZl5 Zj6g== 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=qQJgp5b20r5k0LA/LVVPpe+99DLC0mJjRrQE7xjRrQQ=; b=fCxgL1sQ11nopr105VHribEALNLxao6Ax3IfiOzd5sAZCfqN9YqbEadlU/xt2zjTRl K46d2LOIqw6gDpk+fb6zJJg0j1pb9qfSvcnxSIJjHeGH2fsF/tbsgwjSMBQnmcJKalBo 473zBxc2Kj7ZeCpFq+KpEDReDlxYddSTwcSlpTaONnF5b4mNTX7kKaiyqWH//APFIaMq CbeQ/bKFJt7rBg+fiV+4/AowQQxV03gN/1eHrSPn1myVzy8Bl2kglvSUduxHUMM8xOho meoEdZUYBuKf+mvxlX+JLV7zfKdP9fsObqrsUBXmbLPnSsQ0yP5oZ/ihoKnVwOyDCxdF O+Iw== X-Gm-Message-State: AOAM530ZHj0eXpowuRRTOLBkMA6Jb+u6/3dt8ktNZep+xGwvvyOVPP5Y j41HK2U/Ch0kCYge0rW4eyY= X-Google-Smtp-Source: ABdhPJzprWvXqQ1HU2QZnhKEZj6jDziADTekaMLEOaEzPXRIBGtdMYLtluaGzPSpZKUSEFBos8kXvw== X-Received: by 2002:adf:f5d0:: with SMTP id k16mr8279380wrp.288.1592391046041; Wed, 17 Jun 2020 03:50:46 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:45 -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 v7 2/9] dt-bindings: reset: add BCM6345 reset controller bindings Date: Wed, 17 Jun 2020 12:50:34 +0200 Message-Id: <20200617105042.3824116-3-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Rob Herring --- v7: no changes v6: no changes v5: no changes 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 Wed Jun 17 10:50:35 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: 11609673 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 CCCD4618 for ; Wed, 17 Jun 2020 10:51:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B105521534 for ; Wed, 17 Jun 2020 10:51:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X4zfVD8G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbgFQKv3 (ORCPT ); Wed, 17 Jun 2020 06:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726662AbgFQKus (ORCPT ); Wed, 17 Jun 2020 06:50:48 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 644F0C061755; Wed, 17 Jun 2020 03:50:48 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id t18so1822319wru.6; Wed, 17 Jun 2020 03:50:48 -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=PsvB5PDMRspei3v/2mV86AXl7rPPfE789kJJpqAl2ck=; b=X4zfVD8G3X1e+ncxn+aGMDyaA9yLcg/d5H+6UsGlG0Mq9yBQ2F9cvthTwPdQnGdu+P tJ3p7OPCk6vGdT2EEENjQK5eZzqwUaXjgneX0u6+NtB+HKDVrwrn/VX5keG8cTFnAnD+ 8PS8mesp3RbH1vtZOCWqRBCfgQgm5mmYq8szAJqA/GtALe7f541bmswygX88mZgSkXqS SYLvPzWzd/6bXoiJn5lwwPhj0sFQ2/wLOlQ1FLCaVDwzA3Dzk0jM4BOBXePJABcjEEJ2 MceCN6Dte0ONfxM36XsJu4V0WLmvuC+WkRPCe3j2+2IMoLLXhVDUIl6qqfRuI5Vl/R5A Km2A== 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=PsvB5PDMRspei3v/2mV86AXl7rPPfE789kJJpqAl2ck=; b=X6LMv0Pb+UHTTkHN/HRzVYJfmoxzT/SYyVMBwC0d/tHdvf0igR0pzFM4ZTjIGQJq5v lgWb5Jq92Je1MZvTIBzVn7y+hpq0grqGBFNP4djPf2l4X4uVRNRIEMxu5dcYl2GwfT5b HKNxuVABfLO6pVu4ljgnqDjvJ6+Rp5vV6yEnaY80nWU+eipWqoaFhNKd/wLDU11vYPwo gs2+LQ1cGWbc5RG+O7cAPDo5/mNhT2QhO+eVbUfxQCWMr3GvI2j0gY+KN6PU+tS9f4d8 OQoW1yvA22HWRM2I/BqZEiBVN7HMTxSSXMLRwfvdWjT0wn9Lw8ilhTDtoX5J9v8A5oKB viFg== X-Gm-Message-State: AOAM532HshS1VAHEXKMcpjKMU0486ev6yMWFS9Kuky5TZNV83BAtBOrf d9v0ioTGLLPUAQMYNC0Mr48= X-Google-Smtp-Source: ABdhPJxsQtvKf4mr9YaFIeiFECoNOlS6aMNQa4T8UG0Yd6vOrkspc6mUJHzwpioewgaAye/DAgIMpQ== X-Received: by 2002:adf:f446:: with SMTP id f6mr7814599wrp.59.1592391046998; Wed, 17 Jun 2020 03:50:46 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:46 -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?= , Florian Fainelli Subject: [PATCH v7 3/9] reset: add BCM6345 reset controller driver Date: Wed, 17 Jun 2020 12:50:35 +0200 Message-Id: <20200617105042.3824116-4-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Philipp Zabel --- v7: introduce changes suggested by Philipp: - sort Kconfig alphabetically. - return 0 on bcm6345_reset_update. - add second sleep comment. v6: driver improvements: - use devm_platform_ioremap_resource. - simplify bcm6345_reset_probe return. - introduce and use to_bcm6345_reset function. v5: fix kbuild robot error (drop __init). 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..6b9625a40799 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -35,6 +35,13 @@ config RESET_AXS10X help This enables the reset controller driver for AXS10x. +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_BERLIN bool "Berlin Reset Driver" if COMPILE_TEST default ARCH_BERLIN 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..737e4e81f6b7 --- /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 inline struct bcm6345_reset * +to_bcm6345_reset(struct reset_controller_dev *rcdev) +{ + return container_of(rcdev, struct bcm6345_reset, rcdev); +} + +static int bcm6345_reset_update(struct reset_controller_dev *rcdev, + unsigned long id, bool assert) +{ + struct bcm6345_reset *bcm6345_reset = to_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); + + return 0; +} + +static int bcm6345_reset_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + return bcm6345_reset_update(rcdev, id, true); +} + +static int bcm6345_reset_deassert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + return bcm6345_reset_update(rcdev, id, false); +} + +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); + /* + * Ensure component is taken out reset state by sleeping also after + * deasserting the reset. Otherwise, the component may not be ready + * for operation. + */ + 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 = to_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 bcm6345_reset_probe(struct platform_device *pdev) +{ + struct bcm6345_reset *bcm6345_reset; + + bcm6345_reset = devm_kzalloc(&pdev->dev, + sizeof(*bcm6345_reset), GFP_KERNEL); + if (!bcm6345_reset) + return -ENOMEM; + + platform_set_drvdata(pdev, bcm6345_reset); + + bcm6345_reset->base = devm_platform_ioremap_resource(pdev, 0); + 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; + + return devm_reset_controller_register(&pdev->dev, + &bcm6345_reset->rcdev); +} + +static const struct of_device_id bcm6345_reset_of_match[] = { + { .compatible = "brcm,bcm6345-reset" }, + { /* sentinel */ }, +}; + +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 Wed Jun 17 10:50:36 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: 11609659 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 39249618 for ; Wed, 17 Jun 2020 10:50:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2133221534 for ; Wed, 17 Jun 2020 10:50:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lNCu+YU6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726745AbgFQKuv (ORCPT ); Wed, 17 Jun 2020 06:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726688AbgFQKuu (ORCPT ); Wed, 17 Jun 2020 06:50:50 -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 B4DBFC061573; Wed, 17 Jun 2020 03:50:49 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id r7so1844866wro.1; Wed, 17 Jun 2020 03:50:49 -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=Z+9RWAx8eDY3BjryEj1kR82wcBWupAAqs97VDpee1Rk=; b=lNCu+YU6uIrD95Hz6WWcVsjxxNlbJC9KRjW4ukM1kwjf7nggvkY4nDzMuLW6QSv/rO WVrwD6xswaP7yyayXIYwDyfGYo72gw0P9cSKO8cwpSsDiYFAXfrGY/ZQ7hTTvjN9T8Sx xJonigszt/PwIcyz78OpjoLCjxkk23W5Vy/K4rrAHKjOSWIJjc9ojtbUnz4j88MRZdnn yvExRC3PT3xeUV2GzN6Cb7lRigJlHzu4PDW9XXzc+38PVOJAdFxmUd/DTkkTWjQpa02M E4ARlBzHuV4h92EOrP0nZMnvjUocqjP1JWCqv6mXxyOrfC4PuGmHqBF2xDySDel1Klt1 YEPQ== 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=Z+9RWAx8eDY3BjryEj1kR82wcBWupAAqs97VDpee1Rk=; b=csBiTjEXfB41/Vf/UZYLeMUU9LxIjlfPPEnDSW4wLzhDMSDquutfVm778UfXMkZK2x 3L4XDwL4AAsmYLmguCVXvYwDOfqmORLY6T+Euaf6kt8hGIbMUmtLlu3KaKdC6yj+/OrL fCzVCGCpC1hdq7jwCJ6zEKWdK2r9jhaouKxwdHmsPy4nS3bkAqHTD6Dy2XxA/XXnVOBD LkTmdeWu+Ja6qtrK9axlosb2j861oOvlt16eJbiwWblC9S0balQxEFa0ATwnokroD4KC BAVW5qty76rUDiFsoB6XSaWroGki6ayakU8U6LHhJ1SLgNwKBMp7kHzxYTkV/9DDIoxU 1UMg== X-Gm-Message-State: AOAM533RbsWOJg4wxLAjSTtct8Yx+WrF/PrEntaameyWs3iTVT27Kb7f 1GflHgbROOU+NRLQ4/rrkvo= X-Google-Smtp-Source: ABdhPJwHz+uV/jJmlstvV+BagjqRxmpoPQUkexczyrAYbLUJdyfFXQPPkSBG+rMQFtRSd2JPMtnwMQ== X-Received: by 2002:adf:ed87:: with SMTP id c7mr7821729wro.108.1592391048038; Wed, 17 Jun 2020 03:50:48 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:47 -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 v7 4/9] mips: bmips: dts: add BCM6328 reset controller support Date: Wed, 17 Jun 2020 12:50:36 +0200 Message-Id: <20200617105042.3824116-5-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Rob Herring --- v7: no changes. v6: no changes. v5: no changes. 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 Wed Jun 17 10:50:37 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: 11609677 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 6B796618 for ; Wed, 17 Jun 2020 10:51:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53888214DB for ; Wed, 17 Jun 2020 10:51:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mngr/72j" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726329AbgFQKv2 (ORCPT ); Wed, 17 Jun 2020 06:51:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbgFQKuu (ORCPT ); Wed, 17 Jun 2020 06:50:50 -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 667A2C06174E; Wed, 17 Jun 2020 03:50:50 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id q25so1498272wmj.0; Wed, 17 Jun 2020 03:50:50 -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=lkwxNYc8+p5wlTPi+QbFvKZuq2LERGtqK/cmyvg1WyU=; b=mngr/72jBc/BYYoAmQIyE3RSfdIQ1RIU4J2Sawq9hUZzTjlXiL2QfJIEUWI8I+6It4 ormCefBOJNJ5UT64mERy1cGz3vfWp2CPIk1zQkoWe/VbSWL/UtUv2Pc4nR7Ivzm+MwDy 3vS/1TI75oA/YAVd5GAr73hoLETc0dfRthJODs9xqaRhJzaksbBXvb2PV4Nk4yzPznro eZ7736OJoXfAw8vxH2+Hr23w4DRdCTJ/+GVdMDXxwW6v5LhEZ7B7QPlawdWs7S7udp8D H+IYAOSBEy3FnivzC7uNsDsNqDF2SxG2haU66FqJ5gZQAFZV5fGQLDoNEAAXjsbFeg0d eVAQ== 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=lkwxNYc8+p5wlTPi+QbFvKZuq2LERGtqK/cmyvg1WyU=; b=MUFJWogh256Tc/+pd34w2vQEmUnpVfl/ogslbIza3H0j0ZSr563gxMxS+mKCNn9bqE ewdn3a1JcXKRSUsQb0h7tMS9RwaI2Nys2SfpHbH8oHMk+6Y43nn0RgKFDXDTOf8djLKB sk8OMOAE6l5XYOhwRUybsl05N6ngfRIkQ3m/E+Aoaly7IN/4rmMiNrzyoJNbPz/n/7za 7Hon3BizxA9HX/25ju8Zu7Oxmk1neXRenxKBwwiPqGdU7tOYn9ycsUFQU5wVZgq0uMaA +mpOLlWyEm8Zr6RAAqyjlTuI9urbAbI/KVYgrWfb6q0IRty48Eaq7rIIo+XZS98jkwG9 HT0g== X-Gm-Message-State: AOAM5316MUOxBV4NCU3MGcOtNNfaqVbJNmbfq/tOo/IEio6rqsXX2m+t AdohsHUKG88P3lu755QkXXc= X-Google-Smtp-Source: ABdhPJyzc1TgIozo4EoM0qqori3t224XG/EQKxX5qj0nl582gZVhkYh9F1FMiHd6vg9utSmJD1vw1A== X-Received: by 2002:a1c:5445:: with SMTP id p5mr7557409wmi.115.1592391049055; Wed, 17 Jun 2020 03:50:49 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:48 -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 v7 5/9] mips: bmips: dts: add BCM6358 reset controller support Date: Wed, 17 Jun 2020 12:50:37 +0200 Message-Id: <20200617105042.3824116-6-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Rob Herring --- v7: no changes. v6: no changes. v5: no changes. 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 Wed Jun 17 10:50:38 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: 11609667 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 133DF618 for ; Wed, 17 Jun 2020 10:51:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFE9320FC3 for ; Wed, 17 Jun 2020 10:51:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ig07ZXPf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726893AbgFQKvP (ORCPT ); Wed, 17 Jun 2020 06:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726727AbgFQKuv (ORCPT ); Wed, 17 Jun 2020 06:50:51 -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 3658DC061755; Wed, 17 Jun 2020 03:50:51 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id r7so1844963wro.1; Wed, 17 Jun 2020 03:50:51 -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=Jj+NgUXyPVtjRlKAsLUW1Ywg7sxz/gprDC+dItpQr40=; b=Ig07ZXPfXkckFhtMZW6TsfFbMnr006DYVz8Tz8/sGE1WfzsUnJaVxgWUfgOZwY0Ipd zmuzViUZpSuzpCX+XkRT6XAzJ8q5+xbhQwKpAvovUZ2NJQllqUG0+0nViA1DbIVpRike hpFirA5gX5s5PFK0JM925zT3r3ntGwPHbACIIEKaSJzpmso5xHDHwuCrGCbDTXveemho Fzab+nOee8Dt8/0WAgby1o2jBpi1hKny8Fx0EgtibwZXGCJ+jP5tFd0vwV++pZYmzu1u 28mlzDgbkhUnb46s3cNk2Co5oTT2CF6eTjSfBc0sbjXLrQsgfmNArOynmorhiP3tGoIy g7IA== 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=Jj+NgUXyPVtjRlKAsLUW1Ywg7sxz/gprDC+dItpQr40=; b=nf2dAa2DU0g9lxf/6aaD0rFWWK8NK2BxLRoHztd+1/udbLse8M+xF9A3RBGVJDSuWO 8wdhvyCkiU92J/9/Kkt7noLGINlUsZsdIiKBy3xcBQJBLB2tCUe0XQiqsBWol0zGO/dL rBMckwjCtkd7C7tveAEt47kfEQ64Vd+jHmCzwnXrMQoA0J7F/T/NbYGaZTjZwpNdOIIx X33h9RhQE55UoLMnZB62oTGroTAtPkITSzFEzp9qdfEo8pS7wlT1Ux6dzUPh2P3wERuE mBO7unaffrjlMw14G38TzgXlk0I5QLcbxQHIYgsiWYs4Ud4hDqP8wJDJCUVlwQV6BNa7 /qrw== X-Gm-Message-State: AOAM531GPH3Y4k/A6tdpYzLwq45MrmNjF01gwg40FvBqg8heKj8eifcW HTvZIgbDff7HSv/pypTnBIw= X-Google-Smtp-Source: ABdhPJybvjQGZWCKdAYA5oWW1ihs+kacZo9wJ0YMZ18w59iM/Avb811/OrAFsDOK8pDzYqayq6oufQ== X-Received: by 2002:a5d:61c6:: with SMTP id q6mr6561938wrv.282.1592391049861; Wed, 17 Jun 2020 03:50:49 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:49 -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 v7 6/9] mips: bmips: dts: add BCM6362 reset controller support Date: Wed, 17 Jun 2020 12:50:38 +0200 Message-Id: <20200617105042.3824116-7-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Rob Herring --- v7: no changes. v6: no changes. v5: no changes. 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 Wed Jun 17 10:50:39 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: 11609669 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 B985B14DD for ; Wed, 17 Jun 2020 10:51:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A09AF214DB for ; Wed, 17 Jun 2020 10:51:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aPaPmobH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726758AbgFQKvO (ORCPT ); Wed, 17 Jun 2020 06:51:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbgFQKux (ORCPT ); Wed, 17 Jun 2020 06:50:53 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EDEBC061573; Wed, 17 Jun 2020 03:50:52 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id t18so1822495wru.6; Wed, 17 Jun 2020 03:50:52 -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=1CwmoCVnTINSQnAbLAfkmEGV50yYwRbUo3wBwxU/aZg=; b=aPaPmobH6FAjDsYeVouJT5wVWCYi6vLtR5hRSPZnysEgC6TL0t5WDpMRg4BjCbpy6m 1bZJMwqsDgczeEOIqv845C2qJcUJhjMdaGgBr0GbAfLBC30Eod2EzI7DymHOTXSd5NZE Z2RmXfwObOtOpeo7y7L0fN18GkE3qrAnLIp2b1zlV0LHVaC0KN47EW/eubSk8FDWk/1t oYrP7V0G/0XDBi5LDhlRDEzyJPeuXyOWf5S1Kp1qUDzR6/dLmTeKFwuBLvDS4Ll1Ejdf /NtGdhuvWZf4+3E3d9EPg6xnYB7z/qro+1P0xtbhBsPvqTVxFP6Tlk7w4djiTxMxhN9Y A14Q== 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=1CwmoCVnTINSQnAbLAfkmEGV50yYwRbUo3wBwxU/aZg=; b=oFsAejqlIPS2Ioyuk3LX4ZKNen3/MFl113WaBoRyrGaOhEgG2OOWJGO/WpDOSVjPrv hIXxEykkYiBEax4KAdSbRT4HAPtXm8XbZMf9061owMnqA4OAz/IP68T/IzwXgMkCh1Ps FhRXT4EzzWj+mq41iFmcD5juuXvLg/1z+argrviBhmk5zlLN2TcKT33Ea0/m3LsWJYCG rPhwnW2db+Kq1jisIGPsVOVZZ2v/f9gsXR1QiUizSg1AxiNnEtfvNGUmUiNbTbVXSGeR yAKbL3NZoLL24NkxLLZqtBXM8qku5o9EcVwzzNPEJc0oec+RvDZKoxBmRM41mhmo5XTK kGVg== X-Gm-Message-State: AOAM532rzLrsOcliyooKsApKRddg3NxlRtbhfAeo7puD+xiiycP92aVu rlunU9nabns9p9Xc9KOowPw= X-Google-Smtp-Source: ABdhPJz9anm2OpTkq5YzL7Ca6Q0ZmEpcJIZ9cZ6FT7KPA35qytxQX4qeDqj2aVMrBCcib1HRhS7ooQ== X-Received: by 2002:adf:f149:: with SMTP id y9mr7981277wro.208.1592391050798; Wed, 17 Jun 2020 03:50:50 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:50 -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 v7 7/9] mips: bmips: dts: add BCM6368 reset controller support Date: Wed, 17 Jun 2020 12:50:39 +0200 Message-Id: <20200617105042.3824116-8-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Rob Herring --- v7: no changes. v6: no changes. v5: no changes. 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 Wed Jun 17 10:50:40 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: 11609661 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 CCD7E618 for ; Wed, 17 Jun 2020 10:51:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3F03214DB for ; Wed, 17 Jun 2020 10:51:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="En9Qn96D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbgFQKu5 (ORCPT ); Wed, 17 Jun 2020 06:50:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbgFQKuy (ORCPT ); Wed, 17 Jun 2020 06:50:54 -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 E514DC06174E; Wed, 17 Jun 2020 03:50:52 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id t18so1822557wru.6; Wed, 17 Jun 2020 03:50:52 -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=VPzTGDK9IokIsGvMPuu4MwOewjqv0Dg1ngD5vhIfqUA=; b=En9Qn96DRgSurAb2aoZPJWsbMCeu+e1K5a9imF7R+gxHOYg48u5R546rneTkTh22o6 slnP1zFlRCp5OVNAYpLQE5W4iIvF0y2SHbqyMIa67FAYxBO/ZYdSXU0GFhc1BKC/qfKY pfKHCPaAytzoRNvHgvFslkyUnLH8O1Ritt+PFR8oSgZ42fRq6LotQoOiWHSPrC7Tl46Y TDGzDMF9a5K29R+oFInclEjAmjfwNGypyCTPPTmVNBMyfCCgICv9n7974rKGQTJohZMm CS37z4PMb8VHA/zqHvpR44RWh1GhubmKZdgGT7FQTr/kWcvGH9+R1hJf2FFLz4AFCo3A ofOg== 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=VPzTGDK9IokIsGvMPuu4MwOewjqv0Dg1ngD5vhIfqUA=; b=fgCxA378z3OrHpHAvkoZThNJDD5E11GSyhQOVl6lsHCmAH7VEJgjeH1Q4Dp83YhLkv iQ87BBjXAirBeeus3jYVpgnEnZAO4bh67IXTVnhoVSl6e++lOwKtEePpHanm3siAlj2i cz/i1W8gkHnNeLqLV3r++847mXyLlT2Su66gd8IP+DRtsq26FLf5dyPVzw5N4QXGeCW4 Tf5Xzb8xkELZWs+AKE2H1YeIC8R6mWAD06E4A7aJ5sdYLhVq+9FZVHoTZbG/9wta2cZR fIUkijQZZvnaOPvXAv+spfrEc+oTsAgCFt85TBJkJVqRtEpjFm2tC2hmzTGt2m6q7kMz 9e9w== X-Gm-Message-State: AOAM532mnpSjX+yYQd4nvl04HMoZ+J7A+VOjKAwvIQmGx54oGC60CnmK U5qH5MC3eKYVOrzMNL08cgI= X-Google-Smtp-Source: ABdhPJzBlEvwI6RKd/GJkmjY2zB2MQkRcbeTNkGMLvX53kYKmsvrJ2NuyeH9gIooKM+8Qfs7QzbqaQ== X-Received: by 2002:a5d:484b:: with SMTP id n11mr7903298wrs.356.1592391051612; Wed, 17 Jun 2020 03:50:51 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:51 -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 v7 8/9] mips: bmips: dts: add BCM63268 reset controller support Date: Wed, 17 Jun 2020 12:50:40 +0200 Message-Id: <20200617105042.3824116-9-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Rob Herring --- v7: no changes. v6: no changes. v5: no changes. 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 Wed Jun 17 10:50:41 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: 11609663 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 03B1D14DD for ; Wed, 17 Jun 2020 10:51:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA8AC2173E for ; Wed, 17 Jun 2020 10:51:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mkBUbRo4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726797AbgFQKu4 (ORCPT ); Wed, 17 Jun 2020 06:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726773AbgFQKuz (ORCPT ); Wed, 17 Jun 2020 06:50:55 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A97DDC061755; Wed, 17 Jun 2020 03:50:54 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id l11so1851337wru.0; Wed, 17 Jun 2020 03:50:54 -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=q32jAFtYDGTd7ehWi2GSlZRUAUiNhVpvNu8v0nFr12M=; b=mkBUbRo4unyaF1QFGNtUiXARCSxOZ7YVOI8T6RO5PyY0F0M8fuaTnhOuf86mnWdMVH 3Zkdh5odX0zsx24/FFK7pH3rimS/J0e7MIgWMPpcsQJgMXyJSXlfj+3vr9kcIkxjjmvA EHcvdt94qRwnFhXFNLLKcb06Ejyzyvy67xB/Z351JE9Y+qE+o9vgnWlAmSFHN+L7VhLB Zq/RvPYcdxLAZGPDSQ/LY6XwzQpbZVmtzmzSbNggYEdnwP1lfdk9zWdouEUs8dhbhFdT D30ljuOZNx9ZmElSTm+op3xiAGkWeNqiE0U1RPJCXdgcYoHbaPLYTjL4ACv1JKpR1ebE +1eA== 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=q32jAFtYDGTd7ehWi2GSlZRUAUiNhVpvNu8v0nFr12M=; b=QEzl0utFUpcLcPcyt2OnqMKoU6G7FR+VvhVR7Bpzkyc0QL8E5u77ULj468nGnl/KiG 8WmDGefpApVmUq4yOriPqec23a3cc9EE4lto7RtKxnxSr8sVbNl6xA+nEmi+SjgRZafu 87WuqqHR8ZT3l89XNAxiT9L/Ns50JHaxaOd42EFtjptxdNibP/r2wx9sO7qJ97cHoQV0 TFuWeUwvILyQ+QaKXZ/23YFSzP1Cv5qnQJeLLGODq7yy3ql5AGbqQFSyPAwCk976NGZm aytUX2xOua9oaGy81boHJsE3zTKlrqAM6bSEMph+Ad1J5QsyVhIIjONhCFj11ejUUDRA O15g== X-Gm-Message-State: AOAM533vdt5SLNJFciawodXbrznn340HW0X8eORrqMPKeZy/xaSv7ERD FlEUS50v9xO0O8dGR+E69HY3S+3sG7og+g== X-Google-Smtp-Source: ABdhPJyttkMj/wWuPtlLnPcfiFv18cRqA8UWh01OFGYr3vE+IydWYwQuwzIsNibREUR6/jZ2492rbQ== X-Received: by 2002:adf:f5d0:: with SMTP id k16mr8280025wrp.288.1592391052614; Wed, 17 Jun 2020 03:50:52 -0700 (PDT) Received: from skynet.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id u12sm33331927wrq.90.2020.06.17.03.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 03:50:52 -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?= , Florian Fainelli Subject: [PATCH v7 9/9] mips: bmips: add BCM6318 reset controller definitions Date: Wed, 17 Jun 2020 12:50:41 +0200 Message-Id: <20200617105042.3824116-10-noltari@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200617105042.3824116-1-noltari@gmail.com> References: <20200617105042.3824116-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 Reviewed-by: Rob Herring --- v7: no changes. v6: fix BCM6318_RST_HOSTMIPS value (12 vs 11). v5: no changes. 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..f882662505ea --- /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 12 + +#endif /* __DT_BINDINGS_RESET_BCM6318_H */