Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3412143rdb; Sun, 10 Dec 2023 05:01:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiItf9nV9r4uMEVdmLbpv5GY7AnjDfr7saRZXaNLCoI9iHdY5dPdVvUujMe+qzEtKhK9Ng X-Received: by 2002:a05:6870:b28d:b0:1fb:165c:473a with SMTP id c13-20020a056870b28d00b001fb165c473amr4368001oao.57.1702213261134; Sun, 10 Dec 2023 05:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702213261; cv=none; d=google.com; s=arc-20160816; b=nbI0k8f5az7ruxFxd6MFciRHezfXIpVhCw4XyUwn2HylJJMZVnsLbzuh95EYtoKdVF F5L6y3wOgyCHXo419uguKdKyp26V/8rVsNJje/fQbbEb83uP8JgaIWQJ0eaM3kb2Ojnj dYK/PUnu+mqnamkoCzRcVhR4YEL6wCuf3OX0IZJGv7S7nyTsNsbgW6SgBKcSY0BLVq0o YgyeJ3kTgOjMMjAvjLRyH82PTu9TyS8YBd14lcNv/ajT0oAPW2TqYUjWRkuWFoYVXBLs qMyUJdFgM3UtNQe1eJ/3xPweZhup7Pz0bKx9kDiZDCuE4MRATvq2Jef9MN3bFePvJibI ePFQ== 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=QP4ZV7YyqeQFCr7fKyMgWEbeUKcNeD2cWy0MLNepC5Y=; fh=Wxwmrf3fZO02awwyGjo2YRb0AkeJPpkc7Bccl97THA4=; b=ICoTvukErQAoogylcTRxG7j0NAeKloJBnCwI8IIZg7i5pHnP9vUC3yOX0XgfleuN3G YmmabVHZEtkf1tm67o0gfqn4/xCSjiUYF2wjj1jUFYuIBIk+LRumGofoNi9hFHDus9P9 /ZWAvjFvLtIFs3yQllJGIi4BrLPHIIG3TB79f0gJXOQnzNuUkKWmeg9z+zHIqWHVXfLf wCAlZjbhnbfQOnSD3bw+mMc0fWXezWJJps38Ds5MgyJuY5XdtUxlnJHs3TXrl1wTumvd APGK7KY5GoUO/IeAlH0pgy28IIavZ68zQDQOh60jWPhcSur+xuExkNOI7Dp22MEZIa/2 L5wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yLvyXzrU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g62-20020a636b41000000b005c6617f183fsi4519292pgc.303.2023.12.10.05.01.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 05:01:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yLvyXzrU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 953F580792F4; Sun, 10 Dec 2023 05:00:59 -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 S231755AbjLJNAr (ORCPT + 99 others); Sun, 10 Dec 2023 08:00:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232243AbjLJNAo (ORCPT ); Sun, 10 Dec 2023 08:00:44 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9888B119 for ; Sun, 10 Dec 2023 05:00:46 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a196f84d217so418448066b.3 for ; Sun, 10 Dec 2023 05:00:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702213245; x=1702818045; 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=QP4ZV7YyqeQFCr7fKyMgWEbeUKcNeD2cWy0MLNepC5Y=; b=yLvyXzrUAKrklS2oQQxMOhTJyN1fEbdEq46D3QrosqNPcA+TaOt4Qr1hn0ThBrhDmA eBONddjOv9UAp2/NxCg5tkoixfMQj3lYdzQ+dv3Qs5JFuMek2TbnPAm5lCJulWT0tYip vzXGJqWMP61H0tNC68u9Ookjm/sMeqcMgBmW0WX138yVrm0cBwUy/cUoQtREFecv+3ho fCU85rFrd+6bAPsnWQL8TdG60f4BgiPb6YdINLaGq4Pl2lqTrlbo0PXssgWCW3wSo9SN lSZP4gYN/LKDyWC2xXN6JyFBqYbcUZZHK8W/MUsWWw/U6sqzbz+BW46smoEdvD3HfH6O pbTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702213245; x=1702818045; 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=QP4ZV7YyqeQFCr7fKyMgWEbeUKcNeD2cWy0MLNepC5Y=; b=Eh8CdTMzkGN9v+yotoVFrJ1wyMoU0dXPxZmDMrLvJuW6MfULKacjt7oHSekm7y7IyO gCC5NVHwx/txt6u73NuJ1p1BI6DzPyFz0CDkew7hsS1HBfzfKZgPcEj0dGp905XsHdou HCWpbaOLWlkGUCjpBdICr9xERU79pwOYmopI2sGAywQP7s5EjINv+HWrJemuJ0dLB6n6 GKi0z7c3M9Wh+U0CkWjb/blgJj/QxzslyqsNJn0qt9b8qoam1rSV7fVEy29r+0dme7nY WfbnrwL4vWdNUP6WM1K6MBl+0Jozs2QERN96Ww6OVDkcu3O9zY2d9Rmgds1n5ULHPC78 kA9w== X-Gm-Message-State: AOJu0Yy2hIHZAeW6+L2gnvmDbJDR3CD9JBY2a58gLBdY9UR+xxClVOK/ BkbagM+DSDtMKqo5gfrxhz2LWw== X-Received: by 2002:a17:906:830f:b0:a1f:6ae3:3f99 with SMTP id j15-20020a170906830f00b00a1f6ae33f99mr1213710ejx.132.1702213244986; Sun, 10 Dec 2023 05:00:44 -0800 (PST) Received: from [192.168.1.20] ([178.197.218.27]) by smtp.gmail.com with ESMTPSA id tx18-20020a1709078e9200b00a1b618766cbsm3425958ejc.136.2023.12.10.05.00.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Dec 2023 05:00:44 -0800 (PST) Message-ID: <421ede4c-7a96-47e0-9b82-0eb350b59c33@linaro.org> Date: Sun, 10 Dec 2023 14:00:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/4] pinctrl: samsung: support ExynosAuto GPIO structure 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: <20231208074527.50840-1-jaewon02.kim@samsung.com> <20231208074527.50840-4-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/ng473E8ZFh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/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]); Sun, 10 Dec 2023 05:00:59 -0800 (PST) On 08/12/2023 08:45, Jaewon Kim wrote: > New ExynosAuto series GPIO have a different register structure. > In the existing Exynos series, EINT control register enumerated after > a specific offset (e.g EXYNOS_GPIO_ECON_OFFSET, EXYNOS_GPIO_EMASK_OFFSET). > However, from ExynosAutov920 SoC, the register that controls EINT belongs > to each GPIO bank, and each GPIO bank has 0x1000 align. > > This is a structure to protect the GPIO bank using S2MPU in VM environment, > and will only be applied in ExynosAuto series SoCs. > > ------------------------------------------------- > | 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 | > | 0x10 GPIO_CONPDN | 0x10 GPIO_CONPDN | > | 0x14 GPIO_PUDPDN | 0x14 GPIO_PUDPDN | > | 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 | > ------------------------------------------------- > > Signed-off-by: Jaewon Kim > --- > drivers/pinctrl/samsung/pinctrl-exynos.c | 81 +++++++++++++++++++++-- > drivers/pinctrl/samsung/pinctrl-exynos.h | 1 + > drivers/pinctrl/samsung/pinctrl-samsung.c | 3 + > drivers/pinctrl/samsung/pinctrl-samsung.h | 12 ++++ > 4 files changed, 90 insertions(+), 7 deletions(-) > > diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c > index 6b58ec84e34b..f798f64b1122 100644 > --- a/drivers/pinctrl/samsung/pinctrl-exynos.c > +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c > @@ -56,6 +56,9 @@ static void exynos_irq_mask(struct irq_data *irqd) > unsigned int mask; > unsigned long flags; > > + if (bank->eint_mask_offset) > + reg_mask = bank->pctl_offset + bank->eint_mask_offset; Drop the initialization of reg_mask so: else: reg_mask = ... > + > raw_spin_lock_irqsave(&bank->slock, flags); > > mask = readl(bank->eint_base + reg_mask); > @@ -72,6 +75,9 @@ static void exynos_irq_ack(struct irq_data *irqd) > struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); > unsigned long reg_pend = our_chip->eint_pend + bank->eint_offset; > > + if (bank->eint_pend_offset) > + reg_pend = bank->pctl_offset + bank->eint_pend_offset; > + > writel(1 << irqd->hwirq, bank->eint_base + reg_pend); > } > > @@ -95,6 +101,9 @@ static void exynos_irq_unmask(struct irq_data *irqd) > if (irqd_get_trigger_type(irqd) & IRQ_TYPE_LEVEL_MASK) > exynos_irq_ack(irqd); > Ditto > + if (bank->eint_mask_offset) > + reg_mask = bank->pctl_offset + bank->eint_mask_offset; > + > raw_spin_lock_irqsave(&bank->slock, flags); > > mask = readl(bank->eint_base + reg_mask); > @@ -139,6 +148,9 @@ static int exynos_irq_set_type(struct irq_data *irqd, unsigned int type) > else > irq_set_handler_locked(irqd, handle_level_irq); > Ditto > + if (bank->eint_con_offset) > + reg_con = bank->pctl_offset + bank->eint_con_offset; > + > con = readl(bank->eint_base + reg_con); > con &= ~(EXYNOS_EINT_CON_MASK << shift); > con |= trig_type << shift; > @@ -221,6 +233,18 @@ static const struct exynos_irq_chip exynos_gpio_irq_chip __initconst = { > /* eint_wake_mask_value not used */ > }; > > +static const struct exynos_irq_chip exynosauto_gpio_irq_chip __initconst = { No related to this patch. > + .chip = { > + .name = "exynosauto_gpio_irq_chip", > + .irq_unmask = exynos_irq_unmask, > + .irq_mask = exynos_irq_mask, > + .irq_ack = exynos_irq_ack, > + .irq_set_type = exynos_irq_set_type, > + .irq_request_resources = exynos_irq_request_resources, > + .irq_release_resources = exynos_irq_release_resources, > + }, > +}; > + > static int exynos_eint_irq_map(struct irq_domain *h, unsigned int virq, > irq_hw_number_t hw) > { > @@ -247,7 +271,10 @@ static irqreturn_t exynos_eint_gpio_irq(int irq, void *data) > unsigned int svc, group, pin; > int ret; > > - svc = readl(bank->eint_base + EXYNOS_SVC_OFFSET); > + if (bank->eint_con_offset) > + svc = readl(bank->eint_base + EXYNOSAUTO_SVC_OFFSET); This belongs to the second patch. The point of this patch is only to customize the offsets. There should be nothing autov920 here. > + else > + svc = readl(bank->eint_base + EXYNOS_SVC_OFFSET); > group = EXYNOS_SVC_GROUP(svc); > pin = svc & EXYNOS_SVC_NUM_MASK; > > @@ -297,8 +324,12 @@ __init int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) > if (bank->eint_type != EINT_TYPE_GPIO) > continue; > > - bank->irq_chip = devm_kmemdup(dev, &exynos_gpio_irq_chip, > - sizeof(*bank->irq_chip), GFP_KERNEL); > + if (bank->eint_con_offset) > + bank->irq_chip = devm_kmemdup(dev, &exynosauto_gpio_irq_chip, > + sizeof(*bank->irq_chip), GFP_KERNEL); > + else > + bank->irq_chip = devm_kmemdup(dev, &exynos_gpio_irq_chip, > + sizeof(*bank->irq_chip), GFP_KERNEL); > if (!bank->irq_chip) { > ret = -ENOMEM; > goto err_domains; > @@ -655,6 +686,19 @@ static void exynos_pinctrl_suspend_bank( > pr_debug("%s: save mask %#010x\n", bank->name, save->eint_mask); > } > > +static void exynosauto_pinctrl_suspend_bank(struct samsung_pinctrl_drv_data *drvdata, > + struct samsung_pin_bank *bank) > +{ > + struct exynos_eint_gpio_save *save = bank->soc_priv; > + void __iomem *regs = bank->eint_base; > + > + save->eint_con = readl(regs + bank->pctl_offset + bank->eint_con_offset); > + save->eint_mask = readl(regs + bank->pctl_offset + bank->eint_mask_offset); > + > + pr_debug("%s: save con %#010x\n", bank->name, save->eint_con); > + pr_debug("%s: save mask %#010x\n", bank->name, save->eint_mask); > +} > + > void exynos_pinctrl_suspend(struct samsung_pinctrl_drv_data *drvdata) > { > struct samsung_pin_bank *bank = drvdata->pin_banks; > @@ -662,8 +706,12 @@ void exynos_pinctrl_suspend(struct samsung_pinctrl_drv_data *drvdata) > int i; > > for (i = 0; i < drvdata->nr_banks; ++i, ++bank) { > - if (bank->eint_type == EINT_TYPE_GPIO) > - exynos_pinctrl_suspend_bank(drvdata, bank); > + if (bank->eint_type == EINT_TYPE_GPIO) { > + if (bank->eint_con_offset) > + exynosauto_pinctrl_suspend_bank(drvdata, bank); > + else > + exynos_pinctrl_suspend_bank(drvdata, bank); > + } > else if (bank->eint_type == EINT_TYPE_WKUP) { > if (!irq_chip) { > irq_chip = bank->irq_chip; > @@ -704,14 +752,33 @@ static void exynos_pinctrl_resume_bank( > + bank->eint_offset); > } > > +static void exynosauto_pinctrl_resume_bank(struct samsung_pinctrl_drv_data *drvdata, > + struct samsung_pin_bank *bank) > +{ > + struct exynos_eint_gpio_save *save = bank->soc_priv; > + void __iomem *regs = bank->eint_base; > + > + pr_debug("%s: con %#010x => %#010x\n", bank->name, > + readl(regs + bank->pctl_offset + bank->eint_con_offset), save->eint_con); > + pr_debug("%s: mask %#010x => %#010x\n", bank->name, > + readl(regs + bank->pctl_offset + bank->eint_mask_offset), save->eint_mask); > + > + writel(save->eint_con, regs + bank->pctl_offset + bank->eint_con_offset); > + writel(save->eint_mask, regs + bank->pctl_offset + bank->eint_mask_offset); > +} > + > void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata) > { > struct samsung_pin_bank *bank = drvdata->pin_banks; > int i; > > for (i = 0; i < drvdata->nr_banks; ++i, ++bank) > - if (bank->eint_type == EINT_TYPE_GPIO) > - exynos_pinctrl_resume_bank(drvdata, bank); > + if (bank->eint_type == EINT_TYPE_GPIO) { > + if (bank->eint_con_offset) > + exynosauto_pinctrl_resume_bank(drvdata, bank); > + else > + exynos_pinctrl_resume_bank(drvdata, bank); > + } > } > > static void exynos_retention_enable(struct samsung_pinctrl_drv_data *drvdata) > diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h > index 3ac52c2cf998..5049c170e958 100644 > --- a/drivers/pinctrl/samsung/pinctrl-exynos.h > +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h > @@ -31,6 +31,7 @@ > #define EXYNOS7_WKUP_EMASK_OFFSET 0x900 > #define EXYNOS7_WKUP_EPEND_OFFSET 0xA00 > #define EXYNOS_SVC_OFFSET 0xB08 > +#define EXYNOSAUTO_SVC_OFFSET 0xF008 As well not related to this patch. Best regards, Krzysztof