Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5612878yba; Thu, 11 Apr 2019 01:48:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFgpVk/Vn+JYQZdFIH0GLGmtU7UraQlBzAFuEJ1O7Q9qfJx54fOJ1xz6ghByz9WEtfS8U9 X-Received: by 2002:a62:6f47:: with SMTP id k68mr32394849pfc.196.1554972482792; Thu, 11 Apr 2019 01:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554972482; cv=none; d=google.com; s=arc-20160816; b=rL6lZxZqvbOfvgfaU4MMUBVOO7cwYnfYomhYoJ6fDxr78kDFSJMp7pBkn8CjhDXi6C F5flgoQsi85XzqLwKG8lm29k1hSFS0ZguoqsEXtibBvM+wXpaCynQwz3EpybfONw/ik5 L5alBLTD8NaJvoq5e/NPvp+D8l7LMLQQhbEtiJgOaQR5Rzj0h7epYNHsExnknApKtIap QSNGH5d8N3jjC2TKddFnO71ZVNhItDABszE/R6alaDJ8WViq7YSC5SWXDSpRCYmoj0Lm kdWhhX6wSbGJ7hmgSgm2Re9yjqTHjHzkfQqhghw+7NlW5O1nMEt3iYtrzWmh7XLAiAmm 2eDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=uZ7qqews2O7XucznXFEO2bWGmRBz91rjfUznQYaR+AU=; b=iUWQz/vfaP2dZA5yUw6sskH7tReSUiZ/vYALVXyudY869uxRy1Xsgss2AbLqr54PsB 7A9l3Yxoe3eb875XSLbITN5Lyi3LPFPAyc041isZzXlcCwx+gAL+MZ2SjxkXeriCBrKF 1vU25SQA1iu1xcFX6rW42XQPEHrT5WGGcrA0nRj/rUGUFNTV0a9vMrW6JW1vLfjEsA/4 vBu7xMj8ELFRLCG1JJcBG1lLSRfb224UJGZAc3Kqp2p8hC9iPUOUO4SjBG4OTUXkQ5RF z2XafXWVG/khX1YHr/gWmuUKWt+4QhHhWlN7weC4URRJNEQoOFw+krBv6KAfcrTd4hvh deYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="hcXgs/Us"; 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 d6si35254931pfh.177.2019.04.11.01.47.47; Thu, 11 Apr 2019 01:48:02 -0700 (PDT) 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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="hcXgs/Us"; 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 S1727034AbfDKIpq (ORCPT + 99 others); Thu, 11 Apr 2019 04:45:46 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38806 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbfDKIpn (ORCPT ); Thu, 11 Apr 2019 04:45:43 -0400 Received: by mail-wr1-f66.google.com with SMTP id k11so6191942wro.5 for ; Thu, 11 Apr 2019 01:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=uZ7qqews2O7XucznXFEO2bWGmRBz91rjfUznQYaR+AU=; b=hcXgs/Us2i1LqiCpownxWKZxx3I0JEedLl7VZ0y48hDAtgCzhSb/I09gP2H4m0nw+2 NkpeFsk6niKChc3wbjXiDxYbI3w7HWN5i29s+9bKj7sn/U92jLTk6//qc/bm2J7TNmF9 mL5/HIgHEf8+p/rGagIfcVnuJmHOu2UfS2ryG490lGsCXjEzTqvouiIKdhdfmt8YGbiB iz5H9O+HJ85SpBaqRE5iLArDPmjVycGOY5jw0YNvwGjF43lp5LlY2CWozbKlX7tzU+LG 7vLeBoNpBS8I39/RZJQ1oGJJ+nGf+N4g7jBtAI5ZMwYgcicuJuogiejVD/LURDOIk0Fd F7/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:subject:date:message-id:in-reply-to :references; bh=uZ7qqews2O7XucznXFEO2bWGmRBz91rjfUznQYaR+AU=; b=UnLSP9QI8PQgy8W1mgfK7d3X8la9pSjtDA/MMaA5QjmMYoZT0zulYcoXO1pbRawKcT XaWn4mEB5ev5TA8Dw4zHT4QKvbi4fZgfYshVtR4gY1rBNpjRjEoyRqP4rgwZHCAp4msk CazyYrKyLadAe/U4iyAlyFnVC/FWfDC0MyEXmtiZi8lxN8O27HqX5UYH568VbqRdTme7 7PHXLgaFafCGuxx/IWAESe91NdRAcjPlPYsLyLQ3OP+fiDO9QBbhAXIfMS6xDmxhqkdu pvlZgzW3vA2kdyXYEkF8bbyacK5eHI1vIoI8FphlrhHWyFxl3b51pUpQtbXgrygB660C rxkg== X-Gm-Message-State: APjAAAXBWNOdp9qfAyXW9l88ivmoeHbQxVNeu7y8AvgA0i4takwKqmdI gIrVS9C3kwV47+JxfG6febEiqg== X-Received: by 2002:a5d:660c:: with SMTP id n12mr30498225wru.160.1554972341885; Thu, 11 Apr 2019 01:45:41 -0700 (PDT) Received: from glaroque-ThinkPad-T480.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id 7sm128602876wrc.81.2019.04.11.01.45.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 01:45:41 -0700 (PDT) From: Guillaume La Roque To: jbrunet@baylibre.com, narmstrong@baylibre.com, khilman@baylibre.com, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/2] clk: meson-g12a: Add Temperature Sensor clock Date: Thu, 11 Apr 2019 10:45:37 +0200 Message-Id: <20190411084537.30299-3-glaroque@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190411084537.30299-1-glaroque@baylibre.com> References: <20190411084537.30299-1-glaroque@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add TS clock used by two temperature sensor Signed-off-by: Guillaume La Roque --- drivers/clk/meson/g12a.c | 31 +++++++++++++++++++++++++++++++ drivers/clk/meson/g12a.h | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index 3a3134976534..e6d2af6ee8ea 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -2335,6 +2335,33 @@ static struct clk_regmap g12a_mali = { }, }; +static struct clk_regmap g12a_ts_div = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_TS_CLK_CNTL, + .shift = 0, + .width = 7, + }, + .hw.init = &(struct clk_init_data){ + .name = "ts_div", + .ops = &clk_regmap_divider_ro_ops, + .parent_names = (const char *[]){ "xtal" }, + .num_parents = 1, + }, +}; + +static struct clk_regmap g12a_ts = { + .data = &(struct clk_regmap_gate_data){ + .offset = HHI_TS_CLK_CNTL, + .bit_idx = 8, + }, + .hw.init = &(struct clk_init_data){ + .name = "ts", + .ops = &clk_regmap_gate_ops, + .parent_names = (const char *[]){ "ts_div" }, + .num_parents = 1, + }, +}; + /* Everything Else (EE) domain gates */ static MESON_GATE(g12a_ddr, HHI_GCLK_MPEG0, 0); static MESON_GATE(g12a_dos, HHI_GCLK_MPEG0, 1); @@ -2615,6 +2642,8 @@ static struct clk_hw_onecell_data g12a_hw_onecell_data = { [CLKID_PCIE_PLL_DCO_DIV2] = &g12a_pcie_pll_dco_div2.hw, [CLKID_PCIE_PLL_OD] = &g12a_pcie_pll_od.hw, [CLKID_PCIE_PLL] = &g12a_pcie_pll.hw, + [CLKID_TS_DIV] = &g12a_ts_div.hw, + [CLKID_TS] = &g12a_ts.hw, [NR_CLKS] = NULL, }, .num = NR_CLKS, @@ -2803,6 +2832,8 @@ static struct clk_regmap *const g12a_clk_regmaps[] = { &g12a_cpu_clk_trace, &g12a_pcie_pll_od, &g12a_pcie_pll_dco, + &g12a_ts_div, + &g12a_ts, }; static const struct meson_eeclkc_data g12a_clkc_data = { diff --git a/drivers/clk/meson/g12a.h b/drivers/clk/meson/g12a.h index 1393a09730a6..5633c72e432d 100644 --- a/drivers/clk/meson/g12a.h +++ b/drivers/clk/meson/g12a.h @@ -189,8 +189,9 @@ #define CLKID_PCIE_PLL_DCO 198 #define CLKID_PCIE_PLL_DCO_DIV2 199 #define CLKID_PCIE_PLL_OD 200 +#define CLKID_TS_DIV 202 -#define NR_CLKS 202 +#define NR_CLKS 204 /* include the CLKIDs that have been made part of the DT binding */ #include -- 2.17.1