From: Sam Protsenko <semen.protsenko@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
Rob Herring <robh+dt@kernel.org>, Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jaewon Kim <jaewon02.kim@samsung.com>,
Chanho Park <chanho61.park@samsung.com>,
David Virag <virag.david003@gmail.com>,
Youngmin Nam <youngmin.nam@samsung.com>,
devicetree@vger.kernel.org, linux-spi@vger.kernel.org,
linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-i2c@vger.kernel.org
Subject: [PATCH 2/8] dt-bindings: soc: samsung: Add Exynos USIv2 bindings doc
Date: Sun, 28 Nov 2021 00:32:47 +0200 [thread overview]
Message-ID: <20211127223253.19098-3-semen.protsenko@linaro.org> (raw)
In-Reply-To: <20211127223253.19098-1-semen.protsenko@linaro.org>
Document USIv2 IP-core bindings.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
.../bindings/soc/samsung/exynos-usi-v2.yaml | 124 ++++++++++++++++++
1 file changed, 124 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/samsung/exynos-usi-v2.yaml
diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi-v2.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi-v2.yaml
new file mode 100644
index 000000000000..d7466aa463dc
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/samsung/exynos-usi-v2.yaml
@@ -0,0 +1,124 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/samsung/exynos-usi-v2.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung's Exynos USIv2 (Universal Serial Interface) binding
+
+maintainers:
+ - Sam Protsenko <semen.protsenko@linaro.org>
+ - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+description: |
+ USIv2 IP-core provides selectable serial protocol (UART, SPI or High-Speed
+ I2C); only one can be chosen at a time. It 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.
+
+ Refer to next bindings documentation for information on protocol subnodes that
+ can exist under USI node:
+
+ [1] Documentation/devicetree/bindings/serial/samsung_uart.yaml
+ [2] Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
+ [3] Documentation/devicetree/bindings/spi/spi-samsung.txt
+
+properties:
+ $nodename:
+ pattern: "^usi@[0-9a-f]+$"
+
+ compatible:
+ const: samsung,exynos-usi-v2
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Bus (APB) clock
+ - description: Operating clock for UART/SPI/I2C protocol
+
+ clock-names:
+ items:
+ - const: pclk
+ - const: ipclk
+
+ ranges: true
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ samsung,sysreg:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ Should be phandle/offset pair. The phandle to System Register syscon node
+ (for the same domain where this USIv2 controller resides) and the offset
+ of SW_CONF register for this USIv2 controller.
+
+ samsung,mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Selects USIv2 function (which serial protocol to use). Refer to
+ <include/dt-bindings/soc/samsung,exynos-usi-v2.h> for valid USI mode
+ values.
+
+ samsung,clkreq-on:
+ type: boolean
+ description:
+ Enable this property if underlying protocol requires the clock to be
+ continuously provided without automatic gating. As suggested by SoC
+ manual, it should be set in case of SPI/I2C slave, UART Rx and I2C
+ multi-master mode. Usually this property is needed if USI mode is set
+ to "UART".
+
+ This property is optional.
+
+patternProperties:
+ # All other properties should be child nodes
+ "^.*@[0-9a-f]+$":
+ type: object
+ description: Child node describing underlying USIv2 serial protocol
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - ranges
+ - "#address-cells"
+ - "#size-cells"
+ - samsung,sysreg
+ - samsung,mode
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/soc/samsung,exynos-usi-v2.h>
+
+ usi_uart: usi@138200c0 {
+ compatible = "samsung,exynos-usi-v2";
+ reg = <0x138200c0 0x20>;
+ samsung,sysreg = <&sysreg_peri 0x1010>;
+ samsung,mode = <USI_V2_UART>;
+ samsung,clkreq-on; /* needed for UART mode */
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ clocks = <&cmu_peri 32>, <&cmu_peri 31>;
+ clock-names = "pclk", "ipclk";
+ status = "disabled";
+
+ serial_0: serial@13820000 {
+ compatible = "samsung,exynos850-uart";
+ reg = <0x13820000 0xc0>;
+ interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cmu_peri 32>, <&cmu_peri 31>;
+ clock-names = "uart", "clk_uart_baud0";
+ status = "disabled";
+ };
+ };
--
2.30.2
next prev parent reply other threads:[~2021-11-27 22:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-27 22:32 [PATCH 0/8] soc: samsung: Add USIv2 driver Sam Protsenko
2021-11-27 22:32 ` [PATCH 1/8] dt-bindings: soc: samsung: Add Exynos USIv2 bindings Sam Protsenko
2021-11-27 22:32 ` Sam Protsenko [this message]
2021-11-29 8:33 ` [PATCH 2/8] dt-bindings: soc: samsung: Add Exynos USIv2 bindings doc Krzysztof Kozlowski
2021-11-27 22:32 ` [PATCH 3/8] soc: samsung: Add USIv2 driver Sam Protsenko
2021-11-29 8:49 ` Krzysztof Kozlowski
2021-11-27 22:32 ` [PATCH 4/8] tty: serial: samsung: Remove USI initialization Sam Protsenko
2021-11-28 14:28 ` Greg Kroah-Hartman
2021-11-28 16:26 ` Sam Protsenko
2021-11-28 17:03 ` Sam Protsenko
2021-11-27 22:32 ` [PATCH 5/8] tty: serial: samsung: Enable console as module Sam Protsenko
2021-11-29 8:52 ` Krzysztof Kozlowski
2021-11-29 20:18 ` Sam Protsenko
2021-11-29 20:38 ` Sam Protsenko
2021-11-27 22:32 ` [PATCH 6/8] tty: serial: Make SERIAL_SAMSUNG=y impossible when EXYNOS_USI_V2=m Sam Protsenko
2021-11-28 14:27 ` Greg Kroah-Hartman
2021-11-28 23:54 ` Sam Protsenko
2021-11-27 22:32 ` [PATCH 7/8] i2c: Make I2C_EXYNOS5=y " Sam Protsenko
2021-11-29 0:02 ` Sam Protsenko
2021-11-27 22:32 ` [PATCH 8/8] spi: Make SPI_S3C64XX=y " Sam Protsenko
2021-11-29 0:02 ` Sam Protsenko
2021-11-28 3:15 ` [PATCH 0/8] soc: samsung: Add USIv2 driver David Virag
2021-11-29 9:02 ` Krzysztof Kozlowski
2021-11-29 13:56 ` Sam Protsenko
2021-11-29 17:35 ` Krzysztof Kozlowski
2021-11-29 19:19 ` David Virag
2021-11-30 0:01 ` Sam Protsenko
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=20211127223253.19098-3-semen.protsenko@linaro.org \
--to=semen.protsenko@linaro.org \
--cc=broonie@kernel.org \
--cc=chanho61.park@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jaewon02.kim@samsung.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=virag.david003@gmail.com \
--cc=youngmin.nam@samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).