* [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
@ 2026-03-05 2:27 Meiker Gao
2026-03-05 3:37 ` Rob Herring (Arm)
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Meiker Gao @ 2026-03-05 2:27 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, Meiker Gao
Update mediatek,spi-mtk-nor.yaml to add conditional clock and
clock-names bindings for the mt8189-nor platform. The mt8189-nor
controller requires five specific clocks and corresponding clock-names
("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
requirements in the device tree binding schema.
For other platforms, the minimum number of clocks and clock-names
remains unchanged. The patch also adds an example for mt8189-nor,
illustrating the new clock configuration.
This update ensures correct hardware description and validation for
mt8189-nor, improving compatibility and reducing configuration errors.
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
---
.../bindings/spi/mediatek,spi-mtk-nor.yaml | 78 ++++++++++++++++---
1 file changed, 68 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
index a453996c13f2..7e551f2cb52c 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -17,8 +17,6 @@ description: |
for devices other than SPI NOR flash due to limited transfer
capability of this controller.
-allOf:
- - $ref: /schemas/spi/spi-controller.yaml#
properties:
compatible:
@@ -39,6 +37,7 @@ properties:
- items:
- enum:
- mediatek,mt8188-nor
+ - mediatek,mt8189-nor
- const: mediatek,mt8186-nor
reg:
@@ -56,14 +55,12 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
-
- clock-names:
- minItems: 2
- items:
- - const: spi
- - const: sf
- - const: axi
- - const: axi_s
+ - description: clock used for controller axi fast bus (axi_f).
+ Required for new platforms, such as mt8189.
+ - description: clock used for controller axi high-speed bus (axi_h).
+ Required for new platforms, such as mt8189.
+ - description: clock used for controller axi peripheral bus (axi_p).
+ Required for new platforms, such as mt8189.
required:
- compatible
@@ -71,6 +68,42 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: /schemas/spi/spi-controller.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8189-nor
+ then:
+ properties:
+ clocks:
+ minItems: 5
+ maxItems: 5
+ clock-names:
+ minItems: 5
+ maxItems: 5
+ items:
+ - const: spi
+ - const: sf
+ - const: axi_f
+ - const: axi_h
+ - const: axi_p
+ else:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 2
+ clock-names:
+ minItems: 2
+ maxItems: 2
+ items:
+ - const: spi
+ - const: sf
+ - const: axi
+ - const: axi_s
+
unevaluatedProperties: false
examples:
@@ -97,3 +130,28 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/clock/mt8189-clk.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ nor_flash: spi@1100d000 {
+ compatible = "mediatek,mt8189-nor";
+ reg = <0 0x1100d000 0 0xe0>;
+ interrupts = <1>;
+ clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>,
+ <&pericfg CLK_PERAO_SFLASH_F>, <&topckgen CLK_PERAO_SFLASH_H>,
+ <&pericfg CLK_PERAO_SFLASH_P>;
+ clock-names = "spi", "sf", "axi_f", "axi_h", "axi_p";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ };
+ };
+ };
--
2.45.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-05 2:27 Meiker Gao
@ 2026-03-05 3:37 ` Rob Herring (Arm)
2026-03-05 8:47 ` Krzysztof Kozlowski
2026-03-05 8:47 ` Krzysztof Kozlowski
2 siblings, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2026-03-05 3:37 UTC (permalink / raw)
To: Meiker Gao
Cc: Bayi Cheng, linux-arm-kernel,
Project_Global_Chrome_Upstream_Group, vince-wl.liu, Mark Brown,
linux-kernel, devicetree, sirius.wang, linux-spi, Chuanhong Guo,
Matthias Brugger, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
linux-mediatek, Conor Dooley, jh.hsu
On Thu, 05 Mar 2026 10:27:36 +0800, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
> clock-names bindings for the mt8189-nor platform. The mt8189-nor
> controller requires five specific clocks and corresponding clock-names
> ("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
> requirements in the device tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names
> remains unchanged. The patch also adds an example for mt8189-nor,
> illustrating the new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
>
> ---
> .../bindings/spi/mediatek,spi-mtk-nor.yaml | 78 ++++++++++++++++---
> 1 file changed, 68 insertions(+), 10 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml:20:1: [warning] too many blank lines (2 > 1) (empty-lines)
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml: allOf:1:else:properties:clock-names: {'minItems': 2, 'maxItems': 2, 'items': [{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi'}, {'const': 'axi_s'}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml: allOf:1:then:properties:clock-names: {'minItems': 5, 'maxItems': 5, 'items': [{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi_f'}, {'const': 'axi_h'}, {'const': 'axi_p'}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml: allOf:1:then:properties:clock-names: 'oneOf' conditional failed, one must be fixed:
False schema does not allow 5
[{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi_f'}, {'const': 'axi_h'}, {'const': 'axi_p'}] is too long
[{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi_f'}, {'const': 'axi_h'}, {'const': 'axi_p'}] is too short
1 was expected
5 is greater than the maximum of 2
5 is greater than the maximum of 3
5 is greater than the maximum of 4
hint: "minItems" is only needed if less than the "items" list length
from schema $id: http://devicetree.org/meta-schemas/items.yaml
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dts:69:18: fatal error: dt-bindings/clock/mt8189-clk.h: No such file or directory
69 | #include <dt-bindings/clock/mt8189-clk.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.dtbs:140: Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1597: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260305022740.2334033-1-ot_meiker.gao@mediatek.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
@ 2026-03-05 7:15 Meiker Gao
2026-03-05 8:48 ` Krzysztof Kozlowski
2026-03-05 13:45 ` Rob Herring (Arm)
0 siblings, 2 replies; 14+ messages in thread
From: Meiker Gao @ 2026-03-05 7:15 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, Meiker Gao
Update mediatek,spi-mtk-nor.yaml to add conditional clock and
clock-names bindings for the mt8189-nor platform. The mt8189-nor
controller requires five specific clocks and corresponding clock-names
("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
requirements in the device tree binding schema.
For other platforms, the minimum number of clocks and clock-names
remains unchanged. The patch also adds an example for mt8189-nor,
illustrating the new clock configuration.
This update ensures correct hardware description and validation for
mt8189-nor, improving compatibility and reducing configuration errors.
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
(cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
---
.../bindings/spi/mediatek,spi-mtk-nor.yaml | 69 ++++++++++++++++---
1 file changed, 58 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
index a453996c13f2..587f77d3f8d1 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -17,9 +17,6 @@ description: |
for devices other than SPI NOR flash due to limited transfer
capability of this controller.
-allOf:
- - $ref: /schemas/spi/spi-controller.yaml#
-
properties:
compatible:
oneOf:
@@ -39,6 +36,7 @@ properties:
- items:
- enum:
- mediatek,mt8188-nor
+ - mediatek,mt8189-nor
- const: mediatek,mt8186-nor
reg:
@@ -56,14 +54,8 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
-
- clock-names:
- minItems: 2
- items:
- - const: spi
- - const: sf
- - const: axi
- - const: axi_s
+ - description: clock used for controller axi_f, axi_h, and
+ axi_p to support the new platform.
required:
- compatible
@@ -71,6 +63,37 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: /schemas/spi/spi-controller.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8189-nor
+ then:
+ properties:
+ clocks:
+ minItems: 5
+ clock-names:
+ minItems: 5
+ items:
+ - const: spi
+ - const: sf
+ - const: axi_f
+ - const: axi_h
+ - const: axi_p
+ else:
+ properties:
+ clocks:
+ minItems: 2
+ clock-names:
+ items:
+ - const: spi
+ - const: sf
+ - const: axi
+ - const: axi_s
+
unevaluatedProperties: false
examples:
@@ -97,3 +120,27 @@ examples:
};
};
};
+
+ - |
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ nor_flash: spi@1100d000 {
+ compatible = "mediatek,mt8189-nor";
+ reg = <0 0x1100d000 0 0xe0>;
+ interrupts = <1>;
+ clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>,
+ <&pericfg CLK_PERAO_SFLASH_F>, <&topckgen CLK_PERAO_SFLASH_H>,
+ <&pericfg CLK_PERAO_SFLASH_P>;
+ clock-names = "spi", "sf", "axi_f", "axi_h", "axi_p";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ };
+ };
+ };
--
2.45.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-05 2:27 Meiker Gao
2026-03-05 3:37 ` Rob Herring (Arm)
@ 2026-03-05 8:47 ` Krzysztof Kozlowski
2026-03-05 8:47 ` Krzysztof Kozlowski
2 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-05 8:47 UTC (permalink / raw)
To: Meiker Gao
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Chuanhong Guo, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek,
Project_Global_Chrome_Upstream_Group, sirius.wang, vince-wl.liu,
jh.hsu
On Thu, Mar 05, 2026 at 10:27:36AM +0800, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
> clock-names bindings for the mt8189-nor platform. The mt8189-nor
> controller requires five specific clocks and corresponding clock-names
> ("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
> requirements in the device tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names
> remains unchanged. The patch also adds an example for mt8189-nor,
> illustrating the new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
>
> ---
Not tested so limited review.
> .../bindings/spi/mediatek,spi-mtk-nor.yaml | 78 ++++++++++++++++---
> 1 file changed, 68 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
> index a453996c13f2..7e551f2cb52c 100644
> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
> @@ -17,8 +17,6 @@ description: |
> for devices other than SPI NOR flash due to limited transfer
> capability of this controller.
>
> -allOf:
> - - $ref: /schemas/spi/spi-controller.yaml#
>
> properties:
> compatible:
> @@ -39,6 +37,7 @@ properties:
> - items:
> - enum:
> - mediatek,mt8188-nor
> + - mediatek,mt8189-nor
> - const: mediatek,mt8186-nor
>
> reg:
> @@ -56,14 +55,12 @@ properties:
> design, so this is optional.
> - description: clock used for controller axi slave bus.
> this depends on hardware design, so it is optional.
> -
> - clock-names:
> - minItems: 2
> - items:
> - - const: spi
> - - const: sf
> - - const: axi
> - - const: axi_s
> + - description: clock used for controller axi fast bus (axi_f).
> + Required for new platforms, such as mt8189.
> + - description: clock used for controller axi high-speed bus (axi_h).
> + Required for new platforms, such as mt8189.
> + - description: clock used for controller axi peripheral bus (axi_p).
> + Required for new platforms, such as mt8189.
No, I don't understand why you remove names. This is not expected.
Please also read writing schema and writing bindings docs explaining how
to organize properties with variable lengths. There is plenty of
examples to follow.
>
> required:
> - compatible
> @@ -71,6 +68,42 @@ required:
> - clocks
> - clock-names
>
> +allOf:
> + - $ref: /schemas/spi/spi-controller.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: mediatek,mt8189-nor
> + then:
> + properties:
> + clocks:
> + minItems: 5
> + maxItems: 5
> + clock-names:
> + minItems: 5
> + maxItems: 5
Pointess. Drop.
> + items:
> + - const: spi
> + - const: sf
> + - const: axi_f
> + - const: axi_h
> + - const: axi_p
> + else:
> + properties:
> + clocks:
> + minItems: 2
> + maxItems: 2
ABI change without explanation. Don't mix multiple changes into one
commit.
> + clock-names:
> + minItems: 2
> + maxItems: 2
> + items:
> + - const: spi
> + - const: sf
> + - const: axi
> + - const: axi_s
Plain wrong. So either 2 or 4.
> +
> unevaluatedProperties: false
>
> examples:
> @@ -97,3 +130,28 @@ examples:
> };
> };
> };
> +
> + - |
> + #include <dt-bindings/clock/mt8189-clk.h>
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + nor_flash: spi@1100d000 {
No, drop entire example.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-05 2:27 Meiker Gao
2026-03-05 3:37 ` Rob Herring (Arm)
2026-03-05 8:47 ` Krzysztof Kozlowski
@ 2026-03-05 8:47 ` Krzysztof Kozlowski
2 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-05 8:47 UTC (permalink / raw)
To: Meiker Gao
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Chuanhong Guo, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek,
Project_Global_Chrome_Upstream_Group, sirius.wang, vince-wl.liu,
jh.hsu
On Thu, Mar 05, 2026 at 10:27:36AM +0800, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
Also commit msg is incorrect - you are not adding clock bindings.
And there is no user of this, so entire patch is pointless and should
not be sent. We don't take unused bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-05 7:15 Meiker Gao
@ 2026-03-05 8:48 ` Krzysztof Kozlowski
2026-03-05 13:45 ` Rob Herring (Arm)
1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-05 8:48 UTC (permalink / raw)
To: Meiker Gao, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Bayi Cheng, Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu
On 05/03/2026 08:15, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
> clock-names bindings for the mt8189-nor platform. The mt8189-nor
> controller requires five specific clocks and corresponding clock-names
> ("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
> requirements in the device tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names
> remains unchanged. The patch also adds an example for mt8189-nor,
> illustrating the new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> (cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
NAK
Stop sending same stuff multiple times.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-05 7:15 Meiker Gao
2026-03-05 8:48 ` Krzysztof Kozlowski
@ 2026-03-05 13:45 ` Rob Herring (Arm)
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2026-03-05 13:45 UTC (permalink / raw)
To: Meiker Gao
Cc: Mark Brown, Chuanhong Guo, devicetree, linux-spi, Bayi Cheng,
sirius.wang, Matthias Brugger, linux-kernel, vince-wl.liu,
linux-mediatek, Project_Global_Chrome_Upstream_Group,
linux-arm-kernel, jh.hsu, AngeloGioacchino Del Regno,
Conor Dooley, Krzysztof Kozlowski
On Thu, 05 Mar 2026 15:15:42 +0800, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
> clock-names bindings for the mt8189-nor platform. The mt8189-nor
> controller requires five specific clocks and corresponding clock-names
> ("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
> requirements in the device tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names
> remains unchanged. The patch also adds an example for mt8189-nor,
> illustrating the new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> (cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
> ---
> .../bindings/spi/mediatek,spi-mtk-nor.yaml | 69 ++++++++++++++++---
> 1 file changed, 58 insertions(+), 11 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml: allOf:1:then:properties:clock-names: 'oneOf' conditional failed, one must be fixed:
False schema does not allow 5
[{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi_f'}, {'const': 'axi_h'}, {'const': 'axi_p'}] is too long
[{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi_f'}, {'const': 'axi_h'}, {'const': 'axi_p'}] is too short
1 was expected
5 is greater than the maximum of 2
5 is greater than the maximum of 3
5 is greater than the maximum of 4
hint: "minItems" is only needed if less than the "items" list length
from schema $id: http://devicetree.org/meta-schemas/items.yaml
Lexical error: Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dts:79.32-50 Unexpected 'CLK_PERAO_SFLASH_F'
Lexical error: Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dts:79.64-82 Unexpected 'CLK_PERAO_SFLASH_H'
Lexical error: Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dts:80.32-50 Unexpected 'CLK_PERAO_SFLASH_P'
FATAL ERROR: Syntax error parsing input tree
make[2]: *** [scripts/Makefile.dtbs:140: Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1597: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260305071546.2603378-1-ot_meiker.gao@mediatek.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
@ 2026-03-11 1:51 Meiker Gao
2026-03-11 3:23 ` Rob Herring (Arm)
0 siblings, 1 reply; 14+ messages in thread
From: Meiker Gao @ 2026-03-11 1:51 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, Meiker Gao
Update mediatek,spi-mtk-nor.yaml to add conditional clock and clock-names
bindings for the mt8189-nor platform. The mt8189-nor controller requires
five specific clocks and corresponding clock-names ("spi", "sf", "axi_f",
"axi_h", "axi_p"). This change enforces these requirements in the device
tree binding schema.
For other platforms, the minimum number of clocks and clock-names remains
unchanged. The patch also adds an example for mt8189-nor, illustrating the
new clock configuration.
This update ensures correct hardware description and validation for
mt8189-nor, improving compatibility and reducing configuration errors.
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
(cherry picked from commit de637a2fea765a92d4b06efef34671c74f8bc109)
---
.../bindings/spi/mediatek,spi-mtk-nor.yaml | 71 +++++++++++++++----
1 file changed, 59 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
index a453996c13f2..904c25279e2d 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -17,9 +17,6 @@ description: |
for devices other than SPI NOR flash due to limited transfer
capability of this controller.
-allOf:
- - $ref: /schemas/spi/spi-controller.yaml#
-
properties:
compatible:
oneOf:
@@ -27,6 +24,7 @@ properties:
- mediatek,mt8173-nor
- mediatek,mt8186-nor
- mediatek,mt8192-nor
+ - mediatek,mt8189-nor
- items:
- enum:
- mediatek,mt2701-nor
@@ -39,6 +37,7 @@ properties:
- items:
- enum:
- mediatek,mt8188-nor
+ - mediatek,mt8189-nor
- const: mediatek,mt8186-nor
reg:
@@ -56,14 +55,8 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
-
- clock-names:
- minItems: 2
- items:
- - const: spi
- - const: sf
- - const: axi
- - const: axi_s
+ - description: clock used for controller axi_f, axi_h, and
+ axi_p to support the new platform.
required:
- compatible
@@ -71,6 +64,35 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: /schemas/spi/spi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8189-nor
+ then:
+ properties:
+ clocks:
+ maxItems: 5
+ clock-names:
+ maxItems: 5
+ items:
+ - const: spi
+ - const: sf
+ - const: axi_f
+ - const: axi_h
+ - const: axi_p
+ else:
+ properties:
+ clocks:
+ maxItems: 4
+ clock-names:
+ items:
+ - const: spi
+ - const: sf
+ - const: axi
+
unevaluatedProperties: false
examples:
@@ -81,7 +103,7 @@ examples:
#address-cells = <2>;
#size-cells = <2>;
- nor_flash: spi@1100d000 {
+ spi@1100d000 {
compatible = "mediatek,mt8173-nor";
reg = <0 0x1100d000 0 0xe0>;
interrupts = <1>;
@@ -97,3 +119,28 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/clock/mediatek,mt8189-clk.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ spi@11018000 {
+ compatible = "mediatek,mt8189-nor";
+ reg = <0 0x1100d000 0 0xe0>;
+ interrupts = <1>;
+ clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>,
+ <&pericfg CLK_PERAO_SFLASH_F>, <&topckgen CLK_PERAO_SFLASH_H>,
+ <&pericfg CLK_PERAO_SFLASH_P>;
+ clock-names = "spi", "sf", "axi_f", "axi_h", "axi_p";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ };
+ };
+ };
--
2.45.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-11 1:51 Meiker Gao
@ 2026-03-11 3:23 ` Rob Herring (Arm)
0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2026-03-11 3:23 UTC (permalink / raw)
To: Meiker Gao
Cc: AngeloGioacchino Del Regno, linux-mediatek, jh.hsu,
Matthias Brugger, Mark Brown, linux-arm-kernel, linux-spi,
sirius.wang, Krzysztof Kozlowski, devicetree, linux-kernel,
Project_Global_Chrome_Upstream_Group, Conor Dooley, Chuanhong Guo,
vince-wl.liu, Bayi Cheng
On Wed, 11 Mar 2026 09:51:27 +0800, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and clock-names
> bindings for the mt8189-nor platform. The mt8189-nor controller requires
> five specific clocks and corresponding clock-names ("spi", "sf", "axi_f",
> "axi_h", "axi_p"). This change enforces these requirements in the device
> tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names remains
> unchanged. The patch also adds an example for mt8189-nor, illustrating the
> new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> (cherry picked from commit de637a2fea765a92d4b06efef34671c74f8bc109)
> ---
> .../bindings/spi/mediatek,spi-mtk-nor.yaml | 71 +++++++++++++++----
> 1 file changed, 59 insertions(+), 12 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml: allOf:1:then:properties:clock-names: {'maxItems': 5, 'items': [{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi_f'}, {'const': 'axi_h'}, {'const': 'axi_p'}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dts:69:18: fatal error: dt-bindings/clock/mediatek,mt8189-clk.h: No such file or directory
69 | #include <dt-bindings/clock/mediatek,mt8189-clk.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.dtbs:140: Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1608: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260311015214.655555-1-ot_meiker.gao@mediatek.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
@ 2026-03-11 3:43 Meiker Gao
2026-03-11 4:23 ` Rob Herring (Arm)
2026-03-13 13:15 ` Krzysztof Kozlowski
0 siblings, 2 replies; 14+ messages in thread
From: Meiker Gao @ 2026-03-11 3:43 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, Meiker Gao
Update mediatek,spi-mtk-nor.yaml to add conditional clock and
clock-names bindings for the mt8189-nor platform. The mt8189-nor
controller requires five specific clocks and corresponding clock-names
("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
requirements in the device tree binding schema.
For other platforms, the minimum number of clocks and clock-names
remains unchanged. The patch also adds an example for mt8189-nor,
illustrating the new clock configuration.
This update ensures correct hardware description and validation for
mt8189-nor, improving compatibility and reducing configuration errors.
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
(cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
---
.../bindings/spi/mediatek,spi-mtk-nor.yaml | 46 ++++++++++++++-----
1 file changed, 34 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
index a453996c13f2..ff815266479f 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -17,9 +17,6 @@ description: |
for devices other than SPI NOR flash due to limited transfer
capability of this controller.
-allOf:
- - $ref: /schemas/spi/spi-controller.yaml#
-
properties:
compatible:
oneOf:
@@ -27,6 +24,7 @@ properties:
- mediatek,mt8173-nor
- mediatek,mt8186-nor
- mediatek,mt8192-nor
+ - mediatek,mt8189-nor
- items:
- enum:
- mediatek,mt2701-nor
@@ -39,6 +37,7 @@ properties:
- items:
- enum:
- mediatek,mt8188-nor
+ - mediatek,mt8189-nor
- const: mediatek,mt8186-nor
reg:
@@ -56,14 +55,8 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
-
- clock-names:
- minItems: 2
- items:
- - const: spi
- - const: sf
- - const: axi
- - const: axi_s
+ - description: clock used for controller axi_f, axi_h, and
+ axi_p to support the new platform.
required:
- compatible
@@ -71,6 +64,35 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: /schemas/spi/spi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8189-nor
+ then:
+ properties:
+ clocks:
+ maxItems: 5
+ clock-names:
+ maxItems: 5
+ items:
+ - const: spi
+ - const: sf
+ - const: axi_f
+ - const: axi_h
+ - const: axi_p
+ else:
+ properties:
+ clocks:
+ maxItems: 4
+ clock-names:
+ items:
+ - const: spi
+ - const: sf
+ - const: axi
+
unevaluatedProperties: false
examples:
@@ -81,7 +103,7 @@ examples:
#address-cells = <2>;
#size-cells = <2>;
- nor_flash: spi@1100d000 {
+ spi@1100d000 {
compatible = "mediatek,mt8173-nor";
reg = <0 0x1100d000 0 0xe0>;
interrupts = <1>;
--
2.45.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-11 3:43 Meiker Gao
@ 2026-03-11 4:23 ` Rob Herring (Arm)
2026-03-13 13:15 ` Krzysztof Kozlowski
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2026-03-11 4:23 UTC (permalink / raw)
To: Meiker Gao
Cc: Chuanhong Guo, linux-kernel, linux-arm-kernel, linux-spi,
Project_Global_Chrome_Upstream_Group, jh.hsu,
AngeloGioacchino Del Regno, Krzysztof Kozlowski, devicetree,
Matthias Brugger, Bayi Cheng, vince-wl.liu, Conor Dooley,
Mark Brown, sirius.wang, linux-mediatek
On Wed, 11 Mar 2026 11:43:40 +0800, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
> clock-names bindings for the mt8189-nor platform. The mt8189-nor
> controller requires five specific clocks and corresponding clock-names
> ("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
> requirements in the device tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names
> remains unchanged. The patch also adds an example for mt8189-nor,
> illustrating the new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> (cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
> ---
> .../bindings/spi/mediatek,spi-mtk-nor.yaml | 46 ++++++++++++++-----
> 1 file changed, 34 insertions(+), 12 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml: allOf:1:then:properties:clock-names: {'maxItems': 5, 'items': [{'const': 'spi'}, {'const': 'sf'}, {'const': 'axi_f'}, {'const': 'axi_h'}, {'const': 'axi_p'}]} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260311034342.721583-1-ot_meiker.gao@mediatek.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
@ 2026-03-11 5:33 Meiker Gao
2026-03-11 6:09 ` Krzysztof Kozlowski
0 siblings, 1 reply; 14+ messages in thread
From: Meiker Gao @ 2026-03-11 5:33 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, Meiker Gao
Update mediatek,spi-mtk-nor.yaml to add conditional clock and
clock-names bindings for the mt8189-nor platform. The mt8189-nor
controller requires five specific clocks and corresponding clock-names
("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
requirements in the device tree binding schema.
For other platforms, the minimum number of clocks and clock-names
remains unchanged. The patch also adds an example for mt8189-nor,
illustrating the new clock configuration.
This update ensures correct hardware description and validation for
mt8189-nor, improving compatibility and reducing configuration errors.
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
(cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
---
.../bindings/spi/mediatek,spi-mtk-nor.yaml | 45 ++++++++++++++-----
1 file changed, 33 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
index a453996c13f2..bd6f43a0c399 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -17,9 +17,6 @@ description: |
for devices other than SPI NOR flash due to limited transfer
capability of this controller.
-allOf:
- - $ref: /schemas/spi/spi-controller.yaml#
-
properties:
compatible:
oneOf:
@@ -27,6 +24,7 @@ properties:
- mediatek,mt8173-nor
- mediatek,mt8186-nor
- mediatek,mt8192-nor
+ - mediatek,mt8189-nor
- items:
- enum:
- mediatek,mt2701-nor
@@ -39,6 +37,7 @@ properties:
- items:
- enum:
- mediatek,mt8188-nor
+ - mediatek,mt8189-nor
- const: mediatek,mt8186-nor
reg:
@@ -56,14 +55,8 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
-
- clock-names:
- minItems: 2
- items:
- - const: spi
- - const: sf
- - const: axi
- - const: axi_s
+ - description: clock used for controller axi_f, axi_h, and
+ axi_p to support the new platform.
required:
- compatible
@@ -71,6 +64,34 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: /schemas/spi/spi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8189-nor
+ then:
+ properties:
+ clocks:
+ maxItems: 5
+ clock-names:
+ items:
+ - const: spi
+ - const: sf
+ - const: axi_f
+ - const: axi_h
+ - const: axi_p
+ else:
+ properties:
+ clocks:
+ maxItems: 4
+ clock-names:
+ items:
+ - const: spi
+ - const: sf
+ - const: axi
+
unevaluatedProperties: false
examples:
@@ -81,7 +102,7 @@ examples:
#address-cells = <2>;
#size-cells = <2>;
- nor_flash: spi@1100d000 {
+ spi@1100d000 {
compatible = "mediatek,mt8173-nor";
reg = <0 0x1100d000 0 0xe0>;
interrupts = <1>;
--
2.45.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-11 5:33 [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189 Meiker Gao
@ 2026-03-11 6:09 ` Krzysztof Kozlowski
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11 6:09 UTC (permalink / raw)
To: Meiker Gao, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Bayi Cheng, Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu
On 11/03/2026 06:33, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
> clock-names bindings for the mt8189-nor platform. The mt8189-nor
> controller requires five specific clocks and corresponding clock-names
> ("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
> requirements in the device tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names
> remains unchanged. The patch also adds an example for mt8189-nor,
> illustrating the new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> (cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
Clean your patches before sending them.
> ---
> .../bindings/spi/mediatek,spi-mtk-nor.yaml | 45 ++++++++++++++-----
> 1 file changed, 33 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
> index a453996c13f2..bd6f43a0c399 100644
> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
> @@ -17,9 +17,6 @@ description: |
> for devices other than SPI NOR flash due to limited transfer
> capability of this controller.
>
> -allOf:
> - - $ref: /schemas/spi/spi-controller.yaml#
> -
> properties:
> compatible:
> oneOf:
> @@ -27,6 +24,7 @@ properties:
> - mediatek,mt8173-nor
> - mediatek,mt8186-nor
> - mediatek,mt8192-nor
> + - mediatek,mt8189-nor
> - items:
> - enum:
> - mediatek,mt2701-nor
> @@ -39,6 +37,7 @@ properties:
> - items:
> - enum:
> - mediatek,mt8188-nor
> + - mediatek,mt8189-nor
> - const: mediatek,mt8186-nor
>
> reg:
> @@ -56,14 +55,8 @@ properties:
> design, so this is optional.
> - description: clock used for controller axi slave bus.
> this depends on hardware design, so it is optional.
> -
> - clock-names:
You cannot remove properties.
> - minItems: 2
> - items:
> - - const: spi
> - - const: sf
> - - const: axi
> - - const: axi_s
> + - description: clock used for controller axi_f, axi_h, and
> + axi_p to support the new platform.
>
> required:
> - compatible
> @@ -71,6 +64,34 @@ required:
> - clocks
> - clock-names
>
> +allOf:
> + - $ref: /schemas/spi/spi-controller.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: mediatek,mt8189-nor
> + then:
> + properties:
> + clocks:
minItems
> + maxItems: 5
> + clock-names:
> + items:
> + - const: spi
> + - const: sf
> + - const: axi_f
That's just axi, no? Thus keep the list in top-level.
> + - const: axi_h
And that's axi_s
> + - const: axi_p
And what does p stand for? Do you understand these are names of clock
inputs, not names of clocks?
> + else:
> + properties:
> + clocks:
Missing minItems
> + maxItems: 4
> + clock-names:
> + items:
> + - const: spi
> + - const: sf
> + - const: axi
And that's ABI change, NAK.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189
2026-03-11 3:43 Meiker Gao
2026-03-11 4:23 ` Rob Herring (Arm)
@ 2026-03-13 13:15 ` Krzysztof Kozlowski
1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-13 13:15 UTC (permalink / raw)
To: Meiker Gao, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Bayi Cheng, Chuanhong Guo
Cc: linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu
On 11/03/2026 04:43, Meiker Gao wrote:
> Update mediatek,spi-mtk-nor.yaml to add conditional clock and
> clock-names bindings for the mt8189-nor platform. The mt8189-nor
> controller requires five specific clocks and corresponding clock-names
> ("spi", "sf", "axi_f", "axi_h", "axi_p"). This change enforces these
> requirements in the device tree binding schema.
>
> For other platforms, the minimum number of clocks and clock-names
> remains unchanged. The patch also adds an example for mt8189-nor,
> illustrating the new clock configuration.
>
> This update ensures correct hardware description and validation for
> mt8189-nor, improving compatibility and reducing configuration errors.
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> (cherry picked from commit c3180d35e52b5213764a89403e71f9a34d7bb842)
> ---
> .../bindings/spi/mediatek,spi-mtk-nor.yaml | 46 ++++++++++++++-----
> 1 file changed, 34 insertions(+), 12 deletions(-)
How many times are you going to send it? I got three in my mailbox. But
still no answer to provided review...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-03-13 13:15 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 5:33 [PATCH] spi: dt-bindings: mediatek,spi-mtk-nor: Add clock bindings for mt8189 Meiker Gao
2026-03-11 6:09 ` Krzysztof Kozlowski
-- strict thread matches above, loose matches on Subject: below --
2026-03-11 3:43 Meiker Gao
2026-03-11 4:23 ` Rob Herring (Arm)
2026-03-13 13:15 ` Krzysztof Kozlowski
2026-03-11 1:51 Meiker Gao
2026-03-11 3:23 ` Rob Herring (Arm)
2026-03-05 7:15 Meiker Gao
2026-03-05 8:48 ` Krzysztof Kozlowski
2026-03-05 13:45 ` Rob Herring (Arm)
2026-03-05 2:27 Meiker Gao
2026-03-05 3:37 ` Rob Herring (Arm)
2026-03-05 8:47 ` Krzysztof Kozlowski
2026-03-05 8:47 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox