From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1440ECE563 for ; Mon, 17 Sep 2018 08:13:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A26E3214C4 for ; Mon, 17 Sep 2018 08:13:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A26E3214C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbeIQNjW (ORCPT ); Mon, 17 Sep 2018 09:39:22 -0400 Received: from mga05.intel.com ([192.55.52.43]:21768 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727302AbeIQNjW (ORCPT ); Mon, 17 Sep 2018 09:39:22 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 01:13:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,384,1531810800"; d="scan'208";a="81012260" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by FMSMGA003.fm.intel.com with SMTP; 17 Sep 2018 01:12:50 -0700 Received: by lahna (sSMTP sendmail emulation); Mon, 17 Sep 2018 11:12:49 +0300 Date: Mon, 17 Sep 2018 11:12:49 +0300 From: Mika Westerberg To: Rajat Jain Cc: Andy Shevchenko , Linus Walleij , linux-gpio@vger.kernel.org, Linux Kernel Mailing List , casey.g.bowman@intel.com, "Atwood, Matthew S" Subject: Re: pinctrl-icelake: driver writes to wrong offsets? Message-ID: <20180917081249.GM14465@lahna.fi.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 14, 2018 at 05:18:34PM -0700, Rajat Jain wrote: > This is to report what I think is a problem in the pinctrl-icelake > driver. It seems that when trying to control GPIO pins GPP_A* and > GPIO_B*, the driver ends up writing to incorrect PADCFG registers. > I've reached this conclusion by putting debug prints in the driver, > although this can be seen by the following commands too. Please let me > know if something is wrong in my experiments. For example, when trying > to control GPP_B8/ISH_I2C1_SCL, the driver ends up writing to > GPP_A6/ESPI_RESETB registers. Hmm, when you add debug prints to the driver and you access GPIO 224 (GPP_B8/ISH_I2C1_SCL) from userspace you can see that the driver actually uses PADCFG registers of GPP_A6/ESPI_RESETB? So that it is not just a side-effect of how the pins are wired on your board.