diff mbox series

[v2,2/4] dt-bindings: gnss: add mediatek binding

Message ID 1547744074-28308-3-git-send-email-lollivier@baylibre.com
State Not Applicable, archived
Headers show
Series [v2,1/4] dt-bindings: Add vendor prefix for "GlobalTop Technology, Inc." | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Loys Ollivier Jan. 17, 2019, 4:54 p.m. UTC
Add binding for Mediatek-based GNSS receivers.

Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
---

v2:
Renamed bindings from Globaltop/gtop to Mediatek/mtk.
Moved current-speed as an optional propertie.
Removed the status line in the example.
Added "mediatek,mt3339" compatible.

 .../devicetree/bindings/gnss/mediatek.txt          | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt

Comments

Rob Herring Jan. 21, 2019, 5:10 p.m. UTC | #1
On Thu, 17 Jan 2019 17:54:32 +0100, Loys Ollivier wrote:
> Add binding for Mediatek-based GNSS receivers.
> 
> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
> ---
> 
> v2:
> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
> Moved current-speed as an optional propertie.
> Removed the status line in the example.
> Added "mediatek,mt3339" compatible.
> 
>  .../devicetree/bindings/gnss/mediatek.txt          | 39 ++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Loys Ollivier Jan. 21, 2019, 5:27 p.m. UTC | #2
On Mon 21 Jan 2019 at 17:10, Rob Herring wrote:

> On Thu, 17 Jan 2019 17:54:32 +0100, Loys Ollivier wrote:
>> Add binding for Mediatek-based GNSS receivers.
>> 
>> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
>> ---
>> 
>> v2:
>> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
>> Moved current-speed as an optional propertie.
>> Removed the status line in the example.
>> Added "mediatek,mt3339" compatible.
>> 
>>  .../devicetree/bindings/gnss/mediatek.txt          | 39 
>>  ++++++++++++++++++++++
>>  1 file changed, 39 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
>> 
>
> Reviewed-by: Rob Herring <robh@kernel.org>

Thanks Rob,
If there are no objections by others, I'll stop sending these two patch
(1/4 and 2/4) and reference any new patch serie for 3 and 4 as depending
on those two.
Sean Wang Jan. 21, 2019, 6:44 p.m. UTC | #3
On Mon, Jan 21, 2019 at 9:29 AM Loys Ollivier <lollivier@baylibre.com> wrote:
>
>
> On Mon 21 Jan 2019 at 17:10, Rob Herring wrote:
>
> > On Thu, 17 Jan 2019 17:54:32 +0100, Loys Ollivier wrote:
> >> Add binding for Mediatek-based GNSS receivers.
> >>
> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
> >> ---
> >>
> >> v2:
> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
> >> Moved current-speed as an optional propertie.
> >> Removed the status line in the example.
> >> Added "mediatek,mt3339" compatible.
> >>
> >>  .../devicetree/bindings/gnss/mediatek.txt          | 39
> >>  ++++++++++++++++++++++
> >>  1 file changed, 39 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
> >>
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
>
> Thanks Rob,
> If there are no objections by others, I'll stop sending these two patch
> (1/4 and 2/4) and reference any new patch serie for 3 and 4 as depending
> on those two.
>

Hi Loys,

Thanks for adding the first GPS device driver. It's really nice to see
more device drivers added to upstream support.

Do you mind send the series again with Cc linux-mediatek@lists.infradead.org ?

Sean

> --
> -L
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
Rob Herring Jan. 21, 2019, 9:51 p.m. UTC | #4
On Mon, Jan 21, 2019 at 11:29 AM Loys Ollivier <lollivier@baylibre.com> wrote:
>
>
> On Mon 21 Jan 2019 at 17:10, Rob Herring wrote:
>
> > On Thu, 17 Jan 2019 17:54:32 +0100, Loys Ollivier wrote:
> >> Add binding for Mediatek-based GNSS receivers.
> >>
> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
> >> ---
> >>
> >> v2:
> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
> >> Moved current-speed as an optional propertie.
> >> Removed the status line in the example.
> >> Added "mediatek,mt3339" compatible.
> >>
> >>  .../devicetree/bindings/gnss/mediatek.txt          | 39
> >>  ++++++++++++++++++++++
> >>  1 file changed, 39 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
> >>
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
>
> Thanks Rob,
> If there are no objections by others, I'll stop sending these two patch
> (1/4 and 2/4) and reference any new patch serie for 3 and 4 as depending
> on those two.

