mbox series

[0/8] Initial LG G Watch R support

Message ID 20210911232707.259615-1-luca@z3ntu.xyz
Headers show
Series Initial LG G Watch R support | expand

Message

Luca Weiss Sept. 11, 2021, 11:26 p.m. UTC
Add support for more msm8226 hardware and the LG G Watch R smartwatch which
is based on apq8026.

Luca Weiss (8):
  pinctrl: qcom: msm8226: fill in more functions
  dt-bindings: mmc: sdhci-msm: Add compatible string for msm8226
  dt-bindings: firmware: scm: Add compatible for msm8226
  ARM: dts: qcom: msm8226: Add more SoC bits
  ARM: dts: qcom: Add pm8226 PMIC
  dt-bindings: vendor-prefixes: add LG Electronics
  dt-bindings: arm: qcom: Document APQ8026 SoC binding
  ARM: dts: qcom: Add support for LG G Watch R

 .../devicetree/bindings/arm/qcom.yaml         |   6 +
 .../devicetree/bindings/firmware/qcom,scm.txt |   1 +
 .../devicetree/bindings/mmc/sdhci-msm.txt     |   1 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/qcom-apq8026-lge-lenok.dts  | 237 ++++++++++++++++
 arch/arm/boot/dts/qcom-msm8226.dtsi           | 263 +++++++++++++++++-
 arch/arm/boot/dts/qcom-pm8226.dtsi            |  27 ++
 drivers/pinctrl/qcom/pinctrl-msm8226.c        |  74 +++--
 9 files changed, 582 insertions(+), 30 deletions(-)
 create mode 100644 arch/arm/boot/dts/qcom-apq8026-lge-lenok.dts
 create mode 100644 arch/arm/boot/dts/qcom-pm8226.dtsi

Comments

Krzysztof Kozlowski Sept. 13, 2021, 8:49 a.m. UTC | #1
On 12/09/2021 01:27, Luca Weiss wrote:
> LG Electronics is a part of the LG Corporation and produces, amongst

> other things, consumer electronics such as phones and smartwatches.


Hi,

Thanks for the patches.

I think "lge" it's the same prefix as "lg". There is no sense in having
multiple vendor prefixes just because company splits inside business
units or subsidiaries. The same as with other conglomerates, e.g.
Samsung - if we wanted to be specific, there will be 4-5 Samsung
vendors... Not mentioning that company organisation is not always
disclosed and can change.

We already have lg for several components, also made by LG Electronics.
What about these?

There is only one device with "lge", added back in 2016 without adding
vendor prefix. I would propose to fix that one, instead of keeping
duplicated "lg".

Best regards,
Krzysztof
Luca Weiss Sept. 13, 2021, 7:14 p.m. UTC | #2
Hi Krzysztof,

On Montag, 13. September 2021 10:49:43 CEST Krzysztof Kozlowski wrote:
> On 12/09/2021 01:27, Luca Weiss wrote:

> > LG Electronics is a part of the LG Corporation and produces, amongst

> > other things, consumer electronics such as phones and smartwatches.

> 

> Hi,

> 

> Thanks for the patches.

> 

> I think "lge" it's the same prefix as "lg". There is no sense in having

> multiple vendor prefixes just because company splits inside business

> units or subsidiaries. The same as with other conglomerates, e.g.

> Samsung - if we wanted to be specific, there will be 4-5 Samsung

> vendors... Not mentioning that company organisation is not always

> disclosed and can change.

> 


I was mostly following qcom-msm8974-lge-nexus5-hammerhead as it's the other LG 
device tree I am aware of so I've picked lge instead of lg. Also worth noting 
that Google uses "LGE" in the Android device tree[1] or in the model name in 
the LG G Watch R kernel sources ("LGE APQ 8026v2 LENOK rev-1.0").

I don't have a strong opinion either way so I'm fine with either.

