From patchwork Tue Sep 27 10:24:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2388 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B678D3F1C8 for ; Tue, 27 Sep 2022 12:25:34 +0200 (CEST) Received: by mail-qk1-f199.google.com with SMTP id w10-20020a05620a444a00b006ce9917ea1fsf6978242qkp.16 for ; Tue, 27 Sep 2022 03:25:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664274333; cv=pass; d=google.com; s=arc-20160816; b=aEl5vYcj6kxzjQ9n78c2yexv+eC66numJy/PyWP4TjWwnli/S5kRe4BvhFibxQeEWv bcEYXLKopRIXoVtOkulQo+QAn5gTfCed/lgpswfO41gXYN3RiYuNhpyCNlcz3rLrhQiP zWFNOoHm/dN99C3icntzfHsstXqZCRU2VLz7aT9TtYiiH50K0dOYGuLPMQVIGdAzMfvO I1BNwCmZPGKl4QSv9eG4i/WlzZnZAHsXLqeuhriTtllOuxtKdvtubv35MdRtDVNMbq0B FE6K3svnO3o2lpnwQCxQCxpJpjYLMB9nUGPLgPZ1A5je7wKMgEtm30Q+3CPTGjL5j1t2 5Dhw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TCNqw8nDFBZ+9RfaM6MHVaHe/s4S4aL2bMgmQ7kF7rg=; b=QrVtGtzMCHOsXRsCQEWjEnbAhPLcJxsI22b2mMISF5XxlpKLA8f92wu9IBrPVYhsMj cHUqcPNuz6W1aZWPz6DsNIua7sQPf0tLBINS6WAQBrCOP9oZUo3+Jjw3EHk+ChlWxG+W zr9rar8ghiFypmxLgffoRfQ/ickAQ1MdFRs1MC7LPNJGsaRSLCxrsp//fcWiWVczRqDo QAHx6TTULaRjAz5vRZYRs7GWz/Y9woBp5mBuU41ns9bSout0lHrKiZgzdhUF7PTZV+3U XSV69XSFoAQhVi6uAN0MKDq3PsAVzaGcf+ZPy+LYyq3Xckz0gUUsd4e7aHprwdjxtDk5 29TA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OzZubobJ; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date; bh=TCNqw8nDFBZ+9RfaM6MHVaHe/s4S4aL2bMgmQ7kF7rg=; b=g0w9pw6hRltC5JYXSJkle5t0dCuOFcEJ+f8r6fGD9CQAyzG4uHKYmPgWYyhPVaK5SF vEyvffbHQCXJEKzFaZ9yHXSSZBNn/e2/klFX+1nzMxODj6IXF3V66chvp9FdVVqY/4Ut Mn0NVeUkeDlUzbq3tP6ACPrjq+6vSOAe5jtvs= 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=TCNqw8nDFBZ+9RfaM6MHVaHe/s4S4aL2bMgmQ7kF7rg=; b=dSoS2NRug7pq6xreDA+BFkH2ueCvObKlVl6mAbuqOmbRuBmS0ceT0SeO2IUNqC5Mfc luyKUgCT2ytHNvHRaDxzqUaTnGHZOpU6jNrw14uqXo2pYlRE7yl18kKpn3Rv8CUPZ73/ fKi2XIbe5rbgspLlTwxTCKstSqiWlIh7TBA9bL5Sczro+rrJggUzWsdrH1qnz33IoMDK sljWVaMZHkB3D/AspuZabuZds0bMoPtjL3dfMRHzKwQ1ZOpcgIxJJvDStpfaQDp/poJQ 8t0NSwA3mCLLWgj6a5OUS6RuNKIOJoAEptzY8NKHbStu2iUzXKzUBIMkKOT0DRUwux5B v4Lg== X-Gm-Message-State: ACrzQf2up1dXxzp6bNsyOX9yRGCD43IpjhHeO9QVH+AV2LXDxpTynedm XIJWKVG8iDPgo85/9Da+W+m7Qooc X-Google-Smtp-Source: AMsMyM7Ys+Lih0tERjryZj0/ccR/+bh963UvlYwaDo+VQAmZ/BU+dtuNkmEsuE69z/itpGmMs9VZEw== X-Received: by 2002:a05:620a:c55:b0:6a7:9f07:f41 with SMTP id u21-20020a05620a0c5500b006a79f070f41mr17445247qki.430.1664274333764; Tue, 27 Sep 2022 03:25:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a0c:a9ce:0:b0:4ad:3c6e:9c05 with SMTP id c14-20020a0ca9ce000000b004ad3c6e9c05ls1070753qvb.11.-pod-prod-gmail; Tue, 27 Sep 2022 03:25:33 -0700 (PDT) X-Received: by 2002:a05:6214:4101:b0:4af:8cdc:20c4 with SMTP id kc1-20020a056214410100b004af8cdc20c4mr1598763qvb.6.1664274333219; Tue, 27 Sep 2022 03:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664274333; cv=none; d=google.com; s=arc-20160816; b=Bwopk89cI824LK5sp0/DVj8WdLcp63tNO85IIx4ps8d7tMvuwfnM47I3AknELfDDn7 m1+Nr2KSmg/yMQ3+bw6JFW3fYEbRdxYYmwcrYPyNbSWmP1w7MUVgiQ3KbBvBz1Z5/JAG QOjfuZ9EJ2gzsZAJiNmMT6I1NAfDxUtTtx0ymSarxyti3rQcTHvV4FkDS9xIg6TZtTmI IJgtoQ1CMYM6dllOZrCnLGIL+iu3vQqRk3l/YuqvbvUvNjH2SKWFdWkkAAu3i3sylAsT ZYcSJD/4jvYCT9SOHMAkz8jOZTXDEOwemTVxBlqBm+TJoz8nyNoE4XX+RLWfRBNKlvDI UdkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pGDKq+xn18+m6jtoNNUu49y0z2SdD5p2VhRYi00YVHY=; b=RBlr4BvDwli+7V1IShr35JjxvZNzA+1cqip2bQDc61SlPlTUq6I1mKMcxlxkO0x6ag B3U2MrSpZunBormxd1Do8nY5GEgdu1XzXH4oMJc9i6rec2p9IYkqxFcIDHVB204pBV2B S3wywhSwxFtO8dIeQJrEhcQJJ/JVxcpYm436l/zSg8ewCMwkunCTMfJKfws6K7oikTgO Xw3/xnnaX7zJspquCeqkCG7SeG7AIbUl/hCxoMy/yALQd//sn+sA9nMoClmcXrwOic1W s1rgMJDLF2Y16xEbHlS0a/qMj0p+WZ1oV4+yfgA/pTXKjfZrOnCsEDvEEArGWv10FQ0d erIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OzZubobJ; 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 iy13-20020a0562140f6d00b004a06adbd4c5sor814347qvb.10.2022.09.27.03.25.33 for (Google Transport Security); Tue, 27 Sep 2022 03:25:33 -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:a0c:dd94:0:b0:4ad:4f0e:d660 with SMTP id v20-20020a0cdd94000000b004ad4f0ed660mr20230334qvk.118.1664274332668; Tue, 27 Sep 2022 03:25:32 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id d11-20020a05620a240b00b006be8713f742sm752220qkn.38.2022.09.27.03.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 03:25:32 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Cc: michael@amarulasolutions.com, Dario Binacchi Subject: [PATCH 2/6] clk: imx: clk-imx8mn add gpmi nand clocks Date: Tue, 27 Sep 2022 12:24:39 +0200 Message-Id: <20220927102443.1816168-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220927102443.1816168-1-dario.binacchi@amarulasolutions.com> References: <20220927102443.1816168-1-dario.binacchi@amarulasolutions.com> 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=OzZubobJ; 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: , From: Michael Trimarchi Add gpmi nand clock. Those clock can be used in mxs nand driver to run nand to EDO mode 5, 4, ... Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk-imx8mn.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 15d7599cfb7d..83e31e37fa49 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -15,6 +15,8 @@ #include "clk.h" +static u32 share_count_nand; + static const char *pll_ref_sels[] = { "clock-osc-24m", "dummy", "dummy", "dummy", }; static const char *dram_pll_bypass_sels[] = {"dram_pll", "dram_pll_ref_sel", }; static const char *arm_pll_bypass_sels[] = {"arm_pll", "arm_pll_ref_sel", }; @@ -90,6 +92,10 @@ static const char *imx8mn_usdhc3_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sy static const char *imx8mn_qspi_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sys_pll2_333m", "sys_pll2_500m", "audio_pll2_out", "sys_pll1_266m", "sys_pll3_out", "sys_pll1_100m", }; +static const char *imx8mn_nand_sels[] = {"osc_24m", "sys_pll2_500m", "audio_pll1_out", + "sys_pll1_400m", "audio_pll2_out", "sys_pll3_out", + "sys_pll2_250m", "video_pll1_out", }; + static const char * const imx8mn_usb_core_sels[] = {"clock-osc-24m", "sys_pll1_100m", "sys_pll1_40m", "sys_pll2_100m", "sys_pll2_200m", "clk_ext2", "clk_ext3", "audio_pll2_out", }; @@ -268,6 +274,8 @@ static int imx8mn_clk_probe(struct udevice *dev) clk_dm(IMX8MN_CLK_USDHC3, imx8m_clk_composite("usdhc3", imx8mn_usdhc3_sels, base + 0xbc80)); + clk_dm(IMX8MN_CLK_NAND, + imx8m_clk_composite("nand", imx8mn_nand_sels, base + 0xab00)); clk_dm(IMX8MN_CLK_QSPI, imx8m_clk_composite("qspi", imx8mn_qspi_sels, base + 0xab80)); clk_dm(IMX8MN_CLK_USB_CORE_REF, @@ -299,6 +307,11 @@ static int imx8mn_clk_probe(struct udevice *dev) imx_clk_gate4("usdhc3_root_clk", "usdhc3", base + 0x45e0, 0)); clk_dm(IMX8MN_CLK_QSPI_ROOT, imx_clk_gate4("qspi_root_clk", "qspi", base + 0x42f0, 0)); + clk_dm(IMX8MN_CLK_NAND_ROOT, + imx_clk_gate2_shared2("nand_root_clk", "nand", base + 0x4300, 0, &share_count_nand)); + clk_dm(IMX8MN_CLK_NAND_USDHC_BUS_RAWNAND_CLK, + imx_clk_gate2_shared2("nand_usdhc_rawnand_clk", "nand_usdhc_bus", base + 0x4300, 0, + &share_count_nand)); clk_dm(IMX8MN_CLK_USB1_CTRL_ROOT, imx_clk_gate4("usb1_ctrl_root_clk", "usb_bus", base + 0x44d0, 0));