Generally, you should just resend the whole series unless the
maintainer has applied some of the patches. I could apply this but
usually the whole series goes in together.

Rob
Loys Ollivier Jan. 22, 2019, 8:47 a.m. UTC | #5
On Mon 21 Jan 2019 at 18:44, Sean Wang wrote:

> On Mon, Jan 21, 2019 at 9:29 AM Loys Ollivier <lollivier@baylibre.com> 
> wrote:
>>
>>
>> On Mon 21 Jan 2019 at 17:10, Rob Herring wrote:
>>
>> > On Thu, 17 Jan 2019 17:54:32 +0100, Loys Ollivier wrote:
>> >> Add binding for Mediatek-based GNSS receivers.
>> >>
>> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
>> >> ---
>> >>
>> >> v2:
>> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
>> >> Moved current-speed as an optional propertie.
>> >> Removed the status line in the example.
>> >> Added "mediatek,mt3339" compatible.
>> >>
>> >>  .../devicetree/bindings/gnss/mediatek.txt          | 39
>> >>  ++++++++++++++++++++++
>> >>  1 file changed, 39 insertions(+)
>> >>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
>> >>
>> >
>> > Reviewed-by: Rob Herring <robh@kernel.org>
>>
>> Thanks Rob,
>> If there are no objections by others, I'll stop sending these two patch
>> (1/4 and 2/4) and reference any new patch serie for 3 and 4 as depending
>> on those two.
>>
>
> Hi Loys,
>
> Thanks for adding the first GPS device driver. It's really nice to see
> more device drivers added to upstream support.
>
Hi Sean,

Glad to know you're supporting this initiative.

> Do you mind send the series again with Cc linux-mediatek@lists.infradead.org 
> ?
>
The series already has linux-mediatek@lists.infradead.org in Cc. Does it
need a resend ?

> Sean
>
>> --
>> -L
>>
>> _______________________________________________
>> Linux-mediatek mailing list
>> Linux-mediatek@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-mediatek
Loys Ollivier Jan. 22, 2019, 8:49 a.m. UTC | #6
On Mon 21 Jan 2019 at 21:51, Rob Herring wrote:

> On Mon, Jan 21, 2019 at 11:29 AM Loys Ollivier <lollivier@baylibre.com> 
> wrote:
>>
>>
>> On Mon 21 Jan 2019 at 17:10, Rob Herring wrote:
>>
>> > On Thu, 17 Jan 2019 17:54:32 +0100, Loys Ollivier wrote:
>> >> Add binding for Mediatek-based GNSS receivers.
>> >>
>> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
>> >> ---
>> >>
>> >> v2:
>> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
>> >> Moved current-speed as an optional propertie.
>> >> Removed the status line in the example.
>> >> Added "mediatek,mt3339" compatible.
>> >>
>> >>  .../devicetree/bindings/gnss/mediatek.txt          | 39
>> >>  ++++++++++++++++++++++
>> >>  1 file changed, 39 insertions(+)
>> >>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
>> >>
>> >
>> > Reviewed-by: Rob Herring <robh@kernel.org>
>>
>> Thanks Rob,
>> If there are no objections by others, I'll stop sending these two patch
>> (1/4 and 2/4) and reference any new patch serie for 3 and 4 as depending
>> on those two.
>
> Generally, you should just resend the whole series unless the
> maintainer has applied some of the patches. I could apply this but
> usually the whole series goes in together.
>
> Rob

OK understood, I'll resend the whole series if needed then.

