From patchwork Fri Apr 12 10:02:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LA ROQUE X-Patchwork-Id: 10897815 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 D96E617E1 for ; Fri, 12 Apr 2019 10:02:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6F86287D4 for ; Fri, 12 Apr 2019 10:02:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB45628C78; Fri, 12 Apr 2019 10:02:44 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 67200287D4 for ; Fri, 12 Apr 2019 10:02:44 +0000 (UTC) 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lLv3sB5ieWIsbzHaczRbNE+/2o1jqko4lspIF2mOGts=; b=R/KW2NlN0SabyX HyqI0x9bCFNRjsLh6QKbYFxAM7Xn+9Hbdj8jtJ4tqOJd68XUJNd0Tf8qhNQyHmzuei0StP0SNkBd7 kXma79YypQV5Dg98wLk/F0Uz+jQfacu2L3ICDRRG/mljYUaxhiouhvun1tlfZ6DloHYkF54RQb5LN uo8BuE5t5MfTG/D8ue1gRtIIq1utfPsYjt63+GZ4IzGQwwciqqo0TOGi/Qh/XDlGSJOpDzRwhHr+O xukZKNSY3kC0n7cy9I7r2Ub25jd2FhFjasF0IEs4+WvQHlI0aDslVPle6Q+XzrZc5oRYlsIPx3DOc FR9xpeV2jxwGXEeQRuTA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEt18-0007tz-UK; Fri, 12 Apr 2019 10:02:42 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEt0r-0007YD-TY for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2019 10:02:28 +0000 Received: by mail-wr1-x444.google.com with SMTP id q1so11203798wrp.0 for ; Fri, 12 Apr 2019 03:02:25 -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=9Zs17V+7Q5Y7LncnLItMZNJBDJdxDInYfDwePk9CLOc=; b=I32dt88pUCKmVfIQ4jJMEa9xBqnSBOBOeNqfWUDRJa/j6GZUkxFyZvD3pBnYWuTMzX nubpzsMSx/QKv9dakvSn4GqzLt8lamlpxDKvxLm/Me/4mZme7+u49mai3Imm+201EvhI y7tJ1Cg0A8k3+JZ2LCpYOBWyw5YbS0pue17Bc+JP2LJtIs2VcIRcIHEhHBTvDygJVM6d w0Vo5bKZ1qtCVGYK9L1hoVbQzn+8L/V2klZ/3XjsrkLwR3B1TtwXO2/syt5uRD+BRqFX WPDqB1Y8gTo+fwW0Fc3BLruvJXuDuhcRjkoKrNGhRLVSEV0l6tvEDDnzIqCd8IfPJkjC PnDQ== 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=9Zs17V+7Q5Y7LncnLItMZNJBDJdxDInYfDwePk9CLOc=; b=FYgojpsaEjYuD3QzVpvwvbZ8SkJ3h5TH44siN9HCF8O9oCbwlB2m0Ljcl/OU1SvrGh T6Jho1vt9UlIu7B4yC48iMbrJkDbc32dMKEOPzU6LPEIJ7jTLYxWFsBaNXnev3llLEBf LK391w6Mx/5oj2PibdPWdnjZoQHgKTXr0HHGZPwGqSE+COZOR4WL9LjY4h45AClgAPiI lMyOcTTNoNFMM0Qp29idnLShMCy/cHGpw+Wm76jeTjHrUGhJ/V99c4+zMsPcHs+KFxlw Y/Wtd8cOJcQIbFnnzqJEKeykyXfUvHfBxxGbUgiOvPBzkbVVyu+xBEqNa9usrzNqEiSU PFJw== X-Gm-Message-State: APjAAAVG+6j3LlE9D7oP61KgXnE1qLnnM/dH4Kca20IkyIGIKosmGzdS sBdZTr25M8qd5vDLQzvOmy9v5g== X-Google-Smtp-Source: APXvYqyg3+xxim/zUet/g4yD/5T6+z7+B+1j6pkHJ3bnUx1OXbz9NTSoaPB+PYUcyQjlE8SJpG4YCQ== X-Received: by 2002:adf:cd92:: with SMTP id q18mr35745079wrj.134.1555063344334; Fri, 12 Apr 2019 03:02:24 -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.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 03:02:23 -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 1/2] dt-bindings: clk: g12a-clkc: add Temperature Sensor clock ID Date: Fri, 12 Apr 2019 12:02:20 +0200 Message-Id: <20190412100221.26740-2-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_030225_963146_5EB699DF X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add clock id used by temperature sensor for G12A Socs Signed-off-by: Guillaume La Roque Reviewed-by: Martin Blumenstingl Acked-by: Rob Herring --- include/dt-bindings/clock/g12a-clkc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h index 82c9e0c020b2..cfda463091b7 100644 --- a/include/dt-bindings/clock/g12a-clkc.h +++ b/include/dt-bindings/clock/g12a-clkc.h @@ -136,5 +136,6 @@ #define CLKID_VDEC_1 204 #define CLKID_VDEC_HEVC 207 #define CLKID_VDEC_HEVCF 210 +#define CLKID_TS 212 #endif /* __G12A_CLKC_H */ From patchwork Fri Apr 12 10:02:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LA ROQUE X-Patchwork-Id: 10897819 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 1B4FC17E0 for ; Fri, 12 Apr 2019 10:02:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED768287D4 for ; Fri, 12 Apr 2019 10:02:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCC2A28C78; Fri, 12 Apr 2019 10:02:53 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D7F6287D4 for ; Fri, 12 Apr 2019 10:02:53 +0000 (UTC) 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QYwI4F8Dr/9O6W0PL3Ms93FGdaonzBt6cMTeR6aivsU=; b=MW9vmLjI91s5bu STOBygAhxq+CpMF0j4Qb7J8wraOGLIyRhOf+cMRwtc9DwH+oleqDdiaODA2d3ftotiMyDr3jjFb1Y tjBvF3h/GWouY9XFRet3aYJwHjCok6tmFXc+WM5OrHVHuUcQFnZk7ZkbDSY1FdC42eTqoN3vzxBAV TtcECnKQnt9ptY3IGdQON50CCWsmL+Vybec1YeLp+h+XghACzdaitMU54DXh4X+AYqhSNw5f2LDdQ xBbSijyDb2NXCLxAotYZzXHMjPEt0c1sJt/8oRMqHhtRAP7WlG/rUAU4eUPCVZkgC/0pHStq1jnTo xlmB0yFra33iFf+bgS+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEt1I-00083S-2a; Fri, 12 Apr 2019 10:02:52 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEt0t-0007Zx-6l for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2019 10:02:28 +0000 Received: by mail-wr1-x444.google.com with SMTP id k11so11169397wro.5 for ; Fri, 12 Apr 2019 03:02:27 -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=A0tB5wJ56eiyoGEmIaA2+8N3Wo61X5acAHjfpRoDAhWJQn3BZe0sILJtdnOmM6V1mu r7dG553GC3Z7k4Ax7kzxvOylpDzc1RBDmKV4t45fcbngCLe+mCAJvs36I3Frtg9BJH2u OLLi+aJzey8FrBqEYFGMT1SrD7GPoQkhzWQ9mco5d8Q0UbsLMtErXMuSH6HwP2vi0bQ0 vpJ0apk2sSrj20nRVXHfGrLHGcZycAd7UO2EgsStJllqj5viQ0gwAOppJXXa5Q1V46bY 3bbr7HpmEuQfGWot5o/hYgIrZmQrSLpfLj5yGuAzsku7Wrx8QhEAhx1mwY80qXftO0PO Ev4g== X-Gm-Message-State: APjAAAU9KKVHLtnf7QDuDh1IIbCZYQxrjsl3NsMPawAxlCNy7f+50xcu sjHdbrK9xj/fNEgS/tJHuN1vdA== X-Google-Smtp-Source: APXvYqyXe/x7KxLnFH96TFnOajXc5ljmtO4D8GhNtWC1yk24LarkgfUMteurHFq/GwhD8VRy650O0Q== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_030227_397465_6B2EC77C X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add TS clock used by two temperature sensor Signed-off-by: Guillaume La Roque Reviewed-by: Martin Blumenstingl --- 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