Received: by 10.223.185.116 with SMTP id b49csp6531266wrg; Thu, 8 Mar 2018 08:56:56 -0800 (PST) X-Google-Smtp-Source: AG47ELv3OLo72aE0wiRTkyTXtT9pSzixJCs35dtqi7DNgncAfePeGoUateJnTSQSeHdc4e3FEthr X-Received: by 10.98.249.10 with SMTP id o10mr26885091pfh.222.1520528216229; Thu, 08 Mar 2018 08:56:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520528216; cv=none; d=google.com; s=arc-20160816; b=NNMfC6i7BMN2yCtJsCMOdY72h3HX0ooD5lNKEwS5WUufyxDYHHndztlQSZIWZ6yOUr aZJXreDs3w1Pabq81jWY5JRwTb18RoaISJk0WohMSqNBmQicugz61VSk50X/XA6RHBhR sBwcyvOFWRSKV8EzzJ3VGXU+4XcMyQmrBvzV5/jYi9qx0GkS80UXaBRTTGybzKt5Wzeu 1ccwqRrYIBgCjV6TZu/fNmQaE98I4l1UGA/4MEdboZGSi18ciZAFnK38STCuIkZNnygm 14a4quyKOCPCYeNKp3x/RsfbISOp5wDrCHzrBmvJzX+Fa3wp0JqdVunhc5Xic3veIgND NPmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=BKrCdg2Cv6AWwSXcmfPctF4Ou/PW6Uaa++tlElds3ZQ=; b=RVpVpVLKpltliA7G+0FucnzIaGadDQlHygQiHqk1pSe4hXlEFFDrXLfXWClZbj6XgI NQQ3fc3baeGp6fEX3pAwDH4uiuStVtWAdJvEfThEie+c8jquNzmB8PPqyPKBEo0mIrCw K+MlQm5DOiNoyvUVoCx8M6EIJ8c7UMzoYKCxkmnKZwkke0Wj9M6VKZcxgA/SYXmF8y3s GnZ7KTR1A7eAzlZh7qN1dD0HniHth0RhglwASLZLg7jz7HS6gDRQ8qcPC6h3EPAUxjNj GFz+/J98G6BapriG8HflVLVhkb1nYH1SD3fOnDcvxoO5sWKf/w29bmCy35sNFRp8P5nD /Tfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5-v6si15368223plk.390.2018.03.08.08.56.41; Thu, 08 Mar 2018 08:56:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935900AbeCHQy4 (ORCPT + 99 others); Thu, 8 Mar 2018 11:54:56 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:13443 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932076AbeCHQyv (ORCPT ); Thu, 8 Mar 2018 11:54:51 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w28GsFf1000545; Thu, 8 Mar 2018 17:54:25 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2gk83mra1y-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 08 Mar 2018 17:54:25 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 82AE241; Thu, 8 Mar 2018 16:54:24 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag4node2.st.com [10.75.127.11]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 68D885093; Thu, 8 Mar 2018 16:54:24 +0000 (GMT) Received: from localhost (10.75.127.45) by SFHDAG4NODE2.st.com (10.75.127.11) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 8 Mar 2018 17:54:23 +0100 From: To: , Rob Herring , Mark Rutland , Lee Jones , Maxime Coquelin , Alexandre Torgue , Michael Turquette , Stephen Boyd , Gabriel Fernandez CC: , , , , , , Loic PALLARDY , benjamin GAIGNARD Subject: [PATCH v2 10/12] clk: stm32mp1: add RTC clock Date: Thu, 8 Mar 2018 17:54:03 +0100 Message-ID: <1520528045-18330-11-git-send-email-gabriel.fernandez@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520528045-18330-1-git-send-email-gabriel.fernandez@st.com> References: <1520528045-18330-1-git-send-email-gabriel.fernandez@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG4NODE2.st.com (10.75.127.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-08_09:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gabriel Fernandez This patch adds the RTC clock. Signed-off-by: Gabriel Fernandez --- drivers/clk/clk-stm32mp1.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c index b5379a2..51e3e76 100644 --- a/drivers/clk/clk-stm32mp1.c +++ b/drivers/clk/clk-stm32mp1.c @@ -248,6 +248,10 @@ "ck_dsi_phy", "pll4_p" }; +static const char * const rtc_src[] = { + "off", "ck_lse", "ck_lsi", "ck_hse_rtc" +}; + static const struct clk_div_table axi_div_table[] = { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 4 }, { 4, 4 }, { 5, 4 }, { 6, 4 }, { 7, 4 }, @@ -1945,6 +1949,17 @@ enum { _NO_GATE, _MMUX(M_ETHCK), _DIV(RCC_ETHCKSELR, 4, 4, CLK_DIVIDER_ALLOW_ZERO, NULL)), + + /* RTC clock */ + DIV(NO_ID, "ck_hse_rtc", "ck_hse", 0, RCC_RTCDIVR, 0, 7, + CLK_DIVIDER_ALLOW_ZERO), + + COMPOSITE(RTC, "ck_rtc", rtc_src, CLK_OPS_PARENT_ENABLE | + CLK_SET_RATE_PARENT, + _GATE(RCC_BDCR, 20, 0), + _MUX(RCC_BDCR, 16, 2, 0), + _NO_DIV), + }; struct stm32_clock_match_data { -- 1.9.1