All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Chanho Park <chanho61.park@samsung.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Jaewon Kim <jaewon02.kim@samsung.com>,
	devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 4/4] arm64: dts: exynosautov9: add usi device tree nodes
Date: Thu, 30 Jun 2022 09:14:14 +0200	[thread overview]
Message-ID: <7e6ec956-b679-de68-1a4f-61105e3898cf@linaro.org> (raw)
In-Reply-To: <0588d46af06f9d932f4a526c3b04601079b4fde1.1656554759.git.chanho61.park@samsung.com>

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@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@10220000 {
>  			reg = <0x10220000 0x2000>;
>  		};
>  
> +		syscon_peric1: syscon@10820000 {
> +			compatible = "samsung,exynosautov9-sysreg", "syscon";
> +			reg = <0x10820000 0x2000>;
> +		};
> +
>  		usi_0: usi@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@103000c0 {
>  			clock-names = "pclk", "ipclk";
>  			status = "disabled";
>  
> -			/* USI: UART */
>  			serial_0: serial@10300000 {
> -				compatible = "samsung,exynos850-uart";
> +				compatible = "samsung,exynosautov9-uart",
> +					     "samsung,exynos850-uart";
>  				reg = <0x10300000 0xc0>;

As well.

Best regards,
Krzysztof

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Chanho Park <chanho61.park@samsung.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Jaewon Kim <jaewon02.kim@samsung.com>,
	devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 4/4] arm64: dts: exynosautov9: add usi device tree nodes
Date: Thu, 30 Jun 2022 09:14:14 +0200	[thread overview]
Message-ID: <7e6ec956-b679-de68-1a4f-61105e3898cf@linaro.org> (raw)
In-Reply-To: <0588d46af06f9d932f4a526c3b04601079b4fde1.1656554759.git.chanho61.park@samsung.com>

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@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@10220000 {
>  			reg = <0x10220000 0x2000>;
>  		};
>  
> +		syscon_peric1: syscon@10820000 {
> +			compatible = "samsung,exynosautov9-sysreg", "syscon";
> +			reg = <0x10820000 0x2000>;
> +		};
> +
>  		usi_0: usi@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@103000c0 {
>  			clock-names = "pclk", "ipclk";
>  			status = "disabled";
>  
> -			/* USI: UART */
>  			serial_0: serial@10300000 {
> -				compatible = "samsung,exynos850-uart";
> +				compatible = "samsung,exynosautov9-uart",
> +					     "samsung,exynos850-uart";
>  				reg = <0x10300000 0xc0>;

As well.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-30  7:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220630021951epcas2p3fb04daeddd98c74cbee3fed5044da6f9@epcas2p3.samsung.com>
2022-06-30  2:16 ` [PATCH v2 0/4] support USI for Exynos Auto v9 SoC Chanho Park
2022-06-30  2:16   ` Chanho Park
     [not found]   ` <CGME20220630021951epcas2p26cd4a554f01f9cb6e44acd813eee15fd@epcas2p2.samsung.com>
2022-06-30  2:16     ` [PATCH v2 1/4] dt-bindings: soc: samsung: usi: add exynosautov9-usi compatible Chanho Park
2022-06-30  2:16       ` Chanho Park
2022-06-30  5:59       ` Sam Protsenko
2022-06-30  5:59         ` Sam Protsenko
2022-06-30  7:11         ` Krzysztof Kozlowski
2022-06-30  7:11           ` Krzysztof Kozlowski
2022-06-30  7:58           ` Sam Protsenko
2022-06-30  7:58             ` Sam Protsenko
2022-06-30  7:13       ` Krzysztof Kozlowski
2022-06-30  7:13         ` Krzysztof Kozlowski
2022-06-30  7:59       ` Sam Protsenko
2022-06-30  7:59         ` Sam Protsenko
     [not found]   ` <CGME20220630021951epcas2p1d35e3e0b6d4267eccbe0468b15a558f0@epcas2p1.samsung.com>
2022-06-30  2:16     ` [PATCH v2 2/4] dt-bindings: serial: samsung: add exynosautov9-uart compatible Chanho Park
2022-06-30  2:16       ` Chanho Park
2022-06-30  7:16       ` Krzysztof Kozlowski
2022-06-30  7:16         ` Krzysztof Kozlowski
     [not found]   ` <CGME20220630021951epcas2p44f7b0f49a9d9209793e90cdc8ec0d536@epcas2p4.samsung.com>
2022-06-30  2:16     ` [PATCH v2 3/4] arm64: dts: exynosautov9: add pdma0 device tree node Chanho Park
2022-06-30  2:16       ` Chanho Park
     [not found]   ` <CGME20220630021951epcas2p27f839eead168052d03039c2e3efa3460@epcas2p2.samsung.com>
2022-06-30  2:16     ` [PATCH v2 4/4] arm64: dts: exynosautov9: add usi device tree nodes Chanho Park
2022-06-30  2:16       ` Chanho Park
2022-06-30  7:14       ` Krzysztof Kozlowski [this message]
2022-06-30  7:14         ` Krzysztof Kozlowski

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=7e6ec956-b679-de68-1a4f-61105e3898cf@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=chanho61.park@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jaewon02.kim@samsung.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.