mbox series

[0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

Message ID 20231220-fp5-pmic-glink-v1-0-2a1f8e3c661c@fairphone.com
Headers show
Series Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge) | expand

Message

Luca Weiss Dec. 20, 2023, 10:02 a.m. UTC
This series adds all the necessary bits to enable USB-C role switching,
charger and fuel gauge (all via pmic-glink) on Fairphone 5.

One thing that could be made different is the pmic-glink compatible.
I've chosen to use qcm6490 compatible for it and not sc7280 since
there's plenty of firmware variety on sc7280-based platforms and they
might require different quirks in the future, so limit this PDOS quirk
to just qcm6490 for now.

If someone thinks it should be qcom,sc7280-pmic-glink, please let me
know :)

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (3):
      dt-bindings: soc: qcom: qcom,pmic-glink: document QCM6490 compatible
      usb: typec: ucsi: Add qcm6490-pmic-glink as needing PDOS quirk
      arm64: dts: qcom: qcm6490-fairphone-fp5: Add PMIC GLINK

 .../bindings/soc/qcom/qcom,pmic-glink.yaml         |  1 +
 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 46 +++++++++++++++++++++-
 arch/arm64/boot/dts/qcom/sc7280.dtsi               | 19 +++++++++
 drivers/usb/typec/ucsi/ucsi_glink.c                |  1 +
 4 files changed, 66 insertions(+), 1 deletion(-)
---
base-commit: 76fbb7732259f4c970998d6978d72177658a783a
change-id: 20231220-fp5-pmic-glink-b01d4fa1c7ea

Best regards,

Comments

Greg KH Jan. 2, 2024, 1:36 p.m. UTC | #1
On Thu, Dec 21, 2023 at 02:45:26PM +0100, Luca Weiss wrote:
> On Thu Dec 21, 2023 at 1:53 PM CET, Konrad Dybcio wrote:
> > On 21.12.2023 11:34, Dmitry Baryshkov wrote:
> > > On Thu, 21 Dec 2023 at 09:33, Luca Weiss <luca.weiss@fairphone.com> wrote:
> > >>
> > >> On Wed Dec 20, 2023 at 1:32 PM CET, Konrad Dybcio wrote:
> > >>> On 20.12.2023 11:02, Luca Weiss wrote:
> > >>>> This series adds all the necessary bits to enable USB-C role switching,
> > >>>> charger and fuel gauge (all via pmic-glink) on Fairphone 5.
> > >>>>
> > >>>> One thing that could be made different is the pmic-glink compatible.
> > >>>> I've chosen to use qcm6490 compatible for it and not sc7280 since
> > >>>> there's plenty of firmware variety on sc7280-based platforms and they
> > >>>> might require different quirks in the future, so limit this PDOS quirk
> > >>>> to just qcm6490 for now.
> > >>>>
> > >>>> If someone thinks it should be qcom,sc7280-pmic-glink, please let me
> > >>>> know :)
> > >>> IMO it's best to continue using the "base soc" (which just so happened
> > >>> to fall onto sc7280 this time around) for all compatibles, unless the
> > >>> derivatives actually had changes
> > >>
> > >> Hi Konrad,
> > >>
> > >> I think at some point I asked Dmitry what he thought and he mentioned
> > >> qcm6490. Even found the message again:
> > >>
> > >>> well, since it is a firmware thing, you might want to emphasise that.
> > >>> So from my POV qcm6490 makes more sense
> > >>
> > >> But yeah since it's likely that sc7280 firmware behaves the same as
> > >> qcm6490 firmware it's probably okay to use sc7280 compatible, worst case
> > >> we change it later :) I'll send a v2 with those changes.
> > > 
> > > Worst case we end up with sc7280 which has yet another slightly
> > > different UCSI / PMIC GLINK implementation, but the compatible string
> > > is already taken.
> > > I still suppose that this should be a qcm6490-related string.
> > Right, let's keep qcm then
> 
> Ack from my side also. Thanks for the feedback!

