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: <DDB2E224-472B-41CC-A5C6-BEADB4BF2041@aspeedtech.com>
Date:   Wed, 1 Dec 2021 10:38:04 +0000
From:   Billy Tsai <billy_tsai@...eedtech.com>
To:     Iwona Winiarska <iwona.winiarska@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "openbmc@...ts.ozlabs.org" <openbmc@...ts.ozlabs.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:     "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Zev Weiss <zweiss@...inix.com>, Rob Herring <robh@...nel.org>,
        Jae Hyun Yoo <jae.hyun.yoo@...ux.intel.com>,
        Jonathan Corbet <corbet@....net>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Guenter Roeck <linux@...ck-us.net>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Jean Delvare <jdelvare@...e.com>,
        Arnd Bergmann <arnd@...db.de>,
        Rob Herring <robh+dt@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Dan Williams <dan.j.williams@...el.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
        Tony Luck <tony.luck@...el.com>,
        Andrew Jeffery <andrew@...id.au>,
        Randy Dunlap <rdunlap@...radead.org>,
        Olof Johansson <olof@...om.net>
Subject: Re: [PATCH v4 02/13] dt-bindings: Add bindings for peci-aspeed

Hi,

On 2021/11/23, 10:10 PM, "openbmc on behalf of Iwona Winiarska" <openbmc-bounces+billy_tsai=aspeedtech.com@...ts.ozlabs.org on behalf of iwona.winiarska@...el.com> wrote:

    Add device tree bindings for the peci-aspeed controller driver.

    >   +  aspeed,clock-divider:
    >   +    description:
    >   +      This value determines PECI controller internal clock dividing
    >   +      rate. The divider will be calculated as 2 raised to the power of
    >   +      the given value.
    >   +    $ref: /schemas/types.yaml#/definitions/uint32
    >   +    minimum: 0
    >   +    maximum: 7
    >   +    default: 0
    >   +
    >   +  aspeed,msg-timing:
    >   +    description:
    >   +      Message timing negotiation period. This value will determine the period
    >   +      of message timing negotiation to be issued by PECI controller. The unit
    >   +      of the programmed value is four times of PECI clock period.
    >   +    $ref: /schemas/types.yaml#/definitions/uint32
    >   +    minimum: 0
    >   +    maximum: 255
    >   +    default: 1
    >   +
    >   +  aspeed,addr-timing:
    >   +    description:
    >   +      Address timing negotiation period. This value will determine the period
    >   +      of address timing negotiation to be issued by PECI controller. The unit
    >   +      of the programmed value is four times of PECI clock period.
    >   +    $ref: /schemas/types.yaml#/definitions/uint32
    >   +    minimum: 0
    >   +    maximum: 255
    >   +    default: 1
I suggest deleting these three properties and replacing them with the following

aspeed,peci-bit-time:
        description:
          The bit time driven by PECI controller. The unit of the value is Hz.
    minimum: 2000
    maximum: 1000000

And the driver should use this property to caculate the appropriate clock-divider,
msg-timing and addr-timing, instead of exposing hardware registers to dts.

    >    [...]
    >   +examples:
    >   +  - |
    >   +    #include <dt-bindings/interrupt-controller/arm-gic.h>
    >   +    #include <dt-bindings/clock/ast2600-clock.h>
    >   +    peci-controller@...8b000 {
    >   +      compatible = "aspeed,ast2600-peci";
    >   +      reg = <0x1e78b000 0x100>;
    >   +      interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
    >   +      clocks = <&syscon ASPEED_CLK_GATE_REF0CLK>;
    >   +      resets = <&syscon ASPEED_RESET_PECI>;
    >   +      cmd-timeout-ms = <1000>;
    >   +      aspeed,clock-divider = <0>;
    >   +      aspeed,msg-timing = <1>;
    >   +      aspeed,addr-timing = <1>;
    >   +      aspeed,rd-sampling-point = <8>;
    >   +    };
    >   +...
    -- 
    2.31.1

Thanks

Best Regards,
Billy Tsai



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