From patchwork Sun Aug 18 16:23:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11099669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CEAC818A6 for ; Sun, 18 Aug 2019 16:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA0DC28455 for ; Sun, 18 Aug 2019 16:24:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADAD0286B8; Sun, 18 Aug 2019 16:24:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2956E286B3 for ; Sun, 18 Aug 2019 16:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726089AbfHRQYW (ORCPT ); Sun, 18 Aug 2019 12:24:22 -0400 Received: from mout.gmx.net ([212.227.15.18]:52027 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726097AbfHRQYW (ORCPT ); Sun, 18 Aug 2019 12:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1566145453; bh=IM5UxVrBLP5hF/1d1ZFHRD2GqKmi/z5awy9hXKawSn0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=VJQRqdVGHgbBsll1Q6/ZxhVx4LMhKHwxogARlRTqPT6fvTAQNtl9wsNYetEmiH/rP P7i0TWzXvcbhTSA6O4JRjfY3w0i6OIddUJ0hs3jwU3P2XW9g1Nm1EFD+t2e9lBCMSu K7FTt0AS+IR514jkzbxSDcpyfK+09lPuIqIjZ/TQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.106]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LiDrv-1idL9r45ul-00nOkz; Sun, 18 Aug 2019 18:24:13 +0200 From: Stefan Wahren To: Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden , Rob Herring , Mark Rutland , Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, Stefan Wahren Subject: [PATCH 3/4] clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support Date: Sun, 18 Aug 2019 18:23:43 +0200 Message-Id: <1566145424-3186-4-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566145424-3186-1-git-send-email-wahrenst@gmx.net> References: <1566145424-3186-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:3ix2WU/9XnteCrpqo9GRNBYCbCi4Wfo4+blR26+ik5fMozdrR6M IghvLQO/EwpzWfdg9kKXg2hsd3BK+ZoToDC0ZpJYldJ/xLjeZ8BJSK/nK+oDAJHpWo56YW9 RyrSQLY7JZsEIzW6TnBFCZ+ZUbiYE8Iqdzd2YiiagIiwCRWHF1k/yYMT7X6bcjZ9Cs0Xapz yjF5mlpWix3xuvMimQqhw== X-UI-Out-Filterresults: notjunk:1;V03:K0:7CXaunGzrZ4=:Egj7MudH8uxFdxWABY4fA7 AhhP/oquYGzDWVx+MzIW4sjt96cAt6IvJ3v4lge5brB2XY7Ongklh7dktv1BuA/wu6Q4Yex2u 5Clq1mLb5PgyEsltJsKbHG95mPSrYs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Otz aeqxQNKqE742PAxTNWkJo49/geXMtnJ1UlIQxykMOYbPNNOQ== Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The new BCM2711 supports an additional clock for the emmc2 block. So add a new compatible and register this clock only for BCM2711. Signed-off-by: Stefan Wahren Reviewed-by: Matthias Brugger Acked-by: Eric Anholt Reviewed-by: Eric Anholt --- drivers/clk/bcm/clk-bcm2835.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 21cd952..fdf672a 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -114,6 +114,8 @@ #define CM_AVEODIV 0x1bc #define CM_EMMCCTL 0x1c0 #define CM_EMMCDIV 0x1c4 +#define CM_EMMC2CTL 0x1d0 +#define CM_EMMC2DIV 0x1d4 /* General bits for the CM_*CTL regs */ # define CM_ENABLE BIT(4) @@ -290,7 +292,8 @@ #define BCM2835_MAX_FB_RATE 1750000000u #define SOC_BCM2835 BIT(0) -#define SOC_ALL (SOC_BCM2835) +#define SOC_BCM2711 BIT(1) +#define SOC_ALL (SOC_BCM2835 | SOC_BCM2711) /* * Names of clocks used within the driver that need to be replaced @@ -2003,6 +2006,16 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { .frac_bits = 8, .tcnt_mux = 39), + /* EMMC2 clock (only available for BCM2711) */ + [BCM2711_CLOCK_EMMC2] = REGISTER_PER_CLK( + SOC_BCM2711, + .name = "emmc2", + .ctl_reg = CM_EMMC2CTL, + .div_reg = CM_EMMC2DIV, + .int_bits = 4, + .frac_bits = 8, + .tcnt_mux = 42), + /* General purpose (GPIO) clocks */ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( SOC_ALL, @@ -2238,8 +2251,13 @@ static const struct cprman_plat_data cprman_bcm2835_plat_data = { .soc = SOC_BCM2835, }; +static const struct cprman_plat_data cprman_bcm2711_plat_data = { + .soc = SOC_BCM2711, +}; + static const struct of_device_id bcm2835_clk_of_match[] = { { .compatible = "brcm,bcm2835-cprman", .data = &cprman_bcm2835_plat_data }, + { .compatible = "brcm,bcm2711-cprman", .data = &cprman_bcm2711_plat_data }, {} }; MODULE_DEVICE_TABLE(of, bcm2835_clk_of_match);