Loys
Sean Wang Jan. 22, 2019, 10:25 a.m. UTC | #7
On Tue, 2019-01-22 at 09:47 +0100, Loys Ollivier wrote:
> On Mon 21 Jan 2019 at 18:44, Sean Wang wrote:
> 
> > On Mon, Jan 21, 2019 at 9:29 AM Loys Ollivier <lollivier@baylibre.com> 
> > wrote:
> >>
> >>
> >> On Mon 21 Jan 2019 at 17:10, Rob Herring wrote:
> >>
> >> > On Thu, 17 Jan 2019 17:54:32 +0100, Loys Ollivier wrote:
> >> >> Add binding for Mediatek-based GNSS receivers.
> >> >>
> >> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
> >> >> ---
> >> >>
> >> >> v2:
> >> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
> >> >> Moved current-speed as an optional propertie.
> >> >> Removed the status line in the example.
> >> >> Added "mediatek,mt3339" compatible.
> >> >>
> >> >>  .../devicetree/bindings/gnss/mediatek.txt          | 39
> >> >>  ++++++++++++++++++++++
> >> >>  1 file changed, 39 insertions(+)
> >> >>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
> >> >>
> >> >
> >> > Reviewed-by: Rob Herring <robh@kernel.org>
> >>
> >> Thanks Rob,
> >> If there are no objections by others, I'll stop sending these two patch
> >> (1/4 and 2/4) and reference any new patch serie for 3 and 4 as depending
> >> on those two.
> >>
> >
> > Hi Loys,
> >
> > Thanks for adding the first GPS device driver. It's really nice to see
> > more device drivers added to upstream support.
> >
> Hi Sean,
> 
> Glad to know you're supporting this initiative.
> 
> > Do you mind send the series again with Cc linux-mediatek@lists.infradead.org 
> > ?
> >
> The series already has linux-mediatek@lists.infradead.org in Cc. Does it
> need a resend ?
> 

It doesn't need a resend, it's my mistake. thanks for clarifying soon.

> > Sean
> >
> >> --
> >> -L
> >>
> >> _______________________________________________
> >> Linux-mediatek mailing list
> >> Linux-mediatek@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-mediatek
> 
>
Johan Hovold Jan. 25, 2019, 9:07 a.m. UTC | #8
On Thu, Jan 17, 2019 at 05:54:32PM +0100, Loys Ollivier wrote:
> Add binding for Mediatek-based GNSS receivers.
> 
> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
> ---
> 
> v2:
> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
> Moved current-speed as an optional propertie.
> Removed the status line in the example.
> Added "mediatek,mt3339" compatible.
> 
>  .../devicetree/bindings/gnss/mediatek.txt          | 39 ++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
> 
> diff --git a/Documentation/devicetree/bindings/gnss/mediatek.txt b/Documentation/devicetree/bindings/gnss/mediatek.txt
> new file mode 100644
> index 000000000000..fd984b4a9a6d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gnss/mediatek.txt
> @@ -0,0 +1,39 @@
> +Mediatek-based GNSS Receiver DT binding
> +
> +Mediatek chipsets are used in GNSS-receiver modules produced by several
> +vendors and can use UART, SPI or I2C interfaces.
> +
> +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
> +properties.
> +
> +Required properties:
> +
> +- compatible	: Must be one of
> +
> +			"globaltop,pa6h"
> +			"mediatek,mt3339"

I'm not sure it makes sense to add the GPS chip itself as it cannot be
used stand-alone AFAIU, and either not way would require a lot more
resources to be defined than what you add to this binding.

> +
> +- vcc-supply	: Main voltage regulator (pin name: 3V3_IN, VCC, VDD)

The pin names in parenthesis were copied from the sirf-star binding and
were used to capture the various names given to this supply by different
vendors. Please drop as it doesn't apply here.

> +
> +Required properties (I2C):
> +- reg		: I2C slave address
> +
> +Required properties (SPI):
> +- reg		: SPI chip select address

While the mt3339 appears to support these interfaces, the globaltop one
does not.

Have you looked around for a small sample of mt3339-based receivers, to
see whether anyone actually provides these?

> +Optional properties:
> +
> +- timepulse-gpios	: Time pulse GPIO
> +- v-bckp-supply		: Backup voltage regulator
> +- current-speed		: Default UART baud rate

Looks like you forgot the optional NRESET input and 3D-FIX output (even
if the latter might be of limited use).

> +
> +Example:
> +
> +serial@1234 {
> +	compatible = "ns16550a";
> +
> +	gnss {
> +		compatible = "globaltop,pa6h";
> +		vcc-supply = <&vcc_3v3>;
> +	};
> +};

Johan
Loys Ollivier Jan. 28, 2019, 3:46 p.m. UTC | #9
On Fri 25 Jan 2019 at 09:07, Johan Hovold wrote:

