linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dt: add lsm9ds1 iio imu/magn support to gw553x
@ 2019-10-18 23:21 Robert Jones
  2019-10-21  8:19 ` Marco Felsch
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Jones @ 2019-10-18 23:21 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer
  Cc: Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel, linux-arm-kernel, Robert Jones

Add one node for the accel/gyro i2c device and another for the separate
magnetometer device in the lsm9ds1.

Signed-off-by: Robert Jones <rjones@gateworks.com>
---
 arch/arm/boot/dts/imx6qdl-gw553x.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
index a106689..55e6922 100644
--- a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
@@ -173,6 +173,25 @@
 	pinctrl-0 = <&pinctrl_i2c2>;
 	status = "okay";
 
+	lsm9ds1_ag@6a {
+		compatible = "st,lsm9ds1-imu";
+		reg = <0x6a>;
+		st,drdy-int-pin = <1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_acc_gyro>;
+		interrupt-parent = <&gpio7>;
+		interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
+	};
+
+	lsm9ds1_m@1c {
+		compatible = "st,lsm9ds1-magn";
+		reg = <0x1c>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_mag>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <2 IRQ_TYPE_EDGE_RISING>;
+	};
+
 	ltc3676: pmic@3c {
 		compatible = "lltc,ltc3676";
 		reg = <0x3c>;
@@ -462,6 +481,18 @@
 		>;
 	};
 
+	pinctrl_acc_gyro: acc_gyrogrp {
+		fsl,pins = <
+			MX6QDL_PAD_GPIO_18__GPIO7_IO13		0x1b0b0
+		>;
+	};
+
+	pinctrl_mag: maggrp {
+		fsl,pins = <
+			MX6QDL_PAD_GPIO_2__GPIO1_IO02		0x1b0b0
+		>;
+	};
+
 	pinctrl_pps: ppsgrp {
 		fsl,pins = <
 			MX6QDL_PAD_ENET_RXD1__GPIO1_IO26	0x1b0b1
-- 
2.9.2


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

* Re: [PATCH] ARM: dt: add lsm9ds1 iio imu/magn support to gw553x
  2019-10-18 23:21 [PATCH] ARM: dt: add lsm9ds1 iio imu/magn support to gw553x Robert Jones
@ 2019-10-21  8:19 ` Marco Felsch
  2019-10-21 18:30   ` Bobby Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Felsch @ 2019-10-21  8:19 UTC (permalink / raw)
  To: Robert Jones
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer, devicetree,
	linux-kernel, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam, linux-arm-kernel

Hi Robert,

same here, don't name it 'ARM: dt: ...' instead name it 'ARM: dts: imx:
ventana: ..' or 'ARM: dts: imx: imx6qdl-gw553x: ..'.

On 19-10-18 16:21, Robert Jones wrote:
> Add one node for the accel/gyro i2c device and another for the separate
> magnetometer device in the lsm9ds1.
> 
> Signed-off-by: Robert Jones <rjones@gateworks.com>
> ---
>  arch/arm/boot/dts/imx6qdl-gw553x.dtsi | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> index a106689..55e6922 100644
> --- a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> @@ -173,6 +173,25 @@
>  	pinctrl-0 = <&pinctrl_i2c2>;
>  	status = "okay";
>  
> +	lsm9ds1_ag@6a {
> +		compatible = "st,lsm9ds1-imu";

Didn't found this compatible string.

> +		reg = <0x6a>;
> +		st,drdy-int-pin = <1>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_acc_gyro>;
> +		interrupt-parent = <&gpio7>;
> +		interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
> +	};
> +
> +	lsm9ds1_m@1c {
> +		compatible = "st,lsm9ds1-magn";
> +		reg = <0x1c>;

Nodes are sorted according their i2c-addresses.

Regards,
  Marco

> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_mag>;
> +		interrupt-parent = <&gpio1>;
> +		interrupts = <2 IRQ_TYPE_EDGE_RISING>;
> +	};
> +
>  	ltc3676: pmic@3c {
>  		compatible = "lltc,ltc3676";
>  		reg = <0x3c>;
> @@ -462,6 +481,18 @@
>  		>;
>  	};
>  
> +	pinctrl_acc_gyro: acc_gyrogrp {
> +		fsl,pins = <
> +			MX6QDL_PAD_GPIO_18__GPIO7_IO13		0x1b0b0
> +		>;
> +	};
> +
> +	pinctrl_mag: maggrp {
> +		fsl,pins = <
> +			MX6QDL_PAD_GPIO_2__GPIO1_IO02		0x1b0b0
> +		>;
> +	};
> +
>  	pinctrl_pps: ppsgrp {
>  		fsl,pins = <
>  			MX6QDL_PAD_ENET_RXD1__GPIO1_IO26	0x1b0b1
> -- 
> 2.9.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] ARM: dt: add lsm9ds1 iio imu/magn support to gw553x
  2019-10-21  8:19 ` Marco Felsch