This doesn't apply to my tree, where should it be going through?

thanks,
greg k-h
Luca Weiss Jan. 2, 2024, 1:43 p.m. UTC | #2
On Tue Jan 2, 2024 at 2:36 PM CET, Greg Kroah-Hartman wrote:
> On Thu, Dec 21, 2023 at 02:45:26PM +0100, Luca Weiss wrote:
> > On Thu Dec 21, 2023 at 1:53 PM CET, Konrad Dybcio wrote:
> > > On 21.12.2023 11:34, Dmitry Baryshkov wrote:
> > > > On Thu, 21 Dec 2023 at 09:33, Luca Weiss <luca.weiss@fairphone.com> wrote:
> > > >>
> > > >> On Wed Dec 20, 2023 at 1:32 PM CET, Konrad Dybcio wrote:
> > > >>> On 20.12.2023 11:02, Luca Weiss wrote:
> > > >>>> This series adds all the necessary bits to enable USB-C role switching,
> > > >>>> charger and fuel gauge (all via pmic-glink) on Fairphone 5.
> > > >>>>
> > > >>>> One thing that could be made different is the pmic-glink compatible.
> > > >>>> I've chosen to use qcm6490 compatible for it and not sc7280 since
> > > >>>> there's plenty of firmware variety on sc7280-based platforms and they
> > > >>>> might require different quirks in the future, so limit this PDOS quirk
> > > >>>> to just qcm6490 for now.
> > > >>>>
> > > >>>> If someone thinks it should be qcom,sc7280-pmic-glink, please let me
> > > >>>> know :)
> > > >>> IMO it's best to continue using the "base soc" (which just so happened
> > > >>> to fall onto sc7280 this time around) for all compatibles, unless the
> > > >>> derivatives actually had changes
> > > >>
> > > >> Hi Konrad,
> > > >>
> > > >> I think at some point I asked Dmitry what he thought and he mentioned
> > > >> qcm6490. Even found the message again:
> > > >>
> > > >>> well, since it is a firmware thing, you might want to emphasise that.
> > > >>> So from my POV qcm6490 makes more sense
> > > >>
> > > >> But yeah since it's likely that sc7280 firmware behaves the same as
> > > >> qcm6490 firmware it's probably okay to use sc7280 compatible, worst case
> > > >> we change it later :) I'll send a v2 with those changes.
> > > > 
> > > > Worst case we end up with sc7280 which has yet another slightly
> > > > different UCSI / PMIC GLINK implementation, but the compatible string
> > > > is already taken.
> > > > I still suppose that this should be a qcm6490-related string.
> > > Right, let's keep qcm then
> > 
> > Ack from my side also. Thanks for the feedback!
>
> This doesn't apply to my tree, where should it be going through?

As far as I can see the dependency for the driver commit 1d103d6af241
("usb: typec: ucsi: fix UCSI on buggy Qualcomm devices") was applied to
Bjorn's qcom tree, so 2/3 should also go there then.

Patch 3/3 (arm64 dts) definitely also Bjorn's qcom tree.

So that leaves patch 1/3 which Bjorn can probably pick up as well but
looking at git log you also picked up some for that file in the past,
dunno.

Regards
Luca

