2023-12-20 10:03:56

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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 <[email protected]>
---
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,
--
Luca Weiss <[email protected]>



2023-12-20 10:04:12

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: soc: qcom: qcom,pmic-glink: document QCM6490 compatible

Document the QCM6490 compatible used to describe the pmic glink on this
platform.

Signed-off-by: Luca Weiss <[email protected]>
---
Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
index 61df97ffe1e4..101c09554b80 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
@@ -23,6 +23,7 @@ properties:
oneOf:
- items:
- enum:
+ - qcom,qcm6490-pmic-glink
- qcom,sc8180x-pmic-glink
- qcom,sc8280xp-pmic-glink
- qcom,sm8350-pmic-glink

--
2.43.0


2023-12-20 10:04:33

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 2/3] usb: typec: ucsi: Add qcm6490-pmic-glink as needing PDOS quirk

The QCM6490 Linux Android firmware needs this workaround as well. Add it
to the list.

Signed-off-by: Luca Weiss <[email protected]>
---
drivers/usb/typec/ucsi/ucsi_glink.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index 53a7ede8556d..0bd3f6dee678 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -298,6 +298,7 @@ static void pmic_glink_ucsi_destroy(void *data)
}

static const struct of_device_id pmic_glink_ucsi_of_quirks[] = {
+ { .compatible = "qcom,qcm6490-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },
{ .compatible = "qcom,sc8180x-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },
{ .compatible = "qcom,sc8280xp-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },
{ .compatible = "qcom,sm8350-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },

--
2.43.0


2023-12-20 10:06:23

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 3/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PMIC GLINK

Via the PMIC GLINK driver we can get info about fuel gauge, charger and
USB connector events. Add the node to the dts and configure USB so that
role switching works.

Signed-off-by: Luca Weiss <[email protected]>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 46 +++++++++++++++++++++-
arch/arm64/boot/dts/qcom/sc7280.dtsi | 19 +++++++++
2 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 176898c9dbbd..e9076d92ebd1 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -71,6 +71,41 @@ event-hall-sensor {
};
};

+ pmic-glink {
+ compatible = "qcom,qcm6490-pmic-glink", "qcom,pmic-glink";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ power-role = "dual";
+ data-role = "dual";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ pmic_glink_hs_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ pmic_glink_ss_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_ss>;
+ };
+ };
+ };
+ };
+ };
+
reserved-memory {
cont_splash_mem: cont-splash@e1000000 {
reg = <0x0 0xe1000000 0x0 0x2300000>;
@@ -886,7 +921,16 @@ &usb_1 {
};

&usb_1_dwc3 {
- dr_mode = "peripheral";
+ dr_mode = "otg";
+ usb-role-switch;
+};
+
+&usb_1_dwc3_hs {
+ remote-endpoint = <&pmic_glink_hs_in>;
+};
+
+&usb_1_dwc3_ss {
+ remote-endpoint = <&pmic_glink_ss_in>;
};

&usb_1_hsphy {
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index cd7641fd09b2..3b268620bea8 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4065,6 +4065,25 @@ usb_1_dwc3: usb@a600000 {
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_1_dwc3_hs: endpoint {
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_1_dwc3_ss: endpoint {
+ };
+ };
+ };
};
};


--
2.43.0


2023-12-20 12:32:56

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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

as far as firmware goes, I *think* CrOS doesn't even have PMIC_GLINK?
There are however WoA 7280 laptops which totally should have it.. Would
be nice to hunt some down and see if they report different stuff to
what's there on android firmware

Konrad

2023-12-20 14:04:12

by Heikki Krogerus

[permalink] [raw]
Subject: Re: [PATCH 2/3] usb: typec: ucsi: Add qcm6490-pmic-glink as needing PDOS quirk

On Wed, Dec 20, 2023 at 11:02:57AM +0100, Luca Weiss wrote:
> The QCM6490 Linux Android firmware needs this workaround as well. Add it
> to the list.
>
> Signed-off-by: Luca Weiss <[email protected]>

Acked-by: Heikki Krogerus <[email protected]>

> ---
> drivers/usb/typec/ucsi/ucsi_glink.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
> index 53a7ede8556d..0bd3f6dee678 100644
> --- a/drivers/usb/typec/ucsi/ucsi_glink.c
> +++ b/drivers/usb/typec/ucsi/ucsi_glink.c
> @@ -298,6 +298,7 @@ static void pmic_glink_ucsi_destroy(void *data)
> }
>
> static const struct of_device_id pmic_glink_ucsi_of_quirks[] = {
> + { .compatible = "qcom,qcm6490-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },
> { .compatible = "qcom,sc8180x-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },
> { .compatible = "qcom,sc8280xp-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },
> { .compatible = "qcom,sm8350-pmic-glink", .data = (void *)UCSI_NO_PARTNER_PDOS, },
>
> --
> 2.43.0

--
heikki

2023-12-20 14:19:09

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH 2/3] usb: typec: ucsi: Add qcm6490-pmic-glink as needing PDOS quirk

On Wed, 20 Dec 2023 at 12:04, Luca Weiss <[email protected]> wrote:
>
> The QCM6490 Linux Android firmware needs this workaround as well. Add it
> to the list.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> drivers/usb/typec/ucsi/ucsi_glink.c | 1 +
> 1 file changed, 1 insertion(+)

Reviewed-by: Dmitry Baryshkov <[email protected]>

--
With best wishes
Dmitry

2023-12-21 07:33:26

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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.

Regards
Luca

>
> as far as firmware goes, I *think* CrOS doesn't even have PMIC_GLINK?
> There are however WoA 7280 laptops which totally should have it.. Would
> be nice to hunt some down and see if they report different stuff to
> what's there on android firmware
>
> Konrad


2023-12-21 09:42:39

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: soc: qcom: qcom,pmic-glink: document QCM6490 compatible

On 20/12/2023 11:02, Luca Weiss wrote:
> Document the QCM6490 compatible used to describe the pmic glink on this
> platform.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-12-21 10:35:06

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

On Thu, 21 Dec 2023 at 09:33, Luca Weiss <[email protected]> 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.

>
> Regards
> Luca
>
> >
> > as far as firmware goes, I *think* CrOS doesn't even have PMIC_GLINK?
> > There are however WoA 7280 laptops which totally should have it.. Would
> > be nice to hunt some down and see if they report different stuff to
> > what's there on android firmware
> >
> > Konrad
>


--
With best wishes
Dmitry

2023-12-21 13:01:20

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

On 21.12.2023 11:34, Dmitry Baryshkov wrote:
> On Thu, 21 Dec 2023 at 09:33, Luca Weiss <[email protected]> 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

Konrad

2023-12-21 13:55:59

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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 <[email protected]> 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!

>
> Konrad


2024-01-02 13:40:44

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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 <[email protected]> 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

2024-01-02 13:44:03

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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 <[email protected]> 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


2024-01-02 13:53:22

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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 <[email protected]> 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 <[email protected]>

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

2024-01-28 17:46:57

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)


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,
--
Bjorn Andersson <[email protected]>

2024-02-06 23:20:14

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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 <[email protected]> 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 <[email protected]>
>
> 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


2024-02-07 09:48:42

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fairphone 5 PMIC-GLINK support (USB-C, charger, fuel gauge)

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 <[email protected]> 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 <[email protected]>
> >
> > 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