2021-11-23 18:06:46

by Marc Zyngier

[permalink] [raw]
Subject: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

Apologies for the rapid fire (I tend to be much more conservative when
resending series), but given that this series has a direct impact on
other projects (such as u-boot), I'm trying to converge as quickly as
possible.

This series aims at fixing a number of issues for the recently merged
Apple PCIe driver, all revolving around the mishandling of #PERST:

- we didn't properly drive #PERST, and we didn't follow the specified
timings

- the DT had the wrong polarity, which has impacts on the driver
itself

Hopefully, this should address all the issues reported so far.

* From v2:
- Fixed DT
- Fixed #PERST polarity in the driver
- Collected Pali's ack on patch #1

[1] https://lore.kernel.org/r/[email protected]

Marc Zyngier (3):
PCI: apple: Follow the PCIe specifications when resetting the port
arm64: dts: apple: t8103: Fix PCIe #PERST polarity
PCI: apple: Fix #PERST polarity

arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
drivers/pci/controller/pcie-apple.c | 12 +++++++++++-
2 files changed, 15 insertions(+), 4 deletions(-)

--
2.30.2



2021-11-23 18:06:48

by Marc Zyngier

[permalink] [raw]
Subject: [PATCH v3 2/3] arm64: dts: apple: t8103: Fix PCIe #PERST polarity

As the name indicates, #PERST is active low. So fix the DT description
to match the HW behaviour.

Fixes: ff2a8d91d80c ("arm64: apple: Add PCIe node")
Signed-off-by: Marc Zyngier <[email protected]>
---
arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
index fc8b2bb06ffe..e22c9433d5e0 100644
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
@@ -7,6 +7,7 @@
* Copyright The Asahi Linux Contributors
*/

