From patchwork Tue Jun 9 11:30:49 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: 11595313 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 87F60913 for ; Tue, 9 Jun 2020 11:31:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62827206A4 for ; Tue, 9 Jun 2020 11:31:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oRSto8oG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FTaZexr3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62827206A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ImoHv9Tqs+LpZfiE9m6zdOZZeOi64WWf999xLfdoHKg=; b=oRSto8oGpmrT8J DW7UI6GfVYD0X6ovZbpKEy6jogtYNFQ/p4z+pVDBPNfIAYxrcamiK6WapHGgAdDASSMFsZFFeDXF1 0s2gNc6iIGiMnb0xYG4H/8Kn3WP5ERBwEIo/tW6nGiMxABa+EIngwK9fDM0kdAldo3zKvjXah6rdr HhG992Z6HvcD4eFhaMVZccFD3buwLD1QJjzOlFc3LqE9A+kRowAPHiWh+yPLI5xROKo0hjwPocXSq 7RRzTAz3vQ3fhSkJ6LAXOPLuFdqPY6ByVsNIXXLHdQfFHe3lPzODZPiMjpkusSTWBCqXcFV7UJ6Gu vign5wfxXZ9zp9bmXZZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicTW-0002wy-6h; Tue, 09 Jun 2020 11:31:26 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jicT1-0002Va-NG for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2020 11:30:57 +0000 Received: by mail-wm1-x341.google.com with SMTP id f185so2755306wmf.3 for ; Tue, 09 Jun 2020 04:30:55 -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=bH/+slbZjQBA3mYlSc2q+05536qmkTvC1HCFI8ZmnIE=; b=FTaZexr38TGn3YldlZdOFciSIxmG1MkcO6rPSsRRK4OfWjR7a9gl0znAiEgoyR3yqb oTZdf4NyeLjorwZbZS+BzsoRhdFSkVyOE1jmVDzeRY0z+NiigUPSAB+vJonQsdyZhbJW m5pkDmKAQQTdWGczJtXE97kyNt8D2kTqi6e5kHFoxu7jciVPisI/tGL3iBgJLTlKD3/O nqrY1zAnQYjnvsPZkU2pP3U24LuTyyUpnX8fVPmclfVgMGNY0QN5LjKnsVK+3qY7UGRc cXGMUDfjqXuvWfc0gsiLHkriW9FNNFLjR4vkpcXbfLNi9JPj0GkkAMiY+JG596M8lnv/ T6+g== 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=bH/+slbZjQBA3mYlSc2q+05536qmkTvC1HCFI8ZmnIE=; b=pR1akvFfZXoLImH8kMis3n6nfJhDj13/2RVVxnt7W9N5CYRol0rx/vhlsM/eTrs3sD loYESi00gur2oxCXfkFNp0Wgz8ndal3RbYjK4tWm2YAFlwukEHHCP6SQJFup6lmYxCXL A0ACrNSH+Np2geNG5VbtkKh84TcNMD6Kh6+GPhVL//BasokgTqhddKgggCICmjmN/jIk fmJXf6D/seay8Oa5FGF9+7bBn6fSNNAMhR8+43rETs8ctLYwl9IzMf5PZPJWKifPpA+j YJFLWxbUn147IUOG8dbXExMyudTCZZCJx0SGyny0LEhZ4FeJpWsJAyvao3CNUqfh3r13 lEuQ== X-Gm-Message-State: AOAM530pzf1HH4aTaUs7aTeZq5vY9DbNS7kuF5Qu72S/8SJ6FFrDOLyX yY31FMFvxnzFGzP/7+9CzHE= X-Google-Smtp-Source: ABdhPJyb/putWPrIRSQ+MFJ+GR8f+CvA9NmKmGqs0c02IlxuemZcWgOwbIIuRScgxih6gY0m3eHiJw== X-Received: by 2002:a7b:c204:: with SMTP id x4mr3508031wmi.22.1591702254431; Tue, 09 Jun 2020 04:30:54 -0700 (PDT) Received: from skynet.lan (28.red-83-49-61.dynamicip.rima-tde.net. [83.49.61.28]) by smtp.gmail.com with ESMTPSA id l17sm2609877wmi.16.2020.06.09.04.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 04:30:53 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, julia.lawall@lip6.fr, f4bug@amsat.org, jonas.gorski@gmail.com, lkp@intel.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] clk: bcm63xx-gate: add BCM6318 support Date: Tue, 9 Jun 2020 13:30:49 +0200 Message-Id: <20200609113049.4035426-3-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200609113049.4035426-1-noltari@gmail.com> References: <20200609113049.4035426-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200609_043055_755553_88E91792 X-CRM114-Status: GOOD ( 11.07 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [noltari[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add support for the gated clock controllers found on the BCM6318. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli --- drivers/clk/bcm/clk-bcm63xx-gate.c | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/drivers/clk/bcm/clk-bcm63xx-gate.c b/drivers/clk/bcm/clk-bcm63xx-gate.c index 98e884957db8..12394c091d13 100644 --- a/drivers/clk/bcm/clk-bcm63xx-gate.c +++ b/drivers/clk/bcm/clk-bcm63xx-gate.c @@ -40,6 +40,48 @@ static const struct clk_bcm63xx_table_entry bcm3368_clocks[] = { { }, }; +static const struct clk_bcm63xx_table_entry bcm6318_clocks[] = { + { .name = "adsl_asb", .bit = 0, }, + { .name = "usb_asb", .bit = 1, }, + { .name = "mips_asb", .bit = 2, }, + { .name = "pcie_asb", .bit = 3, }, + { .name = "phymips_asb", .bit = 4, }, + { .name = "robosw_asb", .bit = 5, }, + { .name = "sar_asb", .bit = 6, }, + { .name = "sdr_asb", .bit = 7, }, + { .name = "swreg_asb", .bit = 8, }, + { .name = "periph_asb", .bit = 9, }, + { .name = "cpubus160", .bit = 10, }, + { .name = "adsl", .bit = 11, }, + { .name = "sar124", .bit = 12, }, + { .name = "mips", .bit = 13, .flags = CLK_IS_CRITICAL, }, + { .name = "pcie", .bit = 14, }, + { .name = "robosw250", .bit = 16, }, + { .name = "robosw025", .bit = 17, }, + { .name = "sdr", .bit = 19, .flags = CLK_IS_CRITICAL, }, + { .name = "usb", .bit = 20, }, + { .name = "hsspi", .bit = 25, }, + { .name = "pcie25", .bit = 27, }, + { .name = "phymips", .bit = 28, }, + { .name = "afe", .bit = 29, }, + { .name = "qproc", .bit = 30, }, + { }, +}; + +static const struct clk_bcm63xx_table_entry bcm6318_ubus_clocks[] = { + { .name = "adsl-ubus", .bit = 0, }, + { .name = "arb-ubus", .bit = 1, .flags = CLK_IS_CRITICAL, }, + { .name = "mips-ubus", .bit = 2, .flags = CLK_IS_CRITICAL, }, + { .name = "pcie-ubus", .bit = 3, }, + { .name = "periph-ubus", .bit = 4, .flags = CLK_IS_CRITICAL, }, + { .name = "phymips-ubus", .bit = 5, }, + { .name = "robosw-ubus", .bit = 6, }, + { .name = "sar-ubus", .bit = 7, }, + { .name = "sdr-ubus", .bit = 8, }, + { .name = "usb-ubus", .bit = 9, }, + { }, +}; + static const struct clk_bcm63xx_table_entry bcm6328_clocks[] = { { .name = "phy_mips", .bit = 0, }, { .name = "adsl_qproc", .bit = 1, }, @@ -217,6 +259,8 @@ static int clk_bcm63xx_remove(struct platform_device *pdev) static const struct of_device_id clk_bcm63xx_dt_ids[] = { { .compatible = "brcm,bcm3368-clocks", .data = &bcm3368_clocks, }, + { .compatible = "brcm,bcm6318-clocks", .data = &bcm6318_clocks, }, + { .compatible = "brcm,bcm6318-ubus-clocks", .data = &bcm6318_ubus_clocks, }, { .compatible = "brcm,bcm6328-clocks", .data = &bcm6328_clocks, }, { .compatible = "brcm,bcm6358-clocks", .data = &bcm6358_clocks, }, { .compatible = "brcm,bcm6362-clocks", .data = &bcm6362_clocks, },