mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Durai Manickam KR <durai.manickamkr@microchip.com>,
	<robh+dt@kernel.org>, <alexandre.belloni@bootlin.com>,
	<ludovic.desroches@microchip.com>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <Hari.PrasathGE@microchip.com>
Subject: Re: [PATCH] ARM: dts: at91-sama5d27_som1_ek: Added I2C bus recovery support
Date: Wed, 15 Sep 2021 11:05:10 +0200	[thread overview]
Message-ID: <e154c093-222d-0d84-9dba-45277c61cb5e@microchip.com> (raw)
In-Reply-To: <20210914052113.85695-1-durai.manickamkr@microchip.com>

On 14/09/2021 at 07:21, Durai Manickam KR wrote:
> SDA and SCL is configured as GPIO for I2C bus to recover during
> I2C bus malfunction.
> 
> Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Queued in at91-dt for 5.16.

Thanks Durai, best regards,
   Nicolas

> ---
>   arch/arm/boot/dts/at91-sama5d27_som1.dtsi   | 12 ++++++++++-
>   arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 23 +++++++++++++++++++--
>   2 files changed, 32 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> index e3251f3e3eaa..edce6bcf6cd6 100644
> --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> @@ -8,6 +8,7 @@
>    */
>   #include "sama5d2.dtsi"
>   #include "sama5d2-pinfunc.h"
> +#include <dt-bindings/gpio/gpio.h>
>   
>   / {
>   	model = "Atmel SAMA5D27 SoM1";
> @@ -95,8 +96,11 @@ ethernet-phy@7 {
>   
>   			i2c0: i2c@f8028000 {
>   				dmas = <0>, <0>;
> -				pinctrl-names = "default";
> +				pinctrl-names = "default", "gpio";
>   				pinctrl-0 = <&pinctrl_i2c0_default>;
> +				pinctrl-1 = <&pinctrl_i2c0_gpio>;
> +				sda-gpios = <&pioA PIN_PD21 GPIO_ACTIVE_HIGH>;
> +				scl-gpios = <&pioA PIN_PD22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   				status = "okay";
>   
>   				at24@50 {
> @@ -113,6 +117,12 @@ pinctrl_i2c0_default: i2c0_default {
>   					bias-disable;
>   				};
>   
> +				pinctrl_i2c0_gpio: i2c0_gpio {
> +					pinmux = <PIN_PD21__GPIO>,
> +						 <PIN_PD22__GPIO>;
> +					bias-disable;
> +				};
> +
>   				pinctrl_qspi1_default: qspi1_default {
>   					sck_cs {
>   						pinmux = <PIN_PB5__QSPI1_SCK>,
> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
> index 614999dcb990..0f10e05d6e23 100644
> --- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
> +++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
> @@ -131,8 +131,11 @@ i2c3: i2c@600 {
>   					i2c-analog-filter;
>   					i2c-digital-filter;
>   					i2c-digital-filter-width-ns = <35>;
> -					pinctrl-names = "default";
> +					pinctrl-names = "default", "gpio";
>   					pinctrl-0 = <&pinctrl_mikrobus_i2c>;
> +					pinctrl-1 = <&pinctrl_i2c3_gpio>;
> +					sda-gpios = <&pioA PIN_PA24 GPIO_ACTIVE_HIGH>;
> +					scl-gpios = <&pioA PIN_PA23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   					status = "okay";
>   				};
>   			};
> @@ -216,8 +219,11 @@ i2c1: i2c@fc028000 {
>   				i2c-analog-filter;
>   				i2c-digital-filter;
>   				i2c-digital-filter-width-ns = <35>;
> -				pinctrl-names = "default";
> +				pinctrl-names = "default", "gpio";
>   				pinctrl-0 = <&pinctrl_i2c1_default>;
> +				pinctrl-1 = <&pinctrl_i2c1_gpio>;
> +				sda-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_HIGH>;
> +				scl-gpios = <&pioA PIN_PD5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>   				status = "okay";
>   			};
>   
> @@ -253,6 +259,13 @@ pinctrl_i2c1_default: i2c1_default {
>   					bias-disable;
>   				};
>   
> +				pinctrl_i2c1_gpio: i2c1_gpio {
> +                                        pinmux = <PIN_PD4__GPIO>,
> +                                                 <PIN_PD5__GPIO>;
> +                                        bias-disable;
> +                                };
> +
> +
>   				pinctrl_isc_base: isc_base {
>   					pinmux = <PIN_PC21__ISC_PCK>,
>   						 <PIN_PC22__ISC_VSYNC>,
> @@ -442,6 +455,12 @@ pinctrl_mikrobus_i2c: mikrobus1_i2c {
>   					bias-disable;
>   				};
>   
> +				pinctrl_i2c3_gpio: i2c3_gpio {
> +					pinmux = <PIN_PA24__GPIO>,
> +						 <PIN_PA23__GPIO>;
> +					bias-disable;
> +				};
> +
>   				pinctrl_flx4_default: flx4_uart_default {
>   					pinmux = <PIN_PC28__FLEXCOM4_IO0>,
>   						 <PIN_PC29__FLEXCOM4_IO1>,
> 


-- 
Nicolas Ferre

      reply	other threads:[~2021-09-15  9:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  5:21 Durai Manickam KR
2021-09-15  9:05 ` Nicolas Ferre [this message]

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=e154c093-222d-0d84-9dba-45277c61cb5e@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=Hari.PrasathGE@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=durai.manickamkr@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=robh+dt@kernel.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®