Commit 648d2852 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski
Browse files

Merge branch 'for-v6.15/samsung-soc-dt-bindings' into next/drivers

parents 00c1fda7 b6f1ea2a
Loading
Loading
Loading
Loading
+66 −33
Original line number Diff line number Diff line
@@ -11,11 +11,21 @@ maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

description: |
  USI IP-core provides selectable serial protocol (UART, SPI or High-Speed I2C).
  USI shares almost all internal circuits within each protocol, so only one
  protocol can be chosen at a time. USI is modeled as a node with zero or more
  child nodes, each representing a serial sub-node device. The mode setting
  selects which particular function will be used.
  The USI IP-core provides configurable support for serial protocols, enabling
  different serial communication modes depending on the version.

  In USIv1, configurations are available to enable either one or two protocols
  simultaneously in select combinations - High-Speed I2C0, High-Speed
  I2C1, SPI, UART, High-Speed I2C0 and I2C1 or both High-Speed
  I2C1 and UART.

  In USIv2, only one protocol can be active at a time, either UART, SPI, or
  High-Speed I2C.

  The USI core shares internal circuits across protocols, meaning only the
  selected configuration is active at any given time. USI is modeled as a node
  with zero or more child nodes, each representing a serial sub-node device. The
  mode setting selects which particular function will be used.

properties:
  $nodename:
@@ -31,6 +41,7 @@ properties:
          - const: samsung,exynos850-usi
      - enum:
          - samsung,exynos850-usi
          - samsung,exynos8895-usi

  reg:
    maxItems: 1
@@ -64,7 +75,7 @@ properties:

  samsung,mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]
    enum: [0, 1, 2, 3, 4, 5, 6]
    description:
      Selects USI function (which serial protocol to use). Refer to
      <include/dt-bindings/soc/samsung,exynos-usi.h> for valid USI mode values.
@@ -101,7 +112,8 @@ required:
  - samsung,sysreg
  - samsung,mode

if:
allOf:
  - if:
      properties:
        compatible:
          contains:
@@ -121,18 +133,39 @@ then:
        clock-names:
          maxItems: 2

        samsung,mode:
          enum: [0, 1, 2, 3]

      required:
        - reg
        - clocks
        - clock-names

else:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos8895-usi

    then:
      properties:
        reg: false
    clocks: false
    clock-names: false

        clocks:
          items:
            - description: Bus (APB) clock
            - description: Operating clock for UART/SPI protocol

        clock-names:
          maxItems: 2

        samsung,clkreq-on: false

      required:
        - clocks
        - clock-names

additionalProperties: false

examples:
@@ -144,7 +177,7 @@ examples:
        compatible = "samsung,exynos850-usi";
        reg = <0x138200c0 0x20>;
        samsung,sysreg = <&sysreg_peri 0x1010>;
        samsung,mode = <USI_V2_UART>;
        samsung,mode = <USI_MODE_UART>;
        samsung,clkreq-on; /* needed for UART mode */
        #address-cells = <1>;
        #size-cells = <1>;
+13 −4
Original line number Diff line number Diff line
@@ -9,9 +9,18 @@
#ifndef __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H
#define __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H

#define USI_V2_NONE		0
#define USI_V2_UART		1
#define USI_V2_SPI		2
#define USI_V2_I2C		3
#define USI_MODE_NONE		0
#define USI_MODE_UART		1
#define USI_MODE_SPI		2
#define USI_MODE_I2C		3
#define USI_MODE_I2C1		4
#define USI_MODE_I2C0_1		5
#define USI_MODE_UART_I2C1	6

/* Deprecated */
#define USI_V2_NONE		USI_MODE_NONE
#define USI_V2_UART		USI_MODE_UART
#define USI_V2_SPI		USI_MODE_SPI
#define USI_V2_I2C		USI_MODE_I2C

#endif /* __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H */