From patchwork Mon May 13 12:31:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164026 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1263601ili; Mon, 13 May 2019 05:31:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9HGyNdd7/EfD/8vdDNcjWEmC7tQQWENGYzyBzPDAHTCwVNjpSeE6jQ3l7cOamk4p5h6GY X-Received: by 2002:a65:4802:: with SMTP id h2mr28532460pgs.98.1557750691888; Mon, 13 May 2019 05:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557750691; cv=none; d=google.com; s=arc-20160816; b=uxwUrlu1URm71iT8onGj7NhDKFTp6tLNZ7L5EFic9ElBl+cXJJVNq2Fo67FratUDaf moWRs1hkmJQBQocCRjE3QGHC8u8KpwcgpZAjWcKFte+jtmihpYH0bapxDF3+55QUNcFe svXEodo9gx8lZVghTRNqe/F+5TmrgGrkX83WnkXfXDyjPaF4DhkVW+d+b6kygQIzhh2c u8TjrOWlm7RZUZwoC1AxA2NhvYhqBkSKG5EUM8/aPLviJY20xJK5BY/0/toAcJnX9KYL d1muXOdR4tdr3ftxGH7uauvXPxQOx8NLY6OEu0xyTNKZNakK23SR60NDuauxQGCbL089 TeCQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Tymhb+Xz3NQPhmyQuz/DcF6uda1a1VVKCg7sutpOQ84=; b=m9+Gimme6N9lyFFUlT97spAXp+zUaMP95CHy+v96GQEtkpl59N1+bo37SbirRbcD1N /1nKuXbPH71PV02PqaLTbpUIXFXO91yoR5Av+ahy6pXUX8bUfZzaE/fgJDuZdEmOJHo1 xS57YZ3iAHwyX29MKPbIbl8qZ8b5w34fsn03w0SwONYN1lXQasJzIJinKiL+ryOLSImh HYMpbTZFraTwHJ6WuLSyhOcfwJaMkIGcSPXJZl5u5WW+2MKP/Ek341mz25FhG40afh47 OLdvuOaa5Z7GIndxWWFIQwyPMF24D7xQxWmdjZxWZLKUDtCtiR4uMw6co6cPCijSdMH5 Jn6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=sctYjSKO; 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 cc8si7972578plb.325.2019.05.13.05.31.31; Mon, 13 May 2019 05:31:31 -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=sctYjSKO; 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 S1729862AbfEMMb3 (ORCPT + 30 others); Mon, 13 May 2019 08:31:29 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46127 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729816AbfEMMbZ (ORCPT ); Mon, 13 May 2019 08:31:25 -0400 Received: by mail-wr1-f68.google.com with SMTP id r7so14420803wrr.13 for ; Mon, 13 May 2019 05:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tymhb+Xz3NQPhmyQuz/DcF6uda1a1VVKCg7sutpOQ84=; b=sctYjSKOyxhrlLrIsdGH7QhWzJuNOG2YGIRBw27DW2bKxLJdmDcajEJX6fwS67fVt6 jwCDAZTNfhRFTvC5J5Cs0B4p2VG3l9rjmOfhAnElDketpei7UccrxppmBgICQFtl5n8n JAU8r5iGMU/jlYgjpcI8dJ6VATC5KelEY7x1sQeuatayIwFcmY1YWIwYhaosPwyeTqIw mmLWtIPpN1x62TDSGa8Rfc67VzUah5VaAF5OTtN/Vi5oydNI1Pq3p7kyb3afsR3nu3ta tBpqFdKLwHPxvHbBjhJ1ZyKtMbl4j4hiexe2LZOgqJk/+QslS+88L602jcEyi6daZ3G2 8M0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tymhb+Xz3NQPhmyQuz/DcF6uda1a1VVKCg7sutpOQ84=; b=lk/2an95EgGjPH4n2tWT0U5Q8dkVumlkBN1zj5FHZXXkdKcu14s1eJWMprv9B7tJkX Rw74QvAn5M00u6SqKKYp30SB83viZsioCy6r9V2JV2qh22eqow2LlXWrn01HSzB1x6/9 0PM0YnrqlT3RLVDasGIxJ9jpI5+d1rfVaeXpcp+Kdd9eV6i2EiwFfjMxUZ8MUA4xQHgi Ybh95zf5lTs+nOp2K5NHgGvyT8nz+gcVsVfvLRiv+OWYJleSYkYr34+7lLBViMHyk45t 1V6d5HORUkNzTNNi8O69PGOROtRioYQkjPqQ8gRHEc8J7N3i2NVa0XBCmC7wFoILNKFC wy7g== X-Gm-Message-State: APjAAAWnWO99+8flHmn3rdJ5MylhP8g6sUg+ZUGjOoXV7ai5k31CKzNR QrGKdpAujvPL8rc5GrJ6wZAVbg== X-Received: by 2002:a5d:6710:: with SMTP id o16mr14850407wru.173.1557750684166; Mon, 13 May 2019 05:31:24 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id t13sm16175584wra.81.2019.05.13.05.31.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 05:31:23 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/7] clk: meson: mpll: properly handle spread spectrum Date: Mon, 13 May 2019 14:31:09 +0200 Message-Id: <20190513123115.18145-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513123115.18145-1-jbrunet@baylibre.com> References: <20190513123115.18145-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The bit 'SSEN' available on some MPLL DSS outputs is not related to the fractional part of the divider but to the function called 'Spread Spectrum'. This function might be used to solve EM issues by adding a jitter on clock signal. This widens the signal spectrum and weakens the peaks in it. While spread spectrum might be useful for some application, it is problematic for others, such as audio. This patch introduce a new flag to the MPLL driver to enable (or not) the spread spectrum function. Fixes: 1f737ffa13ef ("clk: meson: mpll: fix mpll0 fractional part ignored") Signed-off-by: Jerome Brunet --- drivers/clk/meson/clk-mpll.c | 9 ++++++--- drivers/clk/meson/clk-mpll.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.20.1 Tested-by: Martin Blumenstingl diff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c index f76850d99e59..d3f42e086431 100644 --- a/drivers/clk/meson/clk-mpll.c +++ b/drivers/clk/meson/clk-mpll.c @@ -119,9 +119,12 @@ static int mpll_set_rate(struct clk_hw *hw, meson_parm_write(clk->map, &mpll->sdm, sdm); meson_parm_write(clk->map, &mpll->sdm_en, 1); - /* Set additional fractional part enable if required */ - if (MESON_PARM_APPLICABLE(&mpll->ssen)) - meson_parm_write(clk->map, &mpll->ssen, 1); + /* Set spread spectrum if possible */ + if (MESON_PARM_APPLICABLE(&mpll->ssen)) { + unsigned int ss = + mpll->flags & CLK_MESON_MPLL_SPREAD_SPECTRUM ? 1 : 0; + meson_parm_write(clk->map, &mpll->ssen, ss); + } /* Set the integer divider part */ meson_parm_write(clk->map, &mpll->n2, n2); diff --git a/drivers/clk/meson/clk-mpll.h b/drivers/clk/meson/clk-mpll.h index cf79340006dd..0f948430fed4 100644 --- a/drivers/clk/meson/clk-mpll.h +++ b/drivers/clk/meson/clk-mpll.h @@ -23,6 +23,7 @@ struct meson_clk_mpll_data { }; #define CLK_MESON_MPLL_ROUND_CLOSEST BIT(0) +#define CLK_MESON_MPLL_SPREAD_SPECTRUM BIT(1) extern const struct clk_ops meson_clk_mpll_ro_ops; extern const struct clk_ops meson_clk_mpll_ops; From patchwork Mon May 13 12:31:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164027 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1263654ili; Mon, 13 May 2019 05:31:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXY9mXVfE6BkoC/wX8o7wc20qTmtDZceak0f9pc7OckQRyJP+9uOnXGCtCh8KVYPm6I1Kj X-Received: by 2002:a62:579b:: with SMTP id i27mr33419232pfj.205.1557750694434; Mon, 13 May 2019 05:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557750694; cv=none; d=google.com; s=arc-20160816; b=ZYY+wHyH4js0cqNu4RP+VE++nEWrDQXq48HmxvpDvGmk1uNmAEsgn++wtvLntXEvFR Tb531mdtZj78pPwgRR+oJwdMVZm9MPR2FhA2SmZUD193pS48drUoFgNnPahE3yf/nG42 mREO4j5ZpcP9CGjvhet3oO+qIyQLiOzrt6Btw1I36L1to3IeP6pBFIP3LAc0BPqsEQn7 Ln8YRmDB1FfsnRGnZfMBEsD7KR8zoppLnBsS/cuLfvIyKazm6FCpXrekpeSNixbghYu5 u53RXBO4Jvf9O/eCxcAZfdn0E2jPfJzfK4j4TqkLk6wExP+Iq4xAXFmfbqnMhLxeliMP apFA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mW2Fqi37nfrJWuA7Y78Xlr35mQpQP8Au1z+vEQpFR/c=; b=dCBKi/iSL/z3yr7qttbjajElaKxcLItYAV2NgQ6qAl2YMk2X0gZc8Bmvbrpq+7H9cc PQbWfTuyCZx99j9JDinbpSl4CuJz9iJqJ+phI5Zl9SoSaCfnEIhtWMvx5Fjo3DGcPTzd y2pb7i045ZBKH5yDUx+OxDaoJk0MMufkrMxIQX3CQhUNY8U3B4SQahrYG6drpNxzFDIK CfMrXBr5TqurRvEgdsbe8eWfPlIaQeVxPFNWNy2JIiYE33sCujMwTg0lNdu0HNY+6r0S QeolmEHFXLu8p+r8sQV/lImBbroegbRVnG7vYbFq1DqcNeGzVhKAEYKU9qfF2/RACY9A ffFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="zpNEfai/"; 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 cc8si7972578plb.325.2019.05.13.05.31.34; Mon, 13 May 2019 05:31: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="zpNEfai/"; 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 S1729875AbfEMMbd (ORCPT + 30 others); Mon, 13 May 2019 08:31:33 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38276 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727582AbfEMMb1 (ORCPT ); Mon, 13 May 2019 08:31:27 -0400 Received: by mail-wr1-f66.google.com with SMTP id v11so15066841wru.5 for ; Mon, 13 May 2019 05:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mW2Fqi37nfrJWuA7Y78Xlr35mQpQP8Au1z+vEQpFR/c=; b=zpNEfai/ShFL9b9BqnxeB/Z0ueU/STT54nBh4jzNCSq8avg67UIuysT+FBIdpsciGJ fH+PJQ9dp/RC7UD4U5T30ILymLeLPSwMCGXbRrY5FXFhGMJXH/+xZrPQkS/NROWCtXPG Y7ljuoZE9vGoccHwsjUOCzX8dVYDO7DZe8QJuNXNCAPU66G93Qz+KX2xdn/T7cRrxtNc 8oB5kEqR8RaHUs3dERDJiu2eG5YGccaZMM0q08ciUhiKKYmMbNuj7N6p3ewMaIvPWP4C DeWdKERkqxW3JlXFcHB6roMjM7t/OioSCWUmH/ADLTHh0+Plh+vhbwRRRN3wuazodw3q 8xxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mW2Fqi37nfrJWuA7Y78Xlr35mQpQP8Au1z+vEQpFR/c=; b=tCtKtBmQezN22XTsklRYovNRW3QpbSm+B0lLV3E6FYW08eC11tSNHzOPeICX6RLphx 0vDvibkJtUxsM4YZPqmGaGO9muuhkU3f8RuBOsdcJmLNtCRL3OGr72z6G/hc/rBE7u9P tXZL1exssNFSuDzgSRD07kOuUD0WjDteQ5Sro2AIYkAhZDGfPr3zDvp5a8Y9AI6RpApW laGaX3jISy5srmld5OR2ZzhHZXevZ7fSL43ZguRM5spWzhz90dljAkqi1sRoz4Wnp0ve go52geVNwfLHH1AWWxCN30gHNr+Z/cAPd/7NRDQMeKBFqDg5KtmdbXxXh1Ybw717KXOu ovvA== X-Gm-Message-State: APjAAAWQs5JJfAtYYRe5uQTiuHMBWStjkVZIdRL4I05p2EBwG+xyHNKL IMeFkqzBfjyreNQETmNY0Cjoi13KZvU= X-Received: by 2002:adf:dc4b:: with SMTP id m11mr18014405wrj.66.1557750685310; Mon, 13 May 2019 05:31:25 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id t13sm16175584wra.81.2019.05.13.05.31.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 05:31:24 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/7] clk: meson: gxbb: no spread spectrum on mpll0 Date: Mon, 13 May 2019 14:31:10 +0200 Message-Id: <20190513123115.18145-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513123115.18145-1-jbrunet@baylibre.com> References: <20190513123115.18145-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The documentation says there is an SSEN bit on mpll0 but, after testing it, no spread spectrum function appears to be enabled by this bit on any of the MPLLs. Let's remove it until we know more Fixes: 1f737ffa13ef ("clk: meson: mpll: fix mpll0 fractional part ignored") Signed-off-by: Jerome Brunet --- drivers/clk/meson/gxbb.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.20.1 diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 29ffb4fde714..dab16d9b1af8 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -679,11 +679,6 @@ static struct clk_regmap gxbb_mpll0_div = { .shift = 16, .width = 9, }, - .ssen = { - .reg_off = HHI_MPLL_CNTL, - .shift = 25, - .width = 1, - }, .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ From patchwork Mon May 13 12:31:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164028 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1263718ili; Mon, 13 May 2019 05:31:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBX5Voi/hNguplSQR/GnWIL7wT0Awkx9gh+fGIR96enIX0msKj2vtKNXxI8UqGO8dr+eHT X-Received: by 2002:a63:7054:: with SMTP id a20mr17330763pgn.354.1557750698301; Mon, 13 May 2019 05:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557750698; cv=none; d=google.com; s=arc-20160816; b=KGdwIUIlI+dUHd3EQmVAgSkjVIlWwPdcjEsodiRfbpGYJ1nxSjY09wwb425N1PF1a5 toKaxq5T9oghWLWd+FjMXbHZWZ/MBbQHiQ4KxaBIJ+h2g01cWW9jFysv4RZKy3yeDyme EkVvxKqKWAgISX9jZSJOoZCA+nzoNZRcavJME0JcqmKnf1LHqND2SVCLoQ7xMprbVx+W PPah60BN3Vee6KlODQkw09H50x0pyl0XxORvd0YM+zkKIhVLYVJivHlDiyqz1LPoNdp6 F5gDINIn7Pcx9LBiSv37PFFCoJVrIB70GvNdR66ZTdUzw9iY+/6Yi5TeSS0z98oIgHC3 a0fw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=StsbiAbV0Vt+lXEMy/BJGmoZrMBaAxbvBsCBZl1IPto=; b=jRjN37msd0kPl0k8coL1VbtFj9ZvqqDX6yyz1TFi4GSe9SM+G3CvFqJWUnq3Fil+oa 1ZZlHQPQo2iO3fwXqsS83y6SicdGopo2u4t55Nj7jqmpBXEvPqPZAdWeIEQoV6dTC7O3 p0o/+3dazynCN3oFm7xoGhBPhRW/LlK6C11RuSVvoqFUvdY/HZpK8m0wccmXKY+i4lrd lNoHGBKhz2lNfFUd/yllB8crNsvgGidva6xdJOj2y87nwSofPkReClg/ta8MKmmaEeGT hrI7rSDZSX3KaQYFjTdkwUKd97CoHr3Dc8T4e10k8skMWuGT4+y1Gf56Be3tJNmwMw7E ra5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=iEprL8LW; 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 24si17278694pgt.474.2019.05.13.05.31.37; Mon, 13 May 2019 05:31:38 -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=iEprL8LW; 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 S1729888AbfEMMbg (ORCPT + 30 others); Mon, 13 May 2019 08:31:36 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35187 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729210AbfEMMb1 (ORCPT ); Mon, 13 May 2019 08:31:27 -0400 Received: by mail-wr1-f66.google.com with SMTP id w12so15076795wrp.2 for ; Mon, 13 May 2019 05:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=StsbiAbV0Vt+lXEMy/BJGmoZrMBaAxbvBsCBZl1IPto=; b=iEprL8LWLl8A7xh4GNvz6+BTjvOd9OUeQARGtQ9hS7GYQo1sxl11GkNZR52DmtjVuT x51TiXeHsXOTs1GC4jh1pQDR7W85s+mr/FJDkLPXxXa1PusMELawFwZ5GTMZk2NppEdW 4oSDKD+LCIBbVMe8a0I6PCte3y2oXxY6/7DLQr0jr3m3uizO4k1Hhq3sMF+IAWDEG5aP Y5AutyjcAZHFBo7FG7MCxTJzJSShgHGG1XGn25I1wHga2cMvt3XWE70w9xm8FecQ8ubX nPjEHAGb9FQpFa6oCgrFunTJrvxffo8a6mXcPd/8VJcW4nNPOGcEfSnvywbSQHMY5qxd y7Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=StsbiAbV0Vt+lXEMy/BJGmoZrMBaAxbvBsCBZl1IPto=; b=L+rhSSBnf3NknY8e/7JwFScigX5zkMT9FnyQx2vruP5TvsA9DRZ7LnfaXporCBvqML WHL0Da4hdU+qDLPHjKV9kpWch2UC3S5XkgHl/NPYC7x//ctcTEBjrP+ykXJ2yp4yKJG4 1BafkU1ENRgOv2fecSs41PHm2p8QZ1+eOdvkA/lHJfLJZNwblPuUnX4O767zQ/4BuuPj Fu6ZgsBuz0G2EOPGwAN2CHRkCghSXLtlqkn2/iJV0xiCZ8yXANK2N5B9/PjE2hNEM9xu A8y8rO7FZPzWRMDzxdAM2nwresbkfCoKttOsnLMqW6Qho+QE0ym07H0ja042TXGk/kDk jeKQ== X-Gm-Message-State: APjAAAUfFtta6ymS3SiEJH2akGYhL63CQlV2NjvwhBhEPBG1+Sn5K1m1 AzJvCByjX+Y4573UvnmIL02cdA== X-Received: by 2002:adf:fc8f:: with SMTP id g15mr18367933wrr.122.1557750686306; Mon, 13 May 2019 05:31:26 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id t13sm16175584wra.81.2019.05.13.05.31.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 05:31:25 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/7] clk: meson: axg: spread spectrum is on mpll2 Date: Mon, 13 May 2019 14:31:11 +0200 Message-Id: <20190513123115.18145-4-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513123115.18145-1-jbrunet@baylibre.com> References: <20190513123115.18145-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After testing, it appears that the SSEN bit controls the spread spectrum function on MPLL2, not MPLL0. Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers") Signed-off-by: Jerome Brunet --- drivers/clk/meson/axg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 7a8ef80e5f2c..3ddd0efc9ee0 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -469,11 +469,6 @@ static struct clk_regmap axg_mpll0_div = { .shift = 16, .width = 9, }, - .ssen = { - .reg_off = HHI_MPLL_CNTL, - .shift = 25, - .width = 1, - }, .misc = { .reg_off = HHI_PLL_TOP_MISC, .shift = 0, @@ -568,6 +563,11 @@ static struct clk_regmap axg_mpll2_div = { .shift = 16, .width = 9, }, + .ssen = { + .reg_off = HHI_MPLL_CNTL, + .shift = 25, + .width = 1, + }, .misc = { .reg_off = HHI_PLL_TOP_MISC, .shift = 2, From patchwork Mon May 13 12:31:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164032 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1264415ili; Mon, 13 May 2019 05:32:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTJw/lCZMMXmpzOkSXtsZPOVO/C5zLOnNcWnKxPDuO5MhV9J/6sHTeAtOvI7xVS8AKgo09 X-Received: by 2002:a17:902:2983:: with SMTP id h3mr4066540plb.267.1557750728688; Mon, 13 May 2019 05:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557750728; cv=none; d=google.com; s=arc-20160816; b=xj4/OfXEvXFVEny6wNZgnezgWk7iS4k54UUIE6YxotV3vDLfLsbNI2MR4Cj3BeCysJ ZbY7xfbcpmKEp4KgdpcL2Eb0wYXLgAAJPUE2APP4HUMUMYPbe16g01c+KVaZEcxBfxmL nyC3JRU1DYAG3aPG7sriWbXFYI86v4J0+UdXqblgwue+trXW2mTShyaKFv6VhjwzTf8r jNBraGTq/WrVZVR42LjZZwgQrSc5qV/T/4BM6AxkQKsbBJYi/FN3Mmb0G6/l9ZioYe/d CrC7s6oZ0C+UN658pumlK7l1hFVdhNFACf6lh7FwY6JY2ZSSCwrlKs8YB5VhOewTPtPA KzBQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4iwsD3U3np8IEFD+xTq9Et1jrPwGjexYK1TesQwMIZ0=; b=Sgqq8YOoW0Wi6CqR/x8+JK4kpuOnatzEGl4foqnY5kC1g47JxqpVg9ekC1uwS/75IJ qJktGtwiVqFBv+IipnfZaioFHEOEZsnPoQuQhj7tcMN3zzd9tm7jOoVHwoFGPFCs/sv/ tKDyurBZBTOr8Hg9icGU9NS1pevgaTdwN9absIPym1i7gRb0IaBhUh/0Ual9uxIspeBt 7Y4+/V9frSugXe9x/KQwPugCFFPZUBuySUfW1VNjEe+ZT5ccGAFKyUc32HLDIldFTPYI zTGlBDANl8IsdCQoXTWRqWmV9/WbKKfmPtnX26/BPLkt3D/WcMsLK8NFTNqHpi4NrNIg xpFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=b8POFUNt; 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 cm8si18004714plb.159.2019.05.13.05.32.08; Mon, 13 May 2019 05:32:08 -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=b8POFUNt; 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 S1729924AbfEMMcG (ORCPT + 30 others); Mon, 13 May 2019 08:32:06 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34033 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729848AbfEMMba (ORCPT ); Mon, 13 May 2019 08:31:30 -0400 Received: by mail-wr1-f68.google.com with SMTP id f8so5408203wrt.1 for ; Mon, 13 May 2019 05:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4iwsD3U3np8IEFD+xTq9Et1jrPwGjexYK1TesQwMIZ0=; b=b8POFUNthuvdlpyMAvkz/XPAZYSPESkYHVHrRsGD/I32mzJ09+S9i3Ktn/Iqf0CN5e eXNw9ANuWYo8/i8SL0pEagFcNTCv93/n0ORqEmb5I2K2xaCNEU/d2yjQks/B/8wSDyAW /r18vTn6m5K+nQoLd5zViswByZF48gxxHIgU5HBH6NH1amFjBFP1R9vqLwMaM/oIVYyg 10xxLLdLF0O/ejD3lGhw/7YDhCE9sKJviaNDyJaxML+EgtQH5MJwIOkMAv1JljUI9q2b LzuvBa77ygJMnX/ZnUmOeXkHAU9bXme+N9/WDu9099QCMnn6M9DzKZnT4kR5OWheER7j WfPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4iwsD3U3np8IEFD+xTq9Et1jrPwGjexYK1TesQwMIZ0=; b=pzZySNUVF+U0T8xaFXlaqcA2E33SCAXZqUvrbfjsmEhatOXfj0ed7+fUhQkBvmRLeE V9pi06iEm6qfhMyg4TGQ/C5pgytwH7EQvf9lJf1jy+7/lVULA9d2dBUA0nLddTnSw/oT HXTcF5gDB8E0Rg9CL+vUEO7VGaGHwvO0JEHQPFMbavNpJX5b+Ie6xlpjxiLws0dAtTTS 8V1k17zaS/0wIh4WLteV5dZ60CEVuY/h82R/uGjEJE7ghpweW5JJkD4ZK7cXv444i0Id bgtu9+aUw0BK44fFgkKoKjJVnKfv3RngfxXqiZ19LIqgpx/iJ+p9PKxL3DpeNYM/V6rQ Av1Q== X-Gm-Message-State: APjAAAVZQOVTW9ZltOonCLtM0VzP1j63r+FLTKQG/2lLJuT4PdUhqSKD SdTqtkEQqcjLxebhsx71om6hwA== X-Received: by 2002:adf:dece:: with SMTP id i14mr18177889wrn.138.1557750687429; Mon, 13 May 2019 05:31:27 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id t13sm16175584wra.81.2019.05.13.05.31.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 05:31:26 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/7] clk: meson: mpll: add init callback and regs Date: Mon, 13 May 2019 14:31:12 +0200 Message-Id: <20190513123115.18145-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513123115.18145-1-jbrunet@baylibre.com> References: <20190513123115.18145-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Until now (gx and axg), the mpll setting on boot (whatever the bootloader) was good enough to generate a clean fractional division. It is not the case on the g12a. While moving away from the vendor u-boot, it was noticed the fractional part of the divider was no longer applied. Like on the pll, some magic settings need to applied on the mpll register. This change adds the ability to do that on the mpll driver. Signed-off-by: Jerome Brunet --- drivers/clk/meson/clk-mpll.c | 35 ++++++++++++++++++++++++----------- drivers/clk/meson/clk-mpll.h | 2 ++ 2 files changed, 26 insertions(+), 11 deletions(-) -- 2.20.1 diff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c index d3f42e086431..2d39a8bc367c 100644 --- a/drivers/clk/meson/clk-mpll.c +++ b/drivers/clk/meson/clk-mpll.c @@ -115,8 +115,30 @@ static int mpll_set_rate(struct clk_hw *hw, else __acquire(mpll->lock); - /* Enable and set the fractional part */ + /* Set the fractional part */ meson_parm_write(clk->map, &mpll->sdm, sdm); + + /* Set the integer divider part */ + meson_parm_write(clk->map, &mpll->n2, n2); + + if (mpll->lock) + spin_unlock_irqrestore(mpll->lock, flags); + else + __release(mpll->lock); + + return 0; +} + +static void mpll_init(struct clk_hw *hw) +{ + struct clk_regmap *clk = to_clk_regmap(hw); + struct meson_clk_mpll_data *mpll = meson_clk_mpll_data(clk); + + if (mpll->init_count) + regmap_multi_reg_write(clk->map, mpll->init_regs, + mpll->init_count); + + /* Enable the fractional part */ meson_parm_write(clk->map, &mpll->sdm_en, 1); /* Set spread spectrum if possible */ @@ -126,19 +148,9 @@ static int mpll_set_rate(struct clk_hw *hw, meson_parm_write(clk->map, &mpll->ssen, ss); } - /* Set the integer divider part */ - meson_parm_write(clk->map, &mpll->n2, n2); - /* Set the magic misc bit if required */ if (MESON_PARM_APPLICABLE(&mpll->misc)) meson_parm_write(clk->map, &mpll->misc, 1); - - if (mpll->lock) - spin_unlock_irqrestore(mpll->lock, flags); - else - __release(mpll->lock); - - return 0; } const struct clk_ops meson_clk_mpll_ro_ops = { @@ -151,6 +163,7 @@ const struct clk_ops meson_clk_mpll_ops = { .recalc_rate = mpll_recalc_rate, .round_rate = mpll_round_rate, .set_rate = mpll_set_rate, + .init = mpll_init, }; EXPORT_SYMBOL_GPL(meson_clk_mpll_ops); diff --git a/drivers/clk/meson/clk-mpll.h b/drivers/clk/meson/clk-mpll.h index 0f948430fed4..a991d568c43a 100644 --- a/drivers/clk/meson/clk-mpll.h +++ b/drivers/clk/meson/clk-mpll.h @@ -18,6 +18,8 @@ struct meson_clk_mpll_data { struct parm n2; struct parm ssen; struct parm misc; + const struct reg_sequence *init_regs; + unsigned int init_count; spinlock_t *lock; u8 flags; }; From patchwork Mon May 13 12:31:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164031 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1264192ili; Mon, 13 May 2019 05:31:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4o0Ero3UuZQmtdLo5HDpu2/sv9Vg9k1eJQHOKkAEbfmkLfPLB7ywYPjawOibxDSls9WaZ X-Received: by 2002:a65:610b:: with SMTP id z11mr10562227pgu.204.1557750719692; Mon, 13 May 2019 05:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557750719; cv=none; d=google.com; s=arc-20160816; b=BHRaryoPSuPC4/ZLw7wjpp9JLjP1Swws32cyRZh21H2ThSMOv36mdqRSlmG7e4CJPf Suphc48fvog1ByVxphZtO6mm9hjxB0yw+5lUjf6LEGtBsvAQxgcdztDFAomyWwtBurF3 C47c6QU/iJTYmBOtFM973O3Q9oIbA+utYiID07xQu1XvlWqY2ce8A6fxt7t4kNradc2I s5kNF7UXWuMNdPV+ATafhqmf3WAZl/ZqQAKuCYZ4UeU5M5syfSjnBgO3qCXALtTncdYD hV+mwq28kqZChQvMDTsotg7FcWp/k/LyA5PPZ/Xk+bXI1Q7lS6CUi5aiD0LRrwf3tvuM 87JQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pdGNE3efspU2W+dukA5SOqgLjvxWYgLtfHeCCZw+vxg=; b=d4Gq7RibeqesKDVW6iPrnb9vGo3manmk7FXCs0AIweEB35o6C0ZH3Osf7YX2zK9c7C dEIdjdifUxZqZbHaA8lUIM+2ZV238sIXLBMyFxn52Vqa+lZpiY5P781qZY/THWG/cw+X 0orIjlRgttf4ztR2566IcaaXSAHIFhgincBHW0hL2Bhf5npIuA+RIoLNr0EgDK76y0lf IPscp6s6KsvshnEA89W7DAAmtCBjcDUHnNEzlDvtTlb4P2RH3vbIZxC34yHl68vzXPVY N9/Rt6TlrwK1UUist8/hEWNQmCC6PL8hPW+dE+zmxgQE/PUFiGq+Zbsi7jIBTWDA5LOK 0Mdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=uWHt3xtL; 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 126si16881610pgc.2.2019.05.13.05.31.59; Mon, 13 May 2019 05:31:59 -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=uWHt3xtL; 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 S1729918AbfEMMb6 (ORCPT + 30 others); Mon, 13 May 2019 08:31:58 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:56043 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729863AbfEMMba (ORCPT ); Mon, 13 May 2019 08:31:30 -0400 Received: by mail-wm1-f68.google.com with SMTP id x64so2448825wmb.5 for ; Mon, 13 May 2019 05:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pdGNE3efspU2W+dukA5SOqgLjvxWYgLtfHeCCZw+vxg=; b=uWHt3xtLWXxZD51SfbvUje5CiKhbokXP41QIxuUjYAjnWDlsEw04aeT04nuOYHjM0Z FG2IT9PSXrbBDOlYe9yJ1qiTA2h3hA1Hl75/pEXNCnrxohtH41sh2eXvhUgWwTGNWiyJ V8alRsggbL8HsVxjO6HLvJkTIbtkSbMkuPrzLHCDA7NYWbBX5H+rrCRt8/GyNrNpZGdl mOznOMZaa/wDZk+YevG8ngfEQcQ8hwHF9teT63WxbnbLncpVGl3Ghkx47iP0JY6tvHjS JbLcxHy/1rsxL3nmCjgq78hdzzLjqfehgnjs5MauetJ2vaR129ZC7HBMXrdgwIrLqlln IGmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pdGNE3efspU2W+dukA5SOqgLjvxWYgLtfHeCCZw+vxg=; b=fKoB6FtY/WnERdflc4W+g7CCayfaq6sGiH5909MgfJroxmyWchnUdbH8EQWhgRQlQn 5HEpzV1U3v0kG2C9O3XpCjLXRE8/M9F8ahfOEfmR6HwCqjOVKCswpzmUZKYl05MS3EUN wHmx+xNDMPShMRBAu/DBnlCm7l4/71CX9P8CrRFh/KmRl897tKdcAFNDGj/dY2KWC+pj rIoe2aXsPTJPbHoKphm8UBbp0CSy+NsIsKFyWAklwI2YbZHq7YHePPVkdZ3FFWr4GiMV HocP+24CWTrIp7zoj0TulZXU9r2K+0XHeyeR9jUSlpxWGwDhLqUu7M/JSjnkGvhEeTs0 f6AQ== X-Gm-Message-State: APjAAAWWrqS8mlgfgGoW6O5v8uCSurZEwZ5F+4Oa3yMeOj9IwZh9lMmG lSkyb9hxLy4ciAuZ1hWLrLs4Jw== X-Received: by 2002:a1c:a695:: with SMTP id p143mr15862015wme.128.1557750688475; Mon, 13 May 2019 05:31:28 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id t13sm16175584wra.81.2019.05.13.05.31.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 05:31:27 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/7] clk: meson: g12a: add mpll register init sequences Date: Mon, 13 May 2019 14:31:13 +0200 Message-Id: <20190513123115.18145-6-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513123115.18145-1-jbrunet@baylibre.com> References: <20190513123115.18145-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the required init of each MPLL of the g12a. Signed-off-by: Jerome Brunet --- drivers/clk/meson/g12a.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) -- 2.20.1 diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index d11606d5ddbd..ef1d2e4c8fd2 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -1001,6 +1001,10 @@ static struct clk_fixed_factor g12a_mpll_prediv = { }, }; +static const struct reg_sequence g12a_mpll0_init_regs[] = { + { .reg = HHI_MPLL_CNTL2, .def = 0x40000033 }, +}; + static struct clk_regmap g12a_mpll0_div = { .data = &(struct meson_clk_mpll_data){ .sdm = { @@ -1024,6 +1028,8 @@ static struct clk_regmap g12a_mpll0_div = { .width = 1, }, .lock = &meson_clk_lock, + .init_regs = g12a_mpll0_init_regs, + .init_count = ARRAY_SIZE(g12a_mpll0_init_regs), }, .hw.init = &(struct clk_init_data){ .name = "mpll0_div", @@ -1047,6 +1053,10 @@ static struct clk_regmap g12a_mpll0 = { }, }; +static const struct reg_sequence g12a_mpll1_init_regs[] = { + { .reg = HHI_MPLL_CNTL4, .def = 0x40000033 }, +}; + static struct clk_regmap g12a_mpll1_div = { .data = &(struct meson_clk_mpll_data){ .sdm = { @@ -1070,6 +1080,8 @@ static struct clk_regmap g12a_mpll1_div = { .width = 1, }, .lock = &meson_clk_lock, + .init_regs = g12a_mpll1_init_regs, + .init_count = ARRAY_SIZE(g12a_mpll1_init_regs), }, .hw.init = &(struct clk_init_data){ .name = "mpll1_div", @@ -1093,6 +1105,10 @@ static struct clk_regmap g12a_mpll1 = { }, }; +static const struct reg_sequence g12a_mpll2_init_regs[] = { + { .reg = HHI_MPLL_CNTL6, .def = 0x40000033 }, +}; + static struct clk_regmap g12a_mpll2_div = { .data = &(struct meson_clk_mpll_data){ .sdm = { @@ -1116,6 +1132,8 @@ static struct clk_regmap g12a_mpll2_div = { .width = 1, }, .lock = &meson_clk_lock, + .init_regs = g12a_mpll2_init_regs, + .init_count = ARRAY_SIZE(g12a_mpll2_init_regs), }, .hw.init = &(struct clk_init_data){ .name = "mpll2_div", @@ -1139,6 +1157,10 @@ static struct clk_regmap g12a_mpll2 = { }, }; +static const struct reg_sequence g12a_mpll3_init_regs[] = { + { .reg = HHI_MPLL_CNTL8, .def = 0x40000033 }, +}; + static struct clk_regmap g12a_mpll3_div = { .data = &(struct meson_clk_mpll_data){ .sdm = { @@ -1162,6 +1184,8 @@ static struct clk_regmap g12a_mpll3_div = { .width = 1, }, .lock = &meson_clk_lock, + .init_regs = g12a_mpll3_init_regs, + .init_count = ARRAY_SIZE(g12a_mpll3_init_regs), }, .hw.init = &(struct clk_init_data){ .name = "mpll3_div", From patchwork Mon May 13 12:31:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164030 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1264088ili; Mon, 13 May 2019 05:31:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwYmjOlCCbkcqZo4CrV8vI7EmdAf934z8SzDyTxeKeaclMMmA3P1zBCgRVGbei06UKhkDN X-Received: by 2002:a63:c601:: with SMTP id w1mr30955365pgg.190.1557750714719; Mon, 13 May 2019 05:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557750714; cv=none; d=google.com; s=arc-20160816; b=fd/yiTxoCW6Z4lvzIHQ83MvAelzeLRbw6H34m0wmRLpNmqQxyI/hDwbJlp4yFwHOXN QBo9cH/Gso80oFTnchMHkAVQdhl4sEUVQVULdsKOD9CI14oxdMX7vYG5E9+1B/72hw7M K06FQokzcumcMHh99NebDclEux08e+IbO4rUbCcoh3EEQeIsKAZJYFUJgsB3ver/hObb 2yJST6RBnQdtoU9RQz+2X4b0NVbIFlTdeA/qqyd+7dCIE195p/UqVae2ChanRtv1Qaxm zNZHWpcbNrsJgMsG0qV19owcq9nVBtmh3K/VREFEL66jM2E7YpkfWBGs4l2N12zJmwQ0 Oijg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fKq0Xmw2ntAqrTVNaEz/XqYkib9vFynLezQDvMrUHDU=; b=0uIFaY2yttr1YT7NVo2tC/baNrisDaFsBj8pxD4UVIGhlY55hrzhzkM2BfpQkVqKnA ZSA3VYuYRCdJA9Gr82IEdNMOOfJFRqWG+LXau+AWaSjlVm2El6n9AwBx6YrSp9MctSMx 0AqcJyTirV0W8AFTdhCbJqTzhCzhxe5juI/zC4WAnOlbKg+KHrtxPCL0O7ek/pcOyj+M JlUwZUopvJYmBYNSfNfL7vaGDbksW89ULVeqpqO1F+UjWkpoyu7OrJbRhmMDE6M4SOKc KHe6oiAhiAu17kErw7WqYeQsHMnlPjjXq4bp90yZY92OS5wUkO/VxinHJBapVU1nSBrk wDOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=0wgYoQfY; 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 a36si15899719pgb.165.2019.05.13.05.31.54; Mon, 13 May 2019 05:31:54 -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=0wgYoQfY; 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 S1729901AbfEMMbx (ORCPT + 30 others); Mon, 13 May 2019 08:31:53 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34035 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729867AbfEMMbb (ORCPT ); Mon, 13 May 2019 08:31:31 -0400 Received: by mail-wr1-f65.google.com with SMTP id f8so5408337wrt.1 for ; Mon, 13 May 2019 05:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fKq0Xmw2ntAqrTVNaEz/XqYkib9vFynLezQDvMrUHDU=; b=0wgYoQfY9TIqdwNaY/BkNPlr0XnHO48h33h8xoTL79c51HyaaofletIxDBjvzreQht 3HV9XeCUyMiQecWaAhnQ1239LeF8VIripVqhuFv2YBfC+L2KqP9AhRShrK/lswUtOiLg Y6Q9q5dfecPp9pJ2S7G/R9HBvejDxkZbOS8tPxTz3Rl1C21VYE1grO2WUew9BXfQF7mw ZQ8m91LMV8OdEQHmYFjmRZM0BlKZMS9rlwi00GfoeuZ9Kn+0k6OfQn7E5XSYLI6blUdU A42s1ISqhSRquPF7VtEhghQr7PT1hMZcqYaY9nIl3QheEk74eXZezq1xuhTKzsXCK7cd 3wRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fKq0Xmw2ntAqrTVNaEz/XqYkib9vFynLezQDvMrUHDU=; b=thjjTHKpg7KO78aLo0gtcd/rF+yJl2S1Wb4oaNMmtBDgqlOiD+3hO9njCK7fZB5g5B WQfizbLdSOFi1vfZ9UDy8HpRfxCJ4wcj83CIYNSgUg44WaAFqVtpQ4GmgAuEr1R01mCk cP4vMHXMQd3Jf8VN9TSKqFAVN5XDL85gAzFRwSbrY6CUBIUNELSXiK0cbO6aaK1FWAye Pu6396krh0rwVu/AFwBfAAkUKUP0pNTnUJiQ7yyUCzHObxCW1lUY8hpX6OKejyqSmWzz oqP6ruSb02/Wo4KtKnzBHtA8Ob+b6SKoHPecQnUWBiHw2LXvFvXvrHX+4pdG/FFM5uig MKWw== X-Gm-Message-State: APjAAAW86wAithCDnKG21ULdkl67oeUE9+09XevMw1INUdFK0vguZLYO MobVFCJSn5vk+EeHXVPdrZvfgA== X-Received: by 2002:a5d:6a52:: with SMTP id t18mr15049885wrw.146.1557750689502; Mon, 13 May 2019 05:31:29 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id t13sm16175584wra.81.2019.05.13.05.31.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 05:31:29 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/7] clk: meson: eeclk: add init regs Date: Mon, 13 May 2019 14:31:14 +0200 Message-Id: <20190513123115.18145-7-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513123115.18145-1-jbrunet@baylibre.com> References: <20190513123115.18145-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Like the PLL and MPLL, the controller may require some magic setting to be applied on startup. This is needed when the initial setting is not applied by the boot ROM. The controller need to do it when the setting applies to several clock, like all the MPLLs in the case of g12a. Signed-off-by: Jerome Brunet --- drivers/clk/meson/meson-eeclk.c | 3 +++ drivers/clk/meson/meson-eeclk.h | 2 ++ 2 files changed, 5 insertions(+) -- 2.20.1 diff --git a/drivers/clk/meson/meson-eeclk.c b/drivers/clk/meson/meson-eeclk.c index 37a34c9c3885..6ba2094be257 100644 --- a/drivers/clk/meson/meson-eeclk.c +++ b/drivers/clk/meson/meson-eeclk.c @@ -34,6 +34,9 @@ int meson_eeclkc_probe(struct platform_device *pdev) return PTR_ERR(map); } + if (data->init_count) + regmap_multi_reg_write(map, data->init_regs, data->init_count); + input = meson_clk_hw_register_input(dev, "xtal", IN_PREFIX "xtal", 0); if (IS_ERR(input)) { ret = PTR_ERR(input); diff --git a/drivers/clk/meson/meson-eeclk.h b/drivers/clk/meson/meson-eeclk.h index 1b809b1419fe..9ab5d6fa7ccb 100644 --- a/drivers/clk/meson/meson-eeclk.h +++ b/drivers/clk/meson/meson-eeclk.h @@ -17,6 +17,8 @@ struct platform_device; struct meson_eeclkc_data { struct clk_regmap *const *regmap_clks; unsigned int regmap_clk_num; + const struct reg_sequence *init_regs; + unsigned int init_count; struct clk_hw_onecell_data *hw_onecell_data; }; From patchwork Mon May 13 12:31:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164029 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1263756ili; Mon, 13 May 2019 05:31:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqziqaIDjUN9LBwuSUi0JNd/bxdtPHRvfRGZ0pgs5XYoNT4h+8d9o34far7zG7x66S0EhwPw X-Received: by 2002:a63:730f:: with SMTP id o15mr30340732pgc.315.1557750700166; Mon, 13 May 2019 05:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557750700; cv=none; d=google.com; s=arc-20160816; b=g7xArFJagHhYMoNLSbEsKzDhTtvURlcXQWpclT7oX19WpOruvUU54Rwrg8MkMNtxHQ xWmICNrnlTTbMQwJKvewIlyQjm4vPO6eYIKCQXwX50R4G9A5dt4qn+qCkXaniHY5P08M BZJdc+S8CPXprMQBDJjxQOu8CR4FHJnHnXCO6au+nWJT1UGOKAVU/Gobohm+Ws+VepQ+ Xu2SakTgtePQiAM/OEyXyILlM74XlqUmPQ072F2EfTadJaoGoViaWx66dxhIMkPi8cxd A+0tVMoRvguBt3CvkVfCr8jFCll5eSrf1OEdZK8no375zoXMXmD67vHOMqnuRaz9z/Nj UYUA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qDWoUB9bcp7o6UKFktF9ACZ04OzawQuwNyVSxDs2oGM=; b=UyroAIDZHTSY6CZzYodmuAI6taylg0M1QupNo54ZeWDEU4NAlftiWLgBFgXK0pxzJd XBLfDuEcEntcERQ3AFN/o2x+HMsJvVjZugL+KqTvbBMhepeQ1D65ybRDr+nwpJwYkaiQ ZKs8C0qTtB6XrPZdU4+hsGGKJ6mxxlkVR5dvqeNz98u1L8b9xnmrt7BfmM9mJS5ZWoTk 2SABXNS/fgBpgYfkyx7M6UE2Gf4WVQ/7SDnhV6KDjwE9HMq4GN2myPn4iPCe2divEtJo w70zorTXZQbTMJ9SnnYiYTrRpCDfLFhcgkSA7hm6c4J9e2EyEIS+HjxkZcGhbSlEYV11 tK+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=FTChcYwy; 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 24si17278694pgt.474.2019.05.13.05.31.39; Mon, 13 May 2019 05:31:40 -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=FTChcYwy; 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 S1729897AbfEMMbi (ORCPT + 30 others); Mon, 13 May 2019 08:31:38 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53404 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729870AbfEMMbc (ORCPT ); Mon, 13 May 2019 08:31:32 -0400 Received: by mail-wm1-f68.google.com with SMTP id 198so13644369wme.3 for ; Mon, 13 May 2019 05:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qDWoUB9bcp7o6UKFktF9ACZ04OzawQuwNyVSxDs2oGM=; b=FTChcYwy/64XxJA+Qdoi5SQTOLGXNUXjv+nlh1tRXwcJ5wHIr4YXrKpPSAYujuyCzp nijO6vpU+0BTOBu0M8rH69Fy/BcRNzMsb9+QsY4mgYef5o5Py4Er/BU6A4UPldUHIUwm 3N1VBhSmqFk12ex6lkH7nZ7A1wkbMpbp1wKpzXPxwEDHpUroEI1zCpg1SeMKQmrJ7goz QVgAUjDQTPtot79cCw6omTqisZOw9lWoYiGfS0N3V6ax1/grApmnole0AFlAcoL9OJMk k1xLXdk/GNS3KbD325KPkAfuHONMfgCR0ZXh4mu7cIH8/tJI20Q5P7EPet0TDqsWy1Jv Dx4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qDWoUB9bcp7o6UKFktF9ACZ04OzawQuwNyVSxDs2oGM=; b=Ch59MxQD/IL5tnqGsP2mxy0XakfqDdT7ki9Q8lBTCTfK5gktHIEkoNuAOpRGt1b72k DpoXjoRywUNx2bEB1hWBBBxcxGoDcE5yC0tVcrzbWiC41vwkgWdv4I6MWs/a2jgryZPD JgIJiFAZdxY43gwQpyx9Aoqp/mOFgmEIkX2bujODVYavisjI1jW1whwlWGQKIvv3AN+6 ExMAb1FcoWZOUO/AKTOplMbG1sm3vK4VlRhFlVfMVFryqu42HsSB8uBYgj9d+7aSO85u 9q4hVM1qvrQbQdbdLy0PESTakL3SxG4vBuyZd40Hzxibph60q1KAAfpsXYmR2v9LDn3e l+vQ== X-Gm-Message-State: APjAAAVXxIuaw9kcd5CEkkf8UAqsZ6WjXyeytLf8UcBIlrTsGLXGC53v yYSoa4jpBwOqWXEavWYA4iHAvQ== X-Received: by 2002:a1c:1d4:: with SMTP id 203mr16339134wmb.76.1557750690506; Mon, 13 May 2019 05:31:30 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id t13sm16175584wra.81.2019.05.13.05.31.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 05:31:30 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/7] clk: meson: g12a: add controller register init Date: Mon, 13 May 2019 14:31:15 +0200 Message-Id: <20190513123115.18145-8-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190513123115.18145-1-jbrunet@baylibre.com> References: <20190513123115.18145-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the MPLL common register initial setting Signed-off-by: Jerome Brunet --- drivers/clk/meson/g12a.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index ef1d2e4c8fd2..d5aceb79a91a 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -2992,10 +2992,16 @@ static struct clk_regmap *const g12a_clk_regmaps[] = { &g12a_vdec_hevcf, }; +static const struct reg_sequence g12a_init_regs[] = { + { .reg = HHI_MPLL_CNTL0, .def = 0x00000543 }, +}; + static const struct meson_eeclkc_data g12a_clkc_data = { .regmap_clks = g12a_clk_regmaps, .regmap_clk_num = ARRAY_SIZE(g12a_clk_regmaps), - .hw_onecell_data = &g12a_hw_onecell_data + .hw_onecell_data = &g12a_hw_onecell_data, + .init_regs = g12a_init_regs, + .init_count = ARRAY_SIZE(g12a_init_regs), }; static const struct of_device_id clkc_match_table[] = {