Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2556942rdb; Wed, 15 Nov 2023 04:29:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/hd9TlTmPGfYEQ0a36dx3Qbu8MLGuV1AusZ+nysDEBLHRCTx1hFS9rxTtrtsgzaUGhiVZ X-Received: by 2002:a05:6830:2b21:b0:6b7:4a52:a33a with SMTP id l33-20020a0568302b2100b006b74a52a33amr6464285otv.14.1700051340940; Wed, 15 Nov 2023 04:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700051340; cv=none; d=google.com; s=arc-20160816; b=wsY1Y3Bj1DpGQ6p2qYeA7SH02grgewVkI7CrpF3Zl/zDFut69kwsg4dgGcLuF1ISiZ HEOGzUB85AI1MTjYJi5EX0rIaLTchAjGpfMnndHUlzrKpcu3pk/1tQLZTwBqtwmRyfOX f62eLZPNza+wHg6jKhh0gdhcdrWLRS4r5vlaRxv12+X5K35zPTo102l+FSnzwzsm4u/r hKefOU6czojq+KQWBpM/+x2rLvrS4l9uS/adGBK95plJTAjEQCyH10lJa0/ve4dPjEHo btUFmTh5guDyiwTivQ46VPR5ywke83YkSXy62c1aFELyAOxdzqiIOMLTJcYyjtmwmCYb YWFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=dwjGBPv0LggRv8ucHbctzDyEB0uQFRFM/3IXkTUdnCo=; fh=Wxwmrf3fZO02awwyGjo2YRb0AkeJPpkc7Bccl97THA4=; b=e/9hc9q82BRIyRu4Uh96MH7AgjGZDpBoGtcZi00QE9CSSZ1TU1yXfQ8jqTw29VdDTE eOk2ZhHPJGl8zkE4qEbL8roviwBzRIiiZNxj8pSh+B3xKrZj32jpgqE8e5kRZkCcdB5M sSRxoG444XTsfAPlBRj5PGAZUqNclhytQ3j2X524jDoTHroGq0qxLQqSlGQsrTarQh7P EB9uYcVZsYyC05dAwuPqh9LmME+Frgw9iPfn+KpYHcmj5pV4Ys4l49hxjzownG5LMZfL 8VvbmHvENaHZKU78jGm/MBMdG3hdnloAZqrqTEC82wfL5hEshGHFAYA9P/bIEx33FY7c lylA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lTD5ZvvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t189-20020a6381c6000000b005bdff953b76si9303869pgd.197.2023.11.15.04.28.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 04:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lTD5ZvvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9968481896FA; Wed, 15 Nov 2023 04:28:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234948AbjKOM25 (ORCPT + 99 others); Wed, 15 Nov 2023 07:28:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234680AbjKOM24 (ORCPT ); Wed, 15 Nov 2023 07:28:56 -0500 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58D67C7 for ; Wed, 15 Nov 2023 04:28:52 -0800 (PST) Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-66d13ac2796so38694456d6.2 for ; Wed, 15 Nov 2023 04:28:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700051331; x=1700656131; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dwjGBPv0LggRv8ucHbctzDyEB0uQFRFM/3IXkTUdnCo=; b=lTD5ZvvZCoGiMSuKgEYFq2kK4QFgFjoumEiVf91QEpiFd0xLhzO2ENmi4tV2FWmoVD 8XwfxtceJF7Wr67GCPoWT0Kv7dc79JLaf/no3/Bw3xvveTROjTpgW9xFZcddSoM9y7HV HyDV4gHkmAfbObHrJRKbsA+31smB96Ob1oX6EZX6NU9CreLPXwMiBKDfXRuxBBHkBTkX 5xvJNIyTwlRlM/nz1/rwiOz95vPPLK+ZhZJY4gy+0eN3Q+LcvL0subm5feKGewOaEfCx TQqbs0xvUWQhkO2uo85zppsIFNUyjMunbLejTa8v1yreFcLnIUFB6dYrdzoTgnL9WRLs tBjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700051331; x=1700656131; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dwjGBPv0LggRv8ucHbctzDyEB0uQFRFM/3IXkTUdnCo=; b=Al/65Tg+4hf88uJSp+wyreonnzN1BYs2OegjanL4BAGghjGjhRnry/ryySuhPUwRjH WQaqsgeb3ew8bMJQrgJCYGwiJZypZEG29UqAGMowG2rVyryqqTs8tkcQjVYlN4Q5iVtR aMOVF3ajINarDiQHuZba3M/1ErYy4/H+HNyh7GnDJH59O5OoPt1fF36yeNxF92KBt9NJ ZC39gOWDtaLUDPIjEUm0OTTN+Ui7UWg1s4S3zQPdFFuNx6/8VHi9oU11opnaB8aN0nF7 Yoby8+YhQYx4deb3pvKcdMsBFZFUqzAy7a4aCZIYFWABBCnUgR49dvyuLtXtCPFtdLFb OS7Q== X-Gm-Message-State: AOJu0Yycn3ibktLWBSiZurv2qLAYweaJbhVxsuxYWBF5qnXxtrb62tts CFcezaAufOs2r8yg3cnBl8uUtA== X-Received: by 2002:a05:6214:40f:b0:677:a0f6:8f7c with SMTP id z15-20020a056214040f00b00677a0f68f7cmr7674391qvx.24.1700051331495; Wed, 15 Nov 2023 04:28:51 -0800 (PST) Received: from [192.168.212.13] ([12.191.197.195]) by smtp.gmail.com with ESMTPSA id pr18-20020a056214141200b0067169e210b3sm494437qvb.70.2023.11.15.04.28.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Nov 2023 04:28:50 -0800 (PST) Message-ID: <62b7176d-f99c-49f6-a287-17a6b3604c1c@linaro.org> Date: Wed, 15 Nov 2023 13:28:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 10/12] pinctrl: samsung: add exynosautov920 pinctrl Content-Language: en-US To: Jaewon Kim , Alim Akhtar , Rob Herring , Conor Dooley , Tomasz Figa , Sylwester Nawrocki , Linus Walleij , Thierry Reding , Uwe Kleine-K?nig , Greg Kroah-Hartman , Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org References: <20231115095609.39883-1-jaewon02.kim@samsung.com> <20231115095609.39883-11-jaewon02.kim@samsung.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfreEFCwkIBwIGFQoJCAsCBBYCAwEC HgECF4AACgkQG5NDfTtBYptgbhAAjAGunRoOTduBeC7V6GGOQMYIT5n3OuDSzG1oZyM4kyvO XeodvvYv49/ng473E8ZFhXfrre+c1olbr1A8pnz9vKVQs9JGVa6wwr/6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n8aBohEgET41SpyQz7fMkcaZU+ok/ +HYjC/qfDxT7tjKXqBQEscVODaFicsUkjheOD4BfWEcVUqa+XdUEciwG/SgNyxBZepj41oVq FPSVE+Ni2tNrW/e16b8mgXNngHSnbsr6pAIXZH3qFW+4TKPMGZ2rZ6zITrMip+12jgw4mGjy 5y06JZvA02rZT2k9aa7i9dUUFggaanI09jNGbRA/ABEBAAHCwXwEGAEKACYCGwwWIQSb0H4O DFH41ZZ3t1Qbk0N9O0FimwUCYDzvagUJFF+UtgAKCRAbk0N9O0Fim9JzD/0auoGtUu4mgnna oEEpQEOjgT7l9TVuO3Qa/SeH+E0m55y5Fjpp6ZToc481za3xAcxK/BtIX5Wn1mQ6+szfrJQ6 59y2io437BeuWIRjQniSxHz1kgtFECiV30yHRgOoQlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20231115095609.39883-11-jaewon02.kim@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 15 Nov 2023 04:28:58 -0800 (PST) On 15/11/2023 10:56, Jaewon Kim wrote: > ExynosAutov920 GPIO has a different register structure. > In the existing Exynos series, EINT control register enumerated after > a specific offset (e.g EXYNOS_GPIO_ECON_OFFSET). > However, in ExynosAutov920 SoC, the register that controls EINT belongs > to each GPIO group, and each GPIO group has 0x1000 align. > > This is a structure to protect the GPIO group with S2MPU in VM environment, > and will only be applied in ExynosAuto series SoCs. > > Example) > ------------------------------------------------- > | original | ExynosAutov920 | > |-----------------------------------------------| > | 0x0 GPIO_CON | 0x0 GPIO_CON | > | 0x4 GPIO_DAT | 0x4 GPIO_DAT | > | 0x8 GPIO_PUD | 0x8 GPIO_PUD | > | 0xc GPIO_DRV | 0xc GPIO_DRV | > | 0x700 EINT_CON | 0x18 EINT_CON | > | 0x800 EINT_FLTCON | 0x1c EINT_FLTCON0 | > | 0x900 EINT_MASK | 0x20 EINT_FLTCON1 | > | 0xa00 EINT_PEND | 0x24 EINT_MASK | > | | 0x28 EINT_PEND | > ------------------------------------------------- > > Pinctrl data for ExynosAutoV920 SoC. > - GPA0,GPA1 (10): External wake up interrupt > - GPQ0 (2): SPMI (PMIC I/F) > - GPB0,GPB1,GPB2,GPB3,GPB4,GPB5,GPB6 (47): I2S Audio > - GPH0,GPH1,GPH2,GPH3,GPH4,GPH5,GPH6,GPH8 (49): PCIE, UFS, Ethernet > - GPG0,GPG1,GPG2,GPG3,GPG4,GPG5 (29): General purpose > - GPP0,GPP1,GPP2,GPP3,GPP4,GPP5,GPP6,GPP7,GPP8,GPP9,GPP10 (77): USI > > Signed-off-by: Jaewon Kim > --- > .../pinctrl/samsung/pinctrl-exynos-arm64.c | 140 ++++++++++++++++++ > drivers/pinctrl/samsung/pinctrl-exynos.c | 102 ++++++++++++- > drivers/pinctrl/samsung/pinctrl-exynos.h | 27 ++++ > drivers/pinctrl/samsung/pinctrl-samsung.c | 5 + > drivers/pinctrl/samsung/pinctrl-samsung.h | 13 ++ > 5 files changed, 280 insertions(+), 7 deletions(-) > > diff --git a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c > index cb965cf93705..cf86722a70a3 100644 > --- a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c > +++ b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c > @@ -796,3 +796,143 @@ const struct samsung_pinctrl_of_match_data fsd_of_data __initconst = { > .ctrl = fsd_pin_ctrl, > .num_ctrl = ARRAY_SIZE(fsd_pin_ctrl), > }; > + > +/* pin banks of exynosautov920 pin-controller 0 (ALIVE) */ > +static struct samsung_pin_bank_data exynosautov920_pin_banks0[] = { So you created patch from some downstream code? No, please work on upstream. Take upstream code and customize it to your needs. That way you won't introduce same mistakes fixes years ago. Missing const. ... > @@ -31,6 +31,7 @@ > #define EXYNOS7_WKUP_EMASK_OFFSET 0x900 > #define EXYNOS7_WKUP_EPEND_OFFSET 0xA00 > #define EXYNOS_SVC_OFFSET 0xB08 > +#define EXYNOSAUTOV920_SVC_OFFSET 0xF008 > ... > #ifdef CONFIG_PINCTRL_S3C64XX > { .compatible = "samsung,s3c64xx-pinctrl", > diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.h b/drivers/pinctrl/samsung/pinctrl-samsung.h > index 9b3db50adef3..cbb78178651b 100644 > --- a/drivers/pinctrl/samsung/pinctrl-samsung.h > +++ b/drivers/pinctrl/samsung/pinctrl-samsung.h > @@ -122,6 +122,9 @@ struct samsung_pin_bank_type { > * @eint_type: type of the external interrupt supported by the bank. > * @eint_mask: bit mask of pins which support EINT function. > * @eint_offset: SoC-specific EINT register or interrupt offset of bank. > + * @mask_offset: SoC-specific EINT mask register offset of bank. > + * @pend_offset: SoC-specific EINT pend register offset of bank. > + * @combine: EINT register is adjacent to the GPIO control register. I don't understand it. Adjacent? Are you sure? GPIO control register has 0xF004 (EXYNOSAUTOV920_SVC_OFFSET + 0x4)? Anyway, this does not scale. What if next revision comes with not-adjacent. There will be "combine_plus"? Also name confuses me - combine means together. Also your first map of registers does not have it adjacent... Anyway first patch is to rework driver to support new register layout. Second patch is to add new variant. Best regards, Krzysztof