rework mtk pcie-gen3 bindings and support mt7986
Subsystems (5)
cover rework mtk pcie-gen3 bindings and support mt7986
From: Frank Wunderlich <[email protected]>
This Series prepares support for mt7986 PCIe which is basicly gen3 PCIe but with slightly differnt clock configuration.
To make differences better to read i split the exiting bindings which has already different settings with a compatible switch and then add a new one for mt7986.
Frank Wunderlich (3):
dt-bindings: PCI: mediatek-gen3: add SoC based clock config
dt-bindings: PCI: mediatek-gen3: add support for mt7986
dt-bindings: PCI: mediatek-gen3: add mt7986 clock config
.../bindings/pci/mediatek-pcie-gen3.yaml | 65 +++++++++++++++---- 1 file changed, 53 insertions(+), 12 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/3 dt-bindings: PCI: mediatek-gen3: add SoC based clock config
From: Frank Wunderlich <[email protected]>
The PCIe driver covers different SOC which needing different clock configs. Define them based on compatible.
--- .../bindings/pci/mediatek-pcie-gen3.yaml | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +36 -12
@@ -43,9 +43,6 @@ description: |+ each set has its own address for MSI message, and supports 32 MSI vectors to generate interrupt. -allOf: - - $ref: /schemas/pci/pci-bus.yaml# - properties: compatible: oneOf:
@@ -84,15 +81,7 @@ properties: maxItems: 6 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - enum: - - top_133m # for MT8192 - - peri_mem # for MT8188/MT8195 + maxItems: 6 assigned-clocks: maxItems: 1
@@ -138,6 +127,41 @@ required: - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-mmc + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8188-pcie + - mediatek,mt8195-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: peri_mem + unevaluatedProperties: false examples:
Signature · 1 line
2.34.1
Re: [PATCH 1/3] dt-bindings: PCI: mediatek-gen3: add SoC based clock config
Quoted 10 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
The PCIe driver covers different SOC which needing different clock configs. Define them based on compatible.
Signed-off-by Frank Wunderlich <[email protected]>--- .../bindings/pci/mediatek-pcie-gen3.yaml | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-)
Re: [PATCH 1/3] dt-bindings: PCI: mediatek-gen3: add SoC based clock config
In reply to Frank WunderlichQuoted 46 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
The PCIe driver covers different SOC which needing different clock configs. Define them based on compatible.
Signed-off-by Frank Wunderlich <[email protected]>--- .../bindings/pci/mediatek-pcie-gen3.yaml | 48 ++++++++++++++--- -- 1 file changed, 36 insertions(+), 12 deletions(-)(quoted diff) +0
-0
gen3.yamlb/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
indexc00be39af64e..af0d2201746d100644Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +0
-0@@ -43,9 +43,6 @@ description: |+ each set has its own address for MSI message, and supports 32 MSIvectors
to generate interrupt.Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +1
-12-allOf: - - $ref: /schemas/pci/pci-bus.yaml# - properties: compatible: oneOf:@@ -84,15 +81,7 @@ properties: maxItems: 6 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - enum: - - top_133m # for MT8192 - - peri_mem # for MT8188/MT8195 + maxItems: 6 assigned-clocks: maxItems: 1
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml required: · line 136
Quoted 10 lines
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +7
-0@@ -138,6 +127,41 @@ required: - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-mmc
This should be "mediatek,mt8192-pcie".
Quoted 31 lines
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +28
-0+ then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8188-pcie + - mediatek,mt8195-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: peri_mem + unevaluatedProperties: false examples:
PATCH 2/3 dt-bindings: PCI: mediatek-gen3: add support for mt7986
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Add compatible string for mt7986.
--- Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +1 -0
@@ -48,6 +48,7 @@ properties: oneOf: - items: - enum: + - mediatek,mt7986-pcie - mediatek,mt8188-pcie - mediatek,mt8195-pcie - const: mediatek,mt8192-pcie
Signature · 1 line
2.34.1
PATCH 3/3 dt-bindings: PCI: mediatek-gen3: add mt7986 clock config
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
MT7986 needs 4 clocks for PCIe, define them in binding.
--- .../bindings/pci/mediatek-pcie-gen3.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +16 -0
@@ -79,9 +79,11 @@ properties: - const: mac clocks: + minItems: 4 maxItems: 6 clock-names: + minItems: 4 maxItems: 6 assigned-clocks:
@@ -162,6 +164,20 @@ allOf: - const: tl_32k - const: peri_26m - const: peri_mem + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: peri_26m + - const: top_133m unevaluatedProperties: false
Signature · 1 line
2.34.1
Rob Herring
maintainerRe: [PATCH 3/3] dt-bindings: PCI: mediatek-gen3: add mt7986 clock config
Quoted 3 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
MT7986 needs 4 clocks for PCIe, define them in binding.
Patch 2 is incomplete without this one. Therefore, patch 2 and 3 should be 1 patch.
Quoted 47 lines
Signed-off-by Frank Wunderlich <[email protected]>--- .../bindings/pci/mediatek-pcie-gen3.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +16
-0@@ -79,9 +79,11 @@ properties: - const: mac clocks: + minItems: 4 maxItems: 6 clock-names: + minItems: 4 maxItems: 6 assigned-clocks:@@ -162,6 +164,20 @@ allOf: - const: tl_32k - const: peri_26m - const: peri_mem + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: peri_26m + - const: top_133m unevaluatedProperties: falseSignature · 1 line
2.34.1