@ 2019-10-21 18:30   ` Bobby Jones
  2019-10-21 19:31     ` Bobby Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Bobby Jones @ 2019-10-21 18:30 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer, devicetree,
	linux-kernel, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam, linux-arm-kernel

On Mon, Oct 21, 2019 at 1:19 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
>
> Hi Robert,
>
> same here, don't name it 'ARM: dt: ...' instead name it 'ARM: dts: imx:
> ventana: ..' or 'ARM: dts: imx: imx6qdl-gw553x: ..'.

Sorry about that, I'll follow that format from now on.
>
> On 19-10-18 16:21, Robert Jones wrote:
> > Add one node for the accel/gyro i2c device and another for the separate
> > magnetometer device in the lsm9ds1.
> >
> > Signed-off-by: Robert Jones <rjones@gateworks.com>
> > ---
> >  arch/arm/boot/dts/imx6qdl-gw553x.dtsi | 31 +++++++++++++++++++++++++++++++
> >  1 file changed, 31 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> > index a106689..55e6922 100644
> > --- a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> > +++ b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> > @@ -173,6 +173,25 @@
> >       pinctrl-0 = <&pinctrl_i2c2>;
> >       status = "okay";
> >
> > +     lsm9ds1_ag@6a {
> > +             compatible = "st,lsm9ds1-imu";
>
> Didn't found this compatible string.
So this is a compatible string for a driver that's being mainlined
now. The devicetree bindings for which has already been reviewed-by
Rob Herring as seen here:
https://www.spinics.net/lists/linux-iio/msg47297.html. If possible I'd
prefer to get this in the same kernel release so let me know if
there's anything else I can do to make that happen.

>
> > +             reg = <0x6a>;
> > +             st,drdy-int-pin = <1>;
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&pinctrl_acc_gyro>;
> > +             interrupt-parent = <&gpio7>;
> > +             interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
> > +     };
> > +
> > +     lsm9ds1_m@1c {
> > +             compatible = "st,lsm9ds1-magn";
> > +             reg = <0x1c>;
>
> Nodes are sorted according their i2c-addresses.
>
I'll resubmit with that change, thanks!
- Bobby

> Regards,
>   Marco
>
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&pinctrl_mag>;
> > +             interrupt-parent = <&gpio1>;
> > +             interrupts = <2 IRQ_TYPE_EDGE_RISING>;
> > +     };
> > +
> >       ltc3676: pmic@3c {
> >               compatible = "lltc,ltc3676";
> >               reg = <0x3c>;
> > @@ -462,6 +481,18 @@
> >               >;
> >       };
> >
> > +     pinctrl_acc_gyro: acc_gyrogrp {
> > +             fsl,pins = <
> > +                     MX6QDL_PAD_GPIO_18__GPIO7_IO13          0x1b0b0
> > +             >;
> > +     };
> > +
> > +     pinctrl_mag: maggrp {
> > +             fsl,pins = <
> > +                     MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x1b0b0
> > +             >;
> > +     };
> > +
> >       pinctrl_pps: ppsgrp {
> >               fsl,pins = <
> >                       MX6QDL_PAD_ENET_RXD1__GPIO1_IO26        0x1b0b1
> > --
> > 2.9.2
> >
> >
> >
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] ARM: dt: add lsm9ds1 iio imu/magn support to gw553x
  2019-10-21 18:30   ` Bobby Jones
@ 2019-10-21 19:31     ` Bobby Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Bobby Jones @ 2019-10-21 19:31 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer, devicetree,
	linux-kernel, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam, linux-arm-kernel