+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
@@ -281,7 +282,7 @@ pcie0: pcie@690000000 {
port00: pci@0,0 {
device_type = "pci";
reg = <0x0 0x0 0x0 0x0 0x0>;
- reset-gpios = <&pinctrl_ap 152 0>;
+ reset-gpios = <&pinctrl_ap 152 GPIO_ACTIVE_LOW>;
max-link-speed = <2>;

#address-cells = <3>;
@@ -301,7 +302,7 @@ port00: pci@0,0 {
port01: pci@1,0 {
device_type = "pci";
reg = <0x800 0x0 0x0 0x0 0x0>;
- reset-gpios = <&pinctrl_ap 153 0>;
+ reset-gpios = <&pinctrl_ap 153 GPIO_ACTIVE_LOW>;
max-link-speed = <2>;

#address-cells = <3>;
@@ -321,7 +322,7 @@ port01: pci@1,0 {
port02: pci@2,0 {
device_type = "pci";
reg = <0x1000 0x0 0x0 0x0 0x0>;
- reset-gpios = <&pinctrl_ap 33 0>;
+ reset-gpios = <&pinctrl_ap 33 GPIO_ACTIVE_LOW>;
max-link-speed = <1>;

#address-cells = <3>;
--
2.30.2


2021-11-23 18:06:49

by Marc Zyngier

[permalink] [raw]
Subject: [PATCH v3 3/3] PCI: apple: Fix #PERST polarity

Now that #PERST is properly defined as active-low in the device tree,
fix the driver to correctly drive the line indemendently of the
implied polarity.

Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up")
Suggested-by: Pali Rohár <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
---
drivers/pci/controller/pcie-apple.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
index 957960a733c4..03bc56f39be5 100644
--- a/drivers/pci/controller/pcie-apple.c
+++ b/drivers/pci/controller/pcie-apple.c
@@ -540,7 +540,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK);

/* Engage #PERST before setting up the clock */
- gpiod_set_value(reset, 0);
+ gpiod_set_value(reset, 1);

ret = apple_pcie_setup_refclk(pcie, port);
if (ret < 0)
@@ -551,7 +551,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,

/* Deassert #PERST */
rmw_set(PORT_PERST_OFF, port->base + PORT_PERST);
- gpiod_set_value(reset, 1);
+ gpiod_set_value(reset, 0);

/* Wait for 100ms after #PERST deassertion (PCIe r2.0, 6.6.1) */
msleep(100);
--
2.30.2


2021-11-23 18:16:49

by Mark Kettenis

[permalink] [raw]
Subject: Re: [PATCH v3 2/3] arm64: dts: apple: t8103: Fix PCIe #PERST polarity

> From: Marc Zyngier <[email protected]>
> Date: Tue, 23 Nov 2021 18:06:35 +0000
>
> As the name indicates, #PERST is active low. So fix the DT description
> to match the HW behaviour.
>
> Fixes: ff2a8d91d80c ("arm64: apple: Add PCIe node")
> Signed-off-by: Marc Zyngier <[email protected]>

Reviewed-by: Mark Kettenis <[email protected]>

> ---
> arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
> index fc8b2bb06ffe..e22c9433d5e0 100644
> --- a/arch/arm64/boot/dts/apple/t8103.dtsi
> +++ b/arch/arm64/boot/dts/apple/t8103.dtsi
> @@ -7,6 +7,7 @@
> * Copyright The Asahi Linux Contributors
> */
>
> +#include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/apple-aic.h>
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/pinctrl/apple.h>
> @@ -281,7 +282,7 @@ pcie0: pcie@690000000 {
> port00: pci@0,0 {
> device_type = "pci";
> reg = <0x0 0x0 0x0 0x0 0x0>;
> - reset-gpios = <&pinctrl_ap 152 0>;
> + reset-gpios = <&pinctrl_ap 152 GPIO_ACTIVE_LOW>;
> max-link-speed = <2>;
>
> #address-cells = <3>;
> @@ -301,7 +302,7 @@ port00: pci@0,0 {
> port01: pci@1,0 {
> device_type = "pci";
> reg = <0x800 0x0 0x0 0x0 0x0>;
> - reset-gpios = <&pinctrl_ap 153 0>;
> + reset-gpios = <&pinctrl_ap 153 GPIO_ACTIVE_LOW>;
> max-link-speed = <2>;
>
> #address-cells = <3>;
> @@ -321,7 +322,7 @@ port01: pci@1,0 {
> port02: pci@2,0 {
> device_type = "pci";
> reg = <0x1000 0x0 0x0 0x0 0x0>;
> - reset-gpios = <&pinctrl_ap 33 0>;
> + reset-gpios = <&pinctrl_ap 33 GPIO_ACTIVE_LOW>;
> max-link-speed = <1>;
>
> #address-cells = <3>;
> --
> 2.30.2
>
>

2021-11-23 21:36:20

by Luca Ceresoli

[permalink] [raw]
Subject: Re: [PATCH v3 3/3] PCI: apple: Fix #PERST polarity

Hi Mark,

On 23/11/21 19:06, Marc Zyngier wrote:
> Now that #PERST is properly defined as active-low in the device tree,
> fix the driver to correctly drive the line indemendently of the
> implied polarity.
>
> Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up")
> Suggested-by: Pali Rohár <[email protected]>
> Signed-off-by: Marc Zyngier <[email protected]>

Thanks for quickly addressing this!

Do we need a transition path for backward compatibility with old DTs
already around? Something like this [0]. You said [1] the DT actually
used is not even the one in the kernel, thus how do we guarantee DT and
driver switch to the new polarity all at once?

[0] https://lkml.org/lkml/2021/6/24/1049
[1] https://lkml.org/lkml/2021/11/23/455

> ---
> drivers/pci/controller/pcie-apple.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
> index 957960a733c4..03bc56f39be5 100644
> --- a/drivers/pci/controller/pcie-apple.c
> +++ b/drivers/pci/controller/pcie-apple.c
> @@ -540,7 +540,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
> rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK);
>
> /* Engage #PERST before setting up the clock */
>
> - gpiod_set_value(reset, 0);
> + gpiod_set_value(reset, 1);
>
> ret = apple_pcie_setup_refclk(pcie, port);
> if (ret < 0)
> @@ -551,7 +551,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
>
> /* Deassert #PERST */
> rmw_set(PORT_PERST_OFF, port->base + PORT_PERST);
> - gpiod_set_value(reset, 1);
> + gpiod_set_value(reset, 0);

Minor note: if it were me I would coalesce patches 1 and 3 together,
otherwise we are insisting on a wrong implementation (patch 1) to later
fix it all (this patch).

--
Luca


2021-11-24 09:03:16

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH v3 3/3] PCI: apple: Fix #PERST polarity

On Tue, 23 Nov 2021 21:36:11 +0000,
Luca Ceresoli <[email protected]> wrote:
>
> Hi Mark,
>
> On 23/11/21 19:06, Marc Zyngier wrote:
> > Now that #PERST is properly defined as active-low in the device tree,
> > fix the driver to correctly drive the line indemendently of the
> > implied polarity.
> >
> > Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up")
> > Suggested-by: Pali Rohár <[email protected]>
> > Signed-off-by: Marc Zyngier <[email protected]>
>
> Thanks for quickly addressing this!
>
> Do we need a transition path for backward compatibility with old DTs
> already around? Something like this [0]. You said [1] the DT actually
> used is not even the one in the kernel, thus how do we guarantee DT and
> driver switch to the new polarity all at once?

No. As it turns out, neither u-boot nor OpenBSD (the only two other
payloads that can boot on M1) are upstreamed yet. So we're still in
that stage where we don't need to maintain backward compatibility. If
we don't get this patches merged by the end of this cycle, we will
have to revisit this though.

>
> [0] https://lkml.org/lkml/2021/6/24/1049
> [1] https://lkml.org/lkml/2021/11/23/455
>
> > ---
> > drivers/pci/controller/pcie-apple.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
> > index 957960a733c4..03bc56f39be5 100644
> > --- a/drivers/pci/controller/pcie-apple.c
> > +++ b/drivers/pci/controller/pcie-apple.c
> > @@ -540,7 +540,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
> > rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK);
> >
> > /* Engage #PERST before setting up the clock */
> >
> > - gpiod_set_value(reset, 0);
> > + gpiod_set_value(reset, 1);
> >
> > ret = apple_pcie_setup_refclk(pcie, port);
> > if (ret < 0)
> > @@ -551,7 +551,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
> >
> > /* Deassert #PERST */
> > rmw_set(PORT_PERST_OFF, port->base + PORT_PERST);
> > - gpiod_set_value(reset, 1);
> > + gpiod_set_value(reset, 0);
>
> Minor note: if it were me I would coalesce patches 1 and 3 together,
> otherwise we are insisting on a wrong implementation (patch 1) to later
> fix it all (this patch).

The first patch is a clear bug fix that has a direct HW impact. The
second patch is only sugar coating with zero material impact
(absolutely nothing changes in the way the HW is driven). Squashing
these two patches would be absolutely the wrong thing to do.

M.

--
Without deviation from the norm, progress is not possible.

2021-11-24 09:16:45

by Luca Ceresoli

[permalink] [raw]
Subject: Re: [PATCH v3 3/3] PCI: apple: Fix #PERST polarity

Hi,

On 24/11/21 10:02, Marc Zyngier wrote:
> On Tue, 23 Nov 2021 21:36:11 +0000,
> Luca Ceresoli <[email protected]> wrote:
>>
>> Hi Mark,
>>
>> On 23/11/21 19:06, Marc Zyngier wrote:
>>> Now that #PERST is properly defined as active-low in the device tree,
>>> fix the driver to correctly drive the line indemendently of the
>>> implied polarity.
>>>
>>> Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up")
>>> Suggested-by: Pali Rohár <[email protected]>
>>> Signed-off-by: Marc Zyngier <[email protected]>
>>
>> Thanks for quickly addressing this!
>>
>> Do we need a transition path for backward compatibility with old DTs
>> already around? Something like this [0]. You said [1] the DT actually
>> used is not even the one in the kernel, thus how do we guarantee DT and
>> driver switch to the new polarity all at once?
>
> No. As it turns out, neither u-boot nor OpenBSD (the only two other
> payloads that can boot on M1) are upstreamed yet. So we're still in
> that stage where we don't need to maintain backward compatibility. If
> we don't get this patches merged by the end of this cycle, we will
> have to revisit this though.

Good news!

Reviewed-by: Luca Ceresoli <[email protected]>

--
Luca

2021-11-24 09:17:49

by Luca Ceresoli

[permalink] [raw]
Subject: Re: [PATCH v3 2/3] arm64: dts: apple: t8103: Fix PCIe #PERST polarity

Hi,

On 23/11/21 19:06, Marc Zyngier wrote:
> As the name indicates, #PERST is active low. So fix the DT description
> to match the HW behaviour.
>
> Fixes: ff2a8d91d80c ("arm64: apple: Add PCIe node")
> Signed-off-by: Marc Zyngier <[email protected]>

Reviewed-by: Luca Ceresoli <[email protected]>

--
Luca

2021-11-30 11:57:26

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

On Tue, Nov 23, 2021 at 06:06:33PM +0000, Marc Zyngier wrote:
> Apologies for the rapid fire (I tend to be much more conservative when
> resending series), but given that this series has a direct impact on
> other projects (such as u-boot), I'm trying to converge as quickly as
> possible.
>
> This series aims at fixing a number of issues for the recently merged
> Apple PCIe driver, all revolving around the mishandling of #PERST:
>
> - we didn't properly drive #PERST, and we didn't follow the specified
> timings
>
> - the DT had the wrong polarity, which has impacts on the driver
> itself
>
> Hopefully, this should address all the issues reported so far.
>
> * From v2:
> - Fixed DT
> - Fixed #PERST polarity in the driver
> - Collected Pali's ack on patch #1
>
> [1] https://lore.kernel.org/r/[email protected]
>
> Marc Zyngier (3):
> PCI: apple: Follow the PCIe specifications when resetting the port
> arm64: dts: apple: t8103: Fix PCIe #PERST polarity
> PCI: apple: Fix #PERST polarity
>
> arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
> drivers/pci/controller/pcie-apple.c | 12 +++++++++++-
> 2 files changed, 15 insertions(+), 4 deletions(-)

Hi Bjorn,

this series is v5.16-rcX material for PCI fixes, can you pick patches 1,3
up please ?

Thank you very much.

Lorenzo

2021-11-30 11:59:44

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

Hi Lorenzo, Bjorn,

On 2021-11-30 11:56, Lorenzo Pieralisi wrote:
> On Tue, Nov 23, 2021 at 06:06:33PM +0000, Marc Zyngier wrote:
>> Apologies for the rapid fire (I tend to be much more conservative when
>> resending series), but given that this series has a direct impact on
>> other projects (such as u-boot), I'm trying to converge as quickly as
>> possible.
>>
>> This series aims at fixing a number of issues for the recently merged
>> Apple PCIe driver, all revolving around the mishandling of #PERST:
>>
>> - we didn't properly drive #PERST, and we didn't follow the specified
>> timings
>>
>> - the DT had the wrong polarity, which has impacts on the driver
>> itself
>>
>> Hopefully, this should address all the issues reported so far.
>>
>> * From v2:
>> - Fixed DT
>> - Fixed #PERST polarity in the driver
>> - Collected Pali's ack on patch #1
>>
>> [1] https://lore.kernel.org/r/[email protected]
>>
>> Marc Zyngier (3):
>> PCI: apple: Follow the PCIe specifications when resetting the port
>> arm64: dts: apple: t8103: Fix PCIe #PERST polarity
>> PCI: apple: Fix #PERST polarity
>>
>> arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
>> drivers/pci/controller/pcie-apple.c | 12 +++++++++++-
>> 2 files changed, 15 insertions(+), 4 deletions(-)
>
> Hi Bjorn,
>
> this series is v5.16-rcX material for PCI fixes, can you pick patches
> 1,3
> up please ?

Do you mind picking patch #2 as well? Or shall I route it somewhere
else?

Thanks,

M.
--
Jazz is not dead. It just smells funny...

2021-11-30 12:13:12

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

On Tue, Nov 30, 2021 at 11:59:32AM +0000, Marc Zyngier wrote:
> Hi Lorenzo, Bjorn,
>
> On 2021-11-30 11:56, Lorenzo Pieralisi wrote:
> > On Tue, Nov 23, 2021 at 06:06:33PM +0000, Marc Zyngier wrote:
> > > Apologies for the rapid fire (I tend to be much more conservative when
> > > resending series), but given that this series has a direct impact on
> > > other projects (such as u-boot), I'm trying to converge as quickly as
> > > possible.
> > >
> > > This series aims at fixing a number of issues for the recently merged
> > > Apple PCIe driver, all revolving around the mishandling of #PERST:
> > >
> > > - we didn't properly drive #PERST, and we didn't follow the specified
> > > timings
> > >
> > > - the DT had the wrong polarity, which has impacts on the driver
> > > itself
> > >
> > > Hopefully, this should address all the issues reported so far.
> > >
> > > * From v2:
> > > - Fixed DT
> > > - Fixed #PERST polarity in the driver
> > > - Collected Pali's ack on patch #1
> > >
> > > [1] https://lore.kernel.org/r/[email protected]
> > >
> > > Marc Zyngier (3):
> > > PCI: apple: Follow the PCIe specifications when resetting the port
> > > arm64: dts: apple: t8103: Fix PCIe #PERST polarity
> > > PCI: apple: Fix #PERST polarity
> > >
> > > arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
> > > drivers/pci/controller/pcie-apple.c | 12 +++++++++++-
> > > 2 files changed, 15 insertions(+), 4 deletions(-)
> >
> > Hi Bjorn,
> >
> > this series is v5.16-rcX material for PCI fixes, can you pick patches
> > 1,3
> > up please ?
>
> Do you mind picking patch #2 as well? Or shall I route it somewhere else?

We were told that we should not pick up dts changes, they would normally
go via the ARM SOC team, not sure whether the fixes policy is different
though but I suspect that's not the case.

Thanks,
Lorenzo

2021-11-30 12:45:32

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

+ Arnd,

On Tue, 30 Nov 2021 12:12:37 +0000,
Lorenzo Pieralisi <[email protected]> wrote:
>
> On Tue, Nov 30, 2021 at 11:59:32AM +0000, Marc Zyngier wrote:
> > Hi Lorenzo, Bjorn,
> >
> > On 2021-11-30 11:56, Lorenzo Pieralisi wrote:
> > > On Tue, Nov 23, 2021 at 06:06:33PM +0000, Marc Zyngier wrote:
> > > > Apologies for the rapid fire (I tend to be much more conservative when
> > > > resending series), but given that this series has a direct impact on
> > > > other projects (such as u-boot), I'm trying to converge as quickly as
> > > > possible.
> > > >
> > > > This series aims at fixing a number of issues for the recently merged
> > > > Apple PCIe driver, all revolving around the mishandling of #PERST:
> > > >
> > > > - we didn't properly drive #PERST, and we didn't follow the specified
> > > > timings
> > > >
> > > > - the DT had the wrong polarity, which has impacts on the driver
> > > > itself
> > > >
> > > > Hopefully, this should address all the issues reported so far.
> > > >
> > > > * From v2:
> > > > - Fixed DT
> > > > - Fixed #PERST polarity in the driver
> > > > - Collected Pali's ack on patch #1
> > > >
> > > > [1] https://lore.kernel.org/r/[email protected]
> > > >
> > > > Marc Zyngier (3):
> > > > PCI: apple: Follow the PCIe specifications when resetting the port
> > > > arm64: dts: apple: t8103: Fix PCIe #PERST polarity
> > > > PCI: apple: Fix #PERST polarity
> > > >
> > > > arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
> > > > drivers/pci/controller/pcie-apple.c | 12 +++++++++++-
> > > > 2 files changed, 15 insertions(+), 4 deletions(-)
> > >
> > > Hi Bjorn,
> > >
> > > this series is v5.16-rcX material for PCI fixes, can you pick patches
> > > 1,3
> > > up please ?
> >
> > Do you mind picking patch #2 as well? Or shall I route it somewhere else?
>
> We were told that we should not pick up dts changes, they would normally
> go via the ARM SOC team, not sure whether the fixes policy is different
> though but I suspect that's not the case.

OK. Doesn't really help with keeping these two commit close together,
but hey, if that can't be helped...

Arnd, do you mind picking up patch #2 as a 5.16 fix?

Thanks,

M.

--
Without deviation from the norm, progress is not possible.

2021-12-01 14:47:21

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH v3 2/3] arm64: dts: apple: t8103: Fix PCIe #PERST polarity

On Wed, Nov 24, 2021 at 10:17 AM Luca Ceresoli <[email protected]> wrote:
> On 23/11/21 19:06, Marc Zyngier wrote:
> > As the name indicates, #PERST is active low. So fix the DT description
> > to match the HW behaviour.
> >
> > Fixes: ff2a8d91d80c ("arm64: apple: Add PCIe node")
> > Signed-off-by: Marc Zyngier <[email protected]>
>
> Reviewed-by: Luca Ceresoli <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

If the driver changes are not yet forwarded to Linus, feel free to add
this one as well. Otherwise please send it to Hector Martin so he can
add it to the other Apple DT fixes for 5.16.

Arnd

2021-12-01 14:49:11

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

On Tue, Nov 30, 2021 at 1:45 PM Marc Zyngier <[email protected]> wrote:
> On Tue, 30 Nov 2021 12:12:37 +0000, Lorenzo Pieralisi <[email protected]> wrote:
> > On Tue, Nov 30, 2021 at 11:59:32AM +0000, Marc Zyngier wrote:
> > > On 2021-11-30 11:56, Lorenzo Pieralisi wrote:
> >
> > We were told that we should not pick up dts changes, they would normally
> > go via the ARM SOC team, not sure whether the fixes policy is different
> > though but I suspect that's not the case.
>
> OK. Doesn't really help with keeping these two commit close together,
> but hey, if that can't be helped...
>
> Arnd, do you mind picking up patch #2 as a 5.16 fix?

I try not to bypass the platform maintainers, I'd prefer if this came
my way through
the asahi tree (just replied to the patch as well). In this case it
sounds like there
is a good reason to have it go in along with the driver change, so that's fine
as well, and I provided an Ack for that.

Arnd

2021-12-07 10:16:47

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

On Tue, Nov 30, 2021 at 11:56:32AM +0000, Lorenzo Pieralisi wrote:
> On Tue, Nov 23, 2021 at 06:06:33PM +0000, Marc Zyngier wrote:
> > Apologies for the rapid fire (I tend to be much more conservative when
> > resending series), but given that this series has a direct impact on
> > other projects (such as u-boot), I'm trying to converge as quickly as
> > possible.
> >
> > This series aims at fixing a number of issues for the recently merged
> > Apple PCIe driver, all revolving around the mishandling of #PERST:
> >
> > - we didn't properly drive #PERST, and we didn't follow the specified
> > timings
> >
> > - the DT had the wrong polarity, which has impacts on the driver
> > itself
> >
> > Hopefully, this should address all the issues reported so far.
> >
> > * From v2:
> > - Fixed DT
> > - Fixed #PERST polarity in the driver
> > - Collected Pali's ack on patch #1
> >
> > [1] https://lore.kernel.org/r/[email protected]
> >
> > Marc Zyngier (3):
> > PCI: apple: Follow the PCIe specifications when resetting the port
> > arm64: dts: apple: t8103: Fix PCIe #PERST polarity
> > PCI: apple: Fix #PERST polarity
> >
> > arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
> > drivers/pci/controller/pcie-apple.c | 12 +++++++++++-
> > 2 files changed, 15 insertions(+), 4 deletions(-)
>
> Hi Bjorn,
>
> this series is v5.16-rcX material for PCI fixes, can you pick patches
> 1,3 up please ?

Hi Bjorn,

Arnd acked patch 2, can we send the whole series upstream for one
of the upcoming -rcX please ? It is fixing code that was merged
in the last merge window.

Thanks,
Lorenzo

2021-12-07 20:30:40

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] PCI: apple: Assorted #PERST fixes

On Tue, Dec 07, 2021 at 10:16:32AM +0000, Lorenzo Pieralisi wrote:
> On Tue, Nov 30, 2021 at 11:56:32AM +0000, Lorenzo Pieralisi wrote:
> > On Tue, Nov 23, 2021 at 06:06:33PM +0000, Marc Zyngier wrote:
> > > Apologies for the rapid fire (I tend to be much more conservative when
> > > resending series), but given that this series has a direct impact on
> > > other projects (such as u-boot), I'm trying to converge as quickly as
> > > possible.
> > >
> > > This series aims at fixing a number of issues for the recently merged
> > > Apple PCIe driver, all revolving around the mishandling of #PERST:
> > >
> > > - we didn't properly drive #PERST, and we didn't follow the specified
> > > timings
> > >
> > > - the DT had the wrong polarity, which has impacts on the driver
> > > itself
> > >
> > > Hopefully, this should address all the issues reported so far.
> > >
> > > * From v2:
> > > - Fixed DT
> > > - Fixed #PERST polarity in the driver
> > > - Collected Pali's ack on patch #1
> > >
> > > [1] https://lore.kernel.org/r/[email protected]
> > >
> > > Marc Zyngier (3):
> > > PCI: apple: Follow the PCIe specifications when resetting the port
> > > arm64: dts: apple: t8103: Fix PCIe #PERST polarity
> > > PCI: apple: Fix #PERST polarity
> > >
> > > arch/arm64/boot/dts/apple/t8103.dtsi | 7 ++++---
> > > drivers/pci/controller/pcie-apple.c | 12 +++++++++++-
> > > 2 files changed, 15 insertions(+), 4 deletions(-)
> >
> > Hi Bjorn,
> >
> > this series is v5.16-rcX material for PCI fixes, can you pick patches
> > 1,3 up please ?
>
> Hi Bjorn,
>
> Arnd acked patch 2, can we send the whole series upstream for one
> of the upcoming -rcX please ? It is fixing code that was merged
> in the last merge window.

I put all three of these on for-linus and will ask Linus to pull them
before -rc5.

I do have open questions about the PERST# timing, but we can update
this if needed.