> On Thu, Jan 17, 2019 at 05:54:32PM +0100, Loys Ollivier wrote:
>> Add binding for Mediatek-based GNSS receivers.
>> 
>> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
>> ---
>> 
>> v2:
>> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
>> Moved current-speed as an optional propertie.
>> Removed the status line in the example.
>> Added "mediatek,mt3339" compatible.
>> 
>>  .../devicetree/bindings/gnss/mediatek.txt          | 39 
>>  ++++++++++++++++++++++
>>  1 file changed, 39 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/gnss/mediatek.txt
>> 
>> diff --git a/Documentation/devicetree/bindings/gnss/mediatek.txt 
>> b/Documentation/devicetree/bindings/gnss/mediatek.txt
>> new file mode 100644
>> index 000000000000..fd984b4a9a6d
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/gnss/mediatek.txt
>> @@ -0,0 +1,39 @@
>> +Mediatek-based GNSS Receiver DT binding
>> +
>> +Mediatek chipsets are used in GNSS-receiver modules produced by several
>> +vendors and can use UART, SPI or I2C interfaces.
>> +
>> +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
>> +properties.
>> +
>> +Required properties:
>> +
>> +- compatible	: Must be one of
>> +
>> +			"globaltop,pa6h"
>> +			"mediatek,mt3339"
>
> I'm not sure it makes sense to add the GPS chip itself as it cannot be
> used stand-alone AFAIU, and either not way would require a lot more
> resources to be defined than what you add to this binding.
>

OK, I find it a bit confusing to have Mediatek bindings but no
compatible Mediatek SoCs.
But it is true that it can't be used stand-alone. I will remove this
reference and also remove it from the mtk.c driver code from this patch
serie.

>> +
>> +- vcc-supply	: Main voltage regulator (pin name: 3V3_IN, VCC, VDD)
>
> The pin names in parenthesis were copied from the sirf-star binding and
> were used to capture the various names given to this supply by different
> vendors. Please drop as it doesn't apply here.
>
>> +
>> +Required properties (I2C):
>> +- reg		: I2C slave address
>> +
>> +Required properties (SPI):
>> +- reg		: SPI chip select address
>
> While the mt3339 appears to support these interfaces, the globaltop one
> does not.
>
> Have you looked around for a small sample of mt3339-based receivers, to
> see whether anyone actually provides these?
>

Again I'm confused by the fact that it is the Mediatek bindings.
Hence why I have added it and why it was not present in the v1 that was
only for Globaltop.
I find it odd mentionning the chipset but not all its interfaces.
I will remove these sections and only list supported interfaces (i.e.
UART). Other interfaces can be added afterward if one finds a board that
provides them.

>> +Optional properties:
>> +
>> +- timepulse-gpios	: Time pulse GPIO
>> +- v-bckp-supply		: Backup voltage regulator
>> +- current-speed		: Default UART baud rate
>
> Looks like you forgot the optional NRESET input and 3D-FIX output (even
> if the latter might be of limited use).
>

Thanks I will clean this section.

>> +
>> +Example:
>> +
>> +serial@1234 {
>> +	compatible = "ns16550a";
>> +
>> +	gnss {
>> +		compatible = "globaltop,pa6h";
>> +		vcc-supply = <&vcc_3v3>;
>> +	};
>> +};
>
> Johan
Johan Hovold Feb. 11, 2019, 8:33 a.m. UTC | #10
On Mon, Jan 28, 2019 at 04:46:53PM +0100, Loys Ollivier wrote:
> 
> On Fri 25 Jan 2019 at 09:07, Johan Hovold wrote:
> 
> > On Thu, Jan 17, 2019 at 05:54:32PM +0100, Loys Ollivier wrote:
> >> Add binding for Mediatek-based GNSS receivers.
> >> 
> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
> >> ---
> >> 
> >> v2:
> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
> >> Moved current-speed as an optional propertie.
> >> Removed the status line in the example.
> >> Added "mediatek,mt3339" compatible.

> >> +++ b/Documentation/devicetree/bindings/gnss/mediatek.txt
> >> @@ -0,0 +1,39 @@
> >> +Mediatek-based GNSS Receiver DT binding
> >> +
> >> +Mediatek chipsets are used in GNSS-receiver modules produced by several
> >> +vendors and can use UART, SPI or I2C interfaces.
> >> +
> >> +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
> >> +properties.
> >> +
> >> +Required properties:
> >> +
> >> +- compatible	: Must be one of
> >> +
> >> +			"globaltop,pa6h"
> >> +			"mediatek,mt3339"
> >
> > I'm not sure it makes sense to add the GPS chip itself as it cannot be
> > used stand-alone AFAIU, and either not way would require a lot more
> > resources to be defined than what you add to this binding.
> 
> OK, I find it a bit confusing to have Mediatek bindings but no
> compatible Mediatek SoCs.
> But it is true that it can't be used stand-alone. I will remove this
> reference and also remove it from the mtk.c driver code from this patch
> serie.