>
> thanks,
> greg k-h
Greg KH Jan. 2, 2024, 1:53 p.m. UTC | #3
On Tue, Jan 02, 2024 at 02:43:24PM +0100, Luca Weiss wrote:
> On Tue Jan 2, 2024 at 2:36 PM CET, Greg Kroah-Hartman wrote:
> > On Thu, Dec 21, 2023 at 02:45:26PM +0100, Luca Weiss wrote:
> > > On Thu Dec 21, 2023 at 1:53 PM CET, Konrad Dybcio wrote:
> > > > On 21.12.2023 11:34, Dmitry Baryshkov wrote:
> > > > > On Thu, 21 Dec 2023 at 09:33, Luca Weiss <luca.weiss@fairphone.com> wrote:
> > > > >>
> > > > >> On Wed Dec 20, 2023 at 1:32 PM CET, Konrad Dybcio wrote:
> > > > >>> On 20.12.2023 11:02, Luca Weiss wrote:
> > > > >>>> This series adds all the necessary bits to enable USB-C role switching,
> > > > >>>> charger and fuel gauge (all via pmic-glink) on Fairphone 5.
> > > > >>>>
> > > > >>>> One thing that could be made different is the pmic-glink compatible.
> > > > >>>> I've chosen to use qcm6490 compatible for it and not sc7280 since
> > > > >>>> there's plenty of firmware variety on sc7280-based platforms and they
> > > > >>>> might require different quirks in the future, so limit this PDOS quirk
> > > > >>>> to just qcm6490 for now.
> > > > >>>>
> > > > >>>> If someone thinks it should be qcom,sc7280-pmic-glink, please let me
> > > > >>>> know :)
> > > > >>> IMO it's best to continue using the "base soc" (which just so happened
> > > > >>> to fall onto sc7280 this time around) for all compatibles, unless the
> > > > >>> derivatives actually had changes
> > > > >>
> > > > >> Hi Konrad,
> > > > >>
> > > > >> I think at some point I asked Dmitry what he thought and he mentioned
> > > > >> qcm6490. Even found the message again:
> > > > >>
> > > > >>> well, since it is a firmware thing, you might want to emphasise that.
> > > > >>> So from my POV qcm6490 makes more sense
> > > > >>
> > > > >> But yeah since it's likely that sc7280 firmware behaves the same as
> > > > >> qcm6490 firmware it's probably okay to use sc7280 compatible, worst case
> > > > >> we change it later :) I'll send a v2 with those changes.
> > > > > 
> > > > > Worst case we end up with sc7280 which has yet another slightly
> > > > > different UCSI / PMIC GLINK implementation, but the compatible string
> > > > > is already taken.
> > > > > I still suppose that this should be a qcm6490-related string.
> > > > Right, let's keep qcm then
> > > 
> > > Ack from my side also. Thanks for the feedback!
> >
> > This doesn't apply to my tree, where should it be going through?
> 
> As far as I can see the dependency for the driver commit 1d103d6af241
> ("usb: typec: ucsi: fix UCSI on buggy Qualcomm devices") was applied to
> Bjorn's qcom tree, so 2/3 should also go there then.
> 
> Patch 3/3 (arm64 dts) definitely also Bjorn's qcom tree.
> 
> So that leaves patch 1/3 which Bjorn can probably pick up as well but
> looking at git log you also picked up some for that file in the past,
> dunno.

Ok, for any remaining ones that want to be merged before 6.8-rc1 is out,
feel free to add my:

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

If they don't get picked up by 6.8-rc1, feel free to rebase and send it
for me to take through my tree.

thanks,

greg k-h
Bjorn Andersson Jan. 28, 2024, 5:45 p.m. UTC | #4
On Wed, 20 Dec 2023 11:02:55 +0100, Luca Weiss wrote:
> This series adds all the necessary bits to enable USB-C role switching,
> charger and fuel gauge (all via pmic-glink) on Fairphone 5.
> 
> One thing that could be made different is the pmic-glink compatible.
> I've chosen to use qcm6490 compatible for it and not sc7280 since
> there's plenty of firmware variety on sc7280-based platforms and they
> might require different quirks in the future, so limit this PDOS quirk
> to just qcm6490 for now.
> 
> [...]

Applied, thanks!

