Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp259791yba; Fri, 12 Apr 2019 03:03:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKTsZoRXwZZ15tYt1tH5v87wFGqHdET3MdhJnRfTrIJoyf0q5lbrERQxRzUVyFgk/VD5b1 X-Received: by 2002:a62:1795:: with SMTP id 143mr56541129pfx.104.1555063414627; Fri, 12 Apr 2019 03:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555063414; cv=none; d=google.com; s=arc-20160816; b=ej9jeSKRrJsTkP6kBeZxJfW9Ru9Cue0ZrXUNQ5xFBuGGkkY3OR8YKr7iu4ux3g1L+y qeT4fZdCDWgUTvsKNPyKcL1sVT35q/HqVb1JNLy59KT9rc71dsWO+GbZ/VLv1kXXnXd9 3vjV5XusMvmkXEPJ5xbBuah1uAhZn22O4T4EnPvcScQu4Xg2kJPqvc5AbpSRj3HjYqUh gJyx5DvML67BQlbO5woPXU/EWfapnUV/TIn9WNrIB+IrUhySy659O3ER6JTIE6pXIDS5 ZBE+JU6FpM7cD3vGXiF2XB3oV/TGmYJdyq6otYTF180qu15zh2J5e8GIiWTeDBknMals ZrPQ== 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=/7UXe2DQp/yMvOny3p/HegPYQz23AchTDS99VgInBWU=; b=V8pxvNGZu/+K3HQ4ThsS2qiOrnI8sw9pk4FTo5N5JSWx0Wo54ifcL42N/JRB/YUXKi 7uhbCIxCrc0O0U3vhNLBBF33UC6cmhu3vvRfvqTzH2Y2K/eueXqrw1PpoaUjXHWadFpx oQgfDV3h1Z04IrRU38Ge/RVo0GQQ5ejG9UiXQvkD0yQiwVs0IlkXulTVKX27pxMiUV6Y tM55wFf7zc/WRA7Dx+/bXeaNEHof0u/8/7vcUK0mTej5BUvls/F+auPOCZa06Uv24HHk XJbqEluQUZZE/G3XVn+BtRmFhstOVLHGNOVQMUmaeM/AL9YJbss6uiwbBPMVAvYGDJqy 1a1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=CuriOZMv; 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 8si34523751pfx.43.2019.04.12.03.03.15; Fri, 12 Apr 2019 03:03:34 -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=CuriOZMv; 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 S1727084AbfDLKC3 (ORCPT + 99 others); Fri, 12 Apr 2019 06:02:29 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44791 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbfDLKC2 (ORCPT ); Fri, 12 Apr 2019 06:02:28 -0400 Received: by mail-wr1-f67.google.com with SMTP id y7so11128856wrn.11 for ; Fri, 12 Apr 2019 03:02:26 -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=/7UXe2DQp/yMvOny3p/HegPYQz23AchTDS99VgInBWU=; b=CuriOZMvLZu6W5D0eoLTC8FoMZJ0zKbd+M0jAoDyAEqzbJn4eHScWYTnqr3qMAl+cr nSA21A3498huru6/8evhz+PrG89PYx3JJnkjfV1zSzj95EwZHpR9kWlPFAJuT5QqKjWM rFN4jH+2B11jUCrJKBC9May6Ol7HA3M1QsHJplEzERBg0FL9pKZlrF354tFBfndSSCmU Jki66MQkVLdcRLbevlSB/w7Sh4NywcDzhnadGujKZc/B3bLvNsJ2GhCjaMolR2QBNO4J k5KDn0F0VqlFrBvGiKvmkD7SDAJIDN9761cJmHzmj8EorNUH7NKFAeYaoCsAzpeQl+2G mtRQ== 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=/7UXe2DQp/yMvOny3p/HegPYQz23AchTDS99VgInBWU=; b=I5+NaXh13zrAsgpVL0YDMqUDDdTrY+6/S0ZnVUOHzKdbfzfuhSGQ28CE4Wx68Ez2bU DpuOTyL6b1jB4taliUhdUXZJNtM61IkyQM32eZcu5CIXA0TSCyPo0M/lFLgVA9rWzlF1 ksTt1GyzbaIYBQi7wTfiAFOio4qCqLbuq8RDe36PursEvZeNL0EAMT7bviBLswFJUaL3 44ffyfUlv2GBjcaMMXllRpLy+ibYJV06yIpadaqxyVxCwa2B4QAJFdzoFq2+Tm9GbGN9 fUI/XH4kL1hV81ydVX8lB/zYU5iW2W0eZC84Tprgvm80MKBquxLXvWZ0Rl9DhYheRaS3 OeRg== X-Gm-Message-State: APjAAAUzaAp60CIipq46V+SI1w8grobiReMtcFsOsaTDUdFLVpNedyRj OeXNgnreiOjX8epLkki8MAw9WUouiuU= X-Received: by 2002:a5d:4a4f:: with SMTP id v15mr24909809wrs.5.1555063345983; Fri, 12 Apr 2019 03:02:25 -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 t14sm5961031wmi.16.2019.04.12.03.02.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 03:02:24 -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 v3 2/2] clk: meson-g12a: Add Temperature Sensor clock Date: Fri, 12 Apr 2019 12:02:21 +0200 Message-Id: <20190412100221.26740-3-glaroque@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190412100221.26740-1-glaroque@baylibre.com> References: <20190412100221.26740-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 86a7c1b5bd42..0a1cf782670b 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -2480,6 +2480,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 = 8, + }, + .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); @@ -2769,6 +2796,8 @@ static struct clk_hw_onecell_data g12a_hw_onecell_data = { [CLKID_VDEC_HEVCF_SEL] = &g12a_vdec_hevcf_sel.hw, [CLKID_VDEC_HEVCF_DIV] = &g12a_vdec_hevcf_div.hw, [CLKID_VDEC_HEVCF] = &g12a_vdec_hevcf.hw, + [CLKID_TS_DIV] = &g12a_ts_div.hw, + [CLKID_TS] = &g12a_ts.hw, [NR_CLKS] = NULL, }, .num = NR_CLKS, @@ -2966,6 +2995,8 @@ static struct clk_regmap *const g12a_clk_regmaps[] = { &g12a_vdec_hevcf_sel, &g12a_vdec_hevcf_div, &g12a_vdec_hevcf, + &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 39c41af70804..877b8d205f12 100644 --- a/drivers/clk/meson/g12a.h +++ b/drivers/clk/meson/g12a.h @@ -195,8 +195,9 @@ #define CLKID_VDEC_HEVC_DIV 206 #define CLKID_VDEC_HEVCF_SEL 208 #define CLKID_VDEC_HEVCF_DIV 209 +#define CLKID_TS_DIV 211 -#define NR_CLKS 211 +#define NR_CLKS 213 /* include the CLKIDs that have been made part of the DT binding */ #include -- 2.17.1