If we decide to go with "lg" do we want to change the Nexus 5 devicetree 
(hammerhead) also, that one has the lge name in at least compatible and 
filename (I don't know how much of a breaking change that would be considered 
as).

> We already have lg for several components, also made by LG Electronics.

> What about these?

> 

> There is only one device with "lge", added back in 2016 without adding

> vendor prefix. I would propose to fix that one, instead of keeping

> duplicated "lg".

> 

> Best regards,

> Krzysztof


Regards
Luca

[1] https://android.googlesource.com/device/lge/hammerhead/
Krzysztof Kozlowski Sept. 14, 2021, 7:24 a.m. UTC | #3
On 13/09/2021 21:14, Luca Weiss wrote:
> Hi Krzysztof,

> 

> On Montag, 13. September 2021 10:49:43 CEST Krzysztof Kozlowski wrote:

>> On 12/09/2021 01:27, Luca Weiss wrote:

>>> LG Electronics is a part of the LG Corporation and produces, amongst

>>> other things, consumer electronics such as phones and smartwatches.

>>

>> Hi,

>>

>> Thanks for the patches.

>>

>> I think "lge" it's the same prefix as "lg". There is no sense in having

>> multiple vendor prefixes just because company splits inside business

>> units or subsidiaries. The same as with other conglomerates, e.g.

>> Samsung - if we wanted to be specific, there will be 4-5 Samsung

>> vendors... Not mentioning that company organisation is not always

>> disclosed and can change.

>>

> 

> I was mostly following qcom-msm8974-lge-nexus5-hammerhead as it's the other LG 

> device tree I am aware of so I've picked lge instead of lg. Also worth noting 

> that Google uses "LGE" in the Android device tree[1] or in the model name in 

> the LG G Watch R kernel sources ("LGE APQ 8026v2 LENOK rev-1.0")


[1] Does not point to kernel tree. Downstream user could be a good
argument to switch to lge, but then I would expect correcting other "lg"
devices which are in fact made by LGE.

> 

> I don't have a strong opinion either way so I'm fine with either.

> 

> If we decide to go with "lg" do we want to change the Nexus 5 devicetree 

> (hammerhead) also, that one has the lge name in at least compatible and 

> filename (I don't know how much of a breaking change that would be considered 

> as).


We would have to add a new one and mark the old compatible as deprecated.

> 

>> We already have lg for several components, also made by LG Electronics.

>> What about these?

>>

>> There is only one device with "lge", added back in 2016 without adding

>> vendor prefix. I would propose to fix that one, instead of keeping

>> duplicated "lg".

>>

>> Best regards,

>> Krzysztof

> 

> Regards

> Luca

> 

> [1] https://android.googlesource.com/device/lge/hammerhead/

> 

> 

> 



Best regards,
Krzysztof
Ulf Hansson Sept. 14, 2021, 11:24 a.m. UTC | #4
On Sun, 12 Sept 2021 at 01:28, Luca Weiss <luca@z3ntu.xyz> wrote:
>
> Add msm8226 SoC specific compatible strings for qcom-sdhci controller.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
> index 365c3fc122ea..50841e2843fc 100644
> --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
> +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt
> @@ -13,6 +13,7 @@ Required properties:
>                 string is added to support this change - "qcom,sdhci-msm-v5".
>         full compatible strings with SoC and version:
>                 "qcom,apq8084-sdhci", "qcom,sdhci-msm-v4"
> +               "qcom,msm8226-sdhci", "qcom,sdhci-msm-v4"
>                 "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"
>                 "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"
>                 "qcom,msm8992-sdhci", "qcom,sdhci-msm-v4"
> --
> 2.33.0
>
Rob Herring Sept. 20, 2021, 9:53 p.m. UTC | #5
On Sun, Sep 12, 2021 at 01:27:01AM +0200, Luca Weiss wrote:
> Document the APQ8026 (based on MSM8226) SoC device-tree binding and the

> LG G Watch R.


