From: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Sam Protsenko <semen.protsenko@linaro.org>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] dt-bindings: soc: samsung: usi: add USIv1 and samsung,exynos8895-usi
Date: Sat, 4 Jan 2025 18:29:14 +0200 [thread overview]
Message-ID: <20250104162915.332005-3-ivo.ivanov.ivanov1@gmail.com> (raw)
In-Reply-To: <20250104162915.332005-1-ivo.ivanov.ivanov1@gmail.com>
Add constants for choosing USIv1 configuration mode in device tree.
Those are further used in the USI driver to figure out which value to
write into SW_CONF register. Modify the current USI IP-core
bindings to include information about USIv1 and a compatible for
exynos8895.
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
---
.../bindings/soc/samsung/exynos-usi.yaml | 55 +++++++++++++++----
include/dt-bindings/soc/samsung,exynos-usi.h | 7 +++
2 files changed, 50 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
index 5b046932f..6e32daa45 100644
--- a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
+++ b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
@@ -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,6 @@ properties:
samsung,mode:
$ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1, 2, 3]
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,18 +111,42 @@ required:
- samsung,sysreg
- samsung,mode
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - samsung,exynos850-usi
+ then:
+ properties:
+ reg:
+ maxItems: 1
+
+ samsung,mode:
+ enum: [0, 1, 2, 3]
+
+ required:
+ - reg
+
+ else:
+ properties:
+ reg: false
+ samsung,clkreq-on: false
+
+ samsung,mode:
+ enum: [4, 5, 6, 7, 8, 9, 10]
+
if:
properties:
compatible:
contains:
enum:
- samsung,exynos850-usi
+ - samsung,exynos8895-usi
then:
properties:
- reg:
- maxItems: 1
-
clocks:
items:
- description: Bus (APB) clock
@@ -122,16 +156,13 @@ then:
maxItems: 2
required:
- - reg
- clocks
- clock-names
else:
properties:
- reg: false
clocks: false
clock-names: false
- samsung,clkreq-on: false
additionalProperties: false
diff --git a/include/dt-bindings/soc/samsung,exynos-usi.h b/include/dt-bindings/soc/samsung,exynos-usi.h
index a01af169d..4c077c9a8 100644
--- a/include/dt-bindings/soc/samsung,exynos-usi.h
+++ b/include/dt-bindings/soc/samsung,exynos-usi.h
@@ -13,5 +13,12 @@
#define USI_V2_UART 1
#define USI_V2_SPI 2
#define USI_V2_I2C 3
+#define USI_V1_NONE 4
+#define USI_V1_I2C0 5
+#define USI_V1_I2C1 6
+#define USI_V1_I2C0_1 7
+#define USI_V1_SPI 8
+#define USI_V1_UART 9
+#define USI_V1_UART_I2C1 10
#endif /* __DT_BINDINGS_SAMSUNG_EXYNOS_USI_H */
--
2.43.0
next prev parent reply other threads:[~2025-01-04 16:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-04 16:29 [PATCH v2 0/3] soc: samsung: usi: implement support for USIv1 Ivaylo Ivanov
2025-01-04 16:29 ` [PATCH v2 1/3] dt-bindings: soc: samsung: exynos-sysreg: add sysreg compatibles for exynos8895 Ivaylo Ivanov
2025-01-05 9:22 ` (subset) " Krzysztof Kozlowski
2025-01-04 16:29 ` Ivaylo Ivanov [this message]
2025-01-05 9:18 ` [PATCH v2 2/3] dt-bindings: soc: samsung: usi: add USIv1 and samsung,exynos8895-usi Krzysztof Kozlowski
2025-01-05 9:51 ` Ivaylo Ivanov
2025-01-05 10:39 ` Krzysztof Kozlowski
2025-01-05 10:51 ` Ivaylo Ivanov
2025-01-04 16:29 ` [PATCH v2 3/3] soc: samsung: usi: implement support for USIv1 Ivaylo Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250104162915.332005-3-ivo.ivanov.ivanov1@gmail.com \
--to=ivo.ivanov.ivanov1@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=semen.protsenko@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®