From patchwork Tue Apr 2 11:28:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 189 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2628140B0A for ; Tue, 2 Apr 2019 13:29:13 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id h69sf9598863pfd.21 for ; Tue, 02 Apr 2019 04:29:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204548; cv=pass; d=google.com; s=arc-20160816; b=S+OQbJs0sUZIkg5kFF1WCteaypjRaA2aOLXSQd5Ix0oN3FL9sKhXxtJErvwOcMfWQB QM07pXrV2prp+3c61fShUIDF8lO0K7ylMsmy9LaNuy8mLazz5P7NxSvwAog0cP5E9CNO hhiQL2WZEwIRVCmjJOFHE5Dh8yjkGho9eboAqi1Q6GRhPg6bXUjbPMvqbyutHCPmmxB3 YwDgsQ6stf//iUVlqBG8pM/RM57wuk/rSQ/+NP2j0dXYtTKeygGhPuDJzBrQpNEOqN4N MqD8UgnCbPXiTgWoMuo4dH6Vo7gKDUk1sv0DPamIfM8WOqvy6vA6XMThFv9sLZP4jinu drkg== 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=AjoxMYX5xazSFNFCCO+CrPbQnTqriLMk+O/KaCAOgCw=; b=mfj/olD/8odUFZGwAieIemNJQsFQJgXLv0CN9RDeTp76/gLY5iBmJTovQ5kTSHCM0F EQ4/bXwx2ulGOVwnz9dHx3sA6wmRZzSPJz0QESlExRdVpmo0Je/uBXLCp6LBoAeDpdDE qsgwuIWabYJjm3HC3hpGgD0c6ZeSJgIkRNSeWvYI+yihgNe/VwUmAsHtQwyUrh6D/C99 KDG68PbZL0kTuoSGC5NR8W782txPYp668wApnPr77AHdjqY8A1VS0ARkQueX694ow4VX th/1Wwy9Cdun2nnKxIRkGqm2OEICmLI2vJ3eMZ08UHMf7aHlOc01d/Gz+Pnr9YLVZKiC Hfsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jp7iznYF; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=AjoxMYX5xazSFNFCCO+CrPbQnTqriLMk+O/KaCAOgCw=; b=AunVqFtug53yyDpBmYe2WZOqG23eNWZkJvMZNpBaPDiVEEIyA88TfwVkJvpsTPwz54 1TkB9Gs1Cv9hAkv07BipbUdbISfRZN0Aix+i2vUThkuAwhLQuNBB9lOVrKvJBcD3gwnN TkCqUbKFzL/1kBt/0zqnaWHWoWfaYdqWj93ks= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=AjoxMYX5xazSFNFCCO+CrPbQnTqriLMk+O/KaCAOgCw=; b=O4hkduqV5WX3DQPbKYD4XAJgfno6E1HNwCh4tZqsm9gD02jhReOSG8B4J/1mA4XzCK 8OK7mP/RXPYB1PzVy+735sGwu/Fg09vtPdYlj5X/p9GFQjZGyJzNor1BV16FIc33rX4K 5WeSJJcI9X41UujHMOJnjFBJabLBopsr93KcTUxa78gPRZ4z4B5DO/cm/i0jbURY0+5G spnzmNEjc994QiNRA9lt8H4gJ9WY7006EVjKzeB5i/cBCn+F07St06U0yE0+b6d2GT2M KuL3m6zS4Weevr2JTbw+rQmAOFXIuP89RSG6rXqrFZI4sVQ8ccEpc3kuK7Jk2LlA65mK Ghiw== X-Gm-Message-State: APjAAAULNHK7uYCFOPk1mx7zzGBpB0QWD85DTfj4W8rdVgYd+TKY+gwX Oh2wEa5lhJlGbMDqG1n7sp/ADs2z X-Google-Smtp-Source: APXvYqyQJdZvT13XHc6ZCLrhl0WntoeibDiTVfMVFK9/96BIB0eBbxaBaBDh0jsiXyC+n92StWDXhA== X-Received: by 2002:a17:902:8485:: with SMTP id c5mr1407018plo.29.1554204548813; Tue, 02 Apr 2019 04:29:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:f80f:: with SMTP id n15ls139357pgh.13.gmail; Tue, 02 Apr 2019 04:29:08 -0700 (PDT) X-Received: by 2002:a63:c706:: with SMTP id n6mr32648780pgg.310.1554204548401; Tue, 02 Apr 2019 04:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204548; cv=none; d=google.com; s=arc-20160816; b=ItIsMPv9cg4y43ijuoY7xyDWRba73xRqkK9w+kOEKIB1jpe8Aje66SEJHxHQh1mJU4 aoKTebraTt8rihNKhor+FPDWr9TNqS+XLVkbHyI/NdvZS9hSgarRmHX0HabHlySLteyd GR2igrd+Vj00kQL1iMeUhR1nrUMfvvQRKRtgFOwnCGLt6Qq3yQ1CQRzXJOtG5hQUpWSc /5x/56co3+p0yLdjk1kgtNT3+XpoNVfQjS3fAHwzAxc1ITDojd2PvGWQj1YH577js0Ca 0gMmXXbSbW1IwbyKS3BC/Vs8MozOzAtPWnMS4Ex1i8glidp43mxr5WTdkgBkPFMCt1Zx m6Kg== 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=+98ES9ZYnE0+OkTGwia9MWbbM6YR1Wp8HWdMroJ+xNA=; b=jmyaOJ4FpjdbrsmsmIu2ZHCGR5sulMZzBhyauJBpB8c2JHzSR/T3AuV78SfkRjkz23 aKAXf2WbzWY/0cxtGRPQWkIDH3Ib/6hb6Jd5xeztT+vaDIHxeO76KieDzp3hL5GP+lag eKIRtaaXYEpvV4sXw7+EVEKTjbPv7d87vAFMy8wyPVWkFke/yaVyLrUXKnAKe4BST4L/ CerdSpSpwfUP9V8ZBOXUlTinDk2W78aWVtIAaAeJ6TIWyHri2Yktm1tNRjH0NfXGQULq X/XoyFbP2WwcpG8rNBISwVI7L178a1AjR1DpivIyqhWPTkIx4TmF/5JL78kmNxPTQmxQ lT7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jp7iznYF; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d8sor16435044pln.53.2019.04.02.04.29.08 for (Google Transport Security); Tue, 02 Apr 2019 04:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:2bab:: with SMTP id l40mr69615736plb.273.1554204548124; Tue, 02 Apr 2019 04:29:08 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:07 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 01/10] clk: imx: Kconfig: Make CONFIG_CLK available for selection Date: Tue, 2 Apr 2019 16:58:34 +0530 Message-Id: <20190402112843.992-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jp7iznYF; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , Adjust the Kconfig to hide architecture and other internal configs so-that generic CONFIG_CLK is available for selection. This would make easy for configuration selections between SoC families with in the same SoC and even more readable. Cc: Peng Fan Signed-off-by: Jagan Teki --- configs/imx8qxp_mek_defconfig | 2 +- drivers/clk/imx/Kconfig | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig index a94998b8b5..8ad7ef4c04 100644 --- a/configs/imx8qxp_mek_defconfig +++ b/configs/imx8qxp_mek_defconfig @@ -40,7 +40,7 @@ CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-mek" CONFIG_ENV_IS_IN_MMC=y CONFIG_SPL_DM=y CONFIG_SPL_CLK=y -CONFIG_CLK_IMX8=y +CONFIG_CLK=y CONFIG_CPU=y CONFIG_DM_GPIO=y CONFIG_MXC_GPIO=y diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index a6fb58d6cf..a125c23a19 100644 --- a/drivers/clk/imx/Kconfig +++ b/drivers/clk/imx/Kconfig @@ -1,6 +1,17 @@ +config CLK_IMX + bool "Clock support for i.MX SoCs" + depends on CLK && ARCH_IMX8 + default y + help + This enables support for common clock driver API on i.MX + SoCs. + +if CLK_IMX + config CLK_IMX8 bool "Clock support for i.MX8" - depends on ARCH_IMX8 - select CLK + default ARCH_IMX8 help This enables support clock driver for i.MX8 platforms. + +endif # CLK_IMX From patchwork Tue Apr 2 11:28:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 191 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2232E3F078 for ; Tue, 2 Apr 2019 13:29:16 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id y2sf5327983pfn.13 for ; Tue, 02 Apr 2019 04:29:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204555; cv=pass; d=google.com; s=arc-20160816; b=SzB8t5Ms90NuVCx9WHWl3j9SJ93hvIAtc7z5hRL663Ew1+cLo9WcGXDfn7Td3ABElq ueDvNQfxehqN6uu4alqYXWpg+uRiBYlWXBT/ThWRtS+P5SAIPbyvGWCLyXd6J7UK+fxc Y7LF/WpCAnNB1IWhDR4U5PxtISbm8fmzIyaiITe86xHdkmVSGRZAbvseB+kOA9McvoT5 qWFc4AA3X5ZAMiB2ROfe6fdjLyHUNRXpSJeve9TOMmfHlJYEN+YOPhPEueIC1++E11dc 61gLuwNkJNfMQVAHixU2LyRjUc01+gh2et2ZfuIZWvuvEPIfohM5oSWcuc3sfIvwqkJ1 m+jw== 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=Sl+2gLuLs5A93/YCfHcWIT1fiXHKPoKZYDYXVRN99Bo=; b=kvEi4b9wzXeRqZxJUoGNlJhJdubT7lU2G7ArymHYtptWVzcFi2vO6KHTWm5+aIS01z 9G6Ik+OsjbmKGaHpsAmVmTlC3FChanPOnu3vpTA62MLzigEBda8DWsxNOG/Vt6sSlEcz Sap0lDeliQW/mk93vvIIb7l7wX06vS9X7b9nsT2KpXsv7q4bxiSTerGTJWNBviGRBCVo NpQlsAL1v/enRw3O2QQ8qfTcjRB1kuq+IGAAiovPPMP4KYe8gKcmI5WEF2vT0wW5IT/p zyNBmVwAb7Ha5FCiGfGTrMAUscHHAhMzR4Zmfhm7dAE3HUSzl36NPNEDYO6ygI8yKwva fyzQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ey9lIdgh; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Sl+2gLuLs5A93/YCfHcWIT1fiXHKPoKZYDYXVRN99Bo=; b=HM9FbccPPZO4a8AIlqYg+My6k9zFsK4B8mIq6KzaYpsGjQcfNos/bi9fAwtYMUGGaX JoSiAFrcDFaOn4iZf9nFJ5XemQW7m47suFiK8mvRJXnaO9ybaeOk6H8qIoZcrqZhFwhX OgYYL5p1y4fz0mSM6fmYQOLIAdQhbEXV9KIqQ= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Sl+2gLuLs5A93/YCfHcWIT1fiXHKPoKZYDYXVRN99Bo=; b=ZFsFIKKBMnlKl8fHDvpG81NNweBwtVc2khnT8kibjfEDwCSPgi1R8OEwPykhFozXPs C9z5SvGXtyEyy/EszrDhHx53MHP5kxw4KvYkx76V7EgnVLUtpN8NEkcy2oqmpykUQWwW 1cnEMd7mk74vkik9uSZ10U4LHWDOxxfIdDMxR57GfzQCInY8+L8+CCVL7V8WUutIpP8f ZMSLIf+ffZLDR5rZ9cEQom5x6cVsOuCOZEBj4K8wJ/X83mFCC1EANEl9kjlQzx2Gs28r L05Oniuy8k35B1PlBEzd03f5rj/H6w12ng4EcslKgcVJlO74SPkmlfIF0dGOL493JRSZ uy1Q== X-Gm-Message-State: APjAAAUkn5CbsIcauvbiAuHcylC3FSgo9mKjr4ZslNfgpe6WeerWtJ++ 8CdfSqFE4cfPzEf2f2d+GvESCRys X-Google-Smtp-Source: APXvYqyiw+lZzeIoxSPmtBmkeMjcI2giJ8X7PNjrqSU4+qqKxvZwf/Wrxf1mbcJwpG+G0r8PMYu2Zw== X-Received: by 2002:a17:902:1ab:: with SMTP id b40mr95895plb.139.1554204554904; Tue, 02 Apr 2019 04:29:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:4554:: with SMTP id s81ls145090pfa.3.gmail; Tue, 02 Apr 2019 04:29:14 -0700 (PDT) X-Received: by 2002:a62:5385:: with SMTP id h127mr66239290pfb.10.1554204554465; Tue, 02 Apr 2019 04:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204554; cv=none; d=google.com; s=arc-20160816; b=FLuJ8HFlYVRD8zd+dE+VceNu4RXpHBQapLZRQO5SE55TOOdFq13JdUbk03RofVvOuQ 0oUndBLcX7m9DAoM45j40uC7gA1Jm4qiIsf/wrp8zhSCOoFip6N0ZkMiO+w4rFxtlMHu UCYIVK96JGFoPjhY/LHLJtGLENqCvFCkW6fdwcNpvD2/Y0zx7LnztY/u0RNzR/Id4a6J qNUznXEbcGb7xK1vhhtPgbMiKC9Lhu01UaAm7vMOghyzPF6j9gvBXzsObsfrEQ8Nu5Tj 70+JQgrKn6zoA6yyKCQUJYqLj9e7MA3i90agDt7hYDWZGnFkibqyJLNKNq6+VLtSPvcA zJtw== 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=LXIxXUhtyJWzir7sGVpBhJ+M/jZkPrnV0ICtRuNFk3E=; b=HFtGUh+fRAh7P2r+8BfZv20G4Jd3A+s2zgSCfqbqIzNE6/KZTaqbg7ML1FFcE60or8 u+h7VAz2VHvwGO5NXykN/SnJvhySgpjM9OwhN3/eihqE5zvv56pVKzYX46w4LxEwqkVj 5EnBMBlgrMVHdU8X1fs0MTDoSKrtJYj7G2eTrvsagGXy/mcjtBqU+zqNAegRQ6N20hWg vYv2CjGbaJoR1Hl08YCEMUKpxH9DfZ8svbg1IF+VSLZNIs7pzQek0kOE039CkkhY+xI7 5Hlz6TWWLhfEToHkB6HkCiLEaBXJAWOdVgzKE77sm9f1aNienqhV+YFkVlcu09ayE4RG pVJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ey9lIdgh; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q71sor12990338pfc.2.2019.04.02.04.29.13 for (Google Transport Security); Tue, 02 Apr 2019 04:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:83ce:: with SMTP id j14mr490554pfn.57.1554204552971; Tue, 02 Apr 2019 04:29:12 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:12 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 02/10] clk: imx: Add i.MX6Q clock driver Date: Tue, 2 Apr 2019 16:58:35 +0530 Message-Id: <20190402112843.992-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ey9lIdgh; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , i.MX6 clock control module comprise of parent clocks, gates, multiplexers, dividers, PODF, PLL, fixed rate and etc. This patch add i.MX6Q USDHC clocks via gate clock which would eventually handle enable/disable operations via imx6_clock_gate. Signed-off-by: Jagan Teki --- arch/arm/include/asm/arch-mx6/clock.h | 44 +++++++++++++++++ drivers/clk/imx/Kconfig | 9 +++- drivers/clk/imx/Makefile | 5 ++ drivers/clk/imx/clk-imx6-common.c | 69 +++++++++++++++++++++++++++ drivers/clk/imx/clk-imx6q.c | 39 +++++++++++++++ 5 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/imx/clk-imx6-common.c create mode 100644 drivers/clk/imx/clk-imx6q.c diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index a9481a5fea..fa921a9f08 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -21,6 +21,50 @@ #define MXC_CLK32 32768 #endif +/** + * struct imx6_clk_gate - imx6 ccm clock gate + * + * @off: ccm gate offset + * @bit: ccm gate bit + */ +struct imx6_clk_gate { + u16 off; + u32 bit; +}; + +#define GATE(_off, _bit) { \ + .off = _off, \ + .bit = _bit, \ +} + +/** + * struct imx6_clk_desc - imx6 clock control module descriptor + * + * @gates: ccm clock gates + */ +struct imx6_clk_desc { + const struct imx6_clk_gate *gates; +}; + +/** + * struct imx6_clk_priv - imx6 clock control module + * + * @base: ccm base address + * @desc: ccm descriptor + */ +struct imx6_clk_priv { + void *base; + const struct imx6_clk_desc *desc; +}; + +/** + * imx6_clk_probe - common imx6 clock probe + * @dev: clock device + */ +int imx6_clk_probe(struct udevice *dev); + +extern struct clk_ops imx6_clk_ops; + enum mxc_clock { MXC_ARM_CLK = 0, MXC_PER_CLK, diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index a125c23a19..f81903dcf4 100644 --- a/drivers/clk/imx/Kconfig +++ b/drivers/clk/imx/Kconfig @@ -1,6 +1,6 @@ config CLK_IMX bool "Clock support for i.MX SoCs" - depends on CLK && ARCH_IMX8 + depends on CLK && (ARCH_MX6 || ARCH_IMX8) default y help This enables support for common clock driver API on i.MX @@ -8,6 +8,13 @@ config CLK_IMX if CLK_IMX +config CLK_IMX6Q + bool "Clock driver for i.MX6QDL" + default MX6QDL + help + This enables common clock driver support for platforms based + on i.MX6 QDL SoC. + config CLK_IMX8 bool "Clock support for i.MX8" default ARCH_IMX8 diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index 5505ae52e2..a4cb2bbf3b 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -2,4 +2,9 @@ # # SPDX-License-Identifier: GPL-2.0 +ifdef CONFIG_ARCH_MX6 +obj-$(CONFIG_CLK_IMX) += clk-imx6-common.o +endif + +obj-$(CONFIG_CLK_IMX6Q) += clk-imx6q.o obj-$(CONFIG_CLK_IMX8) += clk-imx8.o diff --git a/drivers/clk/imx/clk-imx6-common.c b/drivers/clk/imx/clk-imx6-common.c new file mode 100644 index 0000000000..1d38f51f7e --- /dev/null +++ b/drivers/clk/imx/clk-imx6-common.c @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Amarula Solutions. + * Author: Jagan Teki + */ + +#include +#include +#include +#include +#include +#include +#include + +static const struct imx6_clk_gate *priv_to_gate(struct imx6_clk_priv *priv, + unsigned long id) +{ + return &priv->desc->gates[id]; +} + +static int imx6_set_gate(struct clk *clk, bool on) +{ + struct imx6_clk_priv *priv = dev_get_priv(clk->dev); + const struct imx6_clk_gate *gate = priv_to_gate(priv, clk->id); + u32 reg; + + debug("%s: (CLK#%ld) off#0x%x, BIT(%d)\n", __func__, + clk->id, gate->off, ilog2(gate->bit)); + + reg = readl(priv->base + gate->off); + if (on) + reg |= gate->bit; + else + reg &= ~gate->bit; + + writel(reg, priv->base + gate->off); + + return 0; +} + +static int imx6_clk_enable(struct clk *clk) +{ + return imx6_set_gate(clk, true); +} + +static int imx6_clk_disable(struct clk *clk) +{ + return imx6_set_gate(clk, false); +} + +struct clk_ops imx6_clk_ops = { + .enable = imx6_clk_enable, + .disable = imx6_clk_disable, +}; + +int imx6_clk_probe(struct udevice *dev) +{ + struct imx6_clk_priv *priv = dev_get_priv(dev); + + priv->base = dev_read_addr_ptr(dev); + if (!priv->base) + return -ENOMEM; + + priv->desc = (const struct imx6_clk_desc *)dev_get_driver_data(dev); + if (!priv->desc) + return -EINVAL; + + return 0; +} diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c new file mode 100644 index 0000000000..8ec713298d --- /dev/null +++ b/drivers/clk/imx/clk-imx6q.c @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Amarula Solutions. + * Author: Jagan Teki + */ + +#include +#include +#include +#include +#include + +static const struct imx6_clk_gate imx6q_gates[] = { + [IMX6QDL_CLK_USDHC1] = GATE(0x080, GENMASK(3, 2)), + [IMX6QDL_CLK_USDHC2] = GATE(0x080, GENMASK(5, 4)), + [IMX6QDL_CLK_USDHC3] = GATE(0x080, GENMASK(7, 6)), + [IMX6QDL_CLK_USDHC4] = GATE(0x080, GENMASK(9, 8)), +}; + +static const struct imx6_clk_desc imx6q_clk_desc = { + .gates = imx6q_gates, +}; + +static const struct udevice_id clk_imx6q_ids[] = { + { + .compatible = "fsl,imx6q-ccm", + .data = (ulong)&imx6q_clk_desc + }, + { /* sentinel */ } +}; + +U_BOOT_DRIVER(clk_imx6q) = { + .name = "clk_imx6q", + .id = UCLASS_CLK, + .of_match = clk_imx6q_ids, + .priv_auto_alloc_size = sizeof(struct imx6_clk_priv), + .ops = &imx6_clk_ops, + .probe = imx6_clk_probe, +}; From patchwork Tue Apr 2 11:28:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 192 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 265C03F078 for ; Tue, 2 Apr 2019 13:29:20 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id 132sf9726683pgc.18 for ; Tue, 02 Apr 2019 04:29:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204558; cv=pass; d=google.com; s=arc-20160816; b=mzS93vmYVTUJdnq4bQQ6EXjIcPehgSLJI0e5qLRmSNBibfRtsuBcnuUD0ooG7K04O/ Sk1+9F6Vm3OfzODE2iJEbr5vMl0V2rme8i9rvYspkXj5TssIUnnBwORZQ88hCi3+CG2n SYy6juEv0cuH/Jzse52I4NAjLB531VTVVRUTp/UbuMqgIPCLahCIKB2GK/DbeE5F2g5t 3dS13Qst/JPJff5cWL4VaI+LoWeXJVGK/Y0mMNFUjrdCbzOPZ1xMcS58dLI9Pc/+FdKl ANQVT63C/9g+JVaG7gmkIgE95kEEC2KXZff48ke0Zr1QjN3f3G+sHL77mpZ1pLqp6g9i JHLA== 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=LjmqfDl0cvZ0W6wfeY8zyOyucAntpc0Pj3DG8oCSMNE=; b=KojjSZmymCLpdFEthwvid42X6tk59KaaruqcMtgYzs63uOqG3V3MmLr7DM5Q3FSMF2 TQfI7SdhY0BdonwKzx0pV9GyyXhLscu2S7+c7f/JGIVJG0QTjgnP7JPJcHdUVQ6D7hDm La5PkFfnxkTRkA7/6TydygQN6xcYQ1TcisPxFCqd/7zVMjaenypwzlwovJI26hgxsdmQ IDqVWechlEx4VNqdb2oS/BqZ2N6b3jK4C9VhTbC0sR0ddW0nryCUjove78Rajx3zmEk0 Gl8+RPGVfPAOmfnk/oju/S8ar7kRoAlnuW3cCaRHlBFOqh8MEk9X/8TlMxt6n2COUwIa DnHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F0jWHL5m; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=LjmqfDl0cvZ0W6wfeY8zyOyucAntpc0Pj3DG8oCSMNE=; b=N5jophH6hrGHwSCb8IJd43lsuTRekyxJPI+5MJaGSdp0+6kEQEYmVtAe2ImZR+MLJw nPVJyNhM4Xsme7Jc2/z3IPw4IwQKy/k1bE0eyk2ZZxmtIwkOydv8z/xI5G7USndIJLr9 rfRjM7ogEhWHiad1Td4tgtmLoUnFY1Sc34F7s= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=LjmqfDl0cvZ0W6wfeY8zyOyucAntpc0Pj3DG8oCSMNE=; b=MmqcrIaaNO8S46jEh/NYVtuzu6v6M7SaF9re98dsnxO1cTm8/DDWLDIe+AiFzy9UaG 46G4Pl601sll67xV+TzCLNxdS1hneLvY2NTVN6ccPMmLfjVmgPgwXkRQhpA3nlTikErY JLjtypbz6anKI7nrFcQ/dH2Qf9n2Fb7XY79Qui4X/MNX0tLZyxMCrG/TOL68CBLC8qsH Ius1NmIe+lfHYRo3nBSpuzJU12XJvAUnOFfYEv0CeEFxX+wN/+2854xmY6m457Z20MIL i9bNFjS2ueRWap5KQP6s5PAQpfffiuw2M9VmNxd7UrZz4TVAHgRhCrItFqDy6m85J4D5 gwyg== X-Gm-Message-State: APjAAAWbfTjwhCgpr7yAjnlLqFxsS1bgxYC/rh8MkosZYmHx8V9kuJUw LPvLA5LS5K8tff34GFXiAqGSoqDm X-Google-Smtp-Source: APXvYqyvv6jhp8AtfUURq97TwDSDAq+7w10WXUHepuUD2XL15G9nzXZLgDy1bcYjJPMLLtAmSx2CWA== X-Received: by 2002:a63:610f:: with SMTP id v15mr1027501pgb.37.1554204558715; Tue, 02 Apr 2019 04:29:18 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:6cc9:: with SMTP id h192ls188338pgc.3.gmail; Tue, 02 Apr 2019 04:29:18 -0700 (PDT) X-Received: by 2002:a62:604:: with SMTP id 4mr32931827pfg.38.1554204558338; Tue, 02 Apr 2019 04:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204558; cv=none; d=google.com; s=arc-20160816; b=aGx33UrvcXGrlU6Y+alSJSudAT+u0Ym0KiQ8Zl9w6eI7jTF8fSJVPcKLJMxcoXEy6X 58Gm2VdXATxQrjDTP3Q+FaQkvOZIKQqNAmfe9oI8qAr/Do4nFn69dndyz3UC7g+q5KQQ UtpCUtpY2NVCdYitKuixbj5lE8eq1IjFi5IY0qW4R0vpihsnaaMweAXfnzRJtpCDyGNp Xi0pjTOP6o2X3q9stcPP5E0oFvo7Br0uNy5vWpAwcbKY2cevlF4EBOxRJPCoSrxKnxI3 sy0j+7b4DrmB9H/CEh0IRcgKxPasmCj4FQOtZt2A8PLplUY0lL9PRTRqn0IlxvbZzxQ0 llxA== 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=a8AJbxAdU8389NRnR6mrBE1duz8udYI+xFOCHMOM90o=; b=Yfo8+XIxNqAIChMOFD144izbEolSQJLRR/Ei0HXC1+YdRQYD2QqCL2ZCNCra1X9gpR qaby3yclAw+flRe8W/D+Pel2DKPh6PRBBPED4GvrrYXTlgOLGXgz9sMexPsY9Ea4Y/uw 5+P9LUrTtfiL6qkvvffbBUBfcrXRhhj201TFSFX6kqTKX2a+lEvBMO2OnMyUCVzbsKAi BZ3rikeMKlZQbtgldgvkpcDwL2i6WHsjEA222a8D1mtO4mH6gPqAJM1s1gmJo1zxnuIX CY8XwmqBshfA6/LEZ57+87NDjTdH1ksWvx4FzR35bvAqHoQy7jC3tv3o9DPSwQ0QTwlT 2Iyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F0jWHL5m; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id k75sor3509355pfb.7.2019.04.02.04.29.18 for (Google Transport Security); Tue, 02 Apr 2019 04:29:18 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a65:430a:: with SMTP id j10mr49366649pgq.143.1554204558039; Tue, 02 Apr 2019 04:29:18 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:16 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 03/10] clk: imx: Add i.MX6UL clock driver Date: Tue, 2 Apr 2019 16:58:36 +0530 Message-Id: <20190402112843.992-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F0jWHL5m; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , i.MX6 clock control module comprise of parent clocks, gates, multiplexers, dividers, PODF, PLL, fixed rate and etc. This patch add i.MX6UL USDHC clocks via gate clock which would eventually handle enable/disable operations via imx6_clock_gate. Signed-off-by: Jagan Teki --- drivers/clk/imx/Kconfig | 7 +++++++ drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-imx6ul.c | 37 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 drivers/clk/imx/clk-imx6ul.c diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index f81903dcf4..952cec8bff 100644 --- a/drivers/clk/imx/Kconfig +++ b/drivers/clk/imx/Kconfig @@ -15,6 +15,13 @@ config CLK_IMX6Q This enables common clock driver support for platforms based on i.MX6 QDL SoC. +config CLK_IMX6UL + bool "Clock driver for i.MX6UL" + default MX6UL + help + This enables common clock driver support for platforms based + on i.MX6 UL SoC. + config CLK_IMX8 bool "Clock support for i.MX8" default ARCH_IMX8 diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index a4cb2bbf3b..999de1dd6f 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -7,4 +7,5 @@ obj-$(CONFIG_CLK_IMX) += clk-imx6-common.o endif obj-$(CONFIG_CLK_IMX6Q) += clk-imx6q.o +obj-$(CONFIG_CLK_IMX6UL) += clk-imx6ul.o obj-$(CONFIG_CLK_IMX8) += clk-imx8.o diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c new file mode 100644 index 0000000000..f5250e8b72 --- /dev/null +++ b/drivers/clk/imx/clk-imx6ul.c @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Amarula Solutions. + * Author: Jagan Teki + */ + +#include +#include +#include +#include +#include + +static const struct imx6_clk_gate imx6ul_gates[] = { + [IMX6UL_CLK_USDHC1] = GATE(0x080, GENMASK(3, 2)), + [IMX6UL_CLK_USDHC2] = GATE(0x080, GENMASK(5, 4)), +}; + +static const struct imx6_clk_desc imx6ul_clk_desc = { + .gates = imx6ul_gates, +}; + +static const struct udevice_id clk_imx6ul_ids[] = { + { + .compatible = "fsl,imx6ul-ccm", + .data = (ulong)&imx6ul_clk_desc + }, + { /* sentinel */ } +}; + +U_BOOT_DRIVER(clk_imx6ul) = { + .name = "clk_imx6ul", + .id = UCLASS_CLK, + .of_match = clk_imx6ul_ids, + .priv_auto_alloc_size = sizeof(struct imx6_clk_priv), + .ops = &imx6_clk_ops, + .probe = imx6_clk_probe, +}; From patchwork Tue Apr 2 11:28:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 193 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 81E823F078 for ; Tue, 2 Apr 2019 13:29:24 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id l74sf2752392pfb.23 for ; Tue, 02 Apr 2019 04:29:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204563; cv=pass; d=google.com; s=arc-20160816; b=cH5lwRk58qSx49WynY+PQSdmbN909nglstvSBSMdjZTrl+ZRZ8nF32QSc9dsR5WH8x VzEytFDT34AGLr1BRDG/+l3RSMvUK8zCRcfiBB+athqYAQ4Y00vExDO351Sxxh92sGMQ 1fy7VaitOefwSkMFPItb7CuSlPG7F4+uQ6gUvrAPT8SVWrC/FkO3qhWbBfCPzkSHE4pj ebn+gUvb+brGgSOZNbFO75Gq/eUAYW35lesGX7VaZBYsLkG4SdavirB8cZjvB+FVo0Jj 5un9dWo1U3zgSDy0MPMxHU6JyUOA/FocKDB9po+koeTXe/wpEunaZmjzgp/Smm0DitwO Q99g== 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=JmHbofsFUqLLbTB0Skg15LiO+LSqtFrZhb23ujbXg9U=; b=KsLj+vrZ7JByF68caVRdcro8u6T914Djh02LW0DdZWHL3NsQ398MwXlPN5xaZuMvcx LvzOpwi58E9FUTjBNLNP7Cxa7lXE8R6GpOvJaBUn+z39MPW0ZB44UqaMHvuAhpzFa2uW oG7lN35mx0f+RxdQXVZgrUd+oygdvkW4ly3mbMCXi3HG6tx3A7uLzEoOgatCpNrjA0Rf nXQy8h54yFrY3bZ57vbdDcTdcrUUVRMml6Q49BwXVZJ9jXM4HqWAyR2a27DdMh7U5cY1 4R7ZAP6Uc/1D7z0ynacKf7niQ7a9z3EsSoGeb+A1nZRj2CUW3qlp+Vcdb+vps+lLkTW0 dvew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hbIvGQlT; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=JmHbofsFUqLLbTB0Skg15LiO+LSqtFrZhb23ujbXg9U=; b=rVDUqootL/aTqI89K+k55/hpLlpg3KtE994hkeo3/750RY9nxTvysGlIUvVd8vunj/ nDdB+DBOma/LaEYiLIDmSg/hnJT/tJ2OIq0xtcsFoF05tySirKdxYplfU51sv3HOIRvV 94g1X9ZtFJbkeDQcSNrBnk+OU1IS5n3Rm8T0s= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=JmHbofsFUqLLbTB0Skg15LiO+LSqtFrZhb23ujbXg9U=; b=hmmZ+TfhU9A9//WuyC74HL+kXirIX+7gPZA0ku/cIZTmGcOJX61wn+y3X1pZnVtdwX C1m5x1XQ5Tw9TkTqijNVA6nlOqDcEOIMEXq/BLo+M0YTvoY0XLsh69gtb8vv3rX2sY9q u3Qe8KazMO9ayooD9L7dq2segzFsEs152lYz9zsUsIvGPV1E2rf1XXEiR/NJEJeIQBsY ZHwprwPrZNzB3jrD56FkE/ZNEkayO7oqSJLfeUZxtlI4259tvx13LdMjzHL09r10xkeq nmnINn1YUKyqalX5Eqb3/CikbwMt9Ga7tTpe9Wj0cBr/LRO1MNk4eqN27LvR4LnZIzWs Rggg== X-Gm-Message-State: APjAAAWO2VjU5ekvRw6b4QJ6C6SZvO61BwITVPN/1/gCwIVXP3/gxTzC 7nm63D6vEsd633vreOB0r6RVLTIO X-Google-Smtp-Source: APXvYqxXubzgcRE8mxoUEY1mQGFybUBOl5dB4RLwncSORVhsW9I2KIGWPI40wbSxbqEh62bfMFCZbQ== X-Received: by 2002:a17:902:b110:: with SMTP id q16mr1460927plr.50.1554204563325; Tue, 02 Apr 2019 04:29:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:ff54:: with SMTP id s20ls139487pgk.14.gmail; Tue, 02 Apr 2019 04:29:23 -0700 (PDT) X-Received: by 2002:aa7:9089:: with SMTP id i9mr7683581pfa.115.1554204562938; Tue, 02 Apr 2019 04:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204562; cv=none; d=google.com; s=arc-20160816; b=RI+vbpcKeHq3qyT5N/qDpGBq57xesgjpjb/1CsCiSEJR9vb1zDqxAihIIq8Z+HduFl WhWriJcpuHuID5tZrlRNhPH3kvE1iVpNujeZkU20rkLRbh9skz1zWmcWZ9yiTipHCXJZ g0RHVzLfeGydhVsKTXeJS7seO0UN2aZi2hhJVG40+1Fco3vQtKAbiQojWSf5fIdI+Bki 7duVAtBqJ+g0Nw/sSKTBjN+bO7AZIMzGFQCgGp2wNV10dJN7SO3OSryg9VaZEphN/QZD lIvTvDkXYZD3AlovXFqc5azGIqKuqAFVQ/gwXOSSNxqGLNMkcaY7qaual7pOiz/N+YwB GcJg== 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=Z+bH/fLv8IHDKT9j/QJHe7hHDAenZDOOj6DTOBobzlA=; b=txFOrgJG1IbFIIXMAdwL40qzqM0sJgIQcowKvFYzwPQXtT/xgtVZYFPmJ5iMA7rgpR mLZRn3xkw3bb2O1SJFZ1rrjYBMq6mqkJ3IXAII/VpR57vEgGaH+zAeMIKFhDyTzXw0jo EyRgoIIN05CFmUdNeRTbP93QUHirXF+aEKcG5oEUnVCxFqgTKfTFNgBStHlhAw+YDGLw pyvhNcklXWP3J2vSjexIWPk777AXKs7AzSivGwM7cZomwy6HqsdVl4GJrGhlar6N13bR S1861pb9l7Y86oxqoU5Foj1wXDX9OsAJdzMShHQM30olzVg7ix+UWf+jpYqnMIn33kGs R/5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hbIvGQlT; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y196sor12943731pfb.16.2019.04.02.04.29.22 for (Google Transport Security); Tue, 02 Apr 2019 04:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:8019:: with SMTP id j25mr68886012pfi.77.1554204562680; Tue, 02 Apr 2019 04:29:22 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:22 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 04/10] clk: Add clk_div_mask helper Date: Tue, 2 Apr 2019 16:58:37 +0530 Message-Id: <20190402112843.992-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hbIvGQlT; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , Add clock helper to compute the clock divider mask when use invoke with clock width. Signed-off-by: Jagan Teki --- include/clk-uclass.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/clk-uclass.h b/include/clk-uclass.h index e76d98e2f6..15ac8867a7 100644 --- a/include/clk-uclass.h +++ b/include/clk-uclass.h @@ -100,4 +100,6 @@ struct clk_ops { int (*disable)(struct clk *clk); }; +#define clk_div_mask(width) ((1 << (width)) - 1) + #endif From patchwork Tue Apr 2 11:28:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 194 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 68CE53F078 for ; Tue, 2 Apr 2019 13:29:29 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id f6sf9735444pgo.15 for ; Tue, 02 Apr 2019 04:29:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204568; cv=pass; d=google.com; s=arc-20160816; b=mXdDn46jONyLw4VUBkyZMgnpLGJ2M4phSkaMcv7u1uT0Qv77wPGiWUyUL0rtzjDtPO RWMyw8jNxSCWaFy0G2Uj5cnBciuvoGFfjren5JuL8QLIunyfaI0bxuGvfM8IZWH9mD2p Pl1B290wEIx6BvT2sEQ+iDY7D/ksNOl5D+fc1wlfqRgQfo1rbvb32PjngKL4ghF9nCC2 9DoAgYV7fGKj55zgPm+kJ5TTaspVz7hKZE0xRu5YC0C7E+TLNDxqksB3F9XtzFnnkpIa galJrZ6SlD+2P+QKUUcNtkKlYsVoXg3+oIRt2ZgEWxzjcj7kSJnluBmazfNm3BAcDWg7 3rLg== 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=W0NNM1sJbvCASIRZabp0DAz8AOspfCFQDnTlDTm213I=; b=1A6sEbJrhU3v93+6hMZv1zWSv20OvD8gQDKg6Q2xkagtfftV4eyZDEjGAKYFXa4PAv GB75/CsszXzkoReT/A2bqFUgaCEY1/zWL60AZOJSx68h05Angtfy8WzWIxf8uM0PVlZe x8vLKH/LqENMBtLHZrdawpumujHEjl4qxYhsHfK5oBP5NA4jwhefn58EggiPqF6+9oyc wnf5hupCLqnf/ZpZvzQBddx4S2tjQ6t3tDCXjgs72F/QIoyhiikBSi1vu3f3mmyks++q 7gwvNPMFvevOMJ7mApaR6xnqOVYgQnCLPM7pHB8mb/NwAJmzPulQeAYUeluhzzZ2WCH+ 6xtg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RT1Heyi0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=W0NNM1sJbvCASIRZabp0DAz8AOspfCFQDnTlDTm213I=; b=DkkCqhboan+6gfKx78iP3CtAIGmXdMZTC7j91zba5/n5coDmw4PWjXUr5CELA7lI3Q 1rYpaNyshXq2+VNs1PV9cGhgh44TKMHIO54J4l+KrHbZUXYzrl9uCmPXD9ccjFcDnlIZ MAPHIYVVtWLqlU3/dD4GFEGhuR3ZJ2ZX/QmDQ= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=W0NNM1sJbvCASIRZabp0DAz8AOspfCFQDnTlDTm213I=; b=MIouYAbj683ZlGmbZjxxKC3Io9uFuMHzP+vKJH9JKfbzFo+Nq06HDF3I2udJuG99qH kxVkRFfiKw8eKgWDINRFdnca5oLCVX1gDucpC32jrZX9qjw2MV4ukwsOg3fAZ6bBYu+s tD2m4F40syncpZPHvpmM57vn3RFbd1rpgAu2YEYh2Aus1WRuzXHdI+PUera/syABcx+l 3TmfJjf2J/H6gcQrrOZCpQrbieebtGBaC0q2jn5Zp1BywrJUSkZoH5OMNebq7MhaWyEj EC2ALSaDJw1Jc+v1hLZaJqPtkxPM0imn0o7/2uiUEESAjltqg87vc85IqkL06Ec0IofS qvKA== X-Gm-Message-State: APjAAAVsk5EkuKQFyUIwDfOsR2gd4nu9AcG+NNwEaRwoLb1dfvkxkCZk 8mJ505IllOKl77Er7ixUVQy+BRyu X-Google-Smtp-Source: APXvYqxQwubwAj4qbvfli5oCeIVePFOlikbvkI35sIoYbxyAeXnMLIPgoLTZGUbJYgPMQo8C29KInA== X-Received: by 2002:a63:7c01:: with SMTP id x1mr1128237pgc.146.1554204568134; Tue, 02 Apr 2019 04:29:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bb8c:: with SMTP id m12ls166595pls.16.gmail; Tue, 02 Apr 2019 04:29:27 -0700 (PDT) X-Received: by 2002:a17:902:694c:: with SMTP id k12mr7356072plt.149.1554204567748; Tue, 02 Apr 2019 04:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204567; cv=none; d=google.com; s=arc-20160816; b=lYHsxpGLSeDoh1vJvE+F0K+V6cAVBRVjdIl61CwjhGdw13VT90s8uM9eEz7WvaSPyY jJ9XdDp87c8HqLKNZbHqoEksU1LHyYrNy1Im+Ad/dvR680EkLLe3prAhXjkQEYM4JDud ctPwjE0efzjQmA+19EpD+PWGNNfizcRxxbxBCpLZFwGi+zg/8x9c/Oe8wB1ZY+zYObM0 GBdZUWnlmPnavU3WMSUAQZSrMTO9NrM6ZgtvEAJDfLj6mQ+uYkuFxwu4VR0khMDru/Jb pKaKCkidiErAevMfuu53lHoSHnYydrot4IpYpQz/7QMKC+8TazX/RMz5t6kBF6SGNKK+ xJMA== 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=mLI39kPkQxLonGpvkiyxIm2efsCew9oD0HEv3cCvfy0=; b=d/gaGBuvVheSXY6aKM90kuefEC/RbadcUrFL4DOH/k8V+McpRp85D6bvuWrSfWvJNo tdLWWc59ArcyK41TvHxHRGMvwU1MsQFTvmKPYzRaxLXjqzvXI8VRZumf1++2wmrOk3Lh STY7amuDgL/ORwzw7U13Ka9ZBPApGvsVfHufB62PyngKN7KNxn5T6NrbRqY2w/KhUmiQ mkdWgw1t1aRjYMBo+pet/Ok6mvuEAvW4SPaNT1mMM1e1vJBG00FkIH9cihe3Jiix7XL1 m9FXea7fA/FjBnxY4z5MoHVwmYO2vTVObVQC84g0SWRWe7TA665KE/DyuEIiXNxG0BP+ h+1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RT1Heyi0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g6sor14527151pll.50.2019.04.02.04.29.27 for (Google Transport Security); Tue, 02 Apr 2019 04:29:27 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:8f92:: with SMTP id z18mr17247416plo.123.1554204567395; Tue, 02 Apr 2019 04:29:27 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:26 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 05/10] clk: imx: Add imx6q clock tree support Date: Tue, 2 Apr 2019 16:58:38 +0530 Message-Id: <20190402112843.992-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RT1Heyi0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , i.MX6 clock control module comprise of parent clocks, gates, multiplexers, dividers, PODF, PLL, fixed rate and etc. So, the U-Boot implementation of ccm has divided into gates and tree. 1) gate clocks are generic clock configuration of enable/disable bit management which can be handle via imx6_clock_gate. 2) tree clocks are handle via tree clock management where it link the clocks based on the parent clock which usually required to get and set the clock rates. This patch add tree clock management for imx6q USDHC clocks, so the mmc driver from imx6 can eventually use this so getting the USDHC clock rates. Unlike Linux, U-Boot implementation may not require to maintain exact clock tree due to various constrains and use cases. So here is how the clock tree differs between them. usdhc clock tree in Linux: ------------------------- USDHC1 => USDHC1_PODF => USDHC1_SEL => PLL2_PFD2 => PLL2_BUS => PLL2_BYPASS => PLL2 => OSC usdhc clock tree in U-Boot: --------------------------- USDHC1 => USDHC1_PODF => USDHC1_SEL => PLL2_PFD2 => PLL2_BUS => OSC Signed-off-by: Jagan Teki --- arch/arm/include/asm/arch-mx6/clock.h | 65 ++++++++++++++++ drivers/clk/imx/clk-imx6-common.c | 103 ++++++++++++++++++++++++++ drivers/clk/imx/clk-imx6q.c | 70 +++++++++++++++++ 3 files changed, 238 insertions(+) diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index fa921a9f08..424231c691 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -21,6 +21,67 @@ #define MXC_CLK32 32768 #endif +#define OSC_24M_ULL 24000000ULL + +enum imx6_clk_type { + IMX6_CLK_TYPE_SIMPLE = 0, + IMX6_CLK_TYPE_FIXED, + IMX6_CLK_TYPE_DIV, + IMX6_CLK_TYPE_MUX, + IMX6_CLK_TYPE_PLL_PFD, + IMX6_CLK_TYPE_PLL_DIV, +}; + +/** + * struct imx6_clk_tree - imx6 ccm clock tree + * + * @parent: parent clock tree + * @type: clock type + * @off: register offset of the specified clock + * @shift: number of bits to shift the bitfield + * @width: width of the bitfield + * @idx: index of the specified clock + * @fixed_rate: fixed clock rate + */ +struct imx6_clk_tree { + const unsigned long *parent; + enum imx6_clk_type type; + u16 off; + + u8 shift; + u8 width; + u8 idx; + ulong fixed_rate; +}; + +#define TREE(_parent, _type, _off, _shift, _width, _idx, _fixed_rate) { \ + .parent = _parent, \ + .type = _type, \ + .off = _off, \ + .shift = _shift, \ + .width = _width, \ + .idx = _idx, \ + .fixed_rate = _fixed_rate, \ +} + +#define SIMPLE(_parent) \ + TREE(_parent, IMX6_CLK_TYPE_SIMPLE, 0, 0, 0, 0, 0) + +#define FIXED(_fixed_rate) \ + TREE(NULL, IMX6_CLK_TYPE_FIXED, 0, 0, 0, 0, _fixed_rate) + +#define DIV(_parent, _off, _shift, _width) \ + TREE(_parent, IMX6_CLK_TYPE_DIV, _off, _shift, _width, 0, 0) + +#define MUX(_parent, _off, _shift, _width) \ + TREE(_parent, IMX6_CLK_TYPE_MUX, _off, _shift, _width, 0, 0) + +#define PLL_PFD(_parent, _off, _width, _idx) \ + TREE(_parent, IMX6_CLK_TYPE_PLL_PFD, _off, 0, _width, _idx, 0) + +#define PLL_DIV(_parent, _off, _shift, _width) \ + TREE(_parent, IMX6_CLK_TYPE_PLL_DIV, _off, _shift, _width, 0, 0) + /** * struct imx6_clk_gate - imx6 ccm clock gate * @@ -41,19 +102,23 @@ struct imx6_clk_gate { * struct imx6_clk_desc - imx6 clock control module descriptor * * @gates: ccm clock gates + * @tree: ccm clock tree */ struct imx6_clk_desc { const struct imx6_clk_gate *gates; + const struct imx6_clk_tree *tree; }; /** * struct imx6_clk_priv - imx6 clock control module * * @base: ccm base address + * @anatop: anatop base address * @desc: ccm descriptor */ struct imx6_clk_priv { void *base; + void *anatop; const struct imx6_clk_desc *desc; }; diff --git a/drivers/clk/imx/clk-imx6-common.c b/drivers/clk/imx/clk-imx6-common.c index 1d38f51f7e..d21facf2e5 100644 --- a/drivers/clk/imx/clk-imx6-common.c +++ b/drivers/clk/imx/clk-imx6-common.c @@ -6,18 +6,117 @@ #include #include +#include #include #include #include #include #include +#include + static const struct imx6_clk_gate *priv_to_gate(struct imx6_clk_priv *priv, unsigned long id) { return &priv->desc->gates[id]; } +static const struct imx6_clk_tree *priv_to_tree(struct imx6_clk_priv *priv, + unsigned long id) +{ + return &priv->desc->tree[id]; +} + +static u8 get_bitfield(void *base, u8 shift, u8 width) +{ + return (readl(base) >> shift) & clk_div_mask(width); +} + +static u8 get_mux_parent(const struct imx6_clk_tree *tree, void *base) +{ + u8 idx = get_bitfield(base + tree->off, tree->shift, tree->width); + + return tree->parent[idx]; +} + +static ulong get_pll2_bus_rate(struct imx6_clk_priv *priv, unsigned long id, + ulong parent_rate) +{ + const struct imx6_clk_tree *tree = priv_to_tree(priv, id); + u8 div; + + div = get_bitfield(priv->anatop + tree->off, tree->shift, tree->width); + return (div == 1) ? parent_rate * 22 : parent_rate * 20; +} + +static ulong get_pfd_rate(struct imx6_clk_priv *priv, unsigned long id, + ulong parent_rate) +{ + const struct imx6_clk_tree *tree = priv_to_tree(priv, id); + u64 tmp = parent_rate; + u8 frac; + + frac = get_bitfield(priv->anatop + tree->off, + tree->idx * 8, tree->width); + tmp *= 18; + do_div(tmp, frac); + + return tmp; +} + +static ulong get_mux_rate(ulong parent_rate) +{ + /* derive clock from respective parent */ + return parent_rate; +} + +static ulong get_div_rate(struct imx6_clk_priv *priv, unsigned long id, + ulong parent_rate) +{ + const struct imx6_clk_tree *tree = priv_to_tree(priv, id); + u8 podf; + + podf = get_bitfield(priv->base + tree->off, tree->shift, tree->width); + return parent_rate / (podf + 1); +} + +static ulong imx6_calc_clk_rate(struct imx6_clk_priv *priv, unsigned long id) +{ + const struct imx6_clk_tree *tree = priv_to_tree(priv, id); + ulong rate = 0; + + switch (tree->type) { + case IMX6_CLK_TYPE_FIXED: + return tree->fixed_rate; + case IMX6_CLK_TYPE_PLL_DIV: + rate = imx6_calc_clk_rate(priv, tree->parent[0]); + return get_pll2_bus_rate(priv, id, rate); + case IMX6_CLK_TYPE_PLL_PFD: + rate = imx6_calc_clk_rate(priv, tree->parent[0]); + return get_pfd_rate(priv, id, rate); + case IMX6_CLK_TYPE_MUX: + rate = imx6_calc_clk_rate(priv, + get_mux_parent(tree, priv->base)); + return get_mux_rate(rate); + case IMX6_CLK_TYPE_DIV: + rate = imx6_calc_clk_rate(priv, tree->parent[0]); + return get_div_rate(priv, id, rate); + case IMX6_CLK_TYPE_SIMPLE: + return imx6_calc_clk_rate(priv, tree->parent[0]); + default: + printf("%s: (TYPE#%d) unhandled\n", __func__, tree->type); + } + + return rate; +} + +static ulong imx6_clk_get_rate(struct clk *clk) +{ + struct imx6_clk_priv *priv = dev_get_priv(clk->dev); + + return imx6_calc_clk_rate(priv, clk->id); +} + static int imx6_set_gate(struct clk *clk, bool on) { struct imx6_clk_priv *priv = dev_get_priv(clk->dev); @@ -51,6 +150,7 @@ static int imx6_clk_disable(struct clk *clk) struct clk_ops imx6_clk_ops = { .enable = imx6_clk_enable, .disable = imx6_clk_disable, + .get_rate = imx6_clk_get_rate, }; int imx6_clk_probe(struct udevice *dev) @@ -61,6 +161,9 @@ int imx6_clk_probe(struct udevice *dev) if (!priv->base) return -ENOMEM; + /* FIXME get the anatop base via OF_LIVE */ + priv->anatop = priv->base + 0x4000; + priv->desc = (const struct imx6_clk_desc *)dev_get_driver_data(dev); if (!priv->desc) return -EINVAL; diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c index 8ec713298d..a46d2f6f88 100644 --- a/drivers/clk/imx/clk-imx6q.c +++ b/drivers/clk/imx/clk-imx6q.c @@ -10,6 +10,75 @@ #include #include +static const unsigned long pll2_bus[] = { + IMX6QDL_CLK_OSC, +}; + +static const unsigned long pfd_352m[] = { + IMX6QDL_CLK_PLL2_BUS, +}; + +static const unsigned long usdhc_sel[] = { + IMX6QDL_CLK_PLL2_PFD2_396M, + IMX6QDL_CLK_PLL2_PFD0_352M, +}; + +static const unsigned long usdhc1_podf[] = { + IMX6QDL_CLK_USDHC1_SEL, +}; + +static const unsigned long usdhc2_podf[] = { + IMX6QDL_CLK_USDHC2_SEL, +}; + +static const unsigned long usdhc3_podf[] = { + IMX6QDL_CLK_USDHC3_SEL, +}; + +static const unsigned long usdhc4_podf[] = { + IMX6QDL_CLK_USDHC4_SEL, +}; + +static const unsigned long usdhc1[] = { + IMX6QDL_CLK_USDHC1_PODF, +}; + +static const unsigned long usdhc2[] = { + IMX6QDL_CLK_USDHC2_PODF, +}; + +static const unsigned long usdhc3[] = { + IMX6QDL_CLK_USDHC3_PODF, +}; + +static const unsigned long usdhc4[] = { + IMX6QDL_CLK_USDHC4_PODF, +}; + +static const struct imx6_clk_tree imx6q_tree[] = { + [IMX6QDL_CLK_OSC] = FIXED(OSC_24M_ULL), + + [IMX6QDL_CLK_PLL2_BUS] = PLL_DIV(pll2_bus, 0x30, 13, 1), + + [IMX6QDL_CLK_PLL2_PFD0_352M] = PLL_PFD(pfd_352m, 0x100, 6, 0), + [IMX6QDL_CLK_PLL2_PFD2_396M] = PLL_PFD(pfd_352m, 0x100, 6, 2), + + [IMX6QDL_CLK_USDHC1_SEL] = MUX(usdhc_sel, 0x01c, 16, 1), + [IMX6QDL_CLK_USDHC2_SEL] = MUX(usdhc_sel, 0x01c, 17, 1), + [IMX6QDL_CLK_USDHC3_SEL] = MUX(usdhc_sel, 0x01c, 18, 1), + [IMX6QDL_CLK_USDHC4_SEL] = MUX(usdhc_sel, 0x01c, 19, 1), + + [IMX6QDL_CLK_USDHC1_PODF] = DIV(usdhc1_podf, 0x024, 11, 3), + [IMX6QDL_CLK_USDHC2_PODF] = DIV(usdhc2_podf, 0x024, 16, 3), + [IMX6QDL_CLK_USDHC3_PODF] = DIV(usdhc3_podf, 0x024, 19, 3), + [IMX6QDL_CLK_USDHC4_PODF] = DIV(usdhc4_podf, 0x024, 22, 3), + + [IMX6QDL_CLK_USDHC1] = SIMPLE(usdhc1), + [IMX6QDL_CLK_USDHC2] = SIMPLE(usdhc2), + [IMX6QDL_CLK_USDHC3] = SIMPLE(usdhc3), + [IMX6QDL_CLK_USDHC4] = SIMPLE(usdhc4), +}; + static const struct imx6_clk_gate imx6q_gates[] = { [IMX6QDL_CLK_USDHC1] = GATE(0x080, GENMASK(3, 2)), [IMX6QDL_CLK_USDHC2] = GATE(0x080, GENMASK(5, 4)), @@ -19,6 +88,7 @@ static const struct imx6_clk_gate imx6q_gates[] = { static const struct imx6_clk_desc imx6q_clk_desc = { .gates = imx6q_gates, + .tree = imx6q_tree, }; static const struct udevice_id clk_imx6q_ids[] = { From patchwork Tue Apr 2 11:28:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 195 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1DFD83F078 for ; Tue, 2 Apr 2019 13:29:34 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id 18sf9729943pgx.11 for ; Tue, 02 Apr 2019 04:29:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204573; cv=pass; d=google.com; s=arc-20160816; b=K10RNIlb7h/DfqwB63ignem5D7xXKTSrupsvxClp97bpaDPBgTeGcQoyuJSgBXJMaD 2KrymHeSIKvvupRTIMtwjsOQA38ZMYpyRbxkPZh84ZXO7heouSXkqdg6H8Amv9vx6ZNU BBpJKlorL6VFf6xZxlCw0saktDLYq9w8WdHlabFUsX0HzcXNMhZXnCxMZEVtedLa/ofk vLu5PN8BRp9fkwZqoIJuYmqmqbuuNfHC38qsYs8gDBqtw8hf886PPVrTfPJrmqpJk7nR yptiUFIX8Ja+8VWaNV6uJfKowCjvgk6Bwg2DKdvy4NQb621ftZOZ1VXA7larmFoaJB3p cAoQ== 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=SdPu0NdP6VBWOY79D156W7TvLsJEkGHoqkG19nUSC5I=; b=dtgwNal5qABc7m6hbg+B85bjDNy8I1z4cAyhVKf/JGF4mdWDOodvwJIoKj7tn15cVM W1rxG2l8dILhDE23QqT3yrrRvnNGx+yTOR3+1VFKPraXDcTvdU9ORDAP8DbgLxMkkseG RtnD6OB+iHsd/ppMfQJ/qV+ODGrfOaDj8k39ErQdf4IPTDnktFOr/SWpCpg1emlX77qB A5lt1upcggkKylClXBB9eThrA2qjL/VeGM/0BludtFXDV3JQTteW/nD18B8xlMaJizhT wfYUP8b7jmkLClP+ohNaPt8HCANRA6DrPcgYPxXZrjDdcm50xr3fk8sk6OVNDoDW+hJr Y67g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WKx8vO7v; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=SdPu0NdP6VBWOY79D156W7TvLsJEkGHoqkG19nUSC5I=; b=S9zm3LUwEnDybSvPWuSeHJ1oorWyAeCbd2ZBKdLiNNdQjt3bTW8IpjozrlvKAfvWK0 /R7T97uw2DIXzjaM0QnkvEnJWuQ6aK2GiKMDpHL9NuDDBDBljAV3TzhALJdBRN3Rb7tx Y/P4pIVEdf4QErcTACtwg7NZDUX4967XTq59U= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=SdPu0NdP6VBWOY79D156W7TvLsJEkGHoqkG19nUSC5I=; b=F9hrpYte4sic6bxJeqvZobKzh7Ckk7z+di1f4vrNHpBUfxSLqQByoG1fG33YmMBlpC w7TfITrnJ/JaIPbjHlXeyuZ0vFQMT8djf+qF7OYVaWN4fDtBG8x4AtJmkB5xjcPuTZSf w8J5KkgTPhL0zKHDAfi02UCS4UqYY0qommV6XvMlS2KnOTn7ovHA82iSVKgLaZtSlTiR Xrf5lJw5hIPszOKBOGgAFA/yAfqRmRfDVwuy4ZFmndIJQa+fcwmPobgAOj84BXVyvP7x TOrDQAcouCfOOLxyT2+unexo04FI7GjYG6AobEgRv4MwB0FNOW3AQyOWHHjSjs/rz4w+ BSFQ== X-Gm-Message-State: APjAAAVpwIW6HayYhQBnv2gzcL3jdtxzX5+HdZGNl+7pkgQJwZVLVK4p Vn0dXHgtdjvN4H5w1gkSdduJiBD7 X-Google-Smtp-Source: APXvYqymy6qzTcyoSimHD331Q/jGLx40gPpKvObNc/5YsN+5o726iuMDmVL4m40aOjx5xj7G2LgCLw== X-Received: by 2002:aa7:93a8:: with SMTP id x8mr1168235pff.87.1554204572896; Tue, 02 Apr 2019 04:29:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:227:: with SMTP id 36ls6321514plc.8.gmail; Tue, 02 Apr 2019 04:29:32 -0700 (PDT) X-Received: by 2002:a17:902:9a09:: with SMTP id v9mr68634491plp.225.1554204572466; Tue, 02 Apr 2019 04:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204572; cv=none; d=google.com; s=arc-20160816; b=Eg3K3Fp9D6WIlxdnFuAAbXULSK9sJ4JLBYD9slYkfPQXcdq6btOywKbg1rrK9o0ShH h54+rkR5CpwbUFtKvJLuLLpZSViSiCTZYtgUQjAB5yowPkmAwpnOK2uPF8R652dfClEp mLgWfZDQar4ezCPgXIFAyBGq5LhrmoXywUmDs7K8V3hVUpeuFmOrhwNh/VXRcY0DM3bu BpHQa6hxFtSe2/9WN6Y8v+URCpnUsNHhcuRhcrmibVr0igLoG4x3Z9X/qZV60kHA8ejS rj01oZAetVeIc1NqfwrHVRWz5jzPuoCZVdS+Oroc/nY1Tnh/fM9Lp6B3ckISm28u4tUh MaYg== 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=WO35GqKvUQJDjEEk6ZGRPqU7zDrVzdtDRzq4IB+StZ8=; b=uVFWII9BriOwLpr+jd3HYp/xwjXh8pBMl719lgfNt/BdvaOFx0attPV74oRGbvaKGb LXxyHtjsuIGP+m5QkTKoOdv8ncrnq5gII9LCFjUNEtZ1+TciU0HklrDrJOiS//UMu0a3 u5OZa+i3Qw377ZkYKu7UwLTdU7p3iDzG3wWgxUAkW3XYYcCOsYWVa/4zwvP7HkUTaYKs tAPwyOlOT9ilIQ9evUPKSig2hLMDYsiennjKRSB+lY1tZUIsM9ncEqCjQTeI/n3Zyb+X aJWs9TPStd7XLDyiCzanCyupEQUXvGeUPB0NnCSm3Nbimtnxh4BNnZF9g0hj2Y0o/mKy BPHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WKx8vO7v; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o9sor16602301plk.9.2019.04.02.04.29.32 for (Google Transport Security); Tue, 02 Apr 2019 04:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:9b83:: with SMTP id y3mr23654838plp.165.1554204572157; Tue, 02 Apr 2019 04:29:32 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:31 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 06/10] clk: imx6: Add imx6ul clock tree support Date: Tue, 2 Apr 2019 16:58:39 +0530 Message-Id: <20190402112843.992-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WKx8vO7v; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , i.MX6 clock control module comprise of parent clocks, gates, multiplexers, dividers, PODF, PLL, fixed rate and etc. So, the U-Boot implementation of ccm has divided into gates and tree. 1) gate clocks are generic clock configuration of enable/disable bit management which can be handle via imx6_clock_gate. 2) tree clocks are handle via tree clock management where it link the clocks based on the parent clock which usually required to get and set the clock rates. This patch add tree clock management for imx6ul USDHC clocks, so the mmc driver from imx6 can eventually use this so getting the USDHC clock rates. Unlike Linux, U-Boot implementation may not require to maintain exact clock tree due to various constrains and use cases. So here is how the clock tree differs between them. usdhc clock tree in Linux: ------------------------- USDHC1 => USDHC1_PODF => USDHC1_SEL => PLL2_PFD2 => PLL2_BUS => PLL2_BYPASS => PLL2 => OSC usdhc clock tree in U-Boot: --------------------------- USDHC1 => USDHC1_PODF => USDHC1_SEL => PLL2_PFD2 => PLL2_BUS => OSC Signed-off-by: Jagan Teki --- drivers/clk/imx/clk-imx6ul.c | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c index f5250e8b72..8528176eec 100644 --- a/drivers/clk/imx/clk-imx6ul.c +++ b/drivers/clk/imx/clk-imx6ul.c @@ -10,6 +10,53 @@ #include #include +static const unsigned long pll2_bus[] = { + IMX6UL_CLK_OSC, +}; + +static const unsigned long pfd_352m[] = { + IMX6UL_CLK_PLL2_BUS, +}; + +static const unsigned long usdhc_sel[] = { + IMX6UL_CLK_PLL2_PFD2, + IMX6UL_CLK_PLL2_PFD0, +}; + +static const unsigned long usdhc1_podf[] = { + IMX6UL_CLK_USDHC1_SEL, +}; + +static const unsigned long usdhc2_podf[] = { + IMX6UL_CLK_USDHC2_SEL, +}; + +static const unsigned long usdhc1[] = { + IMX6UL_CLK_USDHC1_PODF, +}; + +static const unsigned long usdhc2[] = { + IMX6UL_CLK_USDHC2_PODF, +}; + +static const struct imx6_clk_tree imx6ul_tree[] = { + [IMX6UL_CLK_OSC] = FIXED(OSC_24M_ULL), + + [IMX6UL_CLK_PLL2_BUS] = PLL_DIV(pll2_bus, 0x30, 13, 1), + + [IMX6UL_CLK_PLL2_PFD0] = PLL_PFD(pfd_352m, 0x100, 6, 0), + [IMX6UL_CLK_PLL2_PFD2] = PLL_PFD(pfd_352m, 0x100, 6, 2), + + [IMX6UL_CLK_USDHC2_SEL] = MUX(usdhc_sel, 0x01c, 17, 1), + [IMX6UL_CLK_USDHC1_SEL] = MUX(usdhc_sel, 0x01c, 16, 1), + + [IMX6UL_CLK_USDHC2_PODF] = DIV(usdhc2_podf, 0x024, 16, 3), + [IMX6UL_CLK_USDHC1_PODF] = DIV(usdhc1_podf, 0x024, 11, 3), + + [IMX6UL_CLK_USDHC2] = SIMPLE(usdhc2), + [IMX6UL_CLK_USDHC1] = SIMPLE(usdhc1), +}; + static const struct imx6_clk_gate imx6ul_gates[] = { [IMX6UL_CLK_USDHC1] = GATE(0x080, GENMASK(3, 2)), [IMX6UL_CLK_USDHC2] = GATE(0x080, GENMASK(5, 4)), @@ -17,6 +64,7 @@ static const struct imx6_clk_gate imx6ul_gates[] = { static const struct imx6_clk_desc imx6ul_clk_desc = { .gates = imx6ul_gates, + .tree = imx6ul_tree, }; static const struct udevice_id clk_imx6ul_ids[] = { From patchwork Tue Apr 2 11:28:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 196 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9BBC03F078 for ; Tue, 2 Apr 2019 13:29:38 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id z14sf9758807pgv.0 for ; Tue, 02 Apr 2019 04:29:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204577; cv=pass; d=google.com; s=arc-20160816; b=wUO6M9/N2Rk+5hFHO13P/70UqrySy1VYjusAojgAneLD66eEZH7wbYjnaRpdbcOozJ Un3x7s6BBeQZVJ1FmXjkxDzjpkGhDs6p6hUuPvBgqF9IPP9v7y+AT3CPr/Zyle7hIS9Y BSVB3QCQRCJuk6sDZRkyh/+1lkAxkcbZ/W+TU/5qhOe9mcTfZp61XgS9wa97xeommTSY PEtB5T+hwz3Wno4L1m4ymbVU5RAcoHswZud8jDmcT9JbClef+8LBov6n6wLrWrVouRwj dZQInG9iOClz1Yfd5PssR0iPbpjW+BAizGq975Ujx8bbzG1F37YDW+SYo0OpOgZyqlpx RV6g== 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=fS6VzomS+1+FL7YRdDV3qMkyE9B+56DZfa6Sa41YrAY=; b=JfK65k1iGzATdkWTRSTjxQ5F4X02ssrCREr2R4f1sI0U3Tnuj32MtmC1bZHDSA1FRM W1J4niAlO6+fJLnZqxC5dagzArWgQ5gV7sxJdrLjL/ZWhQ+eZdmznOGlnMhkoTmzdg+P 04oMra8EYLNEZBY0L3L1zLLxorbmALJkujqU4GNMgq5IvQybgp5IW2S8pZWOc8ahyjH7 V+ib76ak6OFLE5TQ/vNKrbLhpcxZYtnnJjt2Tr9Fo21QJOIl+42S+SWwuVSoUcjd0ocZ nsukcyx/np9PY0lqJvJiWmm9PDkYQcjEh244z9R047LKf73fZyvuEW/dpjxrOPZrueUN GIuw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mpuk+H0d; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=fS6VzomS+1+FL7YRdDV3qMkyE9B+56DZfa6Sa41YrAY=; b=IQzORSqYqiL6g8Arw7oJCWE6qvbZs0pToldlH5drHTFcGVkfK1G5tB/jkHbCCK3CRG lOqO0X6OpZMyw6slTj+V5RM/JDDoneb+K2VQQgs2rCbq8uyPFTvf2Ryw2BO6DwOxsqqB sxkvAtMj10iZwG58Vzcqsz7h9QCKO5lEJO3qw= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=fS6VzomS+1+FL7YRdDV3qMkyE9B+56DZfa6Sa41YrAY=; b=Pk+0HG9qkKG6Gr/h/phLaTMs0xCfBfhRDre1h9loyfZSrIqCDCsNAgoKrROreMSpb9 jJ0vjPqrcUW2e3gFyg4znxBiE7C9ft9mWH9xqphlT+QS0S0B8ECnhNWweyFZ5wKGJZAQ l+b2oPRj2zKHHKq6+F8v5dCa+++2Kyancr4Jc66LTSGrL+NEV4yCwTokkLJKyjiiXMED VYmiwbCtIF2UUJe1D9UJvzhAP3lexzu7RUE2gcz0s3/zmHjkN/JJzd+FpPpVZeloZJFz otw+hDW2Czwna825tZRbsvyAb0yID7y4+L8SV/kMLwYqWfxpHuAz4lRc4/ZTu5Jshn5Q NqgQ== X-Gm-Message-State: APjAAAVKrrWiB/mKTbcJ0AdIxrtCG4jOm8xRYprmuu41vDaAw8lDynzI llZ1Ek+mJaSaWV7heCk/OzgoB5vR X-Google-Smtp-Source: APXvYqx7UgdYJ9nZihxeguWGztRLEvfiTZ2xCUl7D50WT0vdX/2GHLnHkq7dJ4U9zgzpdfmHpKgWPQ== X-Received: by 2002:a65:524c:: with SMTP id q12mr925399pgp.6.1554204577399; Tue, 02 Apr 2019 04:29:37 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:868e:: with SMTP id g14ls166585plo.15.gmail; Tue, 02 Apr 2019 04:29:37 -0700 (PDT) X-Received: by 2002:a17:902:778a:: with SMTP id o10mr4886329pll.135.1554204577030; Tue, 02 Apr 2019 04:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204577; cv=none; d=google.com; s=arc-20160816; b=r6RppMLbbgWI4yv49Sgi3gngANMgtYUabNtbcPjG4girN3dsx6Xabd1GZbpPuJacTn GXXFfg3MMev6fEigsfx+0usAzBB5CC8Ud+vpACDwBvbyv5+nXxBzQtMKaHaBiNl6Xddz FN/pB5CiOzLhSjI7q2bK+6Fa/nZG+jkpdoc0oUfHofjdUGheVgoJqdSxSuKuSMNnTMHm z3M5UmKuL40XxcWzBhOtN5YlFzZMvOBkE7skgJxbuH9xNUGqtAsfqNzS97n7L+ILbEMg Dn87ux2MsZcfxt827YpuEHKkSm0WczNo2j4pWQ8DlQ7swItYGM5ANdBXMuPw64pAQ1o4 zRfQ== 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=pGzZOq5V14vOiWyglb1H+Qj2RGQaSr1+gAZKFfwsKmw=; b=jpusOuByIdjQ9m5twuCFy5nTyA2nVK2RuOKB6kZl9oK38uYjAtVM714m07lf/+c64S e7lZp/DZH+kNd/758rb6fwf4vpSaQaA0y/+88eGD39AhD84eoOYRqdBp5sqqUYFVeMp2 FErXJyW1HLqIU79ZSC4JVqaVi2q4+0XIlwHjP0o9iN5KK2XByxU7U5cWGhiDwGdk8iWw /hRBcXg391rPVkzsr4fk+fKUwOADRKkjmV9mAhe/2PXTjl/ElekVf45BOGN6cANwjm8l OyGWHyVW+xp/oatNJUe/aN4vJR91mLwhK6oix6bklSxhVNabHWrvmJOoSUPgb+0dhxg8 2heA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mpuk+H0d; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 1sor14460803plk.26.2019.04.02.04.29.37 for (Google Transport Security); Tue, 02 Apr 2019 04:29:37 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:f08a:: with SMTP id go10mr55660681plb.121.1554204576777; Tue, 02 Apr 2019 04:29:36 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:36 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 07/10] ARM: dts: i.MX6QDL: Add u-boot,dm-spl for clks Date: Tue, 2 Apr 2019 16:58:40 +0530 Message-Id: <20190402112843.992-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mpuk+H0d; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , Add clks node available for SPL in imx6qdl SoC. Signed-off-by: Jagan Teki --- arch/arm/dts/imx6qdl-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/imx6qdl-u-boot.dtsi b/arch/arm/dts/imx6qdl-u-boot.dtsi index 0aa29e38b8..912cb4281c 100644 --- a/arch/arm/dts/imx6qdl-u-boot.dtsi +++ b/arch/arm/dts/imx6qdl-u-boot.dtsi @@ -24,6 +24,10 @@ u-boot,dm-spl; }; +&clks { + u-boot,dm-spl; +}; + &iomuxc { u-boot,dm-spl; }; From patchwork Tue Apr 2 11:28:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 197 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2D0153F078 for ; Tue, 2 Apr 2019 13:29:43 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id 18sf9730132pgx.11 for ; Tue, 02 Apr 2019 04:29:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204582; cv=pass; d=google.com; s=arc-20160816; b=MuAPwF9+TTt8Wt2davHOLccuJcW+uuVq3vobN0mhzRK0ZUrU6a4zQEheuz7btpDOPX lypmMFUo9hcz/hHBbJEgYBBu2Mv6uG7DDEswVh5FcDCIGtEE1PCnCJ7D9R6cuYDuWbDs fgbqM8UyqwK+bbViICUCzfj+C+Sz90wQ3G+TMfYh0xXM9jWq9HNj7164LbL/5p+xTxne g5ZCkB0cvOsKCjb3M+H6NI71BwlVcrkwTUeLtmjHQ3EtzlFCeIU0ojGaSa8XyW4G9oHY 4bHXxlmMynRI5vw9XBc85EsyuJK/B6lhTiLUGHqEdZf/FPhWLpWnPAZcDn/oHU0JV8FD TTdw== 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=oH5FSIed0U6Qg7adb/HQduy+s+jaRykHJk0X4D0ddoQ=; b=ImLUPa1GFsyoq3Tw3O9QpRLDnu7FEG0FBn3ET/NgTkimiWK6eU/an4xeSonHoiexv2 6rU3Atfwd8L7E18o2+3rUYu17Ba9sAqXSZ26DxLSM1C6ORgMUMzeBR5JlmyQ6mik3GX7 GfXWIGWwEuB/c1uHTnxILQhD1C/QBGfBptyZKnnLRFhaF/T+dlLc8DbkcddnpA5icDMs fA7BRGy1STOJJuN8qQFbjORHmXdZLCkgEotlbOHrkHJZigXJA0jcQFlboYnpSlqjP1ch 2xTFtnM8HHhnhjQs3mxFfLH/MOD8UB3wKeq1IyopSKYIlEKu7SyaO99WTxAiqpgTO/8l wNXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ng8ojufC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=oH5FSIed0U6Qg7adb/HQduy+s+jaRykHJk0X4D0ddoQ=; b=k4QJIn4HsPg9Z5tzhjdpYKmN0dE8iDEvDlhQ9Ro+IQ2yzgSm4fGfG6ICfwj+LoMdOm fyh/IJFRQWY8p3v/FMG6B/xGUUaEAjkDaaNpOveLUSHFCO1Vhjse/avB2n1POkKiWCWz SimpZnjZ8AYmE/eZsZZH9V9ifNNSUtZr90c8o= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=oH5FSIed0U6Qg7adb/HQduy+s+jaRykHJk0X4D0ddoQ=; b=p/AkBJmhUmbL9fo0xvJk9R63w5UuwkzLRKPG//jcJXHZKbrvwPPAM+RfQcgfOcArVe OG0FLhxKGyXw+3Ald0S10mjyKIYog7C3W6v+QnFf5lwBO5CeuOzQrZ2ldZEkYA+YvfeV ZmNjdPS5A1YAN4sSP41ftamsdsWM43uPuk42xSUODoqpAhWTt5ZjpP9uCVja4LU6Nl6G VY1CfhhcW4VxvtZMPBBGMHWaSV4xnDNyU2rEiaAzVjLYDwm2AimPtAyUKnu+ZMJIj73E VbkC4Bx85zt7fPejgAGGHCJBMzAfr2hcHCSChzkhXPuQwB1FBXqT6LIWGGjCAffJHK9i MDhQ== X-Gm-Message-State: APjAAAUccn+WPbR18XZsQTZRT+2gp5KLUb7ZYv30rH8vhBOrrA6Wfzeq P0sjpMAEa5IjaZjy40ZOXmsafiTe X-Google-Smtp-Source: APXvYqyQvi6knNfnSEIj/RtTP4qbB4TLSOzamc61sw5KBIRMheWugmYiBcQhqqWb1Lbu/gouFCGA5g== X-Received: by 2002:a63:4523:: with SMTP id s35mr860507pga.29.1554204581946; Tue, 02 Apr 2019 04:29:41 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:988b:: with SMTP id s11ls166148plp.13.gmail; Tue, 02 Apr 2019 04:29:41 -0700 (PDT) X-Received: by 2002:a17:902:8c97:: with SMTP id t23mr22393485plo.110.1554204581631; Tue, 02 Apr 2019 04:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204581; cv=none; d=google.com; s=arc-20160816; b=ra/s0GgeqBPTL5M7xndITLJNNcx8I0T6u1adp2T0eu/fh83h/+4vU9bGiOnFHFe9Al HYLqQ7Bk16UZpZfQ0ZHr/vWz06QetHU0GA4u5vjU83mhkNJnyNLRhXa9pP08Y3d4rpWQ t+mJa6QNFOvFnHkbS5YjLuR5R1LqYKQc6QHH366RkSCxK5ACaXXNQXa+FbtkjcS0k9Id fYXd8poVQFJ0vXJgGghJT2ZhwW15Z8nTWWPYtquubBiPm0Vfivzqc7wAUyppT57uYCmu gyXO+1LCvR/I/OtE3Zeyov2xHKqdd8K95D/1lZrmEuQA7MpPTPWsOfRTfJyLLSPg6yao 1yew== 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=5OjflSEvqy/4XaZ3038HbZPUBwCIImt5tDzAmZcTQcc=; b=ETLbOwC0yI35ichMctDW/7nNTC3lJ4D5aughVLG1CLDjeIUD/2uRrKb/cYaqsDDQtX xBzJ7ccvDlDFG+iWJnFS0xMTwp5qVSK5ukalU0yOeeZtP6Vnu4Qn3N9OLqmdJsgwSo5x fTpkfcefnqSUUftJslgGTTG137rYOoE+oy4eeyQspK0B/nVScoC19Rjvc7PL80Cr2btd bRcIMAk8N4KIhK634manY9uhjJLl4iVi5IPjgMAfbVirVBNSYKvxXV1nsmfjcfRiExsr 1sQHFxH9lyUU0CWRAzzDo/w/Yk33OzFIs6QToXlVFUXS7m2d623nYFgpL4rBJvN4SKe7 TKZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ng8ojufC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y23sor11388041pfe.31.2019.04.02.04.29.41 for (Google Transport Security); Tue, 02 Apr 2019 04:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:bd09:: with SMTP id a9mr67500797pff.61.1554204581330; Tue, 02 Apr 2019 04:29:41 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:40 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 08/10] ARM: dts: i.MX6UL: Add u-boot,dm-spl for clks Date: Tue, 2 Apr 2019 16:58:41 +0530 Message-Id: <20190402112843.992-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ng8ojufC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , Add clks node available for SPL in imx6ul SoC. Signed-off-by: Jagan Teki --- arch/arm/dts/imx6ul-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/imx6ul-u-boot.dtsi b/arch/arm/dts/imx6ul-u-boot.dtsi index eb190cf8c8..b25f77cb44 100644 --- a/arch/arm/dts/imx6ul-u-boot.dtsi +++ b/arch/arm/dts/imx6ul-u-boot.dtsi @@ -21,6 +21,10 @@ u-boot,dm-spl; }; +&clks { + u-boot,dm-spl; +}; + &iomuxc { u-boot,dm-spl; }; From patchwork Tue Apr 2 11:28:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 198 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AADAE3F078 for ; Tue, 2 Apr 2019 13:29:47 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id s22sf9769319plq.1 for ; Tue, 02 Apr 2019 04:29:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204586; cv=pass; d=google.com; s=arc-20160816; b=SWUZxDAjNG05dVRmpFZJnYMlhN0amabvdSXnQtcVM4nm9JAnnsdgERl4MEgBJhElEK +bIv2k3izuns6/rK1eMt0pbREJf3Itu0ZqRXhCHAuqXJ0ddlkAYYMi0/x7ISeJN8sd74 u9c2pWCwp9ex9QM6CRqedzgqbxeYBdDI1d1B3+OInJRk2Zo3FVogkGthUXvWszbAMJgi vWqp8xH1Tv78jn5lseSHAPUFYqJWh5efygFZXRlKUlG3f690IjfqLWeP6EtxRvJh2Ovu QJhkc66bhhLTUAwSQuvWdqENNo2VfzsOJGhmrFV9/XCyUDc9ePPTTY8jFa7OqhTu5z87 eFfw== 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=NVlMUktdQFjTITcDF+m9vkjjYtfIOVpIB9U8tEB+LDs=; b=e1gEcejoqzkLTI4VAs2hx2QICSGBi9X90S5KZkCBVWQJ4B66Az64OpflH0fNU1CVLU FxHQYyFf1OEAUwamWMINGILFylxNIbc//PBh4qSz6tQ3B4upsr4IrXHG18rLLlCQGe2c z6K3Hsua0gYo72Fy9O5tiRpe62ouUgWHqvuvOkf/PdUyip2osTSGHfMotSLcK6L9aWgl GwO3USLteMdYFF9jCb1ujLXYGUSWrihVP9VqDfW8Crx6X3+X3eouBRttDUnSDbWMz/HS AVwb3I5k0/rfISx1CgMp1TP8jzwCL+8fEnuv6WWIT9oaEHRPd5YUp16mltqrmzq84xP0 7T4w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Tld6olad; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=NVlMUktdQFjTITcDF+m9vkjjYtfIOVpIB9U8tEB+LDs=; b=Lens2k2KtXkCQn6+YL2TFjJ/hv9r7QvRCqPkbe9PLVhOxJjY9R7kkvB/G7WA08pAns AVfqudeDLgWrZrnQUXEuLV+McrDg+qLS+kjB8ddmitlksvsN9uSgM1JabXjuxcU4KMbm LY7lf9XEa3IDjjO3xOPToNzas96x5rM461SZk= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=NVlMUktdQFjTITcDF+m9vkjjYtfIOVpIB9U8tEB+LDs=; b=os9RIQLQmz4427uLz71+mF3uhgxaFSGU9waRWeuopTBpHDgEfu07VL/f4JWEhqvbKp wbQj3vn9FrUfGVCHc8hhrUXmD+btSxE5t4UrQ0o1tXPwVP4o3ainrYOH2aRKkoDyK5mx E+90c2b5PYqLebcHOzoVsyeeyroeVH/xbmUtYvtyKa0uJIFUOyeNbMBHgrzEzgnDzytL AtVsMyZiZQ52O+jpDw5eYJhlghOa3KjDKs1JA5M4Mghw6RZs3LI0xG17CCHpyFwxBa+X 85/q0UYhDEv4RAdwMfflE44AhenyvSmjhS5OQvcoJpvjrV3NwcU6wkC4FwMqR3SG8c/6 Iy4Q== X-Gm-Message-State: APjAAAVi4TDEcd/vIqZb/HVJ7NcMC7m6iJhvkfZtKdCvGOMHKjhsvL88 fah8Wnm8LKwDUfancXZoYGl8MaQw X-Google-Smtp-Source: APXvYqy7qXkbqj4ZjAZiYmlIEif0FaJyKALEjKxquAxK4bFSMTVR/gf6DGxGFecbXm6+VF8lWW/AMQ== X-Received: by 2002:aa7:8099:: with SMTP id v25mr1306485pff.68.1554204586476; Tue, 02 Apr 2019 04:29:46 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b70c:: with SMTP id d12ls6319896pls.0.gmail; Tue, 02 Apr 2019 04:29:46 -0700 (PDT) X-Received: by 2002:a17:902:2702:: with SMTP id c2mr69011050plb.239.1554204586128; Tue, 02 Apr 2019 04:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204586; cv=none; d=google.com; s=arc-20160816; b=sJyuNNyBIopnJE4oa5b7DxUcqEV4WyDBtS69Xdi4oEqsn6jJJ/VSD0YaeTjbqfzV5p WoCbT7Rz54zzKvPxqDMIWDcek5mY3ETn8RL3U6Otlx9u3D0kl7pOYiA6PpQa1SGIXkNP OFREA1Vl4M96CG+QSvbnkRURybIX+rBoU1o9kDApWJuzGbnltVxVojwboTdazopj73fE sODdsTXpCoG6/sVJ/g5+W73Q3o1hjHPqIrMCXKYucZFuD8ah69/MyzvIkFy+YCHVYYjl gAHEPtk3IwKBXijSbNhP6/OCgViUnViEEn6YxzcNAv170O9W3Fz2GPaEJsYL7bg4kDj6 /Ilw== 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=XNq7DJRilbapLezsajL/l+gBLYJV/jbW91v7lsJpIDo=; b=Y1MEOsmj8ff6r3z6qUgZ+kB+Ncd5JVMJ3LW9gQZgZMekCVNAoRNF5BX3bz10K0yo2m 5Qu3wNhfOEXEYPeHkDFgq595RGMw5X4Djm49Hf/N2b2uZ1muF2VuK3Gx9w15YulzppMt 3irTi0I2j/bA9fPbr2VAI3woLnSpS/y4PUYzljTgdGqA0R7pAxu2huFZ7mF1I7r6mIrA GpzJ6ukehWl37g/e+Hj5UmNGQEgWQqcXduSCyCBtCMNdQHDMIXGZUxDN+qssybosdtgR P+skid0+5eXnDypoc6r4iHmR/LJMSj1/MggBSvNOAhgvqEaQVml7zbAXmfch7DywR/iy Putg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Tld6olad; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g7sor12768065pfa.46.2019.04.02.04.29.46 for (Google Transport Security); Tue, 02 Apr 2019 04:29:46 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:6587:: with SMTP id z129mr29217914pfb.88.1554204585868; Tue, 02 Apr 2019 04:29:45 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:45 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 09/10] configs: icore_mipi: Enable CLK Date: Tue, 2 Apr 2019 16:58:42 +0530 Message-Id: <20190402112843.992-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Tld6olad; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , Now, clock driver available for i.MX6Q so enable the CLK in SPL and U-Boot proper for Engicam i.CoreM6 MIPI boards. Signed-off-by: Jagan Teki --- configs/imx6qdl_icore_mipi_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/imx6qdl_icore_mipi_defconfig b/configs/imx6qdl_icore_mipi_defconfig index 7a0e5169b6..bb5e0d3abd 100644 --- a/configs/imx6qdl_icore_mipi_defconfig +++ b/configs/imx6qdl_icore_mipi_defconfig @@ -8,6 +8,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_MX6Q_ENGICAM=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y +CONFIG_SPL_CLK=y CONFIG_DEBUG_UART_BASE=0x021f0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_LIBDISK_SUPPORT=y @@ -44,6 +45,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-icore-mipi" CONFIG_OF_LIST="imx6q-icore-mipi imx6dl-icore-mipi" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_I2C_MXC=y +CONFIG_CLK=y CONFIG_FSL_ESDHC=y CONFIG_PHYLIB=y CONFIG_PHY_SMSC=y From patchwork Tue Apr 2 11:28:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 199 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5B96C3F078 for ; Tue, 2 Apr 2019 13:29:52 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id n63sf9628350pfb.14 for ; Tue, 02 Apr 2019 04:29:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554204591; cv=pass; d=google.com; s=arc-20160816; b=Qaqx99nd6hjVASGDKbGqzpRehAejfvsOhyeRh4qQnfT5w56zIYV2Nevnfi5EP5uEfE KN/NxUBLrxCsYurtjZg5OaJtDoM73gnIyU1AE2anCHkdS/1pI/pqwOybCJfnnK6p8vx7 RjvpyozXryTK1Qh1P5D44ygYD21tajrj3by4nw3r7lSh+9PEqovXDtTk/P9m9XdwRnZ4 wcS+wFqmcvjh0HPURlL9jBb/TyyNsTyiNwznr36PaG17yfevWYW6vkN9yLtf6yyUupug Agx7cxkMuLGEpXgZU0f9ipX1ss+fVxU2BPNqoBbg//0d/U0q0eYgbPQytVgRq/im2hIj 3Rkw== 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=Jz+o1G2tJ+JxtkWgVKgOsHhzXyiWg+Pan5VzBA1d30s=; b=JQFPtkoJWc6dFcfnJCEqtnCDx61HfnY8PpVMCAEeQMs0fNro9ycKLktecQrTBQDPf0 Bsc9xV2kdYBogLOBzNBDBf3UDNVTbGyXEFiRv4HeXAmcvE9+mNwCPbcqGGInWIVcJPqS lnl6/6JXXHbZ5a+T5YzfnsPOlCFrKp+7BnwABj4qXn/vi/2NlVGjyD5LiIyRdEjxfP3p Dmgm8Q62ShELxmTUHTeqNqPKEPe9RXaJV4y8yFeTl8WSnXFiklfL1lFW6mgEZ2vqTikZ 0O70cIYt4YnTB0HUy9KJll8mz8frmCh7fA9ywqUKutRzevPS2updKj02sF3vNsomNQPw Lj5g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JHH5B28j; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Jz+o1G2tJ+JxtkWgVKgOsHhzXyiWg+Pan5VzBA1d30s=; b=R6FGKJkpIbdohL0r9NdlK3LYyjh7rKU6UduZGcSs2/AtXhmh64iXiu8IUjjt7iV5LU 80qrt6RO0YgwhkU02b+Qseo25SNfoVFILBGPF4WO39KDC+C5R2wetW3mGbP+c19yXezz 0owpR5yWmuCfBxi/Pkg32JCu0NY8Jo6UpSQs8= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Jz+o1G2tJ+JxtkWgVKgOsHhzXyiWg+Pan5VzBA1d30s=; b=fyTW8pXFyYAkpu0qO9+iQB5CeFBVhTU4U4dgfklE5mXQyvWRs3gqKd2bFb9ixBzlOc fWycDa8f00+5PnffbU1XGEDdFQSalveauQMDAHkU0mm7j/XbGYPcWap6EpESdYjoevii h49WMd/JJsx5DDW8e6HG3HvOY6oRPltJl5ZP3o1Bn14KWu7j2ikyG2bHhtWsOy55cD0j Jote4wVwrfiJAo71+shr8QlFN+f88RA8Y5gErxnkqqAs2qBOPI62t1qDYmN+GUi615De qspqdc2X9gcBaHTcPP0Yc/0WTdyWM5Wt4b+uVImThZT95AxCjIydIJcDH53kI4lpQi7i 8RIw== X-Gm-Message-State: APjAAAU4CJy3uBSsNBNapxCpryXpxKFbDh/dE3lXITg0WhNy4y20SzIP hZ034pb0flF1pHYhCQuZbDT6XZVA X-Google-Smtp-Source: APXvYqxkJF0pteN5JIhUEy93hTVehpHxZjKrqcyfa09iiqsmA5X8b8yn5hlrKe62NRlMX1J+VNo9Bg== X-Received: by 2002:a63:fa46:: with SMTP id g6mr312460pgk.73.1554204591183; Tue, 02 Apr 2019 04:29:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:ff54:: with SMTP id s20ls139738pgk.14.gmail; Tue, 02 Apr 2019 04:29:51 -0700 (PDT) X-Received: by 2002:a63:9246:: with SMTP id s6mr66822004pgn.316.1554204590895; Tue, 02 Apr 2019 04:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554204590; cv=none; d=google.com; s=arc-20160816; b=AmNluTpqV25SUvaypYLQQVzUgSpAtiBWJR6wMaBujT/abrQwFztK3nX1j0vFTqu5WJ vSSRTm0OmrZ3uW4whbz8aHOwC+t0FwGkgk+NLncZ2O+FiKiuD4FLRvdBhOvF1NZ93x0A IAI2FNYuchRZHdfIqr+88Q6dLYlntxlSwyw0WU/hwT/rBDurmCXNtLEodedMyv3luNS2 P7nbYr/LohW5ovW9qDZ7Zt0XRgmZvvVfohZYZX/2X9kOKblIE25AaPh9vNzM06KIO0zz kldQBny5DqKR9DZFf2pDlNtJT5/FpU/oKYcZcWMKt1yewFA5cxhJZjG3Rkxjbwgt6kS1 v+rA== 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=z94gdCOhYlDATM1gxvLAy8SUT6DF+EfFtif6Gl+Fn0E=; b=uitogVAPAYHdBiR3xZHgcqrVT2JkvSxQc8WZwkuX70UEsuno4oQOcsaaJ5bX6upkbv 1EvjyUNz3l2UEZkN1GIuzlx/hJ8ORuXWTzZc39Te5A/7IuE9+RUn6WDhzr3j87mXGxSX /xpGsVZ9eEfh/aHP3gI3/lX0oau6vTYue4IR71E38cFdpVoMGhAQYViyKB+WWggynXPe 4Rgzkwsuo3yjOoq5rA6+4GtqLo/WHdZtflJpBRwZ8EoOtoPmm7t1c/5fXu/TOFsLSjNx /7SDRxuYaOTgg7WecprNK1xyNhqHNVKWygyuyP16djTyecJb7YHLiXZzi38R09EDDJVV z0Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JHH5B28j; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id f24sor11462964pfn.22.2019.04.02.04.29.50 for (Google Transport Security); Tue, 02 Apr 2019 04:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:5953:: with SMTP id j19mr51099065pgm.260.1554204590612; Tue, 02 Apr 2019 04:29:50 -0700 (PDT) Received: from jagan-XPS-13-9350.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id u62sm23992715pfa.124.2019.04.02.04.29.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 04:29:50 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini , Neil Armstrong , Philipp Tomsich , Marek Vasut , Stefano Babic , Fabio Estevam , Peng Fan , Maxime Ripard , Michael Trimarchi , Andre Przywara Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Shyam Saini , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 10/10] ARM: imx6: Enable CLK for Engicam i.MX6UL boards Date: Tue, 2 Apr 2019 16:58:43 +0530 Message-Id: <20190402112843.992-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190402112843.992-1-jagan@amarulasolutions.com> References: <20190402112843.992-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JHH5B28j; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , Now, clock driver available for i.MX6UL so enable the CLK in SPL and U-Boot proper for Engicam i.MX6UL boards. Signed-off-by: Jagan Teki --- arch/arm/mach-imx/mx6/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index e782859b1e..851cabc6fa 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -361,6 +361,7 @@ config TARGET_MX6UL_14X14_EVK config TARGET_MX6UL_ENGICAM bool "Support Engicam GEAM6UL/Is.IoT" select BOARD_LATE_INIT + select CLK select DM select DM_ETH select DM_GPIO @@ -369,6 +370,7 @@ config TARGET_MX6UL_ENGICAM select DM_THERMAL select MX6UL select OF_CONTROL + select SPL_CLK if SPL select SPL_DM if SPL select SPL_OF_CONTROL if SPL select SPL_PINCTRL if SPL