Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ettore Chimenti" <ettore.chimenti@linaro.org>
To: "Krzysztof Kozlowski" <krzk@kernel.org>,
	"Ettore Chimenti" <ettore.chimenti@linaro.org>,
	"Paul Walmsley" <paul@pwsan.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Andreas Kemnade" <andreas@kemnade.info>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"Roger Quadros" <rogerq@kernel.org>,
	"Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Christopher Obbard" <chris.obbard@oss.qualcomm.com>,
	"Andrew Goodbody" <andrew.goodbody@linaro.org>,
	"Linus Walleij" <linusw@kernel.org>,
	"Rouven Czerwinski" <rouven.czerwinski@linaro.org>
Cc: <linux-omap@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 02/10] dt-bindings: pinctrl: Add devicetree bindings for DM816x SoC Pinctrl
Date: Tue, 20 Oct 2026 14:16:52 +0200	[thread overview]
Message-ID: <DM9NQ6MMED9N.3QP4ZDCCAZ85Z@linaro.org> (raw)
In-Reply-To: <c91b063f-69b9-4e9b-8e1b-af503de672b7@kernel.org>

Hi Krzyszrof,

On Tue Oct 20, 2026 at 1:22 PM CEST, Krzysztof Kozlowski wrote:
> On 20/10/2026 12:18, Ettore Chimenti wrote:
>> Hi Krzyszrof,
>> 
>> On Mon Oct 19, 2026 at 8:46 AM CEST, Krzysztof Kozlowski wrote:
>>> On 16/10/2026 17:07, Ettore Chimenti wrote:
>>>> Hi Krzyszrof,
>>>>
>>>> On Fri Oct 16, 2026 at 4:51 PM CEST, Krzysztof Kozlowski wrote:
>>>>> On 16/10/2026 16:41, Ettore Chimenti wrote:
>>>>>> Add devicetree bindings for TI DM816x SoC pinctrl configuration.
>>>>>> Using same definition as OMAP2/3 except pullup/down enable macros, which
>>>>>> are inverted in this SoC.
>>>>>>
>>>>>> Signed-off-by: Ettore Chimenti <ettore.chimenti@linaro.org>
>>>>>> ---
>>>>>>  include/dt-bindings/pinctrl/dm816x.h | 20 ++++++++++++++++++++
>>>>>>  1 file changed, 20 insertions(+)
>>>>>>
>>>>>> diff --git a/include/dt-bindings/pinctrl/dm816x.h b/include/dt-bindings/pinctrl/dm816x.h
>>>>>> new file mode 100644
>>>>>> index 000000000000..15aa15bca9bd
>>>>>> --- /dev/null
>>>>>> +++ b/include/dt-bindings/pinctrl/dm816x.h
>>>>>> @@ -0,0 +1,20 @@
>>>>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>>>>> +/*
>>>>>> + * This header provides constants specific to DM816X pinctrl bindings.
>>>>>> + */
>>>>>> +
>>>>>> +#ifndef _DT_BINDINGS_PINCTRL_DM816X_H
>>>>>> +#define _DT_BINDINGS_PINCTRL_DM816X_H
>>>>>> +
>>>>>> +#include <dt-bindings/pinctrl/omap.h>
>>>>>
>>>>> I do not see this being used here, IWYU.
>>>>>
>>>>>> +
>>>>>> +#undef PULL_UP
>>>>>> +#undef PULL_ENA
>>>>>
>>>>> Why are you undefining other macros? That's not a easy to follow code.
>>>>
>>>> Do you prefer to duplicate `omap.h` defines? Only the defines above do not
>>>> apply to DM816x.
>>>
>>> Not sure what you need to duplicate, but if you add header with bindings
>>> for this device, then you should not include headers for other devices.
>> 
>> I basically used dm814x.h as a template which does that, is that not
>> correct?
>> 
>>>
>>>>
>>>>>
>>>>>
>>>>>> +
>>>>>> +/* DM81xx mux bit defines */
>>>>>> +#define PULL_ENA		(0 << 3)  /* Pullup enabled  => 0 */
>>>>>> +#define PULL_DIS		(1 << 3)  /* Pullup disabled => 1 */
>>>>>> +#define PULL_DN			(0 << 4)
>>>>>> +#define PULL_UP			(1 << 4)
>>>>>
>>>>> I do not see this used by drivers, so why do we need one more header?
>>>>> What part of SW are you binding here?
>>>>>
>>>>
>>>> I added those (DN/UP) because they are not defined in `omap.h`. It may be
>>>> convenient for future board upstreaming. I can drop those if undesired.
>>>
>>> Just add the header to proper place - DTS. These are just not looking as
>>> bindings.
>> 
>> Sorry, does dm814x.h not look as bindings? I'm a bit confused.
>
> I asked  which part of SW are you binding. There was no answer, but
> question. So if you cannot point which part of software you bind, then
> we can assume it is not a binding. I did not do any extensive look,
> because I assume that contributor will bring the argument in favor of
> their patch, not me.
>