> >> +Required properties (I2C):
> >> +- reg		: I2C slave address
> >> +
> >> +Required properties (SPI):
> >> +- reg		: SPI chip select address
> >
> > While the mt3339 appears to support these interfaces, the globaltop one
> > does not.
> >
> > Have you looked around for a small sample of mt3339-based receivers, to
> > see whether anyone actually provides these?
> 
> Again I'm confused by the fact that it is the Mediatek bindings.
> Hence why I have added it and why it was not present in the v1 that was
> only for Globaltop.

This is no different from the sirfstar driver for receivers based on
those chipsets but manufactured by various other vendors.

> I find it odd mentionning the chipset but not all its interfaces.
> I will remove these sections and only list supported interfaces (i.e.
> UART). Other interfaces can be added afterward if one finds a board that
> provides them.

Right, but please do look around for other receivers using this chipset
so that we can make the binding generic enough to cover those as well
(e.g. by choosing representative resource names).

Johan
Loys Ollivier Feb. 11, 2019, 2:17 p.m. UTC | #11
On Mon 11 Feb 2019 at 08:33, Johan Hovold <johan@kernel.org> wrote:

> On Mon, Jan 28, 2019 at 04:46:53PM +0100, Loys Ollivier wrote:
>> 
>> On Fri 25 Jan 2019 at 09:07, Johan Hovold wrote:
>> 
>> > On Thu, Jan 17, 2019 at 05:54:32PM +0100, Loys Ollivier wrote:
>> >> Add binding for Mediatek-based GNSS receivers.
>> >> 
>> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
>> >> ---
>> >> 
>> >> v2:
>> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
>> >> Moved current-speed as an optional propertie.
>> >> Removed the status line in the example.
>> >> Added "mediatek,mt3339" compatible.
>
>> >> +++ b/Documentation/devicetree/bindings/gnss/mediatek.txt
>> >> @@ -0,0 +1,39 @@
>> >> +Mediatek-based GNSS Receiver DT binding
>> >> +
>> >> +Mediatek chipsets are used in GNSS-receiver modules produced by several
>> >> +vendors and can use UART, SPI or I2C interfaces.
>> >> +
>> >> +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
>> >> +properties.
>> >> +
>> >> +Required properties:
>> >> +
>> >> +- compatible	: Must be one of
>> >> +
>> >> +			"globaltop,pa6h"
>> >> +			"mediatek,mt3339"
>> >
>> > I'm not sure it makes sense to add the GPS chip itself as it cannot be
>> > used stand-alone AFAIU, and either not way would require a lot more
>> > resources to be defined than what you add to this binding.
>> 
>> OK, I find it a bit confusing to have Mediatek bindings but no
>> compatible Mediatek SoCs.
>> But it is true that it can't be used stand-alone. I will remove this
>> reference and also remove it from the mtk.c driver code from this patch
>> serie.
>
>> >> +Required properties (I2C):
>> >> +- reg		: I2C slave address
>> >> +
>> >> +Required properties (SPI):
>> >> +- reg		: SPI chip select address
>> >
>> > While the mt3339 appears to support these interfaces, the globaltop one
>> > does not.
>> >
>> > Have you looked around for a small sample of mt3339-based receivers, to
>> > see whether anyone actually provides these?
>> 
>> Again I'm confused by the fact that it is the Mediatek bindings.
>> Hence why I have added it and why it was not present in the v1 that was
>> only for Globaltop.
>
> This is no different from the sirfstar driver for receivers based on
> those chipsets but manufactured by various other vendors.
>
Indeed.

>> I find it odd mentionning the chipset but not all its interfaces.
>> I will remove these sections and only list supported interfaces (i.e.
>> UART). Other interfaces can be added afterward if one finds a board that
>> provides them.
>
> Right, but please do look around for other receivers using this chipset
> so that we can make the binding generic enough to cover those as well
> (e.g. by choosing representative resource names).
>
OK will have a look.

> Johan
Loys Ollivier Feb. 13, 2019, 3:22 p.m. UTC | #12
On Mon 11 Feb 2019 at 14:17, Loys Ollivier <lollivier@baylibre.com> wrote:

> On Mon 11 Feb 2019 at 08:33, Johan Hovold <johan@kernel.org> wrote:
>
>> On Mon, Jan 28, 2019 at 04:46:53PM +0100, Loys Ollivier wrote:
>>> 
>>> On Fri 25 Jan 2019 at 09:07, Johan Hovold wrote:
>>> 
>>> > On Thu, Jan 17, 2019 at 05:54:32PM +0100, Loys Ollivier wrote:
    >>> >> +Required properties (I2C):
