All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml
@ 2020-04-10  9:18 ` Sergio Paracuellos
  0 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-10  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel, devicetree, robh

In order to get this driver a new chance to be properly mainlined
convert bindings file into a new yaml one is missing. Previous
bindings got the 'Reviewed-by' tag from Rob Herring last year
in a second attempt to get this driver mainlined.

See:
 - https://patchwork.kernel.org/patch/10878071/ 

In new version the use of the '#phy-cells' property 
has changed a bit. Before, we were using this cell to say which
phy was dual ported but we were using three 'phys' and its 'phy-names'
properties using instances inside the driver code making it a bit
difficult. The fact of re-init registers and so on calling 'phy_init'
for the phy1 was also introducing not stable clock signals on hard-resets and
the kernel was hanging sometimes. Now we just use two 'phys' with two
'phy-names' nodes and we say which port is dual-ported (phy0 and phy1
share the same phy and it just use different offset in config registers to
do the power on. The init process and so on shall be uniq to avoid problems
so now the driver controller achieve this situation.

So now, the pci controller has the following:

pcie: pcie@1e140000 {
    compatible = "mediatek,mt7621-pci";
    ...
    phys = <&pcie0_phy 1>, <&pcie2_phy 0>;
    phy-names = "pcie-phy0", "pcie-phy2";
    ...
}

And the phys are defined as:

pcie0_phy: pcie-phy@1e149000 {
    compatible = "mediatek,mt7621-pci-phy";
    reg = <0x1e149000 0x0700>;
    #phy-cells = <1>;
};

pcie2_phy: pcie-phy@1e14a000 {
    compatible = "mediatek,mt7621-pci-phy";
    reg = <0x1e14a000 0x0700>;
    #phy-cells = <1>;
};

Doing in this way we get a deterministic behaviour and stable pci
clocks for both soft and hard resets and the phy driver code got 
simplified a lot. 

Rob, It would be nice to know if this is a valid approach.

Thanks in advance for your time.

Best regards,
    Sergio Paracuellos

Sergio Paracuellos (2):
  staging: mt7621-pci-phy: dt: bindings: add
    mediatek,mt7621-pci-phy.yaml
  staging: mt7621-pci-phy: dt: bindings: remove bindings txt file

 .../mediatek,mt7621-pci-phy.txt               | 28 ---------------
 .../mediatek,mt7621-pci-phy.yaml              | 36 +++++++++++++++++++
 2 files changed, 36 insertions(+), 28 deletions(-)
 delete mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt
 create mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml

-- 
2.25.1


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

* [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml
@ 2020-04-10  9:18 ` Sergio Paracuellos
  0 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-10  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: neil, devicetree, driverdev-devel, robh

In order to get this driver a new chance to be properly mainlined
convert bindings file into a new yaml one is missing. Previous
bindings got the 'Reviewed-by' tag from Rob Herring last year
in a second attempt to get this driver mainlined.

See:
 - https://patchwork.kernel.org/patch/10878071/ 

