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: 10897813 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 242C517E0 for ; Fri, 12 Apr 2019 10:02:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F294A287D4 for ; Fri, 12 Apr 2019 10:02:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6D3728C78; Fri, 12 Apr 2019 10:02:41 +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 2B4FC28913 for ; Fri, 12 Apr 2019 10:02:38 +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=+CbZ4rZ2LKGRovZ6B360DeYjTPXAiHvwkhMgk4onoW0=; b=i9z2hjlVyD5fg6 epmijrsT/JgW3O3LVr9Z8EAZRSCC3SejGILoPuNGBz+9hfHloaNcUUvGOBw6ex04UTBUhrbcGw5vf bqvruPePzS+SHtghjhbI/BwfQOophKF3JwnY3SnXW0dAFgYCfEYQTlAlu7W3x+dngU0fyKhYzdef5 EZLA7waScqZ1Ay9fBaSo8bAwKRSP3+WIgPN2sCk8hcHMCLR5SxO5h3b5kFdo4VXj9wD0h87feeAJL Jc3yFtfKT8rO9uvnZGS5tflzI0rOqLu/YZSsgv7ct3xjB0pzfNAEzxBj2RPrWZnXXbLOxEs0m4bLl 1c3UDDG4ls4TCKTgYGwA==; 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 1hEt12-0007ml-Rc; Fri, 12 Apr 2019 10:02:36 +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-0007YE-TT for linux-amlogic@lists.infradead.org; Fri, 12 Apr 2019 10:02:28 +0000 Received: by mail-wr1-x444.google.com with SMTP id p10so11188846wrq.1 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=s84Wq+JiPXpYJXLphJTTNlH0grtd0SLpMpBNCnRrGZz1kG+PkEOCQVRoEZ19594VNt gagUkB+MgQtp46pQP8T+RofBWqlGqyjbIWjoIwGHHvNufFciTjiMxqZZVe9LZHwVXgc2 lWsrWOJWFWaUhEoTlKbBZRerr6je2Bo+1HbHJfreNV4hbxxFYVP3xGQh8dE4Da2ruGOd 522NOih2/f+0QSB7tIArjjuSvtos0d0QV4vXzMygMDPWzzA9mmOZyKLcsc+pqBRZQLi0 Y71MZ78k9i687cabrUc00E940Smpd0zfokXoHpaywvtGEKEY3lHZKuP2Rad1qw6s/MQY EAJA== X-Gm-Message-State: APjAAAXI4MgqvTWq1Wpzw4iuRwkz6wO46WKeVqBwKXcHnFIHD9s3FOEQ o3AHYKwbMyuJdzLGq9wCOmTjbA== 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_946928_CC86E934 X-CRM114-Status: UNSURE ( 8.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=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: 10897821 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 EF35117E0 for ; Fri, 12 Apr 2019 10:03:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCD8E287D4 for ; Fri, 12 Apr 2019 10:03:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C156D28C78; Fri, 12 Apr 2019 10:03:02 +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 620D8287D4 for ; Fri, 12 Apr 2019 10:03:02 +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=/+N5EDZIyZYFSqtaAdBquS7eeaDjZ9KAUwWvB72tLv4=; b=lfyqoGP+NckE9S KLXBr7Ja7FiUC+b/ym6E7rRCm1d9DWDziWkXVyn7JZtxCdsFmLpRtzfMFxE0xTIt9l1CSmCnFRpqo os/BXCblJGGBFxXDBAbqoa6JUnAMDk+FfCUn3VXe4KwstF44KLur63v7CYUfXKvZl6XQZCLctVcGX EIwM5i0U5coy7iIkQM6s3ZvlhXrNYQzmV2qh1vPy4XIpME5rLd9vaHvzKEz7CFyKtM3RNVRWvf5CX 2WnKCjD7e2MbgpMl5lh3HUZdrvISqZcHIqNlKsIuZQLN5r+YSwwL35enaNesfEeIdSBUpT+JoS9s3 ml8fWr5birqxIqtqtTaQ==; 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 1hEt1Q-0008HP-KH; Fri, 12 Apr 2019 10:03:00 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEt0t-0007Zw-9y for linux-amlogic@lists.infradead.org; Fri, 12 Apr 2019 10:02:28 +0000 Received: by mail-wr1-x442.google.com with SMTP id r4so11123508wrq.8 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=RsOw5BTDXTQZ1aA2xYdM+WUOJt7PwkNGi6BbcZEtvWzUqrnSKAET4WgRB0llPVAzCe d4eROhdrASSjuMY+juElKT1j7uFqOj0uLKElXqrwVIdRrkVcvXgDeLOkStbhhHD99cgM wWW5J2m8ixu8usjooIGSWmL8pfu0gXy2pJjIJ93gdPSovUw/LDy0em+SDfODBcyaqyDZ /6mcfHdp1XJ4V27kybMf1PfWUmu25HyWL+S0Ylgs/9CxMdXw1D0vGJTyc64bYelsDImK nWC+2jR+rMP71aKS2Kd30xv1EMhUzsgl35AVohtq/BiCDOhKnDGY6yDxWefNNzxAeEnF zGuQ== X-Gm-Message-State: APjAAAVMIJYemWxZMGTY5HV9kPkLiiEDM5Tp+i2UnknHR9jj/57PCSp+ WU5cVPjf0T0GGZzttkKQOS/7jQ== 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_393261_48954913 X-CRM114-Status: GOOD ( 10.48 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=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