>>> >> +- reg		: I2C slave address
>>> >> +
>>> >> +Required properties (SPI):
>>> >> +- reg		: SPI chip select address
>>> >
>>> > While the mt3339 appears to support these interfaces, the globaltop one
>>> > does not.
>>> >
>>> > Have you looked around for a small sample of mt3339-based receivers, to
>>> > see whether anyone actually provides these?
>>> 
>>> Again I'm confused by the fact that it is the Mediatek bindings.
>>> Hence why I have added it and why it was not present in the v1 that was
>>> only for Globaltop.
>>
>> This is no different from the sirfstar driver for receivers based on
>> those chipsets but manufactured by various other vendors.
>>
> Indeed.
>
>>> I find it odd mentionning the chipset but not all its interfaces.
>>> I will remove these sections and only list supported interfaces (i.e.
>>> UART). Other interfaces can be added afterward if one finds a board that
>>> provides them.
>>
>> Right, but please do look around for other receivers using this chipset
>> so that we can make the binding generic enough to cover those as well
>> (e.g. by choosing representative resource names).
>>
> OK will have a look.

The only mt3339-based receivers I have found are:
- [0] Globaltop
- [1] Locosys / Pololu
They both only provide the UART interface and do not list the I2C/SPI
interfaces.

[0] https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf
[1] https://www.pololu.com/file/0J641/LS20030~3_datasheet_v1.3.pdf

Loys
>
>> Johan
Loys Ollivier Feb. 13, 2019, 3:24 p.m. UTC | #13
On Mon 11 Feb 2019 at 14:17, Loys Ollivier <lollivier@baylibre.com> wrote:

> On Mon 11 Feb 2019 at 08:33, Johan Hovold <johan@kernel.org> wrote:
>
>> On Mon, Jan 28, 2019 at 04:46:53PM +0100, Loys Ollivier wrote:
>>>
>>> On Fri 25 Jan 2019 at 09:07, Johan Hovold wrote:
>>>
>>> > On Thu, Jan 17, 2019 at 05:54:32PM +0100, Loys Ollivier wrote:
>>> >> Add binding for Mediatek-based GNSS receivers.
>>> >>
>>> >> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
>>> >> ---
>>> >>
>>> >> v2:
>>> >> Renamed bindings from Globaltop/gtop to Mediatek/mtk.
>>> >> Moved current-speed as an optional propertie.
>>> >> Removed the status line in the example.
>>> >> Added "mediatek,mt3339" compatible.
>>
>>> >> +++ b/Documentation/devicetree/bindings/gnss/mediatek.txt
>>> >> @@ -0,0 +1,39 @@
>>> >> +Mediatek-based GNSS Receiver DT binding
>>> >> +
>>> >> +Mediatek chipsets are used in GNSS-receiver modules produced by several
>>> >> +vendors and can use UART, SPI or I2C interfaces.
>>> >> +
>>> >> +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
>>> >> +properties.
>>> >> +
>>> >> +Required properties:
>>> >> +
>>> >> +- compatible    : Must be one of
>>> >> +
>>> >> +                        "globaltop,pa6h"
>>> >> +                        "mediatek,mt3339"
>>> >
>>> > I'm not sure it makes sense to add the GPS chip itself as it cannot be
>>> > used stand-alone AFAIU, and either not way would require a lot more
>>> > resources to be defined than what you add to this binding.
>>>
>>> OK, I find it a bit confusing to have Mediatek bindings but no
>>> compatible Mediatek SoCs.
>>> But it is true that it can't be used stand-alone. I will remove this
>>> reference and also remove it from the mtk.c driver code from this patch
>>> serie.
>>
>>> >> +Required properties (I2C):
>>> >> +- reg           : I2C slave address
>>> >> +
>>> >> +Required properties (SPI):
>>> >> +- reg           : SPI chip select address
>>> >
>>> > While the mt3339 appears to support these interfaces, the globaltop one
>>> > does not.
>>> >
>>> > Have you looked around for a small sample of mt3339-based receivers, to
>>> > see whether anyone actually provides these?
>>>
>>> Again I'm confused by the fact that it is the Mediatek bindings.
>>> Hence why I have added it and why it was not present in the v1 that was
>>> only for Globaltop.
>>
>> This is no different from the sirfstar driver for receivers based on
>> those chipsets but manufactured by various other vendors.
>>
> Indeed.
>
>>> I find it odd mentionning the chipset but not all its interfaces.
>>> I will remove these sections and only list supported interfaces (i.e.
>>> UART). Other interfaces can be added afterward if one finds a board that
>>> provides them.
>>
>> Right, but please do look around for other receivers using this chipset
>> so that we can make the binding generic enough to cover those as well
>> (e.g. by choosing representative resource names).
>>
> OK will have a look.

