From patchwork Mon Mar 25 11:11:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 161084 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3831260jan; Mon, 25 Mar 2019 04:12:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3x0lz6dP2B+bxFe3zlHwlOR2GnhI6LnAInAVqUPYegFMdio7+GLjEOAvsP8m64JQ5G2XY X-Received: by 2002:a63:d015:: with SMTP id z21mr22224106pgf.215.1553512333131; Mon, 25 Mar 2019 04:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553512333; cv=none; d=google.com; s=arc-20160816; b=C5BxI7zCkjHlAIIEkPTmKDZdswtIYq0WcjIxcRd9027GPJMWAIMjg6E4Wq2VATy7n1 HsOWEZQoyOaodEcLJQGBPDhpoUPOSHNJ3FPiF0QHOrSsBckF+LRAYNcJ2JaH+n/suQpA yh83KWLj0q6rbIaxrr05ziJv43rE+tictUwDRsGkdklPYvJr+1t7s5G0GQpkUL6/PV5Z dxkL4cHW83QFNhNMywqPVK7jgf4hRk+Z1YixX+gmViF73rSGZch/6/bT0bZRNJGxfnQ/ 2Mq6edQ1vCVvIKRGZX0eKNE1GiuitPH/SHTv4jBmFsW1Io5CtG/k5shIIi2ynG/64YkT z84Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=zq6vRTetM545SboMg3VjgwSgsS+YSQUJaE3MlRK8tIs=; b=N5HUuNbfMokQ/lzL0kbzE9kPoPkW9gcvU1WPPTFDdiytTwrSsZqqyHitHwEPTP08+n I4R4TeBGbWJ+EEkdNFEgbAaJ65VUcU4Cl9tF/aY/89SntYWCUFveXRfX+cjbVgCm/48/ riSSk5g5TKTTzF0pxEdDGHvs5LxYEzeC+pX/2RTy0a2iIaAJZ7i/Nw60h/GwjRLPjQ+a 1/h32ggIV85vqDef87jUd/327io7Fh1TYP8kSSq1x9efaiXBPngH87xj1/OfLeC9ohBE nX69oqdHZT4X4SZQDPPxE9/1zLOBzzoe7ykUacmxrHPHDfwsp4B9/jlmPIJIj7TBQjKW kBvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ZXW58RQo; spf=temperror (google.com: error in processing during lookup of linux-kernel-owner@vger.kernel.org: DNS error) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org ([209.132.180.67]) by mx.google.com with ESMTP id d22si13934433plr.37.2019.03.25.04.12.12; Mon, 25 Mar 2019 04:12:13 -0700 (PDT) Received-SPF: temperror (google.com: error in processing during lookup of linux-kernel-owner@vger.kernel.org: DNS error) 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=ZXW58RQo; spf=temperror (google.com: error in processing during lookup of linux-kernel-owner@vger.kernel.org: DNS error) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730903AbfCYLMK (ORCPT + 31 others); Mon, 25 Mar 2019 07:12:10 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36122 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730708AbfCYLMJ (ORCPT ); Mon, 25 Mar 2019 07:12:09 -0400 Received: by mail-wm1-f68.google.com with SMTP id h18so8590783wml.1 for ; Mon, 25 Mar 2019 04:12:08 -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:mime-version :content-transfer-encoding; bh=zq6vRTetM545SboMg3VjgwSgsS+YSQUJaE3MlRK8tIs=; b=ZXW58RQonAOpYLFTCrrCFYUt+m+W7pyrOmzvKP1t1j8CQ3BFbne7+d20B0eFhLrlu9 Wjt+WJVIRmAkgmJxIqmUd8aU5WqI30LH425b6F3e6SoKZLUd+Qi7ASmeA3Daujs2sQ1T jzx4ASkf3xJlmrx2nk785v71K4ujbne7Gug4Pp1s8gJayjFB/XlHQXC2apqRUkYtNAam k0lr2BX5CDDWq7qaeM6v0COAc/1u1EMGORhSq/1Ytw9Ma7/OClT6Gs7lAvmIJkwX8mEZ V7HatMdxobGvN4XU6G2rd+Yh4guUBtIutyhX+7+gW1kZdYod2+YsYAeGVQ87XgVKbMZA W+1g== 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:mime-version :content-transfer-encoding; bh=zq6vRTetM545SboMg3VjgwSgsS+YSQUJaE3MlRK8tIs=; b=hH/iNUt1rLC/ZPr/+4Qv18kwaj+DESDzI574rq4qM+qWHO7oxMxaEctgTBCFzaDliG oFI7nj4wRrwKX4lVuifxyKSrrn/hdDYVpN5c7FXoRsQAT08LXBE+MLXjkbe8ZNxoJWYY oHLQC+BWJKDVj0c4cTWwVVdOTrzpDfyvJGqd1EXO7cXJCsi22zG6jln0Mm1vmtUOICVr 9o9UuD0OeagbHpiNUARkOGqctKS5D2iACJt7j+5ARGhAISAD3l/8BewIkoBjVGYUV3yE KMhJI567LIXq4rnXhrSIy+f/7EQbcGruXUIHjbqRsKurIs5405f8zYgaXf9v4FXwPJbx fD7w== X-Gm-Message-State: APjAAAXDUX3PMzAEFIZ3BI7kPQvjRvt7B0KYJ4exHbtXKmiOnYGwinnZ sv8Zu5kC6h2U9r4G8k1ajOwiGg== X-Received: by 2002:a1c:cc0a:: with SMTP id h10mr11048100wmb.22.1553512328021; Mon, 25 Mar 2019 04:12:08 -0700 (PDT) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id n188sm15134301wme.13.2019.03.25.04.12.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Mar 2019 04:12:07 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] clk: meson: fixup g12a mpll Date: Mon, 25 Mar 2019 12:11:56 +0100 Message-Id: <20190325111200.15940-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the g12a support has been initially submitted, the MPLL appeared (overall) fine. At the time, the board I used was falshed with amlogic vendor u-boot. Since then, I moved to an early version on mainline u-boot. While debugging audio support, I noticed that MPLL based clocks were way above target. It appeared the fractional part of the divider was not working. To work properly, the MPLLs each needs an initial setting in addition to a common one. No one likes those register sequences but sometimes, like here for PLL clocks, there is no way around it. The series adds the possibility to set initial register sequence for the ee clock controller and the MPLL driver. It is then used to enable the fractional part of the g12a MPLL. With this series applied, the fractional part works again but we are still seeing a significant clock jitter (+/- 1,6% for 294912KHz). Discussion are ongoing to explain and, hopefully, solve this as well. Jerome Brunet (4): clk: meson: mpll: add init callback and regs clk: meson: g12a: add mpll register init sequences clk: meson: eeclk: add init regs clk: meson: g12a: add controller register init drivers/clk/meson/clk-mpll.c | 33 +++++++++++++++++++++++---------- drivers/clk/meson/clk-mpll.h | 2 ++ drivers/clk/meson/g12a.c | 32 +++++++++++++++++++++++++++++++- drivers/clk/meson/meson-eeclk.c | 3 +++ drivers/clk/meson/meson-eeclk.h | 2 ++ 5 files changed, 61 insertions(+), 11 deletions(-) -- 2.20.1