In new version the use of the '#phy-cells' property 
has changed a bit. Before, we were using this cell to say which
phy was dual ported but we were using three 'phys' and its 'phy-names'
properties using instances inside the driver code making it a bit
difficult. The fact of re-init registers and so on calling 'phy_init'
for the phy1 was also introducing not stable clock signals on hard-resets and
the kernel was hanging sometimes. Now we just use two 'phys' with two
'phy-names' nodes and we say which port is dual-ported (phy0 and phy1
share the same phy and it just use different offset in config registers to
do the power on. The init process and so on shall be uniq to avoid problems
so now the driver controller achieve this situation.

So now, the pci controller has the following:

pcie: pcie@1e140000 {
    compatible = "mediatek,mt7621-pci";
    ...
    phys = <&pcie0_phy 1>, <&pcie2_phy 0>;
    phy-names = "pcie-phy0", "pcie-phy2";
    ...
}

And the phys are defined as:

pcie0_phy: pcie-phy@1e149000 {
    compatible = "mediatek,mt7621-pci-phy";
    reg = <0x1e149000 0x0700>;
    #phy-cells = <1>;
};

pcie2_phy: pcie-phy@1e14a000 {
    compatible = "mediatek,mt7621-pci-phy";
    reg = <0x1e14a000 0x0700>;
    #phy-cells = <1>;
};

Doing in this way we get a deterministic behaviour and stable pci
clocks for both soft and hard resets and the phy driver code got 
simplified a lot. 

Rob, It would be nice to know if this is a valid approach.

Thanks in advance for your time.

Best regards,
    Sergio Paracuellos

Sergio Paracuellos (2):
  staging: mt7621-pci-phy: dt: bindings: add
    mediatek,mt7621-pci-phy.yaml
  staging: mt7621-pci-phy: dt: bindings: remove bindings txt file

 .../mediatek,mt7621-pci-phy.txt               | 28 ---------------
 .../mediatek,mt7621-pci-phy.yaml              | 36 +++++++++++++++++++
 2 files changed, 36 insertions(+), 28 deletions(-)
 delete mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt
 create mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml

-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/2] staging: mt7621-pci-phy: dt: bindings: add mediatek,mt7621-pci-phy.yaml
  2020-04-10  9:18 ` Sergio Paracuellos
@ 2020-04-10  9:18   ` Sergio Paracuellos
  -1 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-10  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel, devicetree, robh

Add bindings to describe Mediatek MT7621 PCIe PHY.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../mediatek,mt7621-pci-phy.yaml              | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml

diff --git a/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml b/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml
new file mode 100644
index 000000000000..cf32bbc45b5d
--- /dev/null
+++ b/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/mediatek,mt7621-pci-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Mediatek Mt7621 PCIe PHY Device Tree Bindings
+
+maintainers:
+  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
+
+properties:
+  compatible:
+    const: mediatek,mt7621-pci-phy
+
+  reg:
+    maxItems: 1
+
+  "#phy-cells":
+    const: 1
+    description: selects if the phy is dual-ported
+
+required:
+  - compatible
+  - reg
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    pcie0_phy: pcie-phy@1e149000 {
+      compatible = "mediatek,mt7621-pci-phy";
+      reg = <0x1e149000 0x0700>;
+      #phy-cells = <1>;
+    };
-- 
2.25.1


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

* [PATCH 1/2] staging: mt7621-pci-phy: dt: bindings: add mediatek, mt7621-pci-phy.yaml
@ 2020-04-10  9:18   ` Sergio Paracuellos
  0 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-10  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: neil, devicetree, driverdev-devel, robh

Add bindings to describe Mediatek MT7621 PCIe PHY.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../mediatek,mt7621-pci-phy.yaml              | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml

diff --git a/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml b/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml
new file mode 100644
index 000000000000..cf32bbc45b5d
--- /dev/null
+++ b/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/mediatek,mt7621-pci-phy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Mediatek Mt7621 PCIe PHY Device Tree Bindings
+
+maintainers:
+  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
+
+properties:
+  compatible:
+    const: mediatek,mt7621-pci-phy
+
+  reg:
+    maxItems: 1
+
+  "#phy-cells":
+    const: 1
+    description: selects if the phy is dual-ported
+
+required:
+  - compatible
+  - reg
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    pcie0_phy: pcie-phy@1e149000 {
+      compatible = "mediatek,mt7621-pci-phy";
+      reg = <0x1e149000 0x0700>;
+      #phy-cells = <1>;
+    };
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/2] staging: mt7621-pci-phy: dt: bindings: remove bindings txt file
  2020-04-10  9:18 ` Sergio Paracuellos
