Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp328951img; Wed, 20 Mar 2019 01:19:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwf9v5dKuFNrKO/VLgtgZLQhTPmukD81UVwvqwwQifGOdvrObVKSQXj0F0MiIMt1sYiaxNo X-Received: by 2002:a17:902:b416:: with SMTP id x22mr6758447plr.285.1553069987725; Wed, 20 Mar 2019 01:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553069987; cv=none; d=google.com; s=arc-20160816; b=jo0q7uU4r6DPCFV752C85FrP7kr+xJ7cdIJ5oZsIV2sK1b2Y1wAXNNKuCIwVKpgEd7 VGz+45JDiWSNEkVlca1EUREo93FZDLtOqNS2i9PAzX7LiF+GIFPqmEu7SAGy4eqPNu0d te8foWMog/67OrDpt6NjwTaelZHY86LUJuhtAdwbdjhtXfBoNAt/eHsBTXAjQWZeK8LK Sg6unRvaV1JqUAHwKojZkC9MuZsCXVDCdRCJ3tS3buFEUc4CFvD27nQmhDIaxHUIgL2T P9pQGrcO8nnl38LxthZ10kwZahjwS9tGgEn/FRclnVMsroku38V/YvDrV3TEn1Eo93Lq +Eaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject:dkim-signature; bh=zNSEjT5R1wgFC31DWWn380G0jbuTgx5ZPt4C6o89+Po=; b=R1N0eeQypk5+RPZ8ws3vJgbc1EMxz9sJmXvSPIvU6OaWmMhdoangCgzWVu1jw9fWh8 PxmMiv1QiKcsLRYl/ysOUY4p01ksLDZMAXKoqXOyUpnb1WnYXSCG4NbqMJc87vFk2ZWs lE+WzXJvQcDvN1UBqi74aQmi7LcFKmk11x3g77/6y0v5tD/+SYhEgNS2wXObzCIP8VDL Oa3GFhQQ+fE/5TTzC46ibdMXzLv3RfXTcLwmdN3W4i6Bq7bsLdBaZCNcGM6G+nQ/KjTt 58W7KGQw8CbnFdiUuAUFXY95BCGtRdQGUByxzPPH/i5ZJCMDtvx9UMgH4Li732wvb3Th zV3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=LUTjayQS; 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 s79si1116182pgs.245.2019.03.20.01.19.31; Wed, 20 Mar 2019 01:19:47 -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=LUTjayQS; 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 S1727742AbfCTISd (ORCPT + 99 others); Wed, 20 Mar 2019 04:18:33 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43511 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbfCTISc (ORCPT ); Wed, 20 Mar 2019 04:18:32 -0400 Received: by mail-wr1-f68.google.com with SMTP id d17so1621682wre.10 for ; Wed, 20 Mar 2019 01:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=zNSEjT5R1wgFC31DWWn380G0jbuTgx5ZPt4C6o89+Po=; b=LUTjayQSyQFaw+u03MiWndNtuCiDM3+S1tWRq8Logugkywc31EVAkpVb2j5sCAq4i1 e8JVVw4h7cadDdAidI9/MIDYj6GX0io7Ztsroknvi3B9OM3IRXJScirkrKBPsPFXby2Y mfB3gzpnax80ObEwCFsKC7J2DX3F9L7uzdAVMUZwR6ReLfEWuU1Js7A+oBEoedMZFMWi BI9duAXWSdbJZi8Wli43n2a+7siMBsD1JlypzGpoh0OK/gCx71XxNFdPA7jokPGUZ3uE HMGsYxWF7PJiuB87TX5JFJsG6trwonyvF53P7lApnn8FTqzxX30Vl2NdlPk/d7NoJ51n Oohw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=zNSEjT5R1wgFC31DWWn380G0jbuTgx5ZPt4C6o89+Po=; b=PfymV3NtiNkxVFIW1kNRv5cBy4B6qGPgPigz2hlsTK5o14HFYmHULpyR1A6ADa1XgT zNVogXKyVD/FAry9wQmnK7MZao3XvULXUM9ucEckEu0b1n8Utt/d5g/s74cWW+jPm7rN JoUwXsIg/YHzU0ab7m+spHm8u/+rY/ffmcddPCYaAQ2Jt3p0bdvub8bg3n5tBjLds8wc f58jUr6bSYvWJcLpZcMwtuxUPCDqaQ79FGTz5ZWLpzMqRFH7QWnOSHnthb7QPyakQidG Yry4UWRgZdS6FZkSE0j5+K7NPtOYzivPZKK+KsUz4xUTQ8PAVJw95nVsaZBwBfdf05qR 3dKw== X-Gm-Message-State: APjAAAWpASBje346VDR0MG0FHtkS5pNVAsOnkOzhaihoi9HL3mOQk8JG d5Vq/XZpIqmxIlSt3uWsoRAbhRWiO1IfJVl6 X-Received: by 2002:a5d:54c4:: with SMTP id x4mr7853794wrv.296.1553069909445; Wed, 20 Mar 2019 01:18:29 -0700 (PDT) Received: from [192.168.1.62] (176-150-251-154.abo.bbox.fr. [176.150.251.154]) by smtp.gmail.com with ESMTPSA id u7sm1201862wrn.44.2019.03.20.01.18.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 01:18:28 -0700 (PDT) Subject: Re: [PATCH 4/4] clk: meson: meson8b: add the VPU clock trees To: Martin Blumenstingl , jbrunet@baylibre.com, linux-amlogic@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190319215121.29340-1-martin.blumenstingl@googlemail.com> <20190319215121.29340-5-martin.blumenstingl@googlemail.com> From: Neil Armstrong Openpgp: preference=signencrypt Autocrypt: addr=narmstrong@baylibre.com; prefer-encrypt=mutual; keydata= mQENBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAG0KE5laWwgQXJtc3Ryb25nIDxuYXJtc3Ryb25nQGJheWxpYnJlLmNvbT6JATsEEwEKACUC GyMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJXDO2CAhkBAAoJEBaat7Gkz/iubGIH/iyk RqvgB62oKOFlgOTYCMkYpm2aAOZZLf6VKHKc7DoVwuUkjHfIRXdslbrxi4pk5VKU6ZP9AKsN NtMZntB8WrBTtkAZfZbTF7850uwd3eU5cN/7N1Q6g0JQihE7w4GlIkEpQ8vwSg5W7hkx3yQ6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ywdlbGrY9+TqiJ+ZVW4trmui NIJCOku8SYansq34QzYM0x3UFRwff+45zNBEVzctSnremg1mVgrzOfXU8rt+4N1b2MxorPF8 619aCwVP7U16qNSBaqiAJr4e5SNEnoAq18+1Gp8QsFG0ARY8xp+qaKBByWES7lRi3QbqAKZf yOHS6gmYo9gBmuAhc65/VtHMJtxwjpUeN4Bcs9HUpDMDVHdfeRa73wM+wY5potfQ5zkSp0Jp bxnv/cRBH6+c43stTffprd//4Hgz+nJcCgZKtCYIAPkUxABC85ID2CidzbraErVACmRoizhT KR2OiqSLW2x4xdmSiFNcIWkWJB6Qdri0Fzs2dHe8etD1HYaht1ZhZ810s7QOL7JwypO8dscN KTEkyoTGn6cWj0CX+PeP4xp8AR8ot4d0BhtUY34UPzjE1/xyrQFAdnLd0PP4wXxdIUuRs0+n WLY9Aou/vC1LAdlaGsoTVzJ2gX4fkKQIWhX0WVk41BSFeDKQ3RQ2pnuzwedLO94Bf6X0G48O VsbXrP9BZ6snXyHfebPnno/te5XRqZTL9aJOytB/1iUna+1MAwBxGFPvqeEUUyT+gx1l3Acl ZaTUOEkgIor5losDrePdPgE= Organization: Baylibre Message-ID: <0439a93e-8338-efca-9a7d-8285710400fb@baylibre.com> Date: Wed, 20 Mar 2019 09:18:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190319215121.29340-5-martin.blumenstingl@googlemail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/03/2019 22:51, Martin Blumenstingl wrote: > The VPU clock tree is slightly different on all three supported SoCs: > > Meson8 only has an input mux (which chooses between "fclk_div4", > "fclk_div3", "fclk_div5" and "fclk_div7"), a divider and a gate. > > Meson8b has two VPU clock trees, each with an input mux (using the same > parents as the input mux on Meson8), divider and a gates. The final VPU > clock is a glitch-free mux which chooses between VPU_1 and VPU_2. > > Meson8m2 uses a similar clock tree as Meson8b but the last input clock > is different: instead of using "fclk_div7" as input Meson8m2 uses > "gp_pll". This was probably done in hardware to improve the accuracy of > the clock because fclk_div7 gives us 2550MHz / 7 = 364.286MHz while > GP_PLL can achieve 364.0MHz. This could be a reason, but they only implement frequency scaling for the VPU in the recent 4.9 kernel releases... but we should also implement it upstream once we solve how to switch these dual clocks in a clean fashion. > > Signed-off-by: Martin Blumenstingl > --- > drivers/clk/meson/meson8b.c | 167 ++++++++++++++++++++++++++++++++++++ > drivers/clk/meson/meson8b.h | 9 +- > 2 files changed, 175 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c > index 0d08f1ef7af8..8e091c2d10e6 100644 > --- a/drivers/clk/meson/meson8b.c > +++ b/drivers/clk/meson/meson8b.c > @@ -1761,6 +1761,147 @@ static struct clk_regmap meson8m2_gp_pll = { > }, > }; > > +static const char * const mmeson8b_vpu_0_1_parent_names[] = { > + "fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7" > +}; > + > +static const char * const mmeson8m2_vpu_0_1_parent_names[] = { > + "fclk_div4", "fclk_div3", "fclk_div5", "gp_pll" > +}; > + > +static struct clk_regmap meson8b_vpu_0_sel = { > + .data = &(struct clk_regmap_mux_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .mask = 0x3, > + .shift = 9, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "vpu_0_sel", > + .ops = &clk_regmap_mux_ops, > + .parent_names = mmeson8b_vpu_0_1_parent_names, > + .num_parents = ARRAY_SIZE(mmeson8b_vpu_0_1_parent_names), > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8m2_vpu_0_sel = { > + .data = &(struct clk_regmap_mux_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .mask = 0x3, > + .shift = 9, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "vpu_0_sel", > + .ops = &clk_regmap_mux_ops, > + .parent_names = mmeson8m2_vpu_0_1_parent_names, > + .num_parents = ARRAY_SIZE(mmeson8m2_vpu_0_1_parent_names), > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8b_vpu_0_div = { > + .data = &(struct clk_regmap_div_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .shift = 0, > + .width = 7, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "vpu_0_div", > + .ops = &clk_regmap_divider_ops, > + .parent_names = (const char *[]){ "vpu_0_sel" }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8b_vpu_0 = { > + .data = &(struct clk_regmap_gate_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .bit_idx = 8, > + }, > + .hw.init = &(struct clk_init_data) { > + .name = "vpu_0", > + .ops = &clk_regmap_gate_ops, > + .parent_names = (const char *[]){ "vpu_0_div" }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8b_vpu_1_sel = { > + .data = &(struct clk_regmap_mux_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .mask = 0x3, > + .shift = 25, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "vpu_1_sel", > + .ops = &clk_regmap_mux_ops, > + .parent_names = mmeson8b_vpu_0_1_parent_names, > + .num_parents = ARRAY_SIZE(mmeson8b_vpu_0_1_parent_names), > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8m2_vpu_1_sel = { > + .data = &(struct clk_regmap_mux_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .mask = 0x3, > + .shift = 25, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "vpu_1_sel", > + .ops = &clk_regmap_mux_ops, > + .parent_names = mmeson8m2_vpu_0_1_parent_names, > + .num_parents = ARRAY_SIZE(mmeson8m2_vpu_0_1_parent_names), > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8b_vpu_1_div = { > + .data = &(struct clk_regmap_div_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .shift = 16, > + .width = 7, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "vpu_1_div", > + .ops = &clk_regmap_divider_ops, > + .parent_names = (const char *[]){ "vpu_1_sel" }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8b_vpu_1 = { > + .data = &(struct clk_regmap_gate_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .bit_idx = 24, > + }, > + .hw.init = &(struct clk_init_data) { > + .name = "vpu_1", > + .ops = &clk_regmap_gate_ops, > + .parent_names = (const char *[]){ "vpu_1_div" }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT, > + }, > +}; > + > +static struct clk_regmap meson8b_vpu = { > + .data = &(struct clk_regmap_mux_data){ > + .offset = HHI_VPU_CLK_CNTL, > + .mask = 1, > + .shift = 31, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "vpu", > + .ops = &clk_regmap_mux_ops, > + .parent_names = (const char *[]){ "vpu_0", "vpu_1" }, > + .num_parents = 2, > + .flags = CLK_SET_RATE_NO_REPARENT, > + }, > +}; > + > /* Everything Else (EE) domain gates */ > > static MESON_GATE(meson8b_ddr, HHI_GCLK_MPEG0, 0); > @@ -2024,6 +2165,9 @@ static struct clk_hw_onecell_data meson8_hw_onecell_data = { > [CLKID_MALI_0_SEL] = &meson8b_mali_0_sel.hw, > [CLKID_MALI_0_DIV] = &meson8b_mali_0_div.hw, > [CLKID_MALI] = &meson8b_mali_0.hw, > + [CLKID_VPU_0_SEL] = &meson8b_vpu_0_sel.hw, > + [CLKID_VPU_0_DIV] = &meson8b_vpu_0_div.hw, > + [CLKID_VPU] = &meson8b_vpu_0.hw, > [CLK_NR_CLKS] = NULL, > }, > .num = CLK_NR_CLKS, > @@ -2210,6 +2354,13 @@ static struct clk_hw_onecell_data meson8b_hw_onecell_data = { > [CLKID_MALI_1_DIV] = &meson8b_mali_1_div.hw, > [CLKID_MALI_1] = &meson8b_mali_1.hw, > [CLKID_MALI] = &meson8b_mali.hw, > + [CLKID_VPU_0_SEL] = &meson8b_vpu_0_sel.hw, > + [CLKID_VPU_0_DIV] = &meson8b_vpu_0_div.hw, > + [CLKID_VPU_0] = &meson8b_vpu_0.hw, > + [CLKID_VPU_1_SEL] = &meson8b_vpu_1_sel.hw, > + [CLKID_VPU_1_DIV] = &meson8b_vpu_1_div.hw, > + [CLKID_VPU_1] = &meson8b_vpu_1.hw, > + [CLKID_VPU] = &meson8b_vpu.hw, > [CLK_NR_CLKS] = NULL, > }, > .num = CLK_NR_CLKS, > @@ -2398,6 +2549,13 @@ static struct clk_hw_onecell_data meson8m2_hw_onecell_data = { > [CLKID_MALI] = &meson8b_mali.hw, > [CLKID_GP_PLL_DCO] = &meson8m2_gp_pll_dco.hw, > [CLKID_GP_PLL] = &meson8m2_gp_pll.hw, > + [CLKID_VPU_0_SEL] = &meson8m2_vpu_0_sel.hw, > + [CLKID_VPU_0_DIV] = &meson8b_vpu_0_div.hw, > + [CLKID_VPU_0] = &meson8b_vpu_0.hw, > + [CLKID_VPU_1_SEL] = &meson8m2_vpu_1_sel.hw, > + [CLKID_VPU_1_DIV] = &meson8b_vpu_1_div.hw, > + [CLKID_VPU_1] = &meson8b_vpu_1.hw, > + [CLKID_VPU] = &meson8b_vpu.hw, > [CLK_NR_CLKS] = NULL, > }, > .num = CLK_NR_CLKS, > @@ -2562,6 +2720,15 @@ static struct clk_regmap *const meson8b_clk_regmaps[] = { > &meson8b_mali, > &meson8m2_gp_pll_dco, > &meson8m2_gp_pll, > + &meson8b_vpu_0_sel, > + &meson8m2_vpu_0_sel, > + &meson8b_vpu_0_div, > + &meson8b_vpu_0, > + &meson8b_vpu_1_sel, > + &meson8m2_vpu_1_sel, > + &meson8b_vpu_1_div, > + &meson8b_vpu_1, > + &meson8b_vpu, > }; > > static const struct meson8b_clk_reset_line { > diff --git a/drivers/clk/meson/meson8b.h b/drivers/clk/meson/meson8b.h > index a45f7102c558..e775f91ccce9 100644 > --- a/drivers/clk/meson/meson8b.h > +++ b/drivers/clk/meson/meson8b.h > @@ -35,6 +35,7 @@ > #define HHI_VID_DIVIDER_CNTL 0x198 /* 0x66 offset in data sheet */ > #define HHI_SYS_CPU_CLK_CNTL0 0x19c /* 0x67 offset in data sheet */ > #define HHI_MALI_CLK_CNTL 0x1b0 /* 0x6c offset in data sheet */ > +#define HHI_VPU_CLK_CNTL 0x1bc /* 0x6f offset in data sheet */ > #define HHI_HDMI_CLK_CNTL 0x1cc /* 0x73 offset in data sheet */ > #define HHI_NAND_CLK_CNTL 0x25c /* 0x97 offset in data sheet */ > #define HHI_MPLL_CNTL 0x280 /* 0xa0 offset in data sheet */ > @@ -149,8 +150,14 @@ > #define CLKID_MALI_1 180 > #define CLKID_GP_PLL_DCO 181 > #define CLKID_GP_PLL 182 > +#define CLKID_VPU_0_SEL 183 > +#define CLKID_VPU_0_DIV 184 > +#define CLKID_VPU_0 185 > +#define CLKID_VPU_1_SEL 186 > +#define CLKID_VPU_1_DIV 187 > +#define CLKID_VPU_1 189 > > -#define CLK_NR_CLKS 183 > +#define CLK_NR_CLKS 191 > > /* > * include the CLKID and RESETID that have > Reviewed-by: Neil Armstrong