[PATCH v2 4/4] arm64: dts: exynosautov9: add usi device tree nodes
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Thu Jun 30 00:14:14 PDT 2022
On 30/06/2022 04:16, Chanho Park wrote:
> Universal Serial Interface (USI) supports three types of serial interface
> such as Universal Asynchronous Receiver and Transmitter (UART), Serial
> Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C).
> Each protocols can be working independently and configured as one of
> those using external configuration inputs.
> Exynos Auto v9 SoC support 12 USIs. When a USI uses two pins such as i2c
> and 3 wire uarts(RX/TX only), we can use remain two pins as i2c mode.
> So, we can define one USI node that includes serial/spi and hsi2c.
> usi_i2c nodes can be used only for i2c mode.
>
> We can have below combinations for one USI.
> 1) The usi node is used either 4 pin uart or 4 pin spi
> -> No usi_i2c can be used
> 2) The usi node is used 2 pin uart(RX/TX) and i2c(SDA/SCL)
> -> usi_i2c should be enabled to use the latter i2c
> 3) The usi node is used i2c(SDA/SCL) and i2c(SDA/SCL)
> -> usi_i2c should be enabled to use the latter i2c
>
> By default, all USIs are initially set to uart mode by below setting.
> samsung,mode = <USI_V2_UART>;
> You can change it either USI_V2_SPI or USI_V2_I2C.
>
> Signed-off-by: Chanho Park <chanho61.park at samsung.com>
> ---
> .../boot/dts/exynos/exynosautov9-sadk.dts | 2 +
> arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 1077 ++++++++++++++++-
> 2 files changed, 1074 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
> index 2b30a7458297..eec3192c0631 100644
> --- a/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
> +++ b/arch/arm64/boot/dts/exynos/exynosautov9-sadk.dts
> @@ -50,6 +50,7 @@ ufs_1_fixed_vcc_reg: regulator-1 {
> };
>
> &serial_0 {
> + pinctrl-0 = <&uart0_bus_dual>;
> status = "okay";
> };
>
> @@ -74,6 +75,7 @@ &ufs_1 {
> };
>
> &usi_0 {
> + samsung,clkreq-on; /* needed for UART mode */
> status = "okay";
> };
>
> diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
> index c4cfa93e4c2e..2013718532f3 100644
> --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
> @@ -351,12 +351,17 @@ syscon_peric0: syscon at 10220000 {
> reg = <0x10220000 0x2000>;
> };
>
> + syscon_peric1: syscon at 10820000 {
> + compatible = "samsung,exynosautov9-sysreg", "syscon";
> + reg = <0x10820000 0x2000>;
> + };
> +
> usi_0: usi at 103000c0 {
> - compatible = "samsung,exynos850-usi";
> + compatible = "samsung,exynosautov9-usi",
> + "samsung,exynos850-usi";
This change should be separate.
> reg = <0x103000c0 0x20>;
> samsung,sysreg = <&syscon_peric0 0x1000>;
> samsung,mode = <USI_V2_UART>;
> - samsung,clkreq-on; /* needed for UART mode */
> #address-cells = <1>;
> #size-cells = <1>;
> ranges;
> @@ -365,16 +370,1078 @@ usi_0: usi at 103000c0 {
> clock-names = "pclk", "ipclk";
> status = "disabled";
>
> - /* USI: UART */
> serial_0: serial at 10300000 {
> - compatible = "samsung,exynos850-uart";
> + compatible = "samsung,exynosautov9-uart",
> + "samsung,exynos850-uart";
> reg = <0x10300000 0xc0>;
As well.
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list