@ 2020-04-10  9:18   ` Sergio Paracuellos
  -1 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-10  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel, devicetree, robh

Yaml file for bindings has been properly added. Hence, remove
the old txt file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../mediatek,mt7621-pci-phy.txt               | 28 -------------------
 1 file changed, 28 deletions(-)
 delete mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt

diff --git a/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt b/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt
deleted file mode 100644
index a369d715378b..000000000000
--- a/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Mediatek Mt7621 PCIe PHY
-
-Required properties:
-- compatible: must be "mediatek,mt7621-pci-phy"
-- reg: base address and length of the PCIe PHY block
-- #phy-cells: must be <1> for pcie0_phy and for pcie1_phy.
-
-Example:
-	pcie0_phy: pcie-phy@1e149000 {
-		compatible = "mediatek,mt7621-pci-phy";
-		reg = <0x1e149000 0x0700>;
-		#phy-cells = <1>;
-	};
-
-	pcie1_phy: pcie-phy@1e14a000 {
-		compatible = "mediatek,mt7621-pci-phy";
-		reg = <0x1e14a000 0x0700>;
-		#phy-cells = <1>;
-	};
-
-	/* users of the PCIe phy */
-
-	pcie: pcie@1e140000 {
-		...
-		...
-		phys = <&pcie0_phy 0>, <&pcie0_phy 1>, <&pcie1_phy 0>;
-		phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
-	};
-- 
2.25.1


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

* [PATCH 2/2] staging: mt7621-pci-phy: dt: bindings: remove bindings txt file
@ 2020-04-10  9:18   ` Sergio Paracuellos
  0 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-10  9:18 UTC (permalink / raw)
  To: gregkh; +Cc: neil, devicetree, driverdev-devel, robh

Yaml file for bindings has been properly added. Hence, remove
the old txt file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../mediatek,mt7621-pci-phy.txt               | 28 -------------------
 1 file changed, 28 deletions(-)
 delete mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt

diff --git a/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt b/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt
deleted file mode 100644
index a369d715378b..000000000000
--- a/drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Mediatek Mt7621 PCIe PHY
-
-Required properties:
-- compatible: must be "mediatek,mt7621-pci-phy"
-- reg: base address and length of the PCIe PHY block
-- #phy-cells: must be <1> for pcie0_phy and for pcie1_phy.
-
-Example:
-	pcie0_phy: pcie-phy@1e149000 {
-		compatible = "mediatek,mt7621-pci-phy";
-		reg = <0x1e149000 0x0700>;
-		#phy-cells = <1>;
-	};
-
-	pcie1_phy: pcie-phy@1e14a000 {
-		compatible = "mediatek,mt7621-pci-phy";
-		reg = <0x1e14a000 0x0700>;
-		#phy-cells = <1>;
-	};
-
-	/* users of the PCIe phy */
-
-	pcie: pcie@1e140000 {
-		...
-		...
-		phys = <&pcie0_phy 0>, <&pcie0_phy 1>, <&pcie1_phy 0>;
-		phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
-	};
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml
  2020-04-10  9:18 ` Sergio Paracuellos
@ 2020-04-11  3:45   ` NeilBrown
  -1 siblings, 0 replies; 10+ messages in thread
From: NeilBrown @ 2020-04-11  3:45 UTC (permalink / raw)
  To: Sergio Paracuellos, gregkh; +Cc: driverdev-devel, devicetree, robh

