Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp877902ybl; Tue, 13 Aug 2019 04:09:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTbZw0l060LLsLGJTDgf/mJonqkoRVxoGfiGnbp4VSnt2Jbm4RXnOGXMMg9pp8ZuY8qLHW X-Received: by 2002:aa7:85d8:: with SMTP id z24mr39998134pfn.218.1565694556055; Tue, 13 Aug 2019 04:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565694556; cv=none; d=google.com; s=arc-20160816; b=y3XV/ie8BXGfLnBtizaguKOZlmvDcniN8yVD8vAyakryJvmPQbMqruNxZGRk3LIc92 NNVkj4T1LRMgDuQUY7Ao8MDSx6HsRov+Y2iShXKlE84Q3OZukW+9wiX5fj3I+T5anAtT 7+K4JnPqAP1Rh8oSN4kBfwG3tmUxwcpApy9Fi3Qps6u5f3IXVJZFaqr3AfE0XlZOdB7/ loXyz+s24sSlywXZs+E19TjWxsiCJQoEXVoiMODbBu6iidjBwi8rkNDEUAqXGAsLHG3e mszbnUP0blpj6nh3d/8Ed+czUacsf87rjvZ1a7MSn4HupKgfbO33V96W3G/IaYrHcGik 61jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=iaDSyxEKV5r8yB1ruj5JqE+uMK3XBOVm+F55zz8zKNQ=; b=NC57LGSW9/7XwOFS+JAc/3UA6ALqf2YlLKMAw6b+p2CYjuNFS9D5gouF+WA38WyAu1 zSsXTPd/8uHI7VB9VALfX+Ayynhk6MaOnEUw/qK8dfhfGN5+992/fXT8CU5zlIuAC4OL 33Xih+VzAErGfer3ZkgJxs+vYcklbNOuW6UKoOYACM1bPOfaeMN06FHM4syGfiQCbllP N2GoPA8gfMSW+PWfrQ1KKQcDop39xa4AzRvUCIA/NkWv5eMYYchr7JB9dbVZkan4PVeF 9zEuaLi2RvnmhnIM4VUhjaDCk09j1B2feZ0wKt9uP4qhzyfQF0xAfpSTT38gZTT8WeTN zPYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si8369820pfb.69.2019.08.13.04.09.00; Tue, 13 Aug 2019 04:09:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727038AbfHMLIJ convert rfc822-to-8bit (ORCPT + 99 others); Tue, 13 Aug 2019 07:08:09 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:33990 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfHMLIJ (ORCPT ); Tue, 13 Aug 2019 07:08:09 -0400 Received: by mail-qt1-f195.google.com with SMTP id q4so8714330qtp.1; Tue, 13 Aug 2019 04:08:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HIB1FeBMw0kT4n5nY36MOBb0YBcd6Z0mN5e+AnqNyZE=; b=Q1pNtWm9MySi0GsL8tUlHO3WqXtgAR2LGls4H1Rt9LTiEml8z9Hm/2s773AjHRBknF 17SOHd5/LTRnudOc1zqfML1XFS2M8zmDksKe3+HjyD18GYN17XHg53UTXh0ZVlw7xH61 UzEkiC4v9Etkj3/I0dIBnNz4+qt3+S5AYI7HNRnGR23hCgscSzx+R7lrogyojCmUrXvA TgYYaqEbuPOCDF10X3Uz5jkQubzeexU/Cy0ibakKlGNqdxFevTkSMAStf7ZazFtOZsJm AbQo4w938wkGdGMlxvOgBAHGXoa2oxVVF4HHoTmEYdFB4yjFX0XVGQ+wN9ykMCDObMg+ aMyw== X-Gm-Message-State: APjAAAWuFt8vNJCHvBR0BlxV0oiHO4yZ1tQZWmztezbdZGEdICGhcPmj vaIPsoRVLLuR0KTWfAIrBTEiERdOVpOARylvIdo= X-Received: by 2002:ad4:53cb:: with SMTP id k11mr1250357qvv.93.1565694488565; Tue, 13 Aug 2019 04:08:08 -0700 (PDT) MIME-Version: 1.0 References: <20190813101057.GB10751@bogon.m.sigxcpu.org> In-Reply-To: <20190813101057.GB10751@bogon.m.sigxcpu.org> From: Arnd Bergmann Date: Tue, 13 Aug 2019 13:07:52 +0200 Message-ID: Subject: Re: [PATCH v2 1/3] arm64: imx8mq: add imx8mq iomux-gpr field defines To: =?UTF-8?Q?Guido_G=C3=BCnther?= Cc: David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Lee Jones , dri-devel , DTML , Linux ARM , Linux Kernel Mailing List , Robert Chiras , Sam Ravnborg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 12:10 PM Guido Günther wrote: > On Tue, Aug 13, 2019 at 10:08:44AM +0200, Arnd Bergmann wrote: > > On Fri, Aug 9, 2019 at 6:24 PM Guido Günther wrote: > > > > > > This adds all the gpr registers and the define needed for selecting > > > the input source in the imx-nwl drm bridge. > > > > > > Signed-off-by: Guido Günther > > > + > > > +#define IOMUXC_GPR0 0x00 > > > +#define IOMUXC_GPR1 0x04 > > > +#define IOMUXC_GPR2 0x08 > > > +#define IOMUXC_GPR3 0x0c > > > +#define IOMUXC_GPR4 0x10 > > > +#define IOMUXC_GPR5 0x14 > > > +#define IOMUXC_GPR6 0x18 > > > +#define IOMUXC_GPR7 0x1c > > (more of the same) > > > > huh? > > These are the names from the imx8MQ reference manual (general purpose > registers, they lump together all sorts of things), it's the same on > imx6/imx7): > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mfd/syscon/imx7-iomuxc-gpr.h > > > > +/* i.MX8Mq iomux gpr register field defines */ > > > +#define IMX8MQ_GPR13_MIPI_MUX_SEL BIT(2) > > > > I think this define should probably be local to the pinctrl driver, to > > ensure that no other drivers fiddle with the registers manually. > > The purpose of these bits is for a driver to fiddle with them to select > the input source. Similar on imx7 it's already used for e.g. the phy > refclk in the pci controller: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pci-imx6.c#n638 That one should likely use either the clk interface or the phy interface instead. > The GPRs are not about pad configuration but gather all sorts of things > (section 8.2.4 of the imx8mq reference manual): pcie setup, dsi related > bits so I don't think this should be done via a pinctrl > driver. Should we handle that differently than on imx6/7? It would be nice to fix the existing code as well, but for the moment, I only think we should not add more of that. Generally speaking, we can use syscon to do random things that don't have a subsystem of their own, but we should not use it to do things that have an existing driver framework like pinctrl, clock, reset, phy etc. Arnd