Thanks for the clarification, that makes sense. These macros are only
used by the DTS files and not by driver C code, I got confused by an old
header (2015). I will drop the dt-bindings patch and move the
definitions locally into arch/arm/boot/dts/ti/omap/ for v2.

>
>> FWIW, dm8148-evm.dts is not including the header, dm814x.dtsi is.
>> Following 
>> 
>> Basically PULL_ENA define in omap.h is wrong for DM8168 SoCs. 
>> 
>> For a better solution, you would prefer:
>> - Keep omap.h in dm816x.dtsi
>> - Add a variant like DM816X_PULL_{ENA,DIS} in dm816x.h
>> - Replace defines in dm8168-evm.dts
>> - Add the header in dm8168-evm.dts
>> 
>> or:
>> 
>> - Keep omap.h in dm816x.dtsi
>> - Add a variant like DM816X_PULL_{ENA,DIS} in omap.h
>> - Replace defines in dm8168-evm.dts
>
> I gave you one idea, but feel free to implement it in other ways aligned
> with that platform maintainer.
>

I'll do. 

Thanks for the review,
Ettore
>
> Best regards,
> Krzysztof





  reply	other threads:[~2026-10-20 12:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 14:41 [PATCH 00/10] ARM: dts: dm816x: fixes and peripheral updates for DM8168 SoC Ettore Chimenti
2026-10-16 14:41 ` [PATCH 01/10] ARM: ti81xx: Prevent USB being put into idle Ettore Chimenti
2026-10-17  6:53   ` Andreas Kemnade
2026-10-19  9:28     ` Andrew Goodbody
2026-10-16 14:41 ` [PATCH 02/10] dt-bindings: pinctrl: Add devicetree bindings for DM816x SoC Pinctrl Ettore Chimenti
2026-10-16 14:51   ` Krzysztof Kozlowski
2026-10-16 15:07     ` Ettore Chimenti
2026-10-19  6:46       ` Krzysztof Kozlowski
2026-10-20 10:18         ` Ettore Chimenti
2026-10-20 11:22           ` Krzysztof Kozlowski
2026-10-20 12:16             ` Ettore Chimenti [this message]
2026-10-16 14:41 ` [PATCH 03/10] ARM: dts: omap: dm816x: use dedicated SoC pinctrl Ettore Chimenti
2026-10-16 14:41 ` [PATCH 04/10] ARM: dts: omap: dm816x: Fix pinctrl range Ettore Chimenti
2026-10-16 14:41 ` [PATCH 05/10] ARM: dts: omap: dm816x: refactor and align MMC node Ettore Chimenti
2026-10-16 14:41 ` [PATCH 06/10] ARM: dts: omap: dm816x: Update USB node Ettore Chimenti
2026-10-17  6:39   ` Andreas Kemnade
2026-10-19  9:36     ` Andrew Goodbody
2026-10-19 13:45       ` Andreas Kemnade
2026-10-19 16:32         ` Andrew Goodbody
2026-10-16 14:41 ` [PATCH 07/10] ARM: omap: dm816x: Match up capability flags for USB Ettore Chimenti
2026-10-16 14:41 ` [PATCH 08/10] ARM: dts: omap: dm816x: Correct speed for sysclk5 Ettore Chimenti
2026-10-16 14:41 ` [PATCH 09/10] ARM: dts: omap: dm8168-evm: Correct SD card pinmux Ettore Chimenti
2026-10-16 14:41 ` [PATCH 10/10] ARM: dts: omap: dm8168-evm: enable MUSB multipoint support Ettore Chimenti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM9NQ6MMED9N.3QP4ZDCCAZ85Z@linaro.org \
    --to=ettore.chimenti@linaro.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=andreas@kemnade.info \
    --cc=andrew.goodbody@linaro.org \
    --cc=chris.obbard@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=paul@pwsan.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=rouven.czerwinski@linaro.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox