* [PATCH] ARM: mxs: apf28dev: Add I2C, SPI and spidev support
@ 2012-11-06 18:16 Gwenhael Goavec-Merou
2012-11-07 9:07 ` Maxime Ripard
0 siblings, 1 reply; 4+ messages in thread
From: Gwenhael Goavec-Merou @ 2012-11-06 18:16 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com>
---
arch/arm/boot/dts/imx28-apf28dev.dts | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/imx28-apf28dev.dts b/arch/arm/boot/dts/imx28-apf28dev.dts
index 1643d25..da7013d 100644
--- a/arch/arm/boot/dts/imx28-apf28dev.dts
+++ b/arch/arm/boot/dts/imx28-apf28dev.dts
@@ -27,6 +27,19 @@
status = "okay";
};
+ ssp2: ssp at 80014000 {
+ compatible = "fsl,imx28-spi";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2_pins_a>;
+ status = "okay";
+
+ spidev: spidev at 0 {
+ compatible = "spidev";
+ spi-max-frequency = <40000000>;
+ reg = <0>;
+ };
+ };
+
pinctrl at 80018000 {
pinctrl-names = "default";
pinctrl-0 = <&hog_pins_apf28dev>;
@@ -74,6 +87,12 @@
status = "okay";
};
+ i2c0: i2c at 80058000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins_a>;
+ status = "okay";
+ };
+
pwm: pwm at 80064000 {
pinctrl-names = "default";
pinctrl-0 = <&pwm3_pins_a &pwm4_pins_a>;
--
1.7.8.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: mxs: apf28dev: Add I2C, SPI and spidev support
2012-11-06 18:16 [PATCH] ARM: mxs: apf28dev: Add I2C, SPI and spidev support Gwenhael Goavec-Merou
@ 2012-11-07 9:07 ` Maxime Ripard
2012-11-07 14:20 ` gwenhael.goavec
0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2012-11-07 9:07 UTC (permalink / raw)
To: linux-arm-kernel
Le 06/11/2012 19:16, Gwenhael Goavec-Merou a ?crit :
>
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com>
> ---
> arch/arm/boot/dts/imx28-apf28dev.dts | 19 +++++++++++++++++++
> 1 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx28-apf28dev.dts b/arch/arm/boot/dts/imx28-apf28dev.dts
> index 1643d25..da7013d 100644
> --- a/arch/arm/boot/dts/imx28-apf28dev.dts
> +++ b/arch/arm/boot/dts/imx28-apf28dev.dts
> @@ -27,6 +27,19 @@
> status = "okay";
> };
>
> + ssp2: ssp at 80014000 {
> + compatible = "fsl,imx28-spi";
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi2_pins_a>;
> + status = "okay";
> +
> + spidev: spidev at 0 {
> + compatible = "spidev";
> + spi-max-frequency = <40000000>;
> + reg = <0>;
> + };
> + };
This won't work, since the compatible string is not matching in the
spidev driver.
You need to add the compatible string of the spi device that you will
drive with spidev in the spidev driver, and then use this string in your
dts.
See
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-October/129134.html
and
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-October/129133.html
--
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: mxs: apf28dev: Add I2C, SPI and spidev support
2012-11-07 9:07 ` Maxime Ripard
@ 2012-11-07 14:20 ` gwenhael.goavec
2012-11-07 14:22 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: gwenhael.goavec @ 2012-11-07 14:20 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 07 Nov 2012 10:07:32 +0100
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> Le 06/11/2012 19:16, Gwenhael Goavec-Merou a ?crit :
> >
> > Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com>
> > ---
> > arch/arm/boot/dts/imx28-apf28dev.dts | 19 +++++++++++++++++++
> > 1 files changed, 19 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx28-apf28dev.dts b/arch/arm/boot/dts/imx28-apf28dev.dts
> > index 1643d25..da7013d 100644
> > --- a/arch/arm/boot/dts/imx28-apf28dev.dts
> > +++ b/arch/arm/boot/dts/imx28-apf28dev.dts
> > @@ -27,6 +27,19 @@
> > status = "okay";
> > };
> >
> > + ssp2: ssp at 80014000 {
> > + compatible = "fsl,imx28-spi";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&spi2_pins_a>;
> > + status = "okay";
> > +
> > + spidev: spidev at 0 {
> > + compatible = "spidev";
> > + spi-max-frequency = <40000000>;
> > + reg = <0>;
> > + };
> > + };
>
> This won't work, since the compatible string is not matching in the
> spidev driver.
>
This patch has been successfully tested on the Shawn Guo's git. Spidev dt
support seems to be not yet available with this git.
>
> You need to add the compatible string of the spi device that you will
> drive with spidev in the spidev driver, and then use this string in your
> dts.
>
> See
> http://lists.infradead.org/pipermail/linux-arm-kernel/2012-October/129134.html
> and
> http://lists.infradead.org/pipermail/linux-arm-kernel/2012-October/129133.html
>
The APF28dev docking board contains no spi peripheral by default. The spidev
driver is used to evaluation and fast prototyping of peripherals before creating
a driver. Consequently it's a bit difficult to add a compatible string...
What is the solution in this situation?
Gwenhael Goavec-Merou
Armadeus Systems
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: mxs: apf28dev: Add I2C, SPI and spidev support
2012-11-07 14:20 ` gwenhael.goavec
@ 2012-11-07 14:22 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-11-07 14:22 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Nov 07, 2012 at 03:20:05PM +0100, gwenhael.goavec wrote:
> The APF28dev docking board contains no spi peripheral by default. The spidev
> driver is used to evaluation and fast prototyping of peripherals before creating
> a driver. Consequently it's a bit difficult to add a compatible string...
> What is the solution in this situation?
If you're doing that sort of prototyping and development surely it's
easy to locally edit the DT and/or kernel code to register the device as
part of the development? The DT is supposed to describe the hardware so
if you're changing the hardware it seems reasonable to change the DT.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121107/24a99ccf/attachment-0001.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-07 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 18:16 [PATCH] ARM: mxs: apf28dev: Add I2C, SPI and spidev support Gwenhael Goavec-Merou
2012-11-07 9:07 ` Maxime Ripard
2012-11-07 14:20 ` gwenhael.goavec
2012-11-07 14:22 ` Mark Brown
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).