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]
Date:   Fri, 16 Jun 2023 16:47:28 +0800
From:   zhuyinbo <zhuyinbo@...ngson.cn>
To:     Conor Dooley <conor.dooley@...rochip.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Huacai Chen <chenhuacai@...nel.org>,
        WANG Xuerui <kernel@...0n.name>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Pavel Machek <pavel@....cz>, Marc Zyngier <maz@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        loongarch@...ts.linux.dev, Jianmin Lv <lvjianmin@...ngson.cn>,
        wanghongliang@...ngson.cn, Liu Peibao <liupeibao@...ngson.cn>,
        loongson-kernel@...ts.loongnix.cn, zhuyinbo@...ngson.cn
Subject: Re: [PATCH v3 2/3] soc: dt-bindings: add loongson-2 pm



在 2023/6/16 下午4:03, Conor Dooley 写道:
> On Fri, Jun 16, 2023 at 03:53:38PM +0800, zhuyinbo wrote:
>> 在 2023/6/16 下午2:58, Conor Dooley 写道:
>>>
>>> Rob, could you take a look at this please? On v2 while you were away I
>>> was kinda struggling w/ suspend-address & whether it made sense.
>>>
>>> The v2 & v1 are here:
>>> https://lore.kernel.org/all/20230522093156.7108-3-zhuyinbo@loongson.cn/
>>> https://lore.kernel.org/all/20230517073149.31980-3-zhuyinbo@loongson.cn/
>>>
>>> On Thu, Jun 15, 2023 at 05:17:56PM +0800, Yinbo Zhu wrote:
>>>> Add the Loongson-2 SoC Power Management Controller binding with DT
>>>> schema format using json-schema.
>>>>
>>>> Signed-off-by: Yinbo Zhu <zhuyinbo@...ngson.cn>
>>>> ---
>>>>    .../soc/loongson/loongson,ls2k-pmc.yaml       | 53 +++++++++++++++++++
>>>>    MAINTAINERS                                   |  6 +++
>>>>    2 files changed, 59 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
>>>> new file mode 100644
>>>> index 000000000000..32499bd10f8c
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/soc/loongson/loongson,ls2k-pmc.yaml
>>>
>>> The filename should ideally match one of the compatibles.
>>
>>
>> I learn about that yaml file name need match this compatible, but here
>> using a specific compatible as the name of the yaml file seems a bit
>> inappropriate . After all, this yaml file needs to cover lots of ls2k
>> series SoC rather than a specific SoC, and the yaml file naming in
>> kernel drivers is basically the same that use cover a series SoC's way.
>>
>>>
>>>> @@ -0,0 +1,53 @@
>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/soc/loongson/loongson,ls2k-pmc.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Loongson-2 Power Manager controller
>>>> +
>>>> +maintainers:
>>>> +  - Yinbo Zhu <zhuyinbo@...ngson.cn>
>>>> +
>>>> +properties:
>>>> +  compatible:
>>>> +    oneOf:
>>>> +      - items:
>>>> +          - enum:
>>>> +              - loongson,ls2k1000-pmc
>>>> +              - loongson,ls2k0500-pmc
>>>
>>> I notice the driver only supports one of these two. Is there a reason
>>> for that?
>>
>>
>> The driver can support both of the above, and I will add another.
> 
> The driver only contains
> 	static const struct of_device_id loongson2_pm_match[] = {
> 	       { .compatible = "loongson,ls2k1000-pmc", },
> 	       {},
> 	};
> so it only supports the 2k1000 right now. Are the 2k1000 and 2k0500
> compatible with eachother?


They are not completely compatible, 2k500 may still require some work to
be done, but I can confirm this driver was can compatible 2k0500 and
2k1000. for match yaml file, and I can add 2k0500 compatible in driver.

> 
>>>> +          - const: syscon
>>>> +
>>>> +  reg:
>>>> +    maxItems: 1
>>>> +
>>>> +  interrupts:
>>>> +    maxItems: 1
>>>> +
>>>> +  suspend-address:
>>>> +    $ref: /schemas/types.yaml#/definitions/uint32
>>>> +    description:
>>>> +      The "suspend-address" is a deep sleep state (Suspend To RAM)
>>>> +      firmware entry address which was jumped from kernel and it's
>>>> +      value was dependent on specific platform firmware code. In
>>>> +      addition, the PM need according to it to indicate that current
>>>> +      SoC whether support Suspend To RAM.
>>>> +
>>>> +required:
>>>> +  - compatible
>>>> +  - reg
>>>> +  - interrupts
>>>> +
>>>> +additionalProperties: false
>>>> +
>>>> +examples:
>>>> +  - |
>>>> +    #include <dt-bindings/interrupt-controller/irq.h>
>>>> +
>>>> +    pmc: pm@...27000 {
>>>          ^^^
>>>
>>> nit: this label isn't used, so you can drop it.
>>
>>
>> This lable need to be used by poweroff and reboot node but I don't add
>> these node that reference pmc here.
> 
> Right, in the dts it might need those, but not in the example in the
> binding.


okay, I got it.

Thanks,
Yinbo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