[-- Attachment #1: Type: text/plain, Size: 2611 bytes --]


Hi Sergio,
 thanks for your continuing work on mt7621-pci.
 I've looked through you patches and while things seem to make sense I
 don't have the expertise to review them properly.

 I've just a build a kernel based on v5.6.3 with the patches listed
 below applied from your various emails over the last couple of months.

 I have confirm that PCI works and in particular I don't get the
 cold-boot hangs that are common without these patches.  So that is an
 excellent result.

Thanks,
NeilBrown

7e4350e416ed staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function
283e56fe3f49 staging: mt7621-pci: enable clock bit for each port
5edfd9ca31ad MIPS: ralink: mt7621: introduce 'soc_device' initialization
7ce68fa530ad staging: mt7621-pci: use gpios for properly reset
ccffb8f9a204 staging: mt7621-pci: change value for 'PERST_DELAY_MS'
840b0de42c22 staging: mt7621-dts: make use of 'reset-gpios' property for pci
bd44f2c46e60 staging: mt7621-pci: bindings: update doc accordly to last changes
a83cb7040463 staging: mt7621-pci: release gpios after pci initialization
51ae5f557464 staging: mt7621-pci: delete no more needed 'mt7621_reset_port'
6d5af2af8fdd staging: mt7621-pci-phy: add 'mt7621_phy_rmw' to simplify code
8f4e9d5f57ca staging: mt7621-pci: fix io space and properly set resource limits
d907c205371d staging: mt7621-pci: fix register to set up virtual bridges
1a87910faf27 staging: mt7621-pci: don't return if get gpio fails
dcd05b5bda59 staging: mt7621-pci-phy: avoid to create to different phys for a dual port one
b2c3746212ae staging: mt7621-dts: set up only two pcie phys
ef178ecf08bd staging: mt7621-pci: use only two phys from device tree
2553c237ffdc staging: mt7621-pci: change variable to print for slot
0bcb3caed96e staging: mt7621-pci: be sure gpio descriptor is null on fails
07d3877ebc7e staging: mt7621-pci: avoid to poweroff the phy for slot one
ba5687b6220b staging: mt7621-dts: gpio 8 and 9 are vendor specific
04c8eb6ff776 staging: mt7621-pci: delete release gpios related code
d3b3de21837b staging: mt7621-pci: use builtin_platform_driver()
41cd2464a89e staging: mt7621-pci: add myself as a contributor of the driver
815535a5b6ad staging: mt7621-pci-phy: use builtin_platform_driver()
8c26a5eec020 staging: mt7621-pci-phy: re-do 'xtal_mode' detection
ccaa47aeb530 staging: mt7621-pci: avoid to set 'iomem_resource' addresses
28dd5daf3b55 staging: mt7621-pci: properly power off dual-ported pcie phy
10e6aa437d6e staging: mt7621-pci-phy: dt: bindings: add mediatek,mt7621-pci-phy.yaml
8dc6eec861d2 staging: mt7621-pci-phy: dt: bindings: remove bindings txt file

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml
@ 2020-04-11  3:45   ` NeilBrown
  0 siblings, 0 replies; 10+ messages in thread
From: NeilBrown @ 2020-04-11  3:45 UTC (permalink / raw)
  To: Sergio Paracuellos, gregkh; +Cc: devicetree, driverdev-devel, robh


[-- Attachment #1.1: Type: text/plain, Size: 2611 bytes --]


Hi Sergio,
 thanks for your continuing work on mt7621-pci.
 I've looked through you patches and while things seem to make sense I
 don't have the expertise to review them properly.

 I've just a build a kernel based on v5.6.3 with the patches listed
 below applied from your various emails over the last couple of months.

 I have confirm that PCI works and in particular I don't get the
 cold-boot hangs that are common without these patches.  So that is an
 excellent result.

Thanks,
NeilBrown

7e4350e416ed staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function
283e56fe3f49 staging: mt7621-pci: enable clock bit for each port
5edfd9ca31ad MIPS: ralink: mt7621: introduce 'soc_device' initialization
7ce68fa530ad staging: mt7621-pci: use gpios for properly reset
ccffb8f9a204 staging: mt7621-pci: change value for 'PERST_DELAY_MS'
840b0de42c22 staging: mt7621-dts: make use of 'reset-gpios' property for pci
bd44f2c46e60 staging: mt7621-pci: bindings: update doc accordly to last changes
a83cb7040463 staging: mt7621-pci: release gpios after pci initialization
51ae5f557464 staging: mt7621-pci: delete no more needed 'mt7621_reset_port'
6d5af2af8fdd staging: mt7621-pci-phy: add 'mt7621_phy_rmw' to simplify code
8f4e9d5f57ca staging: mt7621-pci: fix io space and properly set resource limits
d907c205371d staging: mt7621-pci: fix register to set up virtual bridges
1a87910faf27 staging: mt7621-pci: don't return if get gpio fails
dcd05b5bda59 staging: mt7621-pci-phy: avoid to create to different phys for a dual port one
b2c3746212ae staging: mt7621-dts: set up only two pcie phys
ef178ecf08bd staging: mt7621-pci: use only two phys from device tree
2553c237ffdc staging: mt7621-pci: change variable to print for slot
0bcb3caed96e staging: mt7621-pci: be sure gpio descriptor is null on fails
07d3877ebc7e staging: mt7621-pci: avoid to poweroff the phy for slot one
ba5687b6220b staging: mt7621-dts: gpio 8 and 9 are vendor specific
04c8eb6ff776 staging: mt7621-pci: delete release gpios related code
d3b3de21837b staging: mt7621-pci: use builtin_platform_driver()
41cd2464a89e staging: mt7621-pci: add myself as a contributor of the driver
815535a5b6ad staging: mt7621-pci-phy: use builtin_platform_driver()
8c26a5eec020 staging: mt7621-pci-phy: re-do 'xtal_mode' detection
ccaa47aeb530 staging: mt7621-pci: avoid to set 'iomem_resource' addresses
28dd5daf3b55 staging: mt7621-pci: properly power off dual-ported pcie phy
10e6aa437d6e staging: mt7621-pci-phy: dt: bindings: add mediatek,mt7621-pci-phy.yaml
8dc6eec861d2 staging: mt7621-pci-phy: dt: bindings: remove bindings txt file

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 169 bytes --]

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml
  2020-04-11  3:45   ` NeilBrown
@ 2020-04-11  4:43     ` Sergio Paracuellos
  -1 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-11  4:43 UTC (permalink / raw)
  To: NeilBrown
  Cc: Greg KH, driverdev-devel,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring

Hi Neil,

On Sat, Apr 11, 2020 at 5:45 AM NeilBrown <neil@brown.name> wrote:
>
>
> Hi Sergio,
>  thanks for your continuing work on mt7621-pci.
>  I've looked through you patches and while things seem to make sense I
>  don't have the expertise to review them properly.
>
>  I've just a build a kernel based on v5.6.3 with the patches listed
>  below applied from your various emails over the last couple of months.
>
>  I have confirm that PCI works and in particular I don't get the
>  cold-boot hangs that are common without these patches.  So that is an
>  excellent result.

Yes, it seems it is not hanging anymore and that is always a good thing :-).
For me the pci phy driver is ready to be mainlined if the two phys
approach is correct.
and for the pci controller part I need to review how interrupts are
being mapped and
then convert bindings into a yaml file and get feedback about what to
do with the clock stuff.
According to this thread and because there is not a clock plan for
mt7621 assumptions should not be done for peripherals clocks:

http://archive.lwn.net:8080/devicetree/20190724022310.28010-1-gch981213@gmail.com/

So maybe we can just forget about clocks and clock-names stuff in the
pci controller binding and do what we are doing with the clock gate
now which is setting up the bit manually as other similar drivers do.

What do you think? (your tree has the patches of the thread I am
pointed out here applied)

>
> Thanks,
> NeilBrown

Best regards,
    Sergio Paracuellos
>
> 7e4350e416ed staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function
> 283e56fe3f49 staging: mt7621-pci: enable clock bit for each port
> 5edfd9ca31ad MIPS: ralink: mt7621: introduce 'soc_device' initialization
> 7ce68fa530ad staging: mt7621-pci: use gpios for properly reset
> ccffb8f9a204 staging: mt7621-pci: change value for 'PERST_DELAY_MS'
> 840b0de42c22 staging: mt7621-dts: make use of 'reset-gpios' property for pci
> bd44f2c46e60 staging: mt7621-pci: bindings: update doc accordly to last changes
> a83cb7040463 staging: mt7621-pci: release gpios after pci initialization
> 51ae5f557464 staging: mt7621-pci: delete no more needed 'mt7621_reset_port'
> 6d5af2af8fdd staging: mt7621-pci-phy: add 'mt7621_phy_rmw' to simplify code
> 8f4e9d5f57ca staging: mt7621-pci: fix io space and properly set resource limits
> d907c205371d staging: mt7621-pci: fix register to set up virtual bridges
> 1a87910faf27 staging: mt7621-pci: don't return if get gpio fails
> dcd05b5bda59 staging: mt7621-pci-phy: avoid to create to different phys for a dual port one
> b2c3746212ae staging: mt7621-dts: set up only two pcie phys
> ef178ecf08bd staging: mt7621-pci: use only two phys from device tree
> 2553c237ffdc staging: mt7621-pci: change variable to print for slot
> 0bcb3caed96e staging: mt7621-pci: be sure gpio descriptor is null on fails
> 07d3877ebc7e staging: mt7621-pci: avoid to poweroff the phy for slot one
> ba5687b6220b staging: mt7621-dts: gpio 8 and 9 are vendor specific
> 04c8eb6ff776 staging: mt7621-pci: delete release gpios related code
> d3b3de21837b staging: mt7621-pci: use builtin_platform_driver()
> 41cd2464a89e staging: mt7621-pci: add myself as a contributor of the driver
^^^^
This one is not applied to the tree. This should be do throug the
MAINTAINERS file. Will do when this is mainlined.

> 815535a5b6ad staging: mt7621-pci-phy: use builtin_platform_driver()
> 8c26a5eec020 staging: mt7621-pci-phy: re-do 'xtal_mode' detection
> ccaa47aeb530 staging: mt7621-pci: avoid to set 'iomem_resource' addresses
> 28dd5daf3b55 staging: mt7621-pci: properly power off dual-ported pcie phy
> 10e6aa437d6e staging: mt7621-pci-phy: dt: bindings: add mediatek,mt7621-pci-phy.yaml
> 8dc6eec861d2 staging: mt7621-pci-phy: dt: bindings: remove bindings txt file

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

* Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml
@ 2020-04-11  4:43     ` Sergio Paracuellos
  0 siblings, 0 replies; 10+ messages in thread
From: Sergio Paracuellos @ 2020-04-11  4:43 UTC (permalink / raw)
  To: NeilBrown
  Cc: Greg KH, driverdev-devel, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Neil,

On Sat, Apr 11, 2020 at 5:45 AM NeilBrown <neil@brown.name> wrote:
>
>
> Hi Sergio,
>  thanks for your continuing work on mt7621-pci.
>  I've looked through you patches and while things seem to make sense I
>  don't have the expertise to review them properly.
>
>  I've just a build a kernel based on v5.6.3 with the patches listed
>  below applied from your various emails over the last couple of months.
>
>  I have confirm that PCI works and in particular I don't get the
>  cold-boot hangs that are common without these patches.  So that is an
>  excellent result.

Yes, it seems it is not hanging anymore and that is always a good thing :-).
For me the pci phy driver is ready to be mainlined if the two phys
approach is correct.
and for the pci controller part I need to review how interrupts are
being mapped and
then convert bindings into a yaml file and get feedback about what to
do with the clock stuff.
According to this thread and because there is not a clock plan for
mt7621 assumptions should not be done for peripherals clocks:

http://archive.lwn.net:8080/devicetree/20190724022310.28010-1-gch981213@gmail.com/

So maybe we can just forget about clocks and clock-names stuff in the
pci controller binding and do what we are doing with the clock gate
now which is setting up the bit manually as other similar drivers do.

What do you think? (your tree has the patches of the thread I am
pointed out here applied)

>
> Thanks,
> NeilBrown

Best regards,
    Sergio Paracuellos
>
> 7e4350e416ed staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function
> 283e56fe3f49 staging: mt7621-pci: enable clock bit for each port
> 5edfd9ca31ad MIPS: ralink: mt7621: introduce 'soc_device' initialization
> 7ce68fa530ad staging: mt7621-pci: use gpios for properly reset
> ccffb8f9a204 staging: mt7621-pci: change value for 'PERST_DELAY_MS'
> 840b0de42c22 staging: mt7621-dts: make use of 'reset-gpios' property for pci
> bd44f2c46e60 staging: mt7621-pci: bindings: update doc accordly to last changes
> a83cb7040463 staging: mt7621-pci: release gpios after pci initialization
> 51ae5f557464 staging: mt7621-pci: delete no more needed 'mt7621_reset_port'
> 6d5af2af8fdd staging: mt7621-pci-phy: add 'mt7621_phy_rmw' to simplify code
> 8f4e9d5f57ca staging: mt7621-pci: fix io space and properly set resource limits
> d907c205371d staging: mt7621-pci: fix register to set up virtual bridges
> 1a87910faf27 staging: mt7621-pci: don't return if get gpio fails
> dcd05b5bda59 staging: mt7621-pci-phy: avoid to create to different phys for a dual port one
> b2c3746212ae staging: mt7621-dts: set up only two pcie phys
> ef178ecf08bd staging: mt7621-pci: use only two phys from device tree
> 2553c237ffdc staging: mt7621-pci: change variable to print for slot
> 0bcb3caed96e staging: mt7621-pci: be sure gpio descriptor is null on fails
> 07d3877ebc7e staging: mt7621-pci: avoid to poweroff the phy for slot one
> ba5687b6220b staging: mt7621-dts: gpio 8 and 9 are vendor specific
> 04c8eb6ff776 staging: mt7621-pci: delete release gpios related code
> d3b3de21837b staging: mt7621-pci: use builtin_platform_driver()
> 41cd2464a89e staging: mt7621-pci: add myself as a contributor of the driver
^^^^
This one is not applied to the tree. This should be do throug the
MAINTAINERS file. Will do when this is mainlined.

