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: <1e0632d6-73e9-4633-a709-bf9140f2fd32@linaro.org>
Date:   Tue, 22 Aug 2023 17:38:58 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Stanley Chang <stanley_chang@...ltek.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>
Cc:     Chanwoo Choi <cw00.choi@...sung.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v1 2/2] dt-bindings: extcon: Add Realtek DHC RTD SoC
 Type-C

On 22/08/2023 12:28, Stanley Chang wrote:
> Document the device-tree bindings for Realtek SoCs Type-C.
> Realtek DHC (digital home center) RTD SoCs support a Type-C module.
> 
> Signed-off-by: Stanley Chang <stanley_chang@...ltek.com>
> ---
>  .../bindings/extcon/extcon-rtk-type-c.yaml    | 77 +++++++++++++++++++
>  1 file changed, 77 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/extcon/extcon-rtk-type-c.yaml

Filename like compatible.

> 
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-rtk-type-c.yaml b/Documentation/devicetree/bindings/extcon/extcon-rtk-type-c.yaml
> new file mode 100644
> index 000000000000..d14b9ee544b9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/extcon/extcon-rtk-type-c.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright 2023 Realtek Semiconductor Corporation
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/extcon/extcon-rtk-type-c.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Realtek DHC RTD SoCs USB Type-C detection

Type-c usually go to usb directory.

> +
> +maintainers:
> +  - Stanley Chang <stanley_chang@...ltek.com>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> +  Realtek digital home center (DHC) RTD series SoCs include a type c module.
> +  This module is able to detect the state of type c connector.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - realtek,rtd1295-type-c
> +      - realtek,rtd1312c-type-c
> +      - realtek,rtd1315e-type-c
> +      - realtek,rtd1319-type-c
> +      - realtek,rtd1319d-type-c
> +      - realtek,rtd1395-type-c
> +      - realtek,rtd1619-type-c
> +      - realtek,rtd1619b-type-c
> +
> +  reg:
> +    maxItems: 1
> +    description: Address and length of register set for type-c module.

Drop description, it's obvious.

> +
> +  interrupts:
> +    maxItems: 1
> +
> +  nvmem-cells:
> +    maxItems: 1
> +    description:
> +      The phandle to nvmem cell that contains the trimming data.
> +      If unspecified, default value is used.
> +
> +  pinctrl-names:
> +    const: default
> +    description: A pinctrl state names "default" must be defined.

Drop, property not needed.

> +
> +  pinctrl-0:
> +    description:
> +      Should contain default pinctrl.

Drop, property not needed.


> +
> +  nvmem-cell-names:
> +    const: usb-cal

items:
  - const: usb-cal


and move description to nvmem-cells.

> +    description:
> +      The type c parameter trimming data specified via efuse.

Keep same properties next to each other. nvmem-cells should be followed
by nvmem-cell-names.

> +
> +  realtek,rd-ctrl-gpio:
> +    description: The gpio node to control external Rd on board.

The names are always "gpios".

> +    maxItems: 1
> +

You miss here connector. Probably also VBUS supply and other supplies.

> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    type-c@...0 {
> +        compatible = "realtek,rtd1619b-type-c";
> +        reg = <0x7220 0x20>;
> +        interrupts = <0 60 4>;

Use proper defines for common constants.

> +
> +        pinctrl-names = "default";
> +        pinctrl-0 = <&usb_cc1_pins>, <&usb_cc2_pins>;
> +        nvmem-cells = <&otp_usb_cal>;
> +        nvmem-cell-names = "usb-cal";

Type-c without connector? This is incomplete.

> +    };

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