Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5219416imm; Tue, 16 Oct 2018 07:04:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Mc+TneVqLDMqjmEadEdsapEyVXMuinUbB2TBOWE6T3eCExTgihbC3PUklznNh/t4yVQHV X-Received: by 2002:a62:8f:: with SMTP id 137-v6mr22095339pfa.24.1539698645148; Tue, 16 Oct 2018 07:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539698645; cv=none; d=google.com; s=arc-20160816; b=dBgmg2TzVW3uofMAdE4DgEgvCklcWg62DTZhRAvRomR5wtj3zUsD2Wp9DugL5yP1cs 2LtL3EQrYVnDSUmScFyk3HQO7Kq0vYp4ejB4dyWxMjo0HxbGq1e/86eOboO8Hdy1YiEp 8zxb/xJYzyjiMSqlZ1aqHTCipKVvI7ePzZzlDBycAm612hCXztCRXKFxz9nVEJcMzj56 aaej67OD3gIAygGtVQ7LF6tfhVowV+rFOdh7+OUZC3KSj/tumxSyOu+PRNZD75abtsMg QKMZ6S2E8siX7II1RFADhluAObnAWW1BQuugRER+3npzE9Rz3L2CUc6otqBk7t8u/Mg0 Nieg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=Os08TZtRIQQk5XJNkJ906/VCHb2GgmVLiq2u3CX0KWI=; b=cNkWsNZ5n0nEZr8ev04sy5jBUWgTVVPZkZRczgs9Hw4j4pIspFuEqmnikKdRwZH4RJ vbY/s4eGLihj/7D/f3rFV3KDPum8vQDlixKaM9xaOdjFuwFgc6L4nj5UdakxFJXVGowE kFhOVIHmXpe7ZxbsrJZWiv5ChBsSU76V9iDf4kZUoc1FP0oN5IXN1XxcmaenwiU2EMGD gmNgdAB19T43WSr1R3Bmcze/tnBKOBspprBUQJseE51vYkwfAL2zsRU/XNaeqJ+spweF g5GEaNDKuGCXXTdcw6j5tPl19gkLt74OWwpu79MxZhX6Jt4cSsjMjlqKh1gpZofImchG N1fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m0x5PSgM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20-v6si14300774pgk.360.2018.10.16.07.03.49; Tue, 16 Oct 2018 07:04:05 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m0x5PSgM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727132AbeJPVvd (ORCPT + 99 others); Tue, 16 Oct 2018 17:51:33 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:32916 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726986AbeJPVvc (ORCPT ); Tue, 16 Oct 2018 17:51:32 -0400 Received: by mail-ed1-f65.google.com with SMTP id l14-v6so12453615edq.0; Tue, 16 Oct 2018 07:00:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Os08TZtRIQQk5XJNkJ906/VCHb2GgmVLiq2u3CX0KWI=; b=m0x5PSgMo3ZtDTCYDv5a+w7eJk/eGouug4g4ycVrGru97ZAbp5bIdLvcCGYcBK5sHN tttptxcmF870jaTTgCtYXnsVJudiy2voP41R82Zaey7vjcmcw8smICBeykYp4pO4v8cC NxO1hu1LkmXbZ0wfYzOKKmujSsaaX1vNvpkkO4327AIlFVrTFSIejhmags09kN74nG/u 0C/pnxSNj+YxAWB/oE1YBIdkyXEbHVI5zV5zVqgO2MYtKtQuof6zCtR+aJbOjaMgKiG4 O9JTt3bzQVZuTpsd694Keur1vfP8gqdOehEody3zStcNYMADiwKO7+rH2OzofLkAUY1S NMZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Os08TZtRIQQk5XJNkJ906/VCHb2GgmVLiq2u3CX0KWI=; b=qo/+E+AoFw0Xey1X1iQbR7Z27yv4NlchUtEB9p1fpNpGyEkKYQWzLAdCE7e5A2zgdw lkoBNvkwQOaXLGvppAuPoUDfPL35TcmwC6cGGZgBFW0TrRL20AvYKh6PJB9uYat5aTuk mZn4HwlHWq0v5K3mrmYrUXtQoq7hYtxPMjgJebBRnM29WX35R6xHu7qcOnVMY11Q4Xyc BY50E6yEh1/YotlwEyUyVwLDN0WyghQx8DHa9wPhxZHk3mX1RN5c8+HQ7KnPcAMjf2DH llfEI6wpbQuqEpl3WqLsSlbO4az9s3BWdrwysBmHBjJJ7IOyUsS7Ojb736/MRteroB1N SVQw== X-Gm-Message-State: ABuFfogATwUP85bWWCkGJjlu/7CS/FzVo/HjGkYxt7QzVeIxxlzi1jgH 7o55b6kBY4L0vODz1IjbWWw= X-Received: by 2002:a50:b2a6:: with SMTP id p35-v6mr30555649edd.261.1539698453513; Tue, 16 Oct 2018 07:00:53 -0700 (PDT) Received: from ziggy.stardust ([93.176.144.101]) by smtp.gmail.com with ESMTPSA id i6-v6sm2858946eja.63.2018.10.16.07.00.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 07:00:52 -0700 (PDT) Subject: Re: [PATCH 5/5] pinctrl: mediatek: Add initial pinctrl driver for MT6797 SoC To: Manivannan Sadhasivam Cc: sean.wang@mediatek.com, linus.walleij@linaro.org, robh+dt@kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, amit.kucheria@linaro.org, Mars Cheng References: <20181008191411.32555-1-manivannan.sadhasivam@linaro.org> <20181008191411.32555-6-manivannan.sadhasivam@linaro.org> <20181011164429.GA18174@Mani-XPS-13-9360> From: Matthias Brugger Openpgp: preference=signencrypt Autocrypt: addr=matthias.bgg@gmail.com; prefer-encrypt=mutual; keydata= xsFNBFP1zgUBEAC21D6hk7//0kOmsUrE3eZ55kjc9DmFPKIz6l4NggqwQjBNRHIMh04BbCMY fL3eT7ZsYV5nur7zctmJ+vbszoOASXUpfq8M+S5hU2w7sBaVk5rpH9yW8CUWz2+ZpQXPJcFa OhLZuSKB1F5JcvLbETRjNzNU7B3TdS2+zkgQQdEyt7Ij2HXGLJ2w+yG2GuR9/iyCJRf10Okq gTh//XESJZ8S6KlOWbLXRE+yfkKDXQx2Jr1XuVvM3zPqH5FMg8reRVFsQ+vI0b+OlyekT/Xe 0Hwvqkev95GG6x7yseJwI+2ydDH6M5O7fPKFW5mzAdDE2g/K9B4e2tYK6/rA7Fq4cqiAw1+u EgO44+eFgv082xtBez5WNkGn18vtw0LW3ESmKh19u6kEGoi0WZwslCNaGFrS4M7OH+aOJeqK fx5dIv2CEbxc6xnHY7dwkcHikTA4QdbdFeUSuj4YhIZ+0QlDVtS1QEXyvZbZky7ur9rHkZvP ZqlUsLJ2nOqsmahMTIQ8Mgx9SLEShWqD4kOF4zNfPJsgEMB49KbS2o9jxb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KgsFpNMKmBAWweBkVJAisoQeX 50OP+/11ArV0cv+fOTfJj0/KwFXJaaYh3LUQNILLBNxkSrhCLl8dUg53IbHx4NfIAgqxLWGf XM8DY1aFdU79pac005PuhxCWkKTJz3gCmznnoat4GCnL5gy/m0Qk45l4PFqwWXVLo9AQg2Kp 3mlIFZ6fsEKIAN5hxlbNvNb9V2Zo5bFZjPWPFTxOteM0omUAS+QopwU0yPLLGJVf2iCmItHc UXI+r2JwH1CJjrHWeQEI2ucSKsNa8FllDmG/fQ== Message-ID: Date: Tue, 16 Oct 2018 15:58:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181011164429.GA18174@Mani-XPS-13-9360> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10/2018 18:44, Manivannan Sadhasivam wrote: > On Thu, Oct 11, 2018 at 05:50:19PM +0200, Matthias Brugger wrote: >> >> >> On 08/10/2018 21:14, Manivannan Sadhasivam wrote: >>> Add initial pinctrl driver for Mediatek MT6797 SoC supporting only >>> GPIO and pinmux configurations. >>> >>> Signed-off-by: Manivannan Sadhasivam >>> --- >>> drivers/pinctrl/mediatek/Kconfig | 7 + >>> drivers/pinctrl/mediatek/Makefile | 1 + >>> drivers/pinctrl/mediatek/pinctrl-mt6797.c | 82 + >>> drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h | 2430 +++++++++++++++++ >>> 4 files changed, 2520 insertions(+) >>> create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt6797.c >>> create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h >>> >> [...] >>> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h >>> new file mode 100644 >>> index 000000000000..8949d2a15c39 >>> --- /dev/null >>> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h >>> @@ -0,0 +1,2430 @@ >>> +/* SPDX-License-Identifier: GPL-2.0 */ >>> +/* >>> + * Based on pinctrl-mtk-mt6765.h >>> + * >>> + * Copyright (C) 2018 MediaTek Inc. >>> + * >>> + * Author: ZH Chen >>> + * >>> + * Copyright (c) 2018 Manivannan Sadhasivam >>> + */ >>> + >>> +#ifndef __PINCTRL_MTK_MT6797_H >>> +#define __PINCTRL_MTK_MT6797_H >>> + >>> +#include "pinctrl-paris.h" >>> + >>> +static const struct mtk_pin_desc mtk_pins_mt6797[] = { >>> + MTK_PIN( >>> + 0, "GPIO0", >>> + MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), >>> + DRV_GRP3, >> >> As far as I have seen, you put all pins in driving group 3, but from the public >> available "Functional Specification" (page 51-81) I can see that there exist >> several driving groups: >> 2/4/6/8 mA (DRV_GRP3) >> 4/8/12/16 mA (not sure which group this is) >> 2/4/6/8/10/12/14/16 mA (DRV_GRP4). >> > > Not sure about that. But I derived the configuration from DRV_CFGx > registers available in "Application Software Register Table - Part 1" > from page no: 906. > > This register supports 2/4/6/8mA and this belongs to DRV_GRP2/DRV_GRP3 > [1]. I can see other driving groups as defined in the "Functional Specification" [1] which gets also reflected in the "Application Software Register Table - Part 1" [2], see for example page 852. CCing Mars, maybe he can help to clarify. Regards, Matthias [1] https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Functional_Specification_V1_0.pdf [2] https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf > > Still I'm not fully confident of my choice here. Maybe Sean can throw > some inputs! > > Thanks, > Mani > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c#n40 > >> Regards, >> Matthias >>