linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] arm: dts: gta04: add gps support
@ 2019-01-31 18:06 Andreas Kemnade
  2019-01-31 18:06 ` [PATCH v3 1/2] arm: dts: gta04: add ldo 3v3 regulator Andreas Kemnade
  2019-01-31 18:06 ` [PATCH v3 2/2] arm: dts: gta04: add gps support Andreas Kemnade
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Kemnade @ 2019-01-31 18:06 UTC (permalink / raw)
  To: Johan Hovold, mark.rutland, devicetree, letux-kernel, tony,
	linux-kernel, robh+dt, bcousson, linux-omap
  Cc: Andreas Kemnade

This patch series adds support for gps for gta04. Formerly
it was a single patch, now a non-controllable regulator was
added for completeness sake and to satisty binding
requirements.

Andreas Kemnade (2):
  arm: dts: gta04: add ldo 3v3 regulator
  arm: dts: gta04: add gps support

 arch/arm/boot/dts/omap3-gta04.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

-- 
2.11.0


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

* [PATCH v3 1/2] arm: dts: gta04: add ldo 3v3 regulator
  2019-01-31 18:06 [PATCH v3 0/2] arm: dts: gta04: add gps support Andreas Kemnade
@ 2019-01-31 18:06 ` Andreas Kemnade
  2019-02-01 10:02   ` Johan Hovold
  2019-01-31 18:06 ` [PATCH v3 2/2] arm: dts: gta04: add gps support Andreas Kemnade
  1 sibling, 1 reply; 9+ messages in thread
From: Andreas Kemnade @ 2019-01-31 18:06 UTC (permalink / raw)
  To: Johan Hovold, mark.rutland, devicetree, letux-kernel, tony,
	linux-kernel, robh+dt, bcousson, linux-omap
  Cc: Andreas Kemnade

Required for completeness sake to be able to specify
a regulator for devices having a non-optional regulator
property. It corresponds to the "3V3" net in the
schematics.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
new in v3

 arch/arm/boot/dts/omap3-gta04.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index e53d32691308..02d8274a2f47 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -32,6 +32,14 @@
 		display1 = &tv0;
 	};
 
+	ldo_3v3: fixedregulator {
+		compatible = "regulator-fixed";
+		regulator-name = "ldo_3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
 	/* fixed 26MHz oscillator */
 	hfclk_26m: oscillator {
 		#clock-cells = <0>;
-- 
2.11.0


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

* [PATCH v3 2/2] arm: dts: gta04: add gps support
  2019-01-31 18:06 [PATCH v3 0/2] arm: dts: gta04: add gps support Andreas Kemnade
  2019-01-31 18:06 ` [PATCH v3 1/2] arm: dts: gta04: add ldo 3v3 regulator Andreas Kemnade
@ 2019-01-31 18:06 ` Andreas Kemnade
  2019-02-01 10:04   ` Johan Hovold
  1 sibling, 1 reply; 9+ messages in thread
From: Andreas Kemnade @ 2019-01-31 18:06 UTC (permalink / raw)
  To: Johan Hovold, mark.rutland, devicetree, letux-kernel, tony,
	linux-kernel, robh+dt, bcousson, linux-omap
  Cc: Andreas Kemnade

The GTA04 has a w2sg0004 or w2sg0084 gps chip. Not detectable
which one is mounted so use the compatibility entry for w2sg0004
for all which will work for both.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
Changes in v3:
- converted to a patchset
- added vcc-supply

Changes in v2:
- some s/gps/gnss/
- not added vcc-supply because the regulator is not modelled
  in dts at all

w2sg0004 bindings are in next-20190129

 arch/arm/boot/dts/omap3-gta04.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 02d8274a2f47..4ea0f7dc37c6 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -320,6 +320,12 @@
 		>;
        };
 
