linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] ARM: dts: imx53: Bind CPLD on M53Menlo
@ 2019-06-01 22:30 Marek Vasut
  2019-06-06  1:55 ` Shawn Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2019-06-01 22:30 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Marek Vasut, Fabio Estevam, Shawn Guo, NXP Linux Team

Enable ECSPI2 and bind CPLD to both chip selects.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
To: linux-arm-kernel@lists.infradead.org
---
V2: Drop fsl,spi-num-chipselects
---
 arch/arm/boot/dts/imx53-m53menlo.dts | 30 ++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/imx53-m53menlo.dts b/arch/arm/boot/dts/imx53-m53menlo.dts
index 55c122a64ef0..1deb070c1c21 100644
--- a/arch/arm/boot/dts/imx53-m53menlo.dts
+++ b/arch/arm/boot/dts/imx53-m53menlo.dts
@@ -100,6 +100,25 @@
 	assigned-clock-rates = <133333334>, <33333334>, <33333334>;
 };
 
+&ecspi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ecspi2>;
+	cs-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>, <&gpio2 27 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+
+	spidev@0 {
+		compatible = "menlo,m53cpld", "spidev";
+		spi-max-frequency = <25000000>;
+		reg = <0>;
+	};
+
+	spidev@1 {
+		compatible = "menlo,m53cpld", "spidev";
+		spi-max-frequency = <25000000>;
+		reg = <1>;
+	};
+};
+
 &esdhc1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc1>;
@@ -301,6 +320,17 @@
 			>;
 		};
 
+		pinctrl_ecspi2: ecspi2grp {
+			fsl,pins = <
+				MX53_PAD_EIM_CS0__ECSPI2_SCLK		0xe4
+				MX53_PAD_EIM_OE__ECSPI2_MISO		0xe4
+				MX53_PAD_EIM_CS1__ECSPI2_MOSI		0xe4
+
+				MX53_PAD_EIM_RW__GPIO2_26		0xe4
+				MX53_PAD_EIM_LBA__GPIO2_27		0xe4
+			>;
+		};
+
 		pinctrl_esdhc1: esdhc1grp {
 			fsl,pins = <
 				MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1e4
-- 
2.20.1


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] ARM: dts: imx53: Bind CPLD on M53Menlo
  2019-06-01 22:30 [PATCH V2] ARM: dts: imx53: Bind CPLD on M53Menlo Marek Vasut
@ 2019-06-06  1:55 ` Shawn Guo
  2019-06-06  1:57   ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2019-06-06  1:55 UTC (permalink / raw)
  To: Marek Vasut; +Cc: Fabio Estevam, NXP Linux Team, linux-arm-kernel

On Sun, Jun 02, 2019 at 12:30:50AM +0200, Marek Vasut wrote:
> Enable ECSPI2 and bind CPLD to both chip selects.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> To: linux-arm-kernel@lists.infradead.org
> ---
> V2: Drop fsl,spi-num-chipselects
> ---
>  arch/arm/boot/dts/imx53-m53menlo.dts | 30 ++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx53-m53menlo.dts b/arch/arm/boot/dts/imx53-m53menlo.dts
> index 55c122a64ef0..1deb070c1c21 100644
> --- a/arch/arm/boot/dts/imx53-m53menlo.dts
> +++ b/arch/arm/boot/dts/imx53-m53menlo.dts
> @@ -100,6 +100,25 @@
>  	assigned-clock-rates = <133333334>, <33333334>, <33333334>;
>  };
>  
> +&ecspi2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_ecspi2>;
> +	cs-gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>, <&gpio2 27 GPIO_ACTIVE_HIGH>;
> +	status = "okay";
> +
> +	spidev@0 {
> +		compatible = "menlo,m53cpld", "spidev";

Don't you get the following warning from kernel?

  OF: buggy DT: spidev listed directly in DT

> +		spi-max-frequency = <25000000>;
> +		reg = <0>;
> +	};
> +
> +	spidev@1 {
> +		compatible = "menlo,m53cpld", "spidev";
> +		spi-max-frequency = <25000000>;
> +		reg = <1>;
> +	};
> +};
> +
>  &esdhc1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_esdhc1>;
> @@ -301,6 +320,17 @@
>  			>;
>  		};
>  
> +		pinctrl_ecspi2: ecspi2grp {
> +			fsl,pins = <
> +				MX53_PAD_EIM_CS0__ECSPI2_SCLK		0xe4
> +				MX53_PAD_EIM_OE__ECSPI2_MISO		0xe4
> +				MX53_PAD_EIM_CS1__ECSPI2_MOSI		0xe4
> +

Nit: unnecessary newline.

Shawn

> +				MX53_PAD_EIM_RW__GPIO2_26		0xe4
> +				MX53_PAD_EIM_LBA__GPIO2_27		0xe4
> +			>;
> +		};
> +
>  		pinctrl_esdhc1: esdhc1grp {
>  			fsl,pins = <
>  				MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1e4
> -- 
> 2.20.1
> 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] ARM: dts: imx53: Bind CPLD on M53Menlo
  2019-06-06  1:55 ` Shawn Guo
@ 2019-06-06  1:57   ` Fabio Estevam
  2019-06-06  2:06     ` Shawn Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2019-06-06  1:57 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Marek Vasut, NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Shawn,

On Wed, Jun 5, 2019 at 10:55 PM Shawn Guo <shawnguo@kernel.org> wrote:

> Don't you get the following warning from kernel?
>
>   OF: buggy DT: spidev listed directly in DT

I originally thought about that too, but then I saw this patch from
Marek, which avoids the warning:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/spi/spidev.c?h=next-20190605&id=c6e2d2c7ca4e6d09bc07ab5ced2e687cc842a860

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] ARM: dts: imx53: Bind CPLD on M53Menlo
  2019-06-06  1:57   ` Fabio Estevam
@ 2019-06-06  2:06     ` Shawn Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2019-06-06  2:06 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Marek Vasut, NXP Linux Team,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Wed, Jun 05, 2019 at 10:57:54PM -0300, Fabio Estevam wrote:
> Hi Shawn,
> 
> On Wed, Jun 5, 2019 at 10:55 PM Shawn Guo <shawnguo@kernel.org> wrote:
> 
> > Don't you get the following warning from kernel?
> >
> >   OF: buggy DT: spidev listed directly in DT
> 
> I originally thought about that too, but then I saw this patch from
> Marek, which avoids the warning:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/spi/spidev.c?h=next-20190605&id=c6e2d2c7ca4e6d09bc07ab5ced2e687cc842a860

Okay.  Has compatible "menlo,m53cpld" been documented?  Also my
understanding is that as long as "spidev" is on the compatible list,
we will see this warning, no?

Shawn

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-06  2:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-01 22:30 [PATCH V2] ARM: dts: imx53: Bind CPLD on M53Menlo Marek Vasut
2019-06-06  1:55 ` Shawn Guo
2019-06-06  1:57   ` Fabio Estevam
2019-06-06  2:06     ` Shawn Guo

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).