Looks like this was applied, but lg vs. lge needs to be sorted first. 
IMO, we should fix the one instance of 'lge'.

> 

> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>

> ---

>  Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++

>  1 file changed, 6 insertions(+)

> 

> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml

> index 880ddafc634e..da44688133af 100644

> --- a/Documentation/devicetree/bindings/arm/qcom.yaml

> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml

> @@ -25,6 +25,7 @@ description: |

>    The 'SoC' element must be one of the following strings:

>  

>          apq8016

> +        apq8026

>          apq8074

>          apq8084

>          apq8096

> @@ -92,6 +93,11 @@ properties:

>                - qcom,apq8016-sbc

>            - const: qcom,apq8016

>  

> +      - items:

> +          - enum:

> +              - lge,lenok

> +          - const: qcom,apq8026

> +

>        - items:

>            - enum:

>                - qcom,apq8064-cm-qs600

> -- 

> 2.33.0

> 

>
Petr Vorel Jan. 27, 2022, 12:20 a.m. UTC | #6
Hi all,

> > Hi Krzysztof,

> > On Montag, 13. September 2021 10:49:43 CEST Krzysztof Kozlowski wrote:
> >> On 12/09/2021 01:27, Luca Weiss wrote:
> >>> LG Electronics is a part of the LG Corporation and produces, amongst
> >>> other things, consumer electronics such as phones and smartwatches.

> >> Hi,

> >> Thanks for the patches.

> >> I think "lge" it's the same prefix as "lg". There is no sense in having
> >> multiple vendor prefixes just because company splits inside business
> >> units or subsidiaries. The same as with other conglomerates, e.g.
> >> Samsung - if we wanted to be specific, there will be 4-5 Samsung
> >> vendors... Not mentioning that company organisation is not always
> >> disclosed and can change.


> > I was mostly following qcom-msm8974-lge-nexus5-hammerhead as it's the other LG
> > device tree I am aware of so I've picked lge instead of lg. Also worth noting
> > that Google uses "LGE" in the Android device tree[1] or in the model name in
> > the LG G Watch R kernel sources ("LGE APQ 8026v2 LENOK rev-1.0")

> [1] Does not point to kernel tree. Downstream user could be a good
> argument to switch to lge, but then I would expect correcting other "lg"
> devices which are in fact made by LGE.


> > I don't have a strong opinion either way so I'm fine with either.

> > If we decide to go with "lg" do we want to change the Nexus 5 devicetree
> > (hammerhead) also, that one has the lge name in at least compatible and
> > filename (I don't know how much of a breaking change that would be considered
> > as).

> We would have to add a new one and mark the old compatible as deprecated.

Have we sorted this lg- vs. lge- ?

There are both:
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
vs
arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts

+ patch flying for msm8992-lg-bullhead-rev-101.dtb
original:
https://lore.kernel.org/linux-arm-msm/20211201231832.188634-1-virgule@jeanthomas.me/
rebased by me:
https://lore.kernel.org/linux-arm-msm/20220113233358.17972-2-petr.vorel@gmail.com/

Kind regards,
Petr

> >> We already have lg for several components, also made by LG Electronics.
> >> What about these?

> >> There is only one device with "lge", added back in 2016 without adding
> >> vendor prefix. I would propose to fix that one, instead of keeping
> >> duplicated "lg".

> >> Best regards,
> >> Krzysztof

> > Regards
> > Luca

> > [1] https://android.googlesource.com/device/lge/hammerhead/





> Best regards,
> Krzysztof
Luca Weiss Jan. 27, 2022, 8:51 p.m. UTC | #7
Hi all,

