dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195
Subsystems (5)
cover dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195
These series patches add dt-bindings compatible string and new clock name to support MT8188 and MT8195.
Jianjun Wang (2):
dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195
dt-bindings: PCI: mediatek-gen3: Add new clock name
.../bindings/pci/mediatek-pcie-gen3.yaml | 51 +++++++++++++++---- 1 file changed, 40 insertions(+), 11 deletions(-)
Signature · 1 line
2.18.0
PATCH 1/2 dt-bindings: PCI: mediatek-gen3: Add support for MT8188 and MT8195
MT8188 and MT8195 are ARM platform SoCs with the same PCIe IP as MT8192.
--- .../devicetree/bindings/pci/mediatek-pcie-gen3.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +8 -1
@@ -48,7 +48,14 @@ allOf: properties: compatible: - const: mediatek,mt8192-pcie + oneOf: + - items: + - enum: + - mediatek,mt8188-pcie + - mediatek,mt8195-pcie + - const: mediatek,mt8192-pcie + - items: + - const: mediatek,mt8192-pcie reg: maxItems: 1
Signature · 1 line
2.18.0
PATCH 2/2 dt-bindings: PCI: mediatek-gen3: Add new clock name
In reply to Jianjun WangMT8188 and MT8195 use clock "peri_mem" instead of "top_133m", add new clock name "peri_mem" for MT8188 and MT8195.
--- .../bindings/pci/mediatek-pcie-gen3.yaml | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +32 -10
@@ -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:
@@ -85,13 +82,7 @@ properties: maxItems: 6 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - const: top_133m + maxItems: 6 assigned-clocks: maxItems: 1
@@ -133,9 +124,40 @@ required: - interrupts - ranges - clocks + - clock-names - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - 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 + else: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + unevaluatedProperties: false examples:
Signature · 1 line
2.18.0
Rob Herring
maintainerRe: [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name
Quoted 2 lines · Jianjun Wang
MT8188 and MT8195 use clock "
peri_mem" instead of "top_133m", add new clock name "peri_mem" for MT8188 and MT8195.
This should be part of patch 1.
Clock names for IP blocks should be local to the IP block. IOW, named after the input name for the clocks or what their function is if you don't know that. Neither the old names nor the new name seem to follow this. At least make the new name follow that convention.
Quoted 80 lines
Signed-off-by Jianjun Wang <[email protected]>--- .../bindings/pci/mediatek-pcie-gen3.yaml | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-)Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +32
-10@@ -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:@@ -85,13 +82,7 @@ properties: maxItems: 6 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - const: top_133m + maxItems: 6 assigned-clocks: maxItems: 1@@ -133,9 +124,40 @@ required: - interrupts - ranges - clocks + - clock-names - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - 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 + else: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + unevaluatedProperties: false examples:Signature · 1 line
2.18.0
Re: [PATCH 2/2] dt-bindings: PCI: mediatek-gen3: Add new clock name
Hi Rob,
Thanks for your comment.
Quoted 6 lines · Rob Herring
Quoted 3 lines · Jianjun Wang
MT8188 and MT8195 use clock "
peri_mem" instead of "top_133m", add new
clock name "peri_mem" for MT8188 and MT8195.This should be part of patch 1.
Sure, I'll merge these two patches into one in the next version.
Quoted 7 lines
Clock names for IP blocks should be local to the IP block. IOW, named
after the input name for the clocks or what their function is if you don't know that. Neither the old names nor the new name seem to follow
this. At least make the new name follow that convention.
Sorry, I'm not sure if I understand correctly, would you mind providing an example of this change?
Thanks.
Quoted 85 lines
Quoted 85 lines
Signed-off-by Jianjun Wang <[email protected]>--- .../bindings/pci/mediatek-pcie-gen3.yaml | 42 ++++++++++++++- ---- 1 file changed, 32 insertions(+), 10 deletions(-)(quoted diff) +0
-0
gen3.yamlb/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index67d2ba25e336..038e25ae0be7100644Documentation/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 32MSI vectors
to generate interrupt.Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +32
-10-allOf: - - $ref: /schemas/pci/pci-bus.yaml# - properties: compatible: oneOf:@@ -85,13 +82,7 @@ properties: maxItems: 6 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - const: top_133m + maxItems: 6 assigned-clocks: maxItems: 1@@ -133,9 +124,40 @@ required: - interrupts - ranges - clocks + - clock-names - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - 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 + else: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + unevaluatedProperties: false examples:Signature · 1 line
2.18.0