Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp926661pxf; Wed, 7 Apr 2021 15:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgr4+IcRy59LnB4ocdFKLL7OI6KnXtwO9Zxs4kOBY7tcEi5TsPfKF4jPI+CIwuMssoSMBI X-Received: by 2002:a17:90b:4c0a:: with SMTP id na10mr5546865pjb.227.1617833708085; Wed, 07 Apr 2021 15:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617833708; cv=none; d=google.com; s=arc-20160816; b=C+gcr6+vXP54iPE5qz6rwHZu6fogu2obACMVllwXpUKOVcAK4XOPdgfsEAsJVfFZTA MkOBCUY/vBPRGaOUAtNUxdQ2yup5kh3/Kzza24USp1CuSJK/PUJ6+LVhvEKavmo2UYOD 2X8E3bWBaQVyvsZVqH1YsBJQOgwqlDMHJbgT173D1+nubzAZKu+Hc3VVL+KxupGVot0C VSKFG2cIHgHmMDb7UfIOPZlm4mjx5ukCq76RcUY6LfwaC0oGm89fyj6fdr2sybru+t0k 7svj0JtfcuzArSCi+e3NNoYbAAc17BY8S5c4lre7DDEt1d01u3bkd2iDmx/Xlr2KZw7q X5gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=uY3HZFzJeebG4wQzRYpwbgF2iX4E3HfN0+xSkr/J4Z8=; b=svEr8vU8ipNdoyK9B6Q8LwzElgGs/0vT4ZpP60Ywp9uy928g6UZmegw+Q3b3wTNt8B w2plTpAXbOCCWzgqv/H4L6rVxySJKpoD9d5yIbp+svQ0E7p7O9rIAYoY5w5GY5OXvG+P /tgOwmCwL8qmqL4vrn+6DG0cJftTPJqkJh3VTuKBLtAk4CL0Dh5xAd7fqEDkrkaF3Gre Zxyvb6EDF5AjxH4k/JLt70ZJMIzoDBBI+U6Pqt74ul+e6+ZPOJXnvccSLFMo2ok8NlG2 6hI49+rMrUkI790r0jtTU4jTH74rsMK//9dfefgW+apafzRk+6M0O+Tuh2wZgXK00lWo FJDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si13128163plg.160.2021.04.07.15.14.55; Wed, 07 Apr 2021 15:15:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbhDGWNb (ORCPT + 99 others); Wed, 7 Apr 2021 18:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbhDGWNb (ORCPT ); Wed, 7 Apr 2021 18:13:31 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03C18C061760 for ; Wed, 7 Apr 2021 15:13:21 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUGQ8-0002Ir-PK; Thu, 08 Apr 2021 00:13:08 +0200 Message-ID: <542d469459083fa31e37ca7feb14480831a0445f.camel@pengutronix.de> Subject: Re: [PATCH v1 0/7] imx-gpcv2 improvements From: Lucas Stach To: Adrien Grassein Cc: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Anson.Huang@nxp.com, krzk@kernel.org, peng.fan@nxp.com, aisheng.dong@nxp.com, qiangqing.zhang@nxp.com, alice.guo@nxp.com, aford173@gmail.com, agx@sigxcpu.org, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Thu, 08 Apr 2021 00:13:06 +0200 In-Reply-To: <20210407212122.626137-1-adrien.grassein@gmail.com> References: <20210407212122.626137-1-adrien.grassein@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adrien, I feel like I already mentioned to you some time ago that there is already a much more complete patch series to add this functionality on the list [1]. If you want this functionality to go upstream, please help test and extend this patch series. Regards, Lucas [1] https://lore.kernel.org/linux-arm-kernel/20201105174434.1817539-1-l.stach@pengutronix.de/ Am Mittwoch, dem 07.04.2021 um 23:21 +0200 schrieb Adrien Grassein: > Hi, > > This patch set aims is to add the support of the i.MX8 MM power domains > on the mainline kernel. > > To achieve this, I do several patches >   - Check errors when reading or writing registers (concerns i.MX8M base >     implementation); >   - Fix power up/down sequence. Handshake was not checked and it was >     not called at the appropriate time (concerns i.MX8M base > implementaions); >   - Allow domains without power sequence control like the HSIOMIX of the >     i.MX8MM. >   - Add some i.MX8MM domains (HSIO and OTGS); >   - Introduce quirks. For example, i.MX8MM OTG domains should not be >     powered off (seen n the source code of th i.MX ATF). Quirks are > easily upgrable for other cases. >   - Finally I defined power domains into the imx8mm.dtb file. > > I know that this kind of patch is rejected by NXP ut the other way > (callin ATF directly) was also rejected. > > I also know that NXP is concerned abou adding hundred lines of codes for > each new SOC but it' the way it works on Linux. And the "added code" > mainly consist of adding structures, defines and generic methods for > regmap. > > If it's a real problem, maybe we can introduc a new "gpcv3" driver for > i.MX8MM, i.MX8MN and i.MX8MP. > > Thanks, > > Adrien Grassein (7): >   soc: imx: gpcv2: check for errors when r/w registers >   soc: imx: gpcv2: Fix power up/down sequence >   soc: imx: gpcv2: allow domains without power sequence control >   dt-bindings: power: fsl,imx-gpcv2: add definitions for i.MX8MM >   soc: imx: gpcv2: add HSIOMIX and USB domains for i.MX8MM >   soc: imx: gpcv2: add quirks to domains >   arm64: dts: imx8mm: add power-domains > >  .../bindings/power/fsl,imx-gpcv2.yaml | 7 +- >  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 35 ++ >  drivers/soc/imx/gpcv2.c | 336 ++++++++++++++---- >  include/dt-bindings/power/imx8mm-power.h | 21 ++ >  4 files changed, 333 insertions(+), 66 deletions(-) >  create mode 100644 include/dt-bindings/power/imx8mm-power.h >