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: <20250917231520-GYA1269891@gentoo.org>
Date: Thu, 18 Sep 2025 07:15:20 +0800
From: Yixun Lan <dlan@...too.org>
To: Alex Elder <elder@...cstar.com>
Cc: broonie@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, linux-spi@...r.kernel.org,
	devicetree@...r.kernel.org, paul.walmsley@...ive.com,
	palmer@...belt.com, aou@...s.berkeley.edu, alex@...ti.fr,
	p.zabel@...gutronix.de, spacemit@...ts.linux.dev,
	linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: spi: add SpacemiT K1 SPI support

Hi Alex,

On 17:07 Wed 17 Sep     , Alex Elder wrote:
> Add support for the SPI controller implemented by the SpacemiT K1 SoC.
> 
> Signed-off-by: Alex Elder <elder@...cstar.com>
> ---
>  .../bindings/spi/spacemit,k1-spi.yaml         | 94 +++++++++++++++++++
>  1 file changed, 94 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml
> 
> diff --git a/Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml b/Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml
> new file mode 100644
> index 0000000000000..5abd4fe268da9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spacemit,k1-spi.yaml
> @@ -0,0 +1,94 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/spacemit,k1-spi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: SpacemiT K1 SoC Serial Peripheral Interface (SPI)
> +
> +maintainers:
> +  - Alex Elder <elder@...nel.org>
> +
> +description:
> +  The SpacemiT K1 SoC implements a SPI controller that has two 32-entry
> +  FIFOs, for transmit and receive.  Details are currently available in
> +  section 18.2.1 of the K1 User Manual, found in the SpacemiT Keystone
> +  K1 Documentation[1].  The controller transfers words using PIO.  DMA
> +  transfers are supported as well, if both TX and RX DMA channels are
> +  specified,
> +
> +  [1] https://developer.spacemit.com/documentation
> +
> +allOf:
> +  - $ref: /schemas/spi/spi-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - spacemit,k1-spi
one enum is effectively equal to const..
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: Core clock
> +      - description: Bus clock
> +
> +  clock-names:
> +    items:
> +      - const: core
> +      - const: bus
> +
> +  resets:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  dmas:
> +    items:
> +      - description: RX DMA channel
> +      - description: TX DMA channel
> +
> +  dma-names:
> +    items:
> +      - const: rx
> +      - const: tx
> +
> +  spacemit,k1-ssp-id:
> +    description: SPI controller number
> +    $ref: /schemas/types.yaml#/definitions/uint32
could you explain a little bit why this vendor specific property should
be introduced? I took a look at the code, and didn't get the reason
behind.. or what's the problem of simply using "pdev->id"?

we should really be careful to introduce vendor specific property..

> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - resets
> +  - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +
> +    #include <dt-bindings/clock/spacemit,k1-syscon.h>
> +    spi3: spi@...1c000 {
label not needed for DT example
> +        compatible = "spacemit,k1-spi";
> +        reg = <0xd401c000 0x30>;
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        clocks = <&syscon_apbc CLK_SSP3>,
> +                 <&syscon_apbc CLK_SSP3_BUS>;
> +        clock-names = "core",
> +                      "bus";
> +        resets = <&syscon_apbc RESET_SSP3>;
> +        interrupts-extended = <&plic 55>;
> +        spacemit,k1-ssp-id = <3>;
> +        dmas = <&pdma 20>,
> +               <&pdma 19>;
> +        dma-names = "rx",
> +                    "tx";
..
> +        status = "disabled";
ditto, drop it
> +    };
> -- 
> 2.48.1
> 

-- 
Yixun Lan (dlan)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