The only mt3339-based receivers I have found are:
- [0] Globaltop
- [1] Locosys / Pololu
They both only provide the UART interface and do not list the I2C/SPI
interfaces.

[0] https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf
[1] https://www.pololu.com/file/0J641/LS20030~3_datasheet_v1.3.pdf

>
>> Johan



--
-L
Johan Hovold Feb. 14, 2019, 9:11 a.m. UTC | #14
On Wed, Feb 13, 2019 at 04:24:00PM +0100, Loys Ollivier wrote:
> On Mon 11 Feb 2019 at 14:17, Loys Ollivier <lollivier@baylibre.com> wrote:
> > On Mon 11 Feb 2019 at 08:33, Johan Hovold <johan@kernel.org> wrote:

> >> Right, but please do look around for other receivers using this chipset
> >> so that we can make the binding generic enough to cover those as well
> >> (e.g. by choosing representative resource names).
> >>
> > OK will have a look.
> 
> The only mt3339-based receivers I have found are:
> - [0] Globaltop
> - [1] Locosys / Pololu
> They both only provide the UART interface and do not list the I2C/SPI
> interfaces.
> 
> [0] https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf
> [1] https://www.pololu.com/file/0J641/LS20030~3_datasheet_v1.3.pdf

I found tree more:

 - Globaltop PA6C

   - https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6C-Datasheet-V0A-Preliminary.pdf

 - Linx RM series
   - https://linxtechnologies.com/wp/wp-content/uploads/rxm-gps-rm.pdf

 - ublox IT530
   - https://www.u-blox.com/sites/default/files/products/documents/IT530_DataSheet_%28FTX-HW-12008%29.pdf

All with uart-interface only and similar pins names, although the ublox
device do have some additional features we can worry about later.

As all but the ublox device use VBACKUP for the backup supply, do you
mind if I change the binding to use "vbackup-supply" instead of
"v-bckp-supply" (which is a ublox-ism) when applying?

Thanks,
Johan
Loys Ollivier Feb. 15, 2019, 12:10 p.m. UTC | #15
On Thu 14 Feb 2019 at 09:11, Johan Hovold <johan@kernel.org> wrote:

> On Wed, Feb 13, 2019 at 04:24:00PM +0100, Loys Ollivier wrote:
>> On Mon 11 Feb 2019 at 14:17, Loys Ollivier <lollivier@baylibre.com> wrote:
>> > On Mon 11 Feb 2019 at 08:33, Johan Hovold <johan@kernel.org> wrote:
>
>> >> Right, but please do look around for other receivers using this chipset
>> >> so that we can make the binding generic enough to cover those as well
>> >> (e.g. by choosing representative resource names).
>> >>
>> > OK will have a look.
>> 
>> The only mt3339-based receivers I have found are:
>> - [0] Globaltop
>> - [1] Locosys / Pololu
>> They both only provide the UART interface and do not list the I2C/SPI
>> interfaces.
>> 
>> [0] https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf
>> [1] https://www.pololu.com/file/0J641/LS20030~3_datasheet_v1.3.pdf
>
> I found tree more:
>
Ah nice.

>  - Globaltop PA6C
>
>    - https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6C-Datasheet-V0A-Preliminary.pdf
>
>  - Linx RM series
>    - https://linxtechnologies.com/wp/wp-content/uploads/rxm-gps-rm.pdf

This is a different chip: MT3337; Apparently this chip only provides an
UART interface: https://labs.mediatek.com/en/chipset/MT3337
However it looks interesting. I'll look for a sample to test it in the
future :)
>
>  - ublox IT530
>    - https://www.u-blox.com/sites/default/files/products/documents/IT530_DataSheet_%28FTX-HW-12008%29.pdf
>
> All with uart-interface only and similar pins names, although the ublox
> device do have some additional features we can worry about later.
>
> As all but the ublox device use VBACKUP for the backup supply, do you
> mind if I change the binding to use "vbackup-supply" instead of
> "v-bckp-supply" (which is a ublox-ism) when applying?