[3/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PMIC GLINK
      commit: 4cc920ed7899de91ea39b6c9bdb0ebb6860e8b47

Best regards,
Luca Weiss Feb. 6, 2024, 11:20 p.m. UTC | #5
On Tue Jan 2, 2024 at 2:53 PM CET, Greg Kroah-Hartman wrote:
> On Tue, Jan 02, 2024 at 02:43:24PM +0100, Luca Weiss wrote:
> > On Tue Jan 2, 2024 at 2:36 PM CET, Greg Kroah-Hartman wrote:
> > > On Thu, Dec 21, 2023 at 02:45:26PM +0100, Luca Weiss wrote:
> > > > On Thu Dec 21, 2023 at 1:53 PM CET, Konrad Dybcio wrote:
> > > > > On 21.12.2023 11:34, Dmitry Baryshkov wrote:
> > > > > > On Thu, 21 Dec 2023 at 09:33, Luca Weiss <luca.weiss@fairphone.com> wrote:
> > > > > >>
> > > > > >> On Wed Dec 20, 2023 at 1:32 PM CET, Konrad Dybcio wrote:
> > > > > >>> On 20.12.2023 11:02, Luca Weiss wrote:
> > > > > >>>> This series adds all the necessary bits to enable USB-C role switching,
> > > > > >>>> charger and fuel gauge (all via pmic-glink) on Fairphone 5.
> > > > > >>>>
> > > > > >>>> One thing that could be made different is the pmic-glink compatible.
> > > > > >>>> I've chosen to use qcm6490 compatible for it and not sc7280 since
> > > > > >>>> there's plenty of firmware variety on sc7280-based platforms and they
> > > > > >>>> might require different quirks in the future, so limit this PDOS quirk
> > > > > >>>> to just qcm6490 for now.
> > > > > >>>>
> > > > > >>>> If someone thinks it should be qcom,sc7280-pmic-glink, please let me
> > > > > >>>> know :)
> > > > > >>> IMO it's best to continue using the "base soc" (which just so happened
> > > > > >>> to fall onto sc7280 this time around) for all compatibles, unless the
> > > > > >>> derivatives actually had changes
> > > > > >>
> > > > > >> Hi Konrad,
> > > > > >>
> > > > > >> I think at some point I asked Dmitry what he thought and he mentioned
> > > > > >> qcm6490. Even found the message again:
> > > > > >>
> > > > > >>> well, since it is a firmware thing, you might want to emphasise that.
> > > > > >>> So from my POV qcm6490 makes more sense
> > > > > >>
> > > > > >> But yeah since it's likely that sc7280 firmware behaves the same as
> > > > > >> qcm6490 firmware it's probably okay to use sc7280 compatible, worst case
> > > > > >> we change it later :) I'll send a v2 with those changes.
> > > > > > 
> > > > > > Worst case we end up with sc7280 which has yet another slightly
> > > > > > different UCSI / PMIC GLINK implementation, but the compatible string
> > > > > > is already taken.
> > > > > > I still suppose that this should be a qcm6490-related string.
> > > > > Right, let's keep qcm then
> > > > 
> > > > Ack from my side also. Thanks for the feedback!
> > >
> > > This doesn't apply to my tree, where should it be going through?
> > 
> > As far as I can see the dependency for the driver commit 1d103d6af241
> > ("usb: typec: ucsi: fix UCSI on buggy Qualcomm devices") was applied to
> > Bjorn's qcom tree, so 2/3 should also go there then.
> > 
> > Patch 3/3 (arm64 dts) definitely also Bjorn's qcom tree.
> > 
> > So that leaves patch 1/3 which Bjorn can probably pick up as well but
> > looking at git log you also picked up some for that file in the past,
> > dunno.
>
> Ok, for any remaining ones that want to be merged before 6.8-rc1 is out,
> feel free to add my:
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> If they don't get picked up by 6.8-rc1, feel free to rebase and send it
> for me to take through my tree.

Hi Greg,

This applies cleanly on -next as of next-20240206 still.

Could you please pick it up for v6.9? I can also send a v2 with only
the two remaining patches (dts was applied to qcom by Bjorn already).

Regards
Luca

