Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1721740ybc; Sun, 17 Nov 2019 06:03:53 -0800 (PST) X-Google-Smtp-Source: APXvYqzWWNWyoY8tiPzOAB1+eurOWMXPt95HrT6VhGQR9xkYZ28c3g2xik+PLj+WaSUpl4mFhRlf X-Received: by 2002:a17:906:2e5a:: with SMTP id r26mr18551748eji.283.1573999433198; Sun, 17 Nov 2019 06:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573999433; cv=none; d=google.com; s=arc-20160816; b=Vgg0HtS6b3BEAe5A7c1yUiM/54kjNDk1ZF9+HeTEKNYCeVU0KPr65m+BsghgnuyA4z dUIRx0SEgvCGvnmz0/uTGFt8KQ48NKU13RiekDsL0+zoNYkBLSQFnZyZFvgcLbhHkzo6 hx+kzkBYST8JTmGPtM2ADN5PWBYnehUcKvHAkS6Rl1OBXnib6XRGCiCqdXPGdsBeNKxj LBSX2LX7IfLNIftcNriujE7iNnC5ThfMW6S7o18wXgJR+PmZ8Q3mIZGdtbTHVhKTKL22 +cSRNBD1dGnh30Id322Ev2LQJgtFclN74WbK0dbVIF51rLj6EjMyMAFjfndHzFkbe8xP GLlQ== 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=05nE8+MHUGvDlOaHhFyY9hdfqx0IM0OvamCE7zybe74=; b=jTgAYQ+EdaW5quYp1EO0i3RxxUCn1Pm1ELVrLn7PXP7SzCeECdDZUatrTJdjm6m41n kmfaCm9HO22wPN1dB8oej/qszdapaxYGe/fHz94AwMTOZ5A4y0i/y4DkqHT0AvW0pfrX MpT4jU5h5LPyJnUzGhS3LXNP7hrdzG+23NEACEUOFNmi/yNZ0Cv5/cF5b3rKkR9ee4vk lMbIBWmIM8Zvg5XREBbxvxmhPOHkrIVUcNtT5Co95FjpkuhsZdG55PYQGfXo/jmI9cDn mdtxeNe/c9YqT3wnlZBxqz9DR7FRdfuN0b9MCeivKtSLH68w9nsGk7WNvfTfbgSG2g9C fFyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=QLF0FvhZ; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 25si1088474ejw.44.2019.11.17.06.03.28; Sun, 17 Nov 2019 06:03:53 -0800 (PST) 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=@googlemail.com header.s=20161025 header.b=QLF0FvhZ; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726222AbfKQOAA (ORCPT + 99 others); Sun, 17 Nov 2019 09:00:00 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42260 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfKQN77 (ORCPT ); Sun, 17 Nov 2019 08:59:59 -0500 Received: by mail-wr1-f66.google.com with SMTP id a15so16353414wrf.9; Sun, 17 Nov 2019 05:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=05nE8+MHUGvDlOaHhFyY9hdfqx0IM0OvamCE7zybe74=; b=QLF0FvhZwFM+TBA7bz7hdl9LccI8q8cq5MvI1/15MaGDEIUxrPD03tnnFu9KImUmEj nSgwq80iTIDuKY+REyNzrYNtVd7Gm0GGeaYElnqlfeSfRB0hkL+p4tnfvyazduMrcTQx GFBV8yLqoovy5YzpuW47Yj8vkVQecKQyGvYbxTW8A8hJlW6DXJSPFBQ5Ku6reF8V7BuA w7LsBg/EUzcFYu8S3UCVcqDkviYcsJnlvx+/peBk4Szgq6YmXbD9rmqFh9NrsNDZ4uQs jYMx43vrlBQtiUECnbsW0PzNnnMdPXWXF+F+k/+XOs/VHHhtowFvWkkxhBfFEChhGmWT RTjQ== 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=05nE8+MHUGvDlOaHhFyY9hdfqx0IM0OvamCE7zybe74=; b=R0RMZqpBZKeefscyp05+4j9uuYFx+iEwT1eWGp0126qCjJT4x0WRQQD3kbSaJUyL3g efMnLDIONJlT2Uzhv/pyqogFW+k5Y2gd0uQO0s+1w7ZzeMAuigTLorsh769OlU9E2dvR Vfz04snuMY94HxrbAxdocJh3Wic9NGtlXkZa1snC1UyTBkcrlz/KldtAaSVDTWbQhe4g o5z8BnGf6jPCxNEVRTvTg4mOg7sR1XVAg7Dr9ICJuNA9Uq7ZO3a/o5M0DkfgGCfNJupz MC7I8o6VDT/pKVk69rVcak4MI6TLmNc1k24LFkGXV0RXlrmClLF93NOhWJ6mcMlUK75Q Zg2g== X-Gm-Message-State: APjAAAW6BwSPVGj3N6wmIx+BxAf6MYL2FN83WK7bNZdHNSHE0GbJXeXU uca7bw5BRKm+yQoK4sfbRW8= X-Received: by 2002:adf:ab41:: with SMTP id r1mr27076505wrc.281.1573999195527; Sun, 17 Nov 2019 05:59:55 -0800 (PST) Received: from localhost.localdomain (p200300F1371CB100428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:371c:b100:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id n65sm18004803wmf.28.2019.11.17.05.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2019 05:59:54 -0800 (PST) From: Martin Blumenstingl To: narmstrong@baylibre.com, jbrunet@baylibre.com, linux-amlogic@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Martin Blumenstingl Subject: [PATCH v3 0/5] provide the XTAL clock via OF on Meson8/8b/8m2 Date: Sun, 17 Nov 2019 14:59:22 +0100 Message-Id: <20191117135927.135428-1-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So far the HHI clock controller has been providing the XTAL clock on Amlogic Meson8/Meson8b/Meson8m2 SoCs. This is not correct because the XTAL is actually a crystal on the boards and the SoC has a dedicated input for it. This updates the dt-bindings of the HHI clock controller and defines a fixed-clock in meson.dtsi (along with switching everything over to use this clock). The clock driver needs three updates to use this: - patch #2 uses clk_hw_set_parent in the CPU clock notifier. This drops the explicit reference to CLKID_XTAL while at the same time making the code much easier (thanks to Neil for providing this new method as part of the G12A CPU clock bringup!) - patch #3 ensures that the clock driver doesn't rely on it's internal XTAL clock while not losing support for older .dtbs that don't have the XTAL clock input yet - with patch #4 the clock controller's own XTAL clock is not registered anymore when a clock input is provided via OF This series is a functional no-op. It's main goal is to better represent how the actual hardware looks like. Changes since v2 at [1]: - add .fw_name in addition to .name in patch #3 as suggested by Jerome - dropped the dts patch so this whole series targets clk-meson - moved patch #5 from another series to this one because once we drop .name = "xtal" the clocks need to be aware of the OF node Changes since v1 at [0]: - add Rob's Reviewed-by to the dt-bindings patch - check that "xtal" clock is actually passed via OF instead of checking that there's any parent at all (which in the worst case may not be the xtal clock) as suggested by Jerome [0] https://patchwork.kernel.org/cover/11155515/ [1] https://patchwork.kernel.org/cover/11214189/ Martin Blumenstingl (5): dt-bindings: clock: meson8b: add the clock inputs clk: meson: meson8b: use clk_hw_set_parent in the CPU clock notifier clk: meson: meson8b: change references to the XTAL clock to use [fw_]name clk: meson: meson8b: don't register the XTAL clock when provided via OF clk: meson: meson8b: use of_clk_hw_register to register the clocks .../bindings/clock/amlogic,meson8b-clkc.txt | 5 + drivers/clk/meson/meson8b.c | 113 ++++++++++-------- 2 files changed, 67 insertions(+), 51 deletions(-) -- 2.24.0