lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46fbdccb-610a-4b73-8697-d7bcf4942a41@kernel.org>
Date: Wed, 26 Feb 2025 16:05:30 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Clement LE GOFFIC <clement.legoffic@...s.st.com>,
 Linus Walleij <linus.walleij@...aro.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Maxime Coquelin <mcoquelin.stm32@...il.com>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
 linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/9] dt-bindings: pinctrl: stm32: Introduce HDP

On 26/02/2025 11:52, Clement LE GOFFIC wrote:
> On 2/26/25 08:21, Krzysztof Kozlowski wrote:
>> On 25/02/2025 16:51, Clement LE GOFFIC wrote:
>>> On 2/25/25 14:04, Krzysztof Kozlowski wrote:
>>>> On 25/02/2025 09:48, Clément Le Goffic wrote:
>>>>> +
>>>>> +maintainers:
>>>>> +  - Clément LE GOFFIC <clement.legoffic@...s.st.com>
>>>>> +
>>>>> +description: |
>>>>
>>>>
>>>> Do not need '|' unless you need to preserve formatting.
>>>
>>> Ok
>>>
>>>>> +  STMicroelectronics's STM32 MPUs integrate a Hardware Debug Port (HDP).
>>>>> +  It allows to output internal signals on SoC's GPIO.
>>>>> +
>>>>> +properties:
>>>>> +  compatible:
>>>>> +    const: st,stm32mp-hdp
>>>>
>>>> There is a mess in STM SoCs. Sometimes you call SoC stm32, sometimes
>>>> stm32mp and sometimes stm32mpXX.
>>>>
>>>> Define for all your STM contributions what is the actual SoC. This
>>>> feedback was already given to ST.
>>>>
>>>>> +
>>>>> +  reg:
>>>>> +    maxItems: 1
>>>>> +
>>>>> +  clocks:
>>>>> +    maxItems: 1
>>>>> +
>>>>> +patternProperties:
>>>>> +  '-pins$':
>>>>> +    type: object
>>>>> +    $ref: pinmux-node.yaml#
>>>>> +
>>>>> +    properties:
>>>>> +      function:
>>>>> +        enum: [ "0", "1", "2", "3", "4", "5", "6", "7",
>>>>> +                "8", "9", "10", "11", "12", "13", "14",
>>>>> +                "15" ]
>>>>
>>>> Function which has a number is not really useful. What does it even express?
>>>
>>> As said in my previous answer, function names are very different from
>>> one platform to another. Numbers were used as string to be generic.
>>> I'll consider it in a V2.
>>
>> What does it mean "one platform to another"? This is one platform! Is
>> this some sort of continuation of SoC compatible mess?
> 
> I may used incorrectly the word platform.
> This driver is the same for the three SoC families STM32MP13, STM32MP15 

That's driver and it is fine, but we talk about hardware here. The
binding is for given specific hardware.

> and STM32MP25 because the hardware is mostly the same.
> 
> Why mostly ?
> 
> The peripheral is behaving as a mux, there are 8 HDP ports, for each 
> port there is up to 16 possible hardware signals. Numbered from 0 to 15.
> Each of this number represent a signal on the port.
> 
> But the hardware signal behind the number is not the same from one SoC 
> family to another.
> As example, in STM32MP15 family the HDP is able to output GPU hardware 
> signals because the family has a GPU but in the STM32MP13 family this 
> signal is not present.

It looks like you have clear mapping between function and port number
(your header also suggests that), so the function property should follow
that user-visible function.

Just like we do for many other architectures - it is not that very, very
different, I think. all of platform hardwares do not operate on strings
but some bits in registers (so numbers) but all (ideally) bindings
operate on strings. You created here exception on basis this is somehow
special, but the point is: it is not special.

> 
> The purpose of my helpers was to give a readable name to facilitate the 
> configuration in boards devicetree's. If needed I can get rid of that 
> and use only the number as string.

If you use "names" you do not need even that helper header.

> 
>> What are the exact functions written in datasheet?
> 
> The exact functions name written in the datasheet are the ones of my 
> helper file without the HDP prefix.

so full strings "pwr_pwrwake_sys" and these should be used.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