From patchwork Wed Oct 19 17:20:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2447 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AF2273F342 for ; Wed, 19 Oct 2022 19:20:24 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id dz9-20020a0564021d4900b0045d9a3aded4sf7172944edb.22 for ; Wed, 19 Oct 2022 10:20:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666200024; cv=pass; d=google.com; s=arc-20160816; b=RAuMvBaTiNWc87LsCfjBYGbw+h7BHzkx+cL7U1Bkf0yNw3/x8gdIuyNBI68zkTAW6+ gaKU5EyMr+naIK6s+DGA/SyKH9f4GoT57mt62fbxcRnvbQrizKxs8tfpCaqc9Rg4xLcp m1izdzTVB/LuJnPJ14fEeV1w25D2yX12N1DTcYBmPx7K6lorG+Vr0gCpJUiSCe0L2yTj HCrgyNigZZ0VJbeR4Y6UKWxMD+xMlPg5S7fkN08OL1CkwzujIScmxrwZ8mr1wgufJ1pm 2WV2qzqhwRrMHo3LIUolVxBC54yHv7blKR2qZo2ds/pusA0vF1vfibrRWGU+66VjNMAH qJIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=qSHN5qMfikfG9FtZ8uTjctL3pI1gDebpKoV5r/p0Nq4=; b=EmM38LyfBybuktqr96nu9PKmMDXe0mtwqJC6PgJg4KEUm8ELFOj+HhUgqYXmnJvlcx +eqCBefA7ctlhz9WugRlH3tGv/uxeXYDOBxuAALiV2FtFdgVYyKYWczkcAuI9nsNYPMW ycc/xnU89b+SaClrcMb/gdvhQwi0j39fWz7NQPCoa2jxJqs+CNgkN/jtZ6Xr88Bfa7+S xGCMvCQF7RrE55k+mOM/l4z3nGEaDA3d6YR4syF1YyVkCJf+pGplLDqeICejA8KpQZA3 x2JjzmqfXH1D8kYG29XWqjjevbpXWTQd0NxrjflgJqAeWkWvDFJRKwUV2xS+0ymn+yvx PREA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MN7/X2A+"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=qSHN5qMfikfG9FtZ8uTjctL3pI1gDebpKoV5r/p0Nq4=; b=Xf34iPlFqdP32rrc+BntmTk0+s2vhKnrIz3cVFR0M6OT2O/isN/POqlP/em1/CUDpE 5JparukcFWoAnQS6LvgyCNDHrjsDd57erwAk+UYtMQV0PzJr8HbL9PrJuXGhZVHUKz5+ 5AQE06gUaKYd574xVEVKyUK+dqzoP26zfbCb8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qSHN5qMfikfG9FtZ8uTjctL3pI1gDebpKoV5r/p0Nq4=; b=jmcIirL+WpPLEMUbKZrb2bGHkTTCeKrUGg95xqGW+auI4LJXrwuArxwEVwSHX7aZkG lH+Cjs2txIboVGl5ioRELc7YN9YtZ/27zPGdoB+M3FRhFdzhxFHvU0+7qsA7uoszljld TiDedHa+zYnImffn5DGu1EWAoeqS5IX+TsNLTsTe9PphBkS0g7zba48fTpuKXOr9skXQ 0nZVSat+t3MQRqBuc5szTX/YPheM4JHCp28LLZjI8uQKsAgyrFNZ7cTr+UNeeFo3mT3R BuzNovptoJNkRTXD2rNrzLffPr3eOqbDowe3XrZ7bwSLtfWlM6CFvhIhQkbWbqsN4Q4v jN9Q== X-Gm-Message-State: ACrzQf1qEA+nyjrHUBlYlBY+j+l2c/Q81quYgCv7a/l/7MxXQh+yuygj 5OOD9Scn6q28SzVss96s8DcDdHzK X-Google-Smtp-Source: AMsMyM4KyAC5lKVmtLYH2muTR+K1aNd82XMfjoHKXmZ7vfPgEcbwMDiHp1rZ9iINheMi4WXsogQ1jQ== X-Received: by 2002:a05:6402:4441:b0:454:8a74:5459 with SMTP id o1-20020a056402444100b004548a745459mr8321265edb.155.1666200024280; Wed, 19 Oct 2022 10:20:24 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:1ec1:b0:780:f131:b4d9 with SMTP id m1-20020a1709061ec100b00780f131b4d9ls9783802ejj.11.-pod-prod-gmail; Wed, 19 Oct 2022 10:20:23 -0700 (PDT) X-Received: by 2002:a17:907:75d5:b0:78d:ef76:da7d with SMTP id jl21-20020a17090775d500b0078def76da7dmr7698818ejc.476.1666200023088; Wed, 19 Oct 2022 10:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666200023; cv=none; d=google.com; s=arc-20160816; b=C/Z59iab3fsiMp0/3Rs4ZpFt9N6TvY6xwdUFDMHDvWqE46iJtbGOcjEsXaB3z+E4pX jZCErnNtMCYGelxJs73W3crvEF4vXqupJMeWY0cYmRGaa1eqgHTvq7OCj4PLi+AYmHyB G8iOzmSN6eGgGA2CGSXEolsDPez3NZmjBaIKjMEK48rS0kPk5SKfxiuRwKxRAHkyA6HV 84AkaAaa8rzxI39kF2LphMqv4pDdr0AA82M2A8UX83Opgj7y0TZm21rZpFY4SwH+xuYq 6m9befIifzWCrwk0sNjw/Qbm1BTCpnU/D8BThDlcmIxrCxNwkKe10LoOBD2QZsp6dPL1 XPkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=qvPjvqPxVMjgDohDAgNyhkOjZSQQtqEmsI8aLcVIUKw=; b=Qeqveqc+YMgANbGS+nEkQzGGFVBL+fJjeifk4qYX/652SeK7jKxLmSAXIElD5xCFK1 BDKmghQ/iqeN0kSqD9/H2j4RmTpd8M7S0bWb5xcd7HRquNmRyWWiklweuwdVhkUclruO XMEgu5AAPv+6jEgJNnkoyQqVYD/lBgig+B9U/ufi4ZJND/8NVAR+nIjGx3cYpq9eCaNo rIdg0e2Ke0jx/33P+vBlEsTa/GHWxDcXKAsEdEK/MqcxOM1lCUa6D7WfoZpkPWBmdR4N Tugag/0tlDQNg4NVP2cPmEbpGnMPdZO5p2LvKdmUd4an/scOO9Co5b3VYhrLUpkdVUdT k5qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MN7/X2A+"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id t5-20020a170906178500b0078df76926b5sor6930517eje.102.2022.10.19.10.20.23 for (Google Transport Security); Wed, 19 Oct 2022 10:20:23 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:3f27:b0:78d:ad42:f733 with SMTP id hq39-20020a1709073f2700b0078dad42f733mr7946399ejc.320.1666200022647; Wed, 19 Oct 2022 10:20:22 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-233-42-253.retail.telecomitalia.it. [95.233.42.253]) by smtp.gmail.com with ESMTPSA id b27-20020a17090630db00b0073dbaeb50f6sm9237983ejb.169.2022.10.19.10.20.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 10:20:22 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Cc: anthony@amarulasolutions.com, jagan@amarulasolutions.com, dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, tommaso.merciai@amarulasolutions.com Subject: [RFC PATCH 0/8] clk: imx8mn: setup clocks by device tree Date: Wed, 19 Oct 2022 19:20:11 +0200 Message-Id: <20221019172019.2303223-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MN7/X2A+"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This draft series (description of commits is not complete, the latest patch is not complete, ...) aims to setup all imx8mn's clocks by device tree. I send it even if it is a draft to understand if it can make sense or not. Whether it makes sense to continue it as it has been developed up to now or not. Any suggestions are welcome. Dario Binacchi (8): clk: imx: add structure to extend register accesses clk: imx: add imx_dt_clk_name() helper to use clock-output-names clk: imx: add imx_get_clk_hw_from_dt() helper clk: imx: add support for imx8mn gate clock clk: imx: add support for imx8mn mux clock clk: imx: pll14xx: support driver's registration by device tree arm64: dts: imx8mn: add dumy clock arm64: dts: imx8mn: add imx8mn-clocks.dtsi .../boot/dts/freescale/imx8mn-clocks.dtsi | 581 ++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8mn.dtsi | 48 +- drivers/clk/imx/Makefile | 2 + drivers/clk/imx/clk-gate.c | 180 ++++++ drivers/clk/imx/clk-imx8mn.c | 128 ++-- drivers/clk/imx/clk-mux.c | 239 +++++++ drivers/clk/imx/clk-pll14xx.c | 242 ++++++-- drivers/clk/imx/clk.c | 32 + drivers/clk/imx/clk.h | 16 + 9 files changed, 1313 insertions(+), 155 deletions(-) create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-clocks.dtsi create mode 100644 drivers/clk/imx/clk-gate.c create mode 100644 drivers/clk/imx/clk-mux.c