linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Move tx-deempth and tx swing to pci.txt
@ 2020-04-10  0:47 Ansuel Smith
  2020-04-10  0:47 ` [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property Ansuel Smith
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Ansuel Smith @ 2020-04-10  0:47 UTC (permalink / raw)
  To: devicetree
  Cc: Ansuel Smith, Richard Zhu, Lucas Stach, Bjorn Helgaas,
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lorenzo Pieralisi, Andrew Murray, linux-pci, linux-arm-kernel,
	linux-kernel

In pushing some fixes to pcie qcom driver, one of the patch had to make
some fixes to tx deempth and tx swing. It was suggested to propose this
to the generic pci.txt as they are actually standard parameter than can
be tuned per board. I also notice these property are already used in
imx6 driver so this would also help to generalize it.

Ansuel Smith (4):
  devicetree: bindings: pci: document tx-deempth tx swing and rx-eq
    property
  drivers: pci: dwc: pci-imx6: update binding to generic name
  arm: dts: imx6: update pci binding to generic name
  devicetree: bindings: pci: fsl,imx6q-pcie: rename tx deemph and swing

 .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 12 ++++++------
 Documentation/devicetree/bindings/pci/pci.txt  | 18 ++++++++++++++++++
 arch/arm/boot/dts/imx6q-ba16.dtsi              |  4 ++--
 arch/arm/boot/dts/imx6qdl-var-dart.dtsi        |  4 ++--
 arch/arm/boot/dts/imx7d.dtsi                   |  2 +-
 drivers/pci/controller/dwc/pci-imx6.c          | 12 ++++++------
 6 files changed, 35 insertions(+), 17 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property
  2020-04-10  0:47 [PATCH 0/4] Move tx-deempth and tx swing to pci.txt Ansuel Smith
@ 2020-04-10  0:47 ` Ansuel Smith
  2020-04-13 20:29   ` Florian Fainelli
  2020-04-13 20:40   ` Bjorn Helgaas
  2020-04-10  0:47 ` [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name Ansuel Smith
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Ansuel Smith @ 2020-04-10  0:47 UTC (permalink / raw)
  To: devicetree
  Cc: Ansuel Smith, Richard Zhu, Lucas Stach, Bjorn Helgaas,
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lorenzo Pieralisi, Andrew Murray, linux-pci, linux-arm-kernel,
	linux-kernel

Document tx-deempth, tx swing and rx-eq property property used on some
device (qcom ipq806x or imx6q) to tune and fix init error of the pci
bridge.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 Documentation/devicetree/bindings/pci/pci.txt | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
index 29bcbd88f457..df37486f1853 100644
--- a/Documentation/devicetree/bindings/pci/pci.txt
+++ b/Documentation/devicetree/bindings/pci/pci.txt
@@ -24,6 +24,24 @@ driver implementation may support the following properties:
    unsupported link speed, for instance, trying to do training for
    unsupported link speed, etc.  Must be '4' for gen4, '3' for gen3, '2'
    for gen2, and '1' for gen1. Any other values are invalid.
+- tx-deemph-gen1
+   If present this property will tune the Transmit De-Emphasis level for GEN1 if
+   supported by the driver.
+- tx-deemph-gen2-3p5db
+   If present this property will tune the Transmit De-Emphasis level for GEN2 in
+   3.5db band if supported by the driver.
+- tx-deempth-gen2-6db
+   If present this property will tune the Transmit De-Emphasis level for GEN2 in
+   6db band if supported by the driver.
+- tx-swing-full
+   If present this property will tune the Tx Swing Full value if supported by the
+   driver.
+- tx-swing-low
+   If present this property will tune the Tx Swing Low value if supported by the
+   driver.
+- rx-equalization
+   If present this property will tune the Rx equalization value if supported by
+   the driver.
 - reset-gpios:
    If present this property specifies PERST# GPIO. Host drivers can parse the
    GPIO and apply fundamental reset to endpoints.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name
  2020-04-10  0:47 [PATCH 0/4] Move tx-deempth and tx swing to pci.txt Ansuel Smith
  2020-04-10  0:47 ` [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property Ansuel Smith
@ 2020-04-10  0:47 ` Ansuel Smith
  2020-04-10  2:24   ` Fabio Estevam
  2020-04-13 20:25   ` Bjorn Helgaas
  2020-04-10  0:47 ` [PATCH 3/4] arm: dts: imx6: update pci " Ansuel Smith
  2020-04-10  0:47 ` [PATCH 4/4] devicetree: bindings: pci: fsl,imx6q-pcie: rename tx deemph and swing Ansuel Smith
  3 siblings, 2 replies; 14+ messages in thread
From: Ansuel Smith @ 2020-04-10  0:47 UTC (permalink / raw)
  To: devicetree
  Cc: Ansuel Smith, Richard Zhu, Lucas Stach, Bjorn Helgaas,
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lorenzo Pieralisi, Andrew Murray, linux-pci, linux-arm-kernel,
	linux-kernel

Rename specific bindings to generic name.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index acfbd34032a8..4ac140e007b4 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1146,28 +1146,28 @@ static int imx6_pcie_probe(struct platform_device *pdev)
 	}
 
 	/* Grab PCIe PHY Tx Settings */
-	if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
+	if (of_property_read_u32(node, "tx-deemph-gen1",
 				 &imx6_pcie->tx_deemph_gen1))
 		imx6_pcie->tx_deemph_gen1 = 0;
 
-	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-3p5db",
+	if (of_property_read_u32(node, "tx-deemph-gen2-3p5db",
 				 &imx6_pcie->tx_deemph_gen2_3p5db))
 		imx6_pcie->tx_deemph_gen2_3p5db = 0;
 
-	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-6db",
+	if (of_property_read_u32(node, "tx-deemph-gen2-6db",
 				 &imx6_pcie->tx_deemph_gen2_6db))
 		imx6_pcie->tx_deemph_gen2_6db = 20;
 
-	if (of_property_read_u32(node, "fsl,tx-swing-full",
+	if (of_property_read_u32(node, "tx-swing-full",
 				 &imx6_pcie->tx_swing_full))
 		imx6_pcie->tx_swing_full = 127;
 
-	if (of_property_read_u32(node, "fsl,tx-swing-low",
+	if (of_property_read_u32(node, "tx-swing-low",
 				 &imx6_pcie->tx_swing_low))
 		imx6_pcie->tx_swing_low = 127;
 
 	/* Limit link speed */
-	ret = of_property_read_u32(node, "fsl,max-link-speed",
+	ret = of_property_read_u32(node, "max-link-speed",
 				   &imx6_pcie->link_gen);
 	if (ret)
 		imx6_pcie->link_gen = 1;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/4] arm: dts: imx6: update pci binding to generic name
  2020-04-10  0:47 [PATCH 0/4] Move tx-deempth and tx swing to pci.txt Ansuel Smith
  2020-04-10  0:47 ` [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property Ansuel Smith
  2020-04-10  0:47 ` [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name Ansuel Smith
@ 2020-04-10  0:47 ` Ansuel Smith
  2020-04-10  0:47 ` [PATCH 4/4] devicetree: bindings: pci: fsl,imx6q-pcie: rename tx deemph and swing Ansuel Smith
  3 siblings, 0 replies; 14+ messages in thread
From: Ansuel Smith @ 2020-04-10  0:47 UTC (permalink / raw)
  To: devicetree
  Cc: Ansuel Smith, Richard Zhu, Lucas Stach, Bjorn Helgaas,
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lorenzo Pieralisi, Andrew Murray, linux-pci, linux-arm-kernel,
	linux-kernel

Rename specific pcie property to generic name.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 arch/arm/boot/dts/imx6q-ba16.dtsi       | 4 ++--
 arch/arm/boot/dts/imx6qdl-var-dart.dtsi | 4 ++--
 arch/arm/boot/dts/imx7d.dtsi            | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/imx6q-ba16.dtsi b/arch/arm/boot/dts/imx6q-ba16.dtsi
index 37c63402157b..55bf77fdd65b 100644
--- a/arch/arm/boot/dts/imx6q-ba16.dtsi
+++ b/arch/arm/boot/dts/imx6q-ba16.dtsi
@@ -328,8 +328,8 @@ &pcie {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_pcie>;
 	reset-gpio = <&gpio7 12 GPIO_ACTIVE_LOW>;
-	fsl,tx-swing-full = <103>;
-	fsl,tx-swing-low = <103>;
+	tx-swing-full = <103>;
+	tx-swing-low = <103>;
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/imx6qdl-var-dart.dtsi b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
index c41cac502bac..45c7edea94da 100644
--- a/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-var-dart.dtsi
@@ -392,8 +392,8 @@ MX6QDL_PAD_SD3_DAT3__SD3_DATA3	0x17059
 };
 
 &pcie {
-	fsl,tx-swing-full = <103>;
-	fsl,tx-swing-low = <103>;
+	tx-swing-full = <103>;
+	tx-swing-low = <103>;
 	reset-gpio = <&gpio4 11 GPIO_ACTIVE_LOW>;
 	status = "disabled";
 };
diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi
index 4c22828df55f..0ab55f66ea79 100644
--- a/arch/arm/boot/dts/imx7d.dtsi
+++ b/arch/arm/boot/dts/imx7d.dtsi
@@ -190,7 +190,7 @@ pcie: pcie@33800000 {
 		assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_250M_CLK>,
 					 <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
 
-		fsl,max-link-speed = <2>;
+		max-link-speed = <2>;
 		power-domains = <&pgc_pcie_phy>;
 		resets = <&src IMX7_RESET_PCIEPHY>,
 			 <&src IMX7_RESET_PCIE_CTRL_APPS_EN>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/4] devicetree: bindings: pci: fsl,imx6q-pcie: rename tx deemph and swing
  2020-04-10  0:47 [PATCH 0/4] Move tx-deempth and tx swing to pci.txt Ansuel Smith
                   ` (2 preceding siblings ...)
  2020-04-10  0:47 ` [PATCH 3/4] arm: dts: imx6: update pci " Ansuel Smith
@ 2020-04-10  0:47 ` Ansuel Smith
  3 siblings, 0 replies; 14+ messages in thread
From: Ansuel Smith @ 2020-04-10  0:47 UTC (permalink / raw)
  To: devicetree
  Cc: Ansuel Smith, Richard Zhu, Lucas Stach, Bjorn Helgaas,
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lorenzo Pieralisi, Andrew Murray, linux-pci, linux-arm-kernel,
	linux-kernel

TX Deemph and TX Swing are now defined in pci.txt, rename them to follow
the new name.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 .../devicetree/bindings/pci/fsl,imx6q-pcie.txt       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
index de4b2baf91e8..937442a4c2ab 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
@@ -19,12 +19,12 @@ Required properties:
 	- "pcie_phy"
 
 Optional properties:
-- fsl,tx-deemph-gen1: Gen1 De-emphasis value. Default: 0
-- fsl,tx-deemph-gen2-3p5db: Gen2 (3.5db) De-emphasis value. Default: 0
-- fsl,tx-deemph-gen2-6db: Gen2 (6db) De-emphasis value. Default: 20
-- fsl,tx-swing-full: Gen2 TX SWING FULL value. Default: 127
-- fsl,tx-swing-low: TX launch amplitude swing_low value. Default: 127
-- fsl,max-link-speed: Specify PCI gen for link capability. Must be '2' for
+- tx-deemph-gen1: Gen1 De-emphasis value. Default: 0
+- tx-deemph-gen2-3p5db: Gen2 (3.5db) De-emphasis value. Default: 0
+- tx-deemph-gen2-6db: Gen2 (6db) De-emphasis value. Default: 20
+- tx-swing-full: Gen2 TX SWING FULL value. Default: 127
+- tx-swing-low: TX launch amplitude swing_low value. Default: 127
+- max-link-speed: Specify PCI gen for link capability. Must be '2' for
   gen2, otherwise will default to gen1. Note that the IMX6 LVDS clock outputs
   do not meet gen2 jitter requirements and thus for gen2 capability a gen2
   compliant clock generator should be used and configured.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name
  2020-04-10  0:47 ` [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name Ansuel Smith
@ 2020-04-10  2:24   ` Fabio Estevam
  2020-04-10 11:07     ` R: " ansuelsmth
  2020-04-13 20:25   ` Bjorn Helgaas
  1 sibling, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2020-04-10  2:24 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Richard Zhu, Lucas Stach, Bjorn Helgaas, Rob Herring,
	Mark Rutland, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team, Lorenzo Pieralisi, Andrew Murray, linux-pci,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

Hi Ansuel,

On Thu, Apr 9, 2020 at 9:47 PM Ansuel Smith <ansuelsmth@gmail.com> wrote:
>
> Rename specific bindings to generic name.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index acfbd34032a8..4ac140e007b4 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1146,28 +1146,28 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>         }
>
>         /* Grab PCIe PHY Tx Settings */
> -       if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
> +       if (of_property_read_u32(node, "tx-deemph-gen1",

This breaks compatibility with older dtbs.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* R: [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name
  2020-04-10  2:24   ` Fabio Estevam
@ 2020-04-10 11:07     ` ansuelsmth
  2020-04-10 12:31       ` Fabio Estevam
  0 siblings, 1 reply; 14+ messages in thread
From: ansuelsmth @ 2020-04-10 11:07 UTC (permalink / raw)
  To: 'Fabio Estevam'
  Cc: 'open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
	BINDINGS', 'Richard Zhu', 'Lucas Stach',
	'Bjorn Helgaas', 'Rob Herring',
	'Mark Rutland', 'Shawn Guo',
	'Sascha Hauer', 'Pengutronix Kernel Team',
	'NXP Linux Team', 'Lorenzo Pieralisi',
	'Andrew Murray',
	linux-pci,
	'moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE',
	'linux-kernel'

> Hi Ansuel,
> 
> On Thu, Apr 9, 2020 at 9:47 PM Ansuel Smith <ansuelsmth@gmail.com>
> wrote:
> >
> > Rename specific bindings to generic name.
> >
> > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> > ---
> >  drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> b/drivers/pci/controller/dwc/pci-imx6.c
> > index acfbd34032a8..4ac140e007b4 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -1146,28 +1146,28 @@ static int imx6_pcie_probe(struct
> platform_device *pdev)
> >         }
> >
> >         /* Grab PCIe PHY Tx Settings */
> > -       if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
> > +       if (of_property_read_u32(node, "tx-deemph-gen1",
> 
> This breaks compatibility with older dtbs.

so no chance of changing this? 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name
  2020-04-10 11:07     ` R: " ansuelsmth
@ 2020-04-10 12:31       ` Fabio Estevam
  2020-04-10 12:40         ` R: " ansuelsmth
  0 siblings, 1 reply; 14+ messages in thread
From: Fabio Estevam @ 2020-04-10 12:31 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Richard Zhu, Lucas Stach, Bjorn Helgaas, Rob Herring,
	Mark Rutland, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team, Lorenzo Pieralisi, Andrew Murray, linux-pci,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

Hi Ansuel,

On Fri, Apr 10, 2020 at 8:07 AM <ansuelsmth@gmail.com> wrote:

> so no chance of changing this?

Reading the commit log I don't see any explanation as to why you need
to change the current bindings.

What is the motivation for doing this? Is this really worth it?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* R: [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name
  2020-04-10 12:31       ` Fabio Estevam
@ 2020-04-10 12:40         ` ansuelsmth
  2020-04-10 12:57           ` Fabio Estevam
  0 siblings, 1 reply; 14+ messages in thread
From: ansuelsmth @ 2020-04-10 12:40 UTC (permalink / raw)
  To: 'Fabio Estevam'
  Cc: 'open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
	BINDINGS', 'Richard Zhu', 'Lucas Stach',
	'Bjorn Helgaas', 'Rob Herring',
	'Mark Rutland', 'Shawn Guo',
	'Sascha Hauer', 'Pengutronix Kernel Team',
	'NXP Linux Team', 'Lorenzo Pieralisi',
	'Andrew Murray',
	linux-pci,
	'moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE',
	'linux-kernel'

> Hi Ansuel,
> 
> On Fri, Apr 10, 2020 at 8:07 AM <ansuelsmth@gmail.com> wrote:
> 
> > so no chance of changing this?
> 
> Reading the commit log I don't see any explanation as to why you need
> to change the current bindings.
> 
> What is the motivation for doing this? Is this really worth it?

It's really to not have the same exact binding to 2 different driver.
If this would cause problem I will use qcom,tx-deemph...... but still it looks
wrong to me having this. How should I proceed?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name
  2020-04-10 12:40         ` R: " ansuelsmth
@ 2020-04-10 12:57           ` Fabio Estevam
  0 siblings, 0 replies; 14+ messages in thread
From: Fabio Estevam @ 2020-04-10 12:57 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Richard Zhu, Lucas Stach, Bjorn Helgaas, Rob Herring,
	Mark Rutland, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	NXP Linux Team, Lorenzo Pieralisi, Andrew Murray, linux-pci,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

On Fri, Apr 10, 2020 at 9:40 AM <ansuelsmth@gmail.com> wrote:

> It's really to not have the same exact binding to 2 different driver.
> If this would cause problem I will use qcom,tx-deemph...... but still it looks
> wrong to me having this. How should I proceed?

You could make the imx6 PCI driver to accept both the new and old
binding versions.

This way we can keep compatibility with old dtb's.

Also, if you respin this, please state the motivation that you
explained here in the commit log.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name
  2020-04-10  0:47 ` [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name Ansuel Smith
  2020-04-10  2:24   ` Fabio Estevam
@ 2020-04-13 20:25   ` Bjorn Helgaas
  1 sibling, 0 replies; 14+ messages in thread
From: Bjorn Helgaas @ 2020-04-13 20:25 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: devicetree, Richard Zhu, Lucas Stach, Rob Herring, Mark Rutland,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Lorenzo Pieralisi, Andrew Murray, linux-pci,
	linux-arm-kernel, linux-kernel

If/when you repost this, please update the subject to match the
convention:

  $ git log --oneline drivers/pci/controller/dwc/pci-imx6.c
  2170a09fb4b0 PCI: imx6: Propagate errors for optional regulators
  075af61c19cd PCI: imx6: Limit DBI register length
  1b8df7aa7874 PCI: imx6: Allow asynchronous probing
  87cb312777b5 PCI: imx6: Use usleep_range() in imx6_pcie_enable_ref_clk()

As Fabio pointed out, we can't break backward compatibility without a
good reason.

On Fri, Apr 10, 2020 at 02:47:36AM +0200, Ansuel Smith wrote:
> Rename specific bindings to generic name.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index acfbd34032a8..4ac140e007b4 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1146,28 +1146,28 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>  	}
>  
>  	/* Grab PCIe PHY Tx Settings */
> -	if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
> +	if (of_property_read_u32(node, "tx-deemph-gen1",
>  				 &imx6_pcie->tx_deemph_gen1))
>  		imx6_pcie->tx_deemph_gen1 = 0;
>  
> -	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-3p5db",
> +	if (of_property_read_u32(node, "tx-deemph-gen2-3p5db",
>  				 &imx6_pcie->tx_deemph_gen2_3p5db))
>  		imx6_pcie->tx_deemph_gen2_3p5db = 0;
>  
> -	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-6db",
> +	if (of_property_read_u32(node, "tx-deemph-gen2-6db",
>  				 &imx6_pcie->tx_deemph_gen2_6db))
>  		imx6_pcie->tx_deemph_gen2_6db = 20;
>  
> -	if (of_property_read_u32(node, "fsl,tx-swing-full",
> +	if (of_property_read_u32(node, "tx-swing-full",
>  				 &imx6_pcie->tx_swing_full))
>  		imx6_pcie->tx_swing_full = 127;
>  
> -	if (of_property_read_u32(node, "fsl,tx-swing-low",
> +	if (of_property_read_u32(node, "tx-swing-low",
>  				 &imx6_pcie->tx_swing_low))
>  		imx6_pcie->tx_swing_low = 127;
>  
>  	/* Limit link speed */
> -	ret = of_property_read_u32(node, "fsl,max-link-speed",
> +	ret = of_property_read_u32(node, "max-link-speed",
>  				   &imx6_pcie->link_gen);
>  	if (ret)
>  		imx6_pcie->link_gen = 1;
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property
  2020-04-10  0:47 ` [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property Ansuel Smith
@ 2020-04-13 20:29   ` Florian Fainelli
  2020-04-14 12:51     ` R: " ansuelsmth
  2020-04-13 20:40   ` Bjorn Helgaas
  1 sibling, 1 reply; 14+ messages in thread
From: Florian Fainelli @ 2020-04-13 20:29 UTC (permalink / raw)
  To: Ansuel Smith, devicetree
  Cc: Mark Rutland, Lorenzo Pieralisi, Richard Zhu, Fabio Estevam,
	Sascha Hauer, linux-kernel, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, linux-pci, Bjorn Helgaas, Andrew Murray,
	Shawn Guo, linux-arm-kernel, Lucas Stach



On 4/9/2020 5:47 PM, Ansuel Smith wrote:
> Document tx-deempth, tx swing and rx-eq property property used on some
> device (qcom ipq806x or imx6q) to tune and fix init error of the pci
> bridge.

Those properties are not specific to the host bridge per-se, but to the
PCIe PHY, therefore, one would expect to find those properties within
the PCIe PHY node if it exists. Given you want this binding to be
generic, this is an important thing to correct here.
-- 
Florian

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property
  2020-04-10  0:47 ` [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property Ansuel Smith
  2020-04-13 20:29   ` Florian Fainelli
@ 2020-04-13 20:40   ` Bjorn Helgaas
  1 sibling, 0 replies; 14+ messages in thread
From: Bjorn Helgaas @ 2020-04-13 20:40 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: devicetree, Richard Zhu, Lucas Stach, Rob Herring, Mark Rutland,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Lorenzo Pieralisi, Andrew Murray, linux-pci,
	linux-arm-kernel, linux-kernel

Looks like "dt-bindings: PCI: " is the convention here.

  $ git log --oneline Documentation/devicetree/bindings/pci/
  11be8af70d86 dt-bindings: PCI: Convert PCIe Host/Endpoint in Cadence platform to DT schema
  69501078fc60 dt-bindings: PCI: cadence: Add PCIe RC/EP DT schema for Cadence PCIe
  847dbf4e1aba dt-bindings: PCI: Add PCI Endpoint Controller Schema
  f9f711efd441 arm64: tegra: Fix Tegra194 PCIe compatible string
  9f04d18b1edf dt-bindings: PCI: tegra: Add DT support for PCIe EP nodes in Tegra194
  6e5f77031cc9 dt-bindings: PCI: meson: Update PCIE bindings documentation
  3edeb49525bb dt-bindings: PCI: Add NXP Layerscape SoCs PCIe Gen4 controller
  34129bb831cc dt-bindings: PCI: intel: Fix dt_binding_check compilation failure

On Fri, Apr 10, 2020 at 02:47:35AM +0200, Ansuel Smith wrote:
> Document tx-deempth, tx swing and rx-eq property property used on some
> device (qcom ipq806x or imx6q) to tune and fix init error of the pci
> bridge.

s/tx-deempth/tx-deemph/ (in subject and commit log)
s/tx swing/tx-swing/ (both places also)
s/rx-eq/rx-equalization/ (ditto)
s/property property/properties/
s/pci/PCI/ in English text (not C variables, function names, etc).

If these are made generic, remove the "qcom ipq806x or imx6q" part.

> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  Documentation/devicetree/bindings/pci/pci.txt | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
> index 29bcbd88f457..df37486f1853 100644
> --- a/Documentation/devicetree/bindings/pci/pci.txt
> +++ b/Documentation/devicetree/bindings/pci/pci.txt
> @@ -24,6 +24,24 @@ driver implementation may support the following properties:
>     unsupported link speed, for instance, trying to do training for
>     unsupported link speed, etc.  Must be '4' for gen4, '3' for gen3, '2'
>     for gen2, and '1' for gen1. Any other values are invalid.
> +- tx-deemph-gen1
> +   If present this property will tune the Transmit De-Emphasis level for GEN1 if
> +   supported by the driver.
> +- tx-deemph-gen2-3p5db
> +   If present this property will tune the Transmit De-Emphasis level for GEN2 in
> +   3.5db band if supported by the driver.
> +- tx-deempth-gen2-6db
> +   If present this property will tune the Transmit De-Emphasis level for GEN2 in
> +   6db band if supported by the driver.
> +- tx-swing-full
> +   If present this property will tune the Tx Swing Full value if supported by the
> +   driver.
> +- tx-swing-low
> +   If present this property will tune the Tx Swing Low value if supported by the

Wrap all of these to fit in 78 columns.  Some of them fit in 80
columns, which is sort of OK.  This one is 81, which is definitely too
long.

> +   driver.
> +- rx-equalization
> +   If present this property will tune the Rx equalization value if supported by
> +   the driver.
>  - reset-gpios:
>     If present this property specifies PERST# GPIO. Host drivers can parse the
>     GPIO and apply fundamental reset to endpoints.
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* R: [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property
  2020-04-13 20:29   ` Florian Fainelli
@ 2020-04-14 12:51     ` ansuelsmth
  0 siblings, 0 replies; 14+ messages in thread
From: ansuelsmth @ 2020-04-14 12:51 UTC (permalink / raw)
  To: 'Florian Fainelli', devicetree
  Cc: 'Mark Rutland', 'Lorenzo Pieralisi',
	'Richard Zhu', 'Fabio Estevam',
	'Sascha Hauer', linux-kernel, 'Rob Herring',
	'NXP Linux Team', 'Pengutronix Kernel Team',
	linux-pci, 'Bjorn Helgaas', 'Andrew Murray',
	'Shawn Guo', linux-arm-kernel, 'Lucas Stach'

> On 4/9/2020 5:47 PM, Ansuel Smith wrote:
> > Document tx-deempth, tx swing and rx-eq property property used on
> some
> > device (qcom ipq806x or imx6q) to tune and fix init error of the pci
> > bridge.
> 
> Those properties are not specific to the host bridge per-se, but to the
> PCIe PHY, therefore, one would expect to find those properties within
> the PCIe PHY node if it exists. Given you want this binding to be
> generic, this is an important thing to correct here.
> --
> Florian

So where should I put these? If I understand this properly I should move 
this to the PHY directory but no PCIe PHY node exist for both imx6q 
and ipq806x. How I should proceed? 
It would be better to just drop this and add qcom specific binding to the
driver? 


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-04-14 12:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10  0:47 [PATCH 0/4] Move tx-deempth and tx swing to pci.txt Ansuel Smith
2020-04-10  0:47 ` [PATCH 1/4] devicetree: bindings: pci: document tx-deempth tx swing and rx-eq property Ansuel Smith
2020-04-13 20:29   ` Florian Fainelli
2020-04-14 12:51     ` R: " ansuelsmth
2020-04-13 20:40   ` Bjorn Helgaas
2020-04-10  0:47 ` [PATCH 2/4] drivers: pci: dwc: pci-imx6: update binding to generic name Ansuel Smith
2020-04-10  2:24   ` Fabio Estevam
2020-04-10 11:07     ` R: " ansuelsmth
2020-04-10 12:31       ` Fabio Estevam
2020-04-10 12:40         ` R: " ansuelsmth
2020-04-10 12:57           ` Fabio Estevam
2020-04-13 20:25   ` Bjorn Helgaas
2020-04-10  0:47 ` [PATCH 3/4] arm: dts: imx6: update pci " Ansuel Smith
2020-04-10  0:47 ` [PATCH 4/4] devicetree: bindings: pci: fsl,imx6q-pcie: rename tx deemph and swing Ansuel Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).