From patchwork Thu Mar 7 14:14:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10842969 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 039B0139A for ; Thu, 7 Mar 2019 14:15:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2DEF287F2 for ; Thu, 7 Mar 2019 14:15:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3F18288B5; Thu, 7 Mar 2019 14:15:04 +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 CA16D287F2 for ; Thu, 7 Mar 2019 14:15: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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/sN2v8RmO7TK9fTqQttqJRVpkkVX7kU45dbc2A7RGPQ=; b=LPee98HAuNyFTc sFF8zXXUElPr4taOlisgJI8c90RVHGSsesfDUaPna8oqMIgphw4esLpVtcXRbbuZDhLs127ElLGM2 yqHb8fiGC6Kb5XE/41Huf8FjqLtoNc6xiKcTBb0MargA8FQu3nG/8XAD72u4NJ3mZt2OTbgUEb3dC thaEArVUzwvp3caia9GIKm5AXwOJu4+TLw6Z/+F+7+SUByw4yQK9/oFSanANPV5w5n4jaXcDluSmN BUYbZcIPwkCk416HsOJb+1Rr8eL9nrIkJ3ocbKGZ7VlXQHrlzquWl28FW0blbRRZFMQDocWOPs0ye +QfEaUVzDoUKqmfLcOag==; 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 1h1tna-000126-7E; Thu, 07 Mar 2019 14:15:02 +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 1h1tnW-0000zQ-H9 for linux-amlogic@lists.infradead.org; Thu, 07 Mar 2019 14:15:00 +0000 Received: by mail-wr1-x442.google.com with SMTP id y6so2459643wrn.7 for ; Thu, 07 Mar 2019 06:14:58 -0800 (PST) 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=102m7vigukY6b2r4HXlaV9za2FJR75yPTrUYx8MuDyg=; b=MntE3LMdL4WhEyeakqoEbbBDCZnuNWUqFQom72tuwIEjS8DppGHYQmct58TELWCtZT Y9OmEDJCTdEnb6M8bVpIsW1HNfbJNQwYBGrzpjzk5YMitJqAtQjg7MKwEfCtS9uANjvE oi+iaF15k8UY3mQ0vOlKYHEZAd7tKOr046UooTQdj0hHBuY7MlADQdoD1uNU2b1CwFgb VSVlstjyAp7uqIi5WaGWIX6q3nH8JdlZdtVbB4f5nplukWcHn6KL4UxJ2JEy+QA0d33J h55Aub59jR3p5VisbfBTG6QyExNutxND8gOKpiuD3qc22Gh12rqHbdug8j1JqRIvO7qK JrjQ== 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=102m7vigukY6b2r4HXlaV9za2FJR75yPTrUYx8MuDyg=; b=ZwgbB/eqFm1MwE858gRT0DXsiaXnwGHJMPodIeY2oTiu0s6GZeqZ+Uyk46UhLMSMG5 uL1JR2WlFnpUwKU+Zd6yd5ssM4xvqisiaNQ46PEBFMpJS86lumZozYJr1x1+oREhqpCk e6Fr/1zgarm6u3rv3112AFZ2tCRPkUcoqHzms3LexmmB4dnOAu4i0BKxu7oIl2PJai7X BS9KakHyFwE5w1CceV/csv/IrmFac6AR/H5o1gIe406ABZfaWWwqEoxDlYaBTo7EUZ0V fT/GisMkYwTk/YzaKm8m/f8LbvO5GW604q2sM39xuqnAA1qA7ZsEUQ25GtsPF43GZH8D TPqA== X-Gm-Message-State: APjAAAWuGcnWE2F542JaUMKnG5CEGBwopL7RdwTjVGp88dSlRQYrnabl ZwLMlZzcyI8WP30wi7N3HX0L6g== X-Google-Smtp-Source: APXvYqxFIGkuc2l23hZhsQeS86bnCNmzSmXwrXIRW2MPpe+DTrSSQZmfekPLccn6gHd1+XuMZzVL+g== X-Received: by 2002:adf:f711:: with SMTP id r17mr6998984wrp.38.1551968096841; Thu, 07 Mar 2019 06:14:56 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id h9sm9679304wrv.11.2019.03.07.06.14.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Mar 2019 06:14:56 -0800 (PST) From: Neil Armstrong To: jbrunet@baylibre.com Subject: [PATCH 0/3] clk: meson: add support for PCIE PLL Date: Thu, 7 Mar 2019 15:14:52 +0100 Message-Id: <20190307141455.23879-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190307_061458_570710_9A48111F X-CRM114-Status: UNSURE ( 9.19 ) 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: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Amlogic G12A SoCs embeds a dedicated PLL to feed the USB3+PCIE Combo PHY. This PLL needs a very specific and strict register sequence in order to correcly enable it and deliver the 100MHz reference clock to the Analog PHY. After lot of trials and errors, and since this PLL will ever feed 100MHz with a static configuration, it is simpler to setup a dedicated ops structure with a custom _enable() op applying the init register sequence. The rate calculation ops are kept in order to keep the nominal read ops as-in, but set_rate is removed. With this setup, the PLL can be enabled and disable safely and always have the recommended PLL setup to feed the USB3+PCIE Combo PHY. Neil Armstrong (3): clk: meson-pll: add reduced specific clk_ops for G12A PCIe PLL dt-bindings: clk: g12a-clkc: add PCIE PLL clock ID clk: meson-g12a: add PCIE PLL clocks drivers/clk/meson/clk-pll.c | 26 ++++++ drivers/clk/meson/clk-pll.h | 1 + drivers/clk/meson/g12a.c | 118 ++++++++++++++++++++++++++ drivers/clk/meson/g12a.h | 5 +- include/dt-bindings/clock/g12a-clkc.h | 1 + 5 files changed, 150 insertions(+), 1 deletion(-) Acked-by: Jerome Brunet