On Mon, Oct 21, 2019 at 11:30 AM Bobby Jones <rjones@gateworks.com> wrote:
>
> On Mon, Oct 21, 2019 at 1:19 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
> >
> > Hi Robert,
> >
> > same here, don't name it 'ARM: dt: ...' instead name it 'ARM: dts: imx:
> > ventana: ..' or 'ARM: dts: imx: imx6qdl-gw553x: ..'.
>
> Sorry about that, I'll follow that format from now on.
> >
> > On 19-10-18 16:21, Robert Jones wrote:
> > > Add one node for the accel/gyro i2c device and another for the separate
> > > magnetometer device in the lsm9ds1.
> > >
> > > Signed-off-by: Robert Jones <rjones@gateworks.com>
> > > ---
> > >  arch/arm/boot/dts/imx6qdl-gw553x.dtsi | 31 +++++++++++++++++++++++++++++++
> > >  1 file changed, 31 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> > > index a106689..55e6922 100644
> > > --- a/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> > > +++ b/arch/arm/boot/dts/imx6qdl-gw553x.dtsi
> > > @@ -173,6 +173,25 @@
> > >       pinctrl-0 = <&pinctrl_i2c2>;
> > >       status = "okay";
> > >
> > > +     lsm9ds1_ag@6a {
> > > +             compatible = "st,lsm9ds1-imu";
> >
> > Didn't found this compatible string.
> So this is a compatible string for a driver that's being mainlined
> now. The devicetree bindings for which has already been reviewed-by
> Rob Herring as seen here:
> https://www.spinics.net/lists/linux-iio/msg47297.html. If possible I'd
> prefer to get this in the same kernel release so let me know if
> there's anything else I can do to make that happen.
>
I mixed up my replies here. That link points to the "nxp,fxos8700"
compatible string that you brought up in your other response. The
"st,lsm9ds1-imu" compatible string is described in
Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt which was an
August commit that made it into the imx/dt branch.
> >
> > > +             reg = <0x6a>;
> > > +             st,drdy-int-pin = <1>;
> > > +             pinctrl-names = "default";
> > > +             pinctrl-0 = <&pinctrl_acc_gyro>;
> > > +             interrupt-parent = <&gpio7>;
> > > +             interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
> > > +     };
> > > +
> > > +     lsm9ds1_m@1c {
> > > +             compatible = "st,lsm9ds1-magn";
> > > +             reg = <0x1c>;
> >
> > Nodes are sorted according their i2c-addresses.
> >
> I'll resubmit with that change, thanks!
> - Bobby
>
> > Regards,
> >   Marco
> >
> > > +             pinctrl-names = "default";
> > > +             pinctrl-0 = <&pinctrl_mag>;
> > > +             interrupt-parent = <&gpio1>;
> > > +             interrupts = <2 IRQ_TYPE_EDGE_RISING>;
> > > +     };
> > > +
> > >       ltc3676: pmic@3c {
> > >               compatible = "lltc,ltc3676";
> > >               reg = <0x3c>;
> > > @@ -462,6 +481,18 @@
> > >               >;
> > >       };
> > >
> > > +     pinctrl_acc_gyro: acc_gyrogrp {
> > > +             fsl,pins = <
> > > +                     MX6QDL_PAD_GPIO_18__GPIO7_IO13          0x1b0b0
> > > +             >;
> > > +     };
> > > +
> > > +     pinctrl_mag: maggrp {
> > > +             fsl,pins = <
> > > +                     MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x1b0b0
> > > +             >;
> > > +     };
> > > +
> > >       pinctrl_pps: ppsgrp {
> > >               fsl,pins = <
> > >                       MX6QDL_PAD_ENET_RXD1__GPIO1_IO26        0x1b0b1
> > > --
> > > 2.9.2
> > >
> > >
> > >
> >
> > --
> > Pengutronix e.K.                           |                             |
> > Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> > Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

end of thread, other threads:[~2019-10-21 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 23:21 [PATCH] ARM: dt: add lsm9ds1 iio imu/magn support to gw553x Robert Jones
2019-10-21  8:19 ` Marco Felsch
2019-10-21 18:30   ` Bobby Jones
2019-10-21 19:31     ` Bobby Jones

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