On Donnerstag, 27. Jänner 2022 08:45:33 CET Krzysztof Kozlowski wrote:
> On 27/01/2022 01:20, Petr Vorel wrote:
> > Hi all,
> > 
> >>> Hi Krzysztof,
> >>> 
> >>> On Montag, 13. September 2021 10:49:43 CEST Krzysztof Kozlowski wrote:
> >>>> On 12/09/2021 01:27, Luca Weiss wrote:
> >>>>> LG Electronics is a part of the LG Corporation and produces, amongst
> >>>>> other things, consumer electronics such as phones and smartwatches.
> >>>> 
> >>>> Hi,
> >>>> 
> >>>> Thanks for the patches.
> >>>> 
> >>>> I think "lge" it's the same prefix as "lg". There is no sense in having
> >>>> multiple vendor prefixes just because company splits inside business
> >>>> units or subsidiaries. The same as with other conglomerates, e.g.
> >>>> Samsung - if we wanted to be specific, there will be 4-5 Samsung
> >>>> vendors... Not mentioning that company organisation is not always
> >>>> disclosed and can change.
> >>> 
> >>> I was mostly following qcom-msm8974-lge-nexus5-hammerhead as it's the
> >>> other LG device tree I am aware of so I've picked lge instead of lg.
> >>> Also worth noting that Google uses "LGE" in the Android device tree[1]
> >>> or in the model name in the LG G Watch R kernel sources ("LGE APQ
> >>> 8026v2 LENOK rev-1.0")
> >> 
> >> [1] Does not point to kernel tree. Downstream user could be a good
> >> argument to switch to lge, but then I would expect correcting other "lg"
> >> devices which are in fact made by LGE.
> >> 
> >>> I don't have a strong opinion either way so I'm fine with either.
> >>> 
> >>> If we decide to go with "lg" do we want to change the Nexus 5 devicetree
> >>> (hammerhead) also, that one has the lge name in at least compatible and
> >>> filename (I don't know how much of a breaking change that would be
> >>> considered as).
> >> 
> >> We would have to add a new one and mark the old compatible as deprecated.
> > 
> > Have we sorted this lg- vs. lge- ?
> > 
> > There are both:
> > arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
> > vs
> > arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts
> 
> Probably renaming/unifying/correcting prefix in existing compatibles is
> not worth the effort. This would make a mess and affect other DTS users.

If wanted I can send a patch renaming the Nexus 5 to just LG, this would 
adjust both compatible in the file (which shouldn't really affect anything) and 
the filename (which probably will affect various scripts and whatnot used by 
existing users of the dtb). 
Is this something that can be done in mainline or should we rather just let it 
be? I'm not sure what the policies there are.

Regards
Luca

> Most of existing usages of "lg" prefix are panels which are coming from
> another subsidiary of LG - LG Display. We all use there "lg" prefix, not
> "lgd".
> Plus mention before Bullhead mobile phone which is coming from LG
> Electronics.
> 
> If we use generalized "lg" prefix for one subsidiary (LG Display), then
> let's do the same for another subsidiary - LG Electronics. Plus entire
> branding of LG Electronics products is LG: the website, the logo,
> advertisements. Everywhere except legal footer.
> 
> I vote for using "lg" for both subsidiaries: LG Display and LG Electronics.
> 
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski Jan. 28, 2022, 9:57 a.m. UTC | #8
On 27/01/2022 21:51, Luca Weiss wrote:
> Hi all,
> 
> On Donnerstag, 27. Jänner 2022 08:45:33 CET Krzysztof Kozlowski wrote:
>> On 27/01/2022 01:20, Petr Vorel wrote:
>>> Hi all,
>>>
>>>>> Hi Krzysztof,
>>>>>
>>>>> On Montag, 13. September 2021 10:49:43 CEST Krzysztof Kozlowski wrote:
>>>>>> On 12/09/2021 01:27, Luca Weiss wrote:
>>>>>>> LG Electronics is a part of the LG Corporation and produces, amongst
>>>>>>> other things, consumer electronics such as phones and smartwatches.
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Thanks for the patches.
>>>>>>
>>>>>> I think "lge" it's the same prefix as "lg". There is no sense in having
>>>>>> multiple vendor prefixes just because company splits inside business
>>>>>> units or subsidiaries. The same as with other conglomerates, e.g.
>>>>>> Samsung - if we wanted to be specific, there will be 4-5 Samsung
>>>>>> vendors... Not mentioning that company organisation is not always
>>>>>> disclosed and can change.
>>>>>
>>>>> I was mostly following qcom-msm8974-lge-nexus5-hammerhead as it's the
>>>>> other LG device tree I am aware of so I've picked lge instead of lg.
>>>>> Also worth noting that Google uses "LGE" in the Android device tree[1]
>>>>> or in the model name in the LG G Watch R kernel sources ("LGE APQ
>>>>> 8026v2 LENOK rev-1.0")
>>>>
>>>> [1] Does not point to kernel tree. Downstream user could be a good
>>>> argument to switch to lge, but then I would expect correcting other "lg"
>>>> devices which are in fact made by LGE.
>>>>
>>>>> I don't have a strong opinion either way so I'm fine with either.
>>>>>
>>>>> If we decide to go with "lg" do we want to change the Nexus 5 devicetree
>>>>> (hammerhead) also, that one has the lge name in at least compatible and
>>>>> filename (I don't know how much of a breaking change that would be
>>>>> considered as).
>>>>
>>>> We would have to add a new one and mark the old compatible as deprecated.
>>>
>>> Have we sorted this lg- vs. lge- ?
>>>
>>> There are both:
>>> arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
>>> vs
>>> arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts
>>
>> Probably renaming/unifying/correcting prefix in existing compatibles is
>> not worth the effort. This would make a mess and affect other DTS users.
> 
> If wanted I can send a patch renaming the Nexus 5 to just LG, this would 
> adjust both compatible in the file (which shouldn't really affect anything) and 
> the filename (which probably will affect various scripts and whatnot used by 
> existing users of the dtb). 
> Is this something that can be done in mainline or should we rather just let it 
> be? I'm not sure what the policies there are.

The "lge" compatible is already in the bindings, so it should not be
changed without valid reason. Imagine there is an user-space code
parsing compatibles to adjust some power-management settings to
different models. It would be broken now.

What could be done is to mark it as deprecated and a add new one:
compatible = "lg,hammerhead", "lge,hammerhead", "qcom,msm8974";
This should be safe for user-space and allow transition to common "lg".


Best regards,
Krzysztof
Krzysztof Kozlowski Jan. 29, 2022, 10:34 a.m. UTC | #9
On 29/01/2022 10:45, Luca Weiss wrote:
> Hi Krzysztof,
> 
>>>>>
>>>>> Have we sorted this lg- vs. lge- ?
>>>>>
>>>>> There are both:
>>>>> arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
>>>>> vs
>>>>> arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts
>>>>
>>>> Probably renaming/unifying/correcting prefix in existing compatibles is
>>>> not worth the effort. This would make a mess and affect other DTS users.
>>>
>>> If wanted I can send a patch renaming the Nexus 5 to just LG, this would
>>> adjust both compatible in the file (which shouldn't really affect
>>> anything) and the filename (which probably will affect various scripts
>>> and whatnot used by existing users of the dtb).
>>> Is this something that can be done in mainline or should we rather just
>>> let it be? I'm not sure what the policies there are.
>>
>> The "lge" compatible is already in the bindings, so it should not be
>> changed without valid reason. Imagine there is an user-space code
>> parsing compatibles to adjust some power-management settings to
>> different models. It would be broken now.
>>
>> What could be done is to mark it as deprecated and a add new one:
>> compatible = "lg,hammerhead", "lge,hammerhead", "qcom,msm8974";
>> This should be safe for user-space and allow transition to common "lg".
> 
> What can or should be done about the filename then?

I don't have an opinion on the filename. It does not matter to me. :)
You can change it to "lg" or keep "lge". I don't see much benefits of
changing it but I don't mind keeping it consistent.

Best regards,
Krzysztof