> 815535a5b6ad staging: mt7621-pci-phy: use builtin_platform_driver()
> 8c26a5eec020 staging: mt7621-pci-phy: re-do 'xtal_mode' detection
> ccaa47aeb530 staging: mt7621-pci: avoid to set 'iomem_resource' addresses
> 28dd5daf3b55 staging: mt7621-pci: properly power off dual-ported pcie phy
> 10e6aa437d6e staging: mt7621-pci-phy: dt: bindings: add mediatek,mt7621-pci-phy.yaml
> 8dc6eec861d2 staging: mt7621-pci-phy: dt: bindings: remove bindings txt file
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-04-11  4:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10  9:18 [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml Sergio Paracuellos
2020-04-10  9:18 ` Sergio Paracuellos
2020-04-10  9:18 ` [PATCH 1/2] staging: mt7621-pci-phy: dt: bindings: add mediatek,mt7621-pci-phy.yaml Sergio Paracuellos
2020-04-10  9:18   ` [PATCH 1/2] staging: mt7621-pci-phy: dt: bindings: add mediatek, mt7621-pci-phy.yaml Sergio Paracuellos
2020-04-10  9:18 ` [PATCH 2/2] staging: mt7621-pci-phy: dt: bindings: remove bindings txt file Sergio Paracuellos
2020-04-10  9:18   ` Sergio Paracuellos
2020-04-11  3:45 ` [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml NeilBrown
2020-04-11  3:45   ` NeilBrown
2020-04-11  4:43   ` Sergio Paracuellos
2020-04-11  4:43     ` Sergio Paracuellos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.