+	gps_pins: pinmux_gps_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio145 */
+		>;
+	};
+
 	hdq_pins: hdq_pins {
 		pinctrl-single,pins = <
 			OMAP3_CORE1_IOPAD(0x21c6, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda.hdq */
@@ -652,6 +658,14 @@
 &uart2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart2_pins>;
+	gnss: gnss {
+		compatible = "wi2wi,w2sg0004";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gps_pins>;
+		sirf,onoff-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
+		lna-supply = <&vsim>;
+		vcc-supply = <&ldo_3v3>;
+	};
 };
 
 &uart3 {
-- 
2.11.0


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

* Re: [PATCH v3 1/2] arm: dts: gta04: add ldo 3v3 regulator
  2019-01-31 18:06 ` [PATCH v3 1/2] arm: dts: gta04: add ldo 3v3 regulator Andreas Kemnade
@ 2019-02-01 10:02   ` Johan Hovold
  0 siblings, 0 replies; 9+ messages in thread
From: Johan Hovold @ 2019-02-01 10:02 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Johan Hovold, mark.rutland, devicetree, letux-kernel, tony,
	linux-kernel, robh+dt, bcousson, linux-omap

On Thu, Jan 31, 2019 at 07:06:39PM +0100, Andreas Kemnade wrote:
> Required for completeness sake to be able to specify
> a regulator for devices having a non-optional regulator
> property. It corresponds to the "3V3" net in the
> schematics.
> 
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
> new in v3
> 
>  arch/arm/boot/dts/omap3-gta04.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
> index e53d32691308..02d8274a2f47 100644
> --- a/arch/arm/boot/dts/omap3-gta04.dtsi
> +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
> @@ -32,6 +32,14 @@
>  		display1 = &tv0;
>  	};
>  
> +	ldo_3v3: fixedregulator {

A suffix, even if its just to rename as "fixedregulator0", would allow
further fixed regulators to be added later, but I guess that can be
handled then.

> +		compatible = "regulator-fixed";
> +		regulator-name = "ldo_3v3";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-always-on;
> +	};
> +
>  	/* fixed 26MHz oscillator */
>  	hfclk_26m: oscillator {
>  		#clock-cells = <0>;

Reviewed-by: Johan Hovold <johan@kernel.org>

Johan

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

* Re: [PATCH v3 2/2] arm: dts: gta04: add gps support
  2019-01-31 18:06 ` [PATCH v3 2/2] arm: dts: gta04: add gps support Andreas Kemnade
@ 2019-02-01 10:04   ` Johan Hovold
  2019-02-01 19:06     ` Andreas Kemnade
  0 siblings, 1 reply; 9+ messages in thread
From: Johan Hovold @ 2019-02-01 10:04 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Johan Hovold, mark.rutland, devicetree, letux-kernel, tony,
	linux-kernel, robh+dt, bcousson, linux-omap

On Thu, Jan 31, 2019 at 07:06:40PM +0100, Andreas Kemnade wrote:
> The GTA04 has a w2sg0004 or w2sg0084 gps chip. Not detectable
> which one is mounted so use the compatibility entry for w2sg0004
> for all which will work for both.
> 
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> ---
> Changes in v3:
> - converted to a patchset
> - added vcc-supply
> 
> Changes in v2:
> - some s/gps/gnss/
> - not added vcc-supply because the regulator is not modelled
>   in dts at all
> 
> w2sg0004 bindings are in next-20190129
> 
>  arch/arm/boot/dts/omap3-gta04.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
> index 02d8274a2f47..4ea0f7dc37c6 100644
> --- a/arch/arm/boot/dts/omap3-gta04.dtsi
> +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
> @@ -320,6 +320,12 @@
>  		>;
>         };
>  
> +	gps_pins: pinmux_gps_pins {

s/gps/gnss/ would be more consistent, but whatever.

> +		pinctrl-single,pins = <
> +			OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio145 */
> +		>;
> +	};
> +
>  	hdq_pins: hdq_pins {
>  		pinctrl-single,pins = <
>  			OMAP3_CORE1_IOPAD(0x21c6, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda.hdq */
> @@ -652,6 +658,14 @@
>  &uart2 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart2_pins>;
> +	gnss: gnss {
> +		compatible = "wi2wi,w2sg0004";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&gps_pins>;
> +		sirf,onoff-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
> +		lna-supply = <&vsim>;
> +		vcc-supply = <&ldo_3v3>;
> +	};

Reviewed-by: Johan Hovold <johan@kernel.org>

Johan

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

* Re: [PATCH v3 2/2] arm: dts: gta04: add gps support
  2019-02-01 10:04   ` Johan Hovold
@ 2019-02-01 19:06     ` Andreas Kemnade
  2019-02-01 20:09       ` [Letux-kernel] " H. Nikolaus Schaller
  2019-02-04  8:30       ` Johan Hovold
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Kemnade @ 2019-02-01 19:06 UTC (permalink / raw)
  To: Johan Hovold
  Cc: mark.rutland, devicetree, letux-kernel, tony, linux-kernel,
	robh+dt, bcousson, linux-omap

[-- Attachment #1: Type: text/plain, Size: 1377 bytes --]

On Fri, 1 Feb 2019 11:04:16 +0100
Johan Hovold <johan@kernel.org> wrote:

> On Thu, Jan 31, 2019 at 07:06:40PM +0100, Andreas Kemnade wrote:
> > The GTA04 has a w2sg0004 or w2sg0084 gps chip. Not detectable
> > which one is mounted so use the compatibility entry for w2sg0004
> > for all which will work for both.
> > 
> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> > Changes in v3:
> > - converted to a patchset
> > - added vcc-supply
> > 
> > Changes in v2:
> > - some s/gps/gnss/
> > - not added vcc-supply because the regulator is not modelled
> >   in dts at all
> > 
> > w2sg0004 bindings are in next-20190129
> > 
> >  arch/arm/boot/dts/omap3-gta04.dtsi | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
> > index 02d8274a2f47..4ea0f7dc37c6 100644
> > --- a/arch/arm/boot/dts/omap3-gta04.dtsi
> > +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
> > @@ -320,6 +320,12 @@  
> >  		>;  
> >         };
> >  
> > +	gps_pins: pinmux_gps_pins {  
> 
> s/gps/gnss/ would be more consistent, but whatever.
> 
well, gps is already in the file at another place. So it is a bit
inconsistent in any case, without further cleanup. If someone comes
up with a strong opinion here I would of course change it.

Regards,
Andreas

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [Letux-kernel] [PATCH v3 2/2] arm: dts: gta04: add gps support
  2019-02-01 19:06     ` Andreas Kemnade
@ 2019-02-01 20:09       ` H. Nikolaus Schaller
  2019-02-04  8:30       ` Johan Hovold
  1 sibling, 0 replies; 9+ messages in thread
From: H. Nikolaus Schaller @ 2019-02-01 20:09 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Johan Hovold, Mark Rutland, devicetree, linux-omap,
	Tony Lindgren, LKML, Rob Herring, Benoit Cousson,
	Discussions about the Letux Kernel

Hi Andreas,

> Am 01.02.2019 um 20:06 schrieb Andreas Kemnade <andreas@kemnade.info>:
> 
> On Fri, 1 Feb 2019 11:04:16 +0100
> Johan Hovold <johan@kernel.org> wrote:
> 
>> On Thu, Jan 31, 2019 at 07:06:40PM +0100, Andreas Kemnade wrote:
>>> The GTA04 has a w2sg0004 or w2sg0084 gps chip. Not detectable
>>> which one is mounted so use the compatibility entry for w2sg0004
>>> for all which will work for both.
>>> 
>>> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
>>> ---
>>> Changes in v3:
>>> - converted to a patchset
>>> - added vcc-supply
>>> 
>>> Changes in v2:
>>> - some s/gps/gnss/
>>> - not added vcc-supply because the regulator is not modelled
>>>  in dts at all
>>> 
>>> w2sg0004 bindings are in next-20190129
>>> 
>>> arch/arm/boot/dts/omap3-gta04.dtsi | 14 ++++++++++++++
>>> 1 file changed, 14 insertions(+)
>>> 
>>> diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
>>> index 02d8274a2f47..4ea0f7dc37c6 100644
>>> --- a/arch/arm/boot/dts/omap3-gta04.dtsi
>>> +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
>>> @@ -320,6 +320,12 @@  
>>> 		>;  
>>>        };
>>> 
>>> +	gps_pins: pinmux_gps_pins {  
>> 
>> s/gps/gnss/ would be more consistent, but whatever.
>> 
> well, gps is already in the file at another place. So it is a bit
> inconsistent in any case, without further cleanup. If someone comes
> up with a strong opinion here I would of course change it.

For me the highest priority is that it works. And that does not depend
on the specific node name. The pinmux node is only referenced through a phandle,
which is translated into a pure numeric code by DTC.

Another argument could be that the w2sg0004 chip was introduced ca. 2007
when GPS was (AFAIR) the only GNSS system widely available and the only one
supported by the chip. So this would be an argument for "gps" since it
is a "GPS only" receiver chip.

Since the DT should describe specific hardware, it maybe should somehow
codify that the chip is GPS only and is not a generic gnss chip (although
the driver knows that as well).

BR,
Nikolaus


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

* Re: [PATCH v3 2/2] arm: dts: gta04: add gps support
  2019-02-01 19:06     ` Andreas Kemnade
  2019-02-01 20:09       ` [Letux-kernel] " H. Nikolaus Schaller
@ 2019-02-04  8:30       ` Johan Hovold
  2019-02-07 17:31         ` Tony Lindgren
  1 sibling, 1 reply; 9+ messages in thread
From: Johan Hovold @ 2019-02-04  8:30 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Johan Hovold, mark.rutland, devicetree, letux-kernel, tony,
	linux-kernel, robh+dt, bcousson, linux-omap

On Fri, Feb 01, 2019 at 08:06:30PM +0100, Andreas Kemnade wrote:
> On Fri, 1 Feb 2019 11:04:16 +0100
> Johan Hovold <johan@kernel.org> wrote:
> 
> > On Thu, Jan 31, 2019 at 07:06:40PM +0100, Andreas Kemnade wrote:
> > > The GTA04 has a w2sg0004 or w2sg0084 gps chip. Not detectable
> > > which one is mounted so use the compatibility entry for w2sg0004
> > > for all which will work for both.
> > > 
> > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > > ---
> > > Changes in v3:
> > > - converted to a patchset
> > > - added vcc-supply
> > > 
> > > Changes in v2:
> > > - some s/gps/gnss/
> > > - not added vcc-supply because the regulator is not modelled
> > >   in dts at all
> > > 
> > > w2sg0004 bindings are in next-20190129
> > > 
> > >  arch/arm/boot/dts/omap3-gta04.dtsi | 14 ++++++++++++++
> > >  1 file changed, 14 insertions(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
> > > index 02d8274a2f47..4ea0f7dc37c6 100644
> > > --- a/arch/arm/boot/dts/omap3-gta04.dtsi
> > > +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
> > > @@ -320,6 +320,12 @@  
> > >  		>;  
> > >         };
> > >  
> > > +	gps_pins: pinmux_gps_pins {  
> > 
> > s/gps/gnss/ would be more consistent, but whatever.
> > 
> well, gps is already in the file at another place. So it is a bit
> inconsistent in any case, without further cleanup. If someone comes
> up with a strong opinion here I would of course change it.

Up to you. As long as the gnss node is named "gnss" I don't have a
strong opinion on the other names (as long as they follow the spec of
course).

Johan

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

* Re: [PATCH v3 2/2] arm: dts: gta04: add gps support
  2019-02-04  8:30       ` Johan Hovold
@ 2019-02-07 17:31         ` Tony Lindgren
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2019-02-07 17:31 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Andreas Kemnade, mark.rutland, devicetree, letux-kernel,
	linux-kernel, robh+dt, bcousson, linux-omap

* Johan Hovold <johan@kernel.org> [190204 08:30]:
> On Fri, Feb 01, 2019 at 08:06:30PM +0100, Andreas Kemnade wrote:
> > On Fri, 1 Feb 2019 11:04:16 +0100
> > Johan Hovold <johan@kernel.org> wrote:
> > 
> > > On Thu, Jan 31, 2019 at 07:06:40PM +0100, Andreas Kemnade wrote:
> > > > The GTA04 has a w2sg0004 or w2sg0084 gps chip. Not detectable
> > > > which one is mounted so use the compatibility entry for w2sg0004
> > > > for all which will work for both.
> > > > 
> > > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > > > ---
> > > > Changes in v3:
> > > > - converted to a patchset
> > > > - added vcc-supply
> > > > 
> > > > Changes in v2:
> > > > - some s/gps/gnss/
> > > > - not added vcc-supply because the regulator is not modelled
> > > >   in dts at all
> > > > 
> > > > w2sg0004 bindings are in next-20190129
> > > > 
> > > >  arch/arm/boot/dts/omap3-gta04.dtsi | 14 ++++++++++++++
> > > >  1 file changed, 14 insertions(+)
> > > > 
> > > > diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
> > > > index 02d8274a2f47..4ea0f7dc37c6 100644
> > > > --- a/arch/arm/boot/dts/omap3-gta04.dtsi
> > > > +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
> > > > @@ -320,6 +320,12 @@  
> > > >  		>;  
> > > >         };
> > > >  
> > > > +	gps_pins: pinmux_gps_pins {  
> > > 
> > > s/gps/gnss/ would be more consistent, but whatever.
> > > 
> > well, gps is already in the file at another place. So it is a bit
> > inconsistent in any case, without further cleanup. If someone comes
> > up with a strong opinion here I would of course change it.
> 
> Up to you. As long as the gnss node is named "gnss" I don't have a
> strong opinion on the other names (as long as they follow the spec of
> course).

OK so I'm applying these two patches into omap-for-v5.1/dt.

Thanks,

Tony

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

end of thread, other threads:[~2019-02-07 17:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 18:06 [PATCH v3 0/2] arm: dts: gta04: add gps support Andreas Kemnade
2019-01-31 18:06 ` [PATCH v3 1/2] arm: dts: gta04: add ldo 3v3 regulator Andreas Kemnade
2019-02-01 10:02   ` Johan Hovold
2019-01-31 18:06 ` [PATCH v3 2/2] arm: dts: gta04: add gps support Andreas Kemnade
2019-02-01 10:04   ` Johan Hovold
2019-02-01 19:06     ` Andreas Kemnade
2019-02-01 20:09       ` [Letux-kernel] " H. Nikolaus Schaller
2019-02-04  8:30       ` Johan Hovold
2019-02-07 17:31         ` Tony Lindgren

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