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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B2F7EDE99C for ; Thu, 14 Sep 2023 09:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237720AbjINJnA (ORCPT ); Thu, 14 Sep 2023 05:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236696AbjINJmr (ORCPT ); Thu, 14 Sep 2023 05:42:47 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70AB965B8 for ; Thu, 14 Sep 2023 02:39:59 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-31fc91d5ca6so702603f8f.0 for ; Thu, 14 Sep 2023 02:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694684398; x=1695289198; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wkRr2Iy0+K6vIJnTucCFmAy5l/T/0tpW8rzsNiTNhmA=; b=aWWc3x+zJHk9/KstU8EfdH2PZW74892FCdzvpy0WleeQEnZyzmamuK9dbHCdKs2/kk ALeyojv0SCghWWg7t1HzmReOuIayQKTu6d4TWfG/gvwNnkjWfCInkRynQwDa46DkU9sX ZXl2WIUEP+I6ofV5zHIB6KdOIHk6nsnrmrAcDYL7P5Em+jnZkwHU3NlUxP0NS9XgguvY GrQI81ClA87NM/cRIyro6YBTZkUBHOEObdFgybyCUSjQTIEe081m7uWXXwaqX0VylA0x +eo4Sc4xzs+wPGy8TRztPZNqrIn4KeRcfjPl0mKOuP5iuS9kyPZl7Y4M9G4tSsbiaFZY cgiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694684398; x=1695289198; h=content-transfer-encoding:in-reply-to: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=wkRr2Iy0+K6vIJnTucCFmAy5l/T/0tpW8rzsNiTNhmA=; b=nNk+HSUqrOSG5inzPJC7WF/KULEcgjtrYWQIb4uymcRUhd03bL4XmCTEx57pcLErLR hUn95DgMlJY65MtmiR+OVq2r3CYkFatEmcFDllKa9uSpJkLZd2BpFlz87sUQ4MNb3g12 cmxskFYV+loW3QaP+DnZnR1VBPL7ntHaSzn8WKsPa9WH9MEEpqCKPMOc6JAIca6spwAt B9p3D47X8qaa/76L4xpuGRlfa5OirxB2WvcVSXZvAOZIUuvLVbtWDO1rcTi7jREqI7ll J/igubMTUgkcJmvl3txDp2q0nJQ9qO0kfDX7d++t/GTutVhK+RyiIf2CrEgoOix3ZAfr V7Tw== X-Gm-Message-State: AOJu0YzwzAOjbrdix6OOA5Gk7avTY2+2CLToecVw1rUByCuO56ICBgoZ Lvth239NaZf2AlDbVFl7oTyscA== X-Google-Smtp-Source: AGHT+IGVe3Woa/BzotTOKXLgtxPUhPiSS0CBrX4NQmlul1TMSNsNw4zct4KzyDU4ZGekV2TbD1NJIw== X-Received: by 2002:a05:6000:1816:b0:313:fe1b:f441 with SMTP id m22-20020a056000181600b00313fe1bf441mr4019402wrh.29.1694684397782; Thu, 14 Sep 2023 02:39:57 -0700 (PDT) Received: from [192.168.1.20] ([178.197.214.188]) by smtp.gmail.com with ESMTPSA id b12-20020adfe64c000000b003177074f830sm1277684wrn.59.2023.09.14.02.39.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Sep 2023 02:39:57 -0700 (PDT) Message-ID: <02e25e44-1146-bb59-58de-800b11d30e7b@linaro.org> Date: Thu, 14 Sep 2023 11:39:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH 3/5] gpio: vf610: add i.MX8ULP of_device_id entry Content-Language: en-US To: Peng Fan , Linus Walleij Cc: "Peng Fan (OSS)" , Bartosz Golaszewski , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stefan Agner , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , dl-linux-imx , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" References: <20230914-vf610-gpio-v1-0-3ed418182a6a@nxp.com> <20230914-vf610-gpio-v1-3-3ed418182a6a@nxp.com> <48e46de0-0996-b715-9d17-e1e10c0e44be@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 14/09/2023 11:08, Peng Fan wrote: >> Subject: Re: [PATCH 3/5] gpio: vf610: add i.MX8ULP of_device_id entry >> >> On 14/09/2023 10:48, Linus Walleij wrote: >>> On Thu, Sep 14, 2023 at 7:48 AM Krzysztof Kozlowski >>> wrote: >>>> On 14/09/2023 04:20, Peng Fan (OSS) wrote: >>>>> From: Peng Fan >>>>> >>>>> i.MX8ULP supports two interrupts, while i.MX7ULP supports one >> interrupt. >>>>> So from hardware perspective, they are not compatible. >>>>> >>>>> So add entry for i.MX8ULP. >>>>> >>>>> Signed-off-by: Peng Fan >>>>> --- >>>>> drivers/gpio/gpio-vf610.c | 1 + >>>>> 1 file changed, 1 insertion(+) >>>>> >>>>> diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c >>>>> index dbc7ba0ee72c..88f7215cdf4b 100644 >>>>> --- a/drivers/gpio/gpio-vf610.c >>>>> +++ b/drivers/gpio/gpio-vf610.c >>>>> @@ -67,6 +67,7 @@ static const struct fsl_gpio_soc_data imx_data = { >>>>> static const struct of_device_id vf610_gpio_dt_ids[] = { >>>>> { .compatible = "fsl,vf610-gpio", .data = NULL, }, >>>>> { .compatible = "fsl,imx7ulp-gpio", .data = &imx_data, }, >>>>> + { .compatible = "fsl,imx8ulp-gpio", .data = &imx_data, }, >>>> >>>> Why? It is the same as imx7. No need. >>> >>> Because compatible = "fsl,imx7ulp-gpio" is not what is going to be in >>> the device tree, but compatible = "fsl,imx8ulp-gpio"? >>> >>> What am I missing here? Maybe the commit message is weird. >>> >> >> If the devices used before and are still going to use same driver data, they >> look compatible from OS point of view. Therefore usually we express such >> compatibility and do not add unneeded device_id entries. >> >> Now whether the devices are truly compatible or not, I don't know and with >> some recent emails I am bit confused. > > Some tricks in dtb are made to make the driver could work for both i.MX7ULP, > i.MX8ULP, i.MX93 with fsl,imx7ulp-gpio. > > Such as i.MX8ULP: > reg = <0x2d000080 0x1000>, <0x2d000040 0x40>; > Actually the two regs are belong to one physical continuous space, > <0x2d000000 0x1000> > Just to i.MX8ULP could reuse the vf610 gpio driver, the regs are partitioned > into two with some offset added > > So from hw, I think they are not compatible, just some sw tricks to > make the linux driver could work for both platform. OK, that sounds like reason to clean this up - drivers, bindings and finally DTS - all with proper explanation justifying affected DTS users. Best regards, Krzysztof