>
> thanks,
>
> greg k-h
Greg KH Feb. 7, 2024, 9:47 a.m. UTC | #6
On Wed, Feb 07, 2024 at 12:20:00AM +0100, Luca Weiss wrote:
> On Tue Jan 2, 2024 at 2:53 PM CET, Greg Kroah-Hartman wrote:
> > On Tue, Jan 02, 2024 at 02:43:24PM +0100, Luca Weiss wrote:
> > > On Tue Jan 2, 2024 at 2:36 PM CET, Greg Kroah-Hartman wrote:
> > > > On Thu, Dec 21, 2023 at 02:45:26PM +0100, Luca Weiss wrote:
> > > > > On Thu Dec 21, 2023 at 1:53 PM CET, Konrad Dybcio wrote:
> > > > > > On 21.12.2023 11:34, Dmitry Baryshkov wrote:
> > > > > > > On Thu, 21 Dec 2023 at 09:33, Luca Weiss <luca.weiss@fairphone.com> wrote:
> > > > > > >>
> > > > > > >> On Wed Dec 20, 2023 at 1:32 PM CET, Konrad Dybcio wrote:
> > > > > > >>> On 20.12.2023 11:02, Luca Weiss wrote:
> > > > > > >>>> This series adds all the necessary bits to enable USB-C role switching,
> > > > > > >>>> charger and fuel gauge (all via pmic-glink) on Fairphone 5.
> > > > > > >>>>
> > > > > > >>>> One thing that could be made different is the pmic-glink compatible.
> > > > > > >>>> I've chosen to use qcm6490 compatible for it and not sc7280 since
> > > > > > >>>> there's plenty of firmware variety on sc7280-based platforms and they
> > > > > > >>>> might require different quirks in the future, so limit this PDOS quirk
> > > > > > >>>> to just qcm6490 for now.
> > > > > > >>>>
> > > > > > >>>> If someone thinks it should be qcom,sc7280-pmic-glink, please let me
> > > > > > >>>> know :)
> > > > > > >>> IMO it's best to continue using the "base soc" (which just so happened
> > > > > > >>> to fall onto sc7280 this time around) for all compatibles, unless the
> > > > > > >>> derivatives actually had changes
> > > > > > >>
> > > > > > >> Hi Konrad,
> > > > > > >>
> > > > > > >> I think at some point I asked Dmitry what he thought and he mentioned
> > > > > > >> qcm6490. Even found the message again:
> > > > > > >>
> > > > > > >>> well, since it is a firmware thing, you might want to emphasise that.
> > > > > > >>> So from my POV qcm6490 makes more sense
> > > > > > >>
> > > > > > >> But yeah since it's likely that sc7280 firmware behaves the same as
> > > > > > >> qcm6490 firmware it's probably okay to use sc7280 compatible, worst case
> > > > > > >> we change it later :) I'll send a v2 with those changes.
> > > > > > > 
> > > > > > > Worst case we end up with sc7280 which has yet another slightly
> > > > > > > different UCSI / PMIC GLINK implementation, but the compatible string
> > > > > > > is already taken.
> > > > > > > I still suppose that this should be a qcm6490-related string.
> > > > > > Right, let's keep qcm then
> > > > > 
> > > > > Ack from my side also. Thanks for the feedback!
> > > >
> > > > This doesn't apply to my tree, where should it be going through?
> > > 
> > > As far as I can see the dependency for the driver commit 1d103d6af241
> > > ("usb: typec: ucsi: fix UCSI on buggy Qualcomm devices") was applied to
> > > Bjorn's qcom tree, so 2/3 should also go there then.
> > > 
> > > Patch 3/3 (arm64 dts) definitely also Bjorn's qcom tree.
> > > 
> > > So that leaves patch 1/3 which Bjorn can probably pick up as well but
> > > looking at git log you also picked up some for that file in the past,
> > > dunno.
> >
> > Ok, for any remaining ones that want to be merged before 6.8-rc1 is out,
> > feel free to add my:
> >
> > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > If they don't get picked up by 6.8-rc1, feel free to rebase and send it
> > for me to take through my tree.
> 
> Hi Greg,
> 
> This applies cleanly on -next as of next-20240206 still.
> 
> Could you please pick it up for v6.9? I can also send a v2 with only
> the two remaining patches (dts was applied to qcom by Bjorn already).

v2 with just the remaining patches would be great, thanks.

greg k-h