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

This commit is contained in:
Krzysztof Kozlowski 2025-02-05 16:23:11 +01:00
commit 648d2852ea
2 changed files with 79 additions and 37 deletions

View File

@ -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,37 +112,59 @@ required:
- samsung,sysreg
- samsung,mode
if:
properties:
compatible:
contains:
enum:
- samsung,exynos850-usi
allOf:
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos850-usi
then:
properties:
reg:
maxItems: 1
then:
properties:
reg:
maxItems: 1
clocks:
items:
- description: Bus (APB) clock
- description: Operating clock for UART/SPI/I2C protocol
clocks:
items:
- description: Bus (APB) clock
- description: Operating clock for UART/SPI/I2C protocol
clock-names:
maxItems: 2
clock-names:
maxItems: 2
required:
- reg
- clocks
- clock-names
samsung,mode:
enum: [0, 1, 2, 3]
else:
properties:
reg: false
clocks: false
clock-names: false
samsung,clkreq-on: false
required:
- reg
- clocks
- clock-names
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos8895-usi
then:
properties:
reg: 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
@ -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>;

View File

@ -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 */