I don't mind. You can go ahead and change the binding.
For reference, the v4 patch serie:
https://lkml.kernel.org/r/1550070569-18588-1-git-send-email-lollivier@baylibre.com

Thanks,
Loys

>
> Thanks,
> Johan
Johan Hovold Feb. 15, 2019, 4 p.m. UTC | #16
On Fri, Feb 15, 2019 at 01:10:35PM +0100, Loys Ollivier wrote:
> 
> On Thu 14 Feb 2019 at 09:11, Johan Hovold <johan@kernel.org> wrote:
> 
> > On Wed, Feb 13, 2019 at 04:24:00PM +0100, Loys Ollivier wrote:
> >> On Mon 11 Feb 2019 at 14:17, Loys Ollivier <lollivier@baylibre.com> wrote:
> >> > On Mon 11 Feb 2019 at 08:33, Johan Hovold <johan@kernel.org> wrote:
> >
> >> >> Right, but please do look around for other receivers using this chipset
> >> >> so that we can make the binding generic enough to cover those as well
> >> >> (e.g. by choosing representative resource names).
> >> >>
> >> > OK will have a look.
> >> 
> >> The only mt3339-based receivers I have found are:
> >> - [0] Globaltop
> >> - [1] Locosys / Pololu
> >> They both only provide the UART interface and do not list the I2C/SPI
> >> interfaces.
> >> 
> >> [0] https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf
> >> [1] https://www.pololu.com/file/0J641/LS20030~3_datasheet_v1.3.pdf
> >
> > I found tree more:
> >
> Ah nice.
> 
> >  - Globaltop PA6C
> >
> >    - https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6C-Datasheet-V0A-Preliminary.pdf
> >
> >  - Linx RM series
> >    - https://linxtechnologies.com/wp/wp-content/uploads/rxm-gps-rm.pdf
> 
> This is a different chip: MT3337; Apparently this chip only provides an
> UART interface: https://labs.mediatek.com/en/chipset/MT3337
> However it looks interesting. I'll look for a sample to test it in the
> future :)

Bah, sorry, I used the wrong link. Here's the mt3339-based one:

	https://linxtechnologies.com/wp/wp-content/uploads/rxm-gps-fm.pdf

But hopefully we can reuse this driver for mt3337 and any other
variants too.

> >  - ublox IT530
> >    - https://www.u-blox.com/sites/default/files/products/documents/IT530_DataSheet_%28FTX-HW-12008%29.pdf
> >
> > All with uart-interface only and similar pins names, although the ublox
> > device do have some additional features we can worry about later.
> >
> > As all but the ublox device use VBACKUP for the backup supply, do you
> > mind if I change the binding to use "vbackup-supply" instead of
> > "v-bckp-supply" (which is a ublox-ism) when applying?
> 
> I don't mind. You can go ahead and change the binding.
> For reference, the v4 patch serie:
> https://lkml.kernel.org/r/1550070569-18588-1-git-send-email-lollivier@baylibre.com

Thanks, now updated and applied.

Johan
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gnss/mediatek.txt b/Documentation/devicetree/bindings/gnss/mediatek.txt
new file mode 100644
index 000000000000..fd984b4a9a6d
--- /dev/null
+++ b/Documentation/devicetree/bindings/gnss/mediatek.txt
@@ -0,0 +1,39 @@ 
+Mediatek-based GNSS Receiver DT binding
+
+Mediatek chipsets are used in GNSS-receiver modules produced by several
+vendors and can use UART, SPI or I2C interfaces.
+
+Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic
+properties.
+
+Required properties:
+
+- compatible	: Must be one of
+
+			"globaltop,pa6h"
+			"mediatek,mt3339"
+
+- vcc-supply	: Main voltage regulator (pin name: 3V3_IN, VCC, VDD)
+
+Required properties (I2C):
+- reg		: I2C slave address
+
+Required properties (SPI):
+- reg		: SPI chip select address
+
+Optional properties:
+
+- timepulse-gpios	: Time pulse GPIO
+- v-bckp-supply		: Backup voltage regulator
+- current-speed		: Default UART baud rate
+
+Example:
+
+serial@1234 {
+	compatible = "ns16550a";
+
+	gnss {
+		compatible = "globaltop,pa6h";
+		vcc-supply = <&vcc_3v3>;
+	};
+};