* [PATCH 1/2] dt-bindings: spi: Fix clock-names definition
2026-03-24 3:26 [PATCH 0/2] *** SUBJECT HERE *** Meiker Gao
@ 2026-03-24 3:26 ` Meiker Gao
2026-03-24 9:54 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Meiker Gao @ 2026-03-24 3:26 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Bayi Cheng, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Meiker Gao
Update the device tree binding for the Mediatek
MT8196 NOR controller to require that the 'clock-names'
property contains exactly six entries, in the strict order:
"spi", "sf", "axi", "axi_s", "bclk", "27m".
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
Change-Id: I0542d6d726f1af34ef76c1a58ba4e4b02ec45fe6
---
.../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
index a453996c13f2..f605a36e753c 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -56,6 +56,10 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
+ - description: clock used for bclk.
+ this depends on hardware design, so it is optional.
+ - description: clock used for 27m.
+ this depends on hardware design, so it is optional.
clock-names:
minItems: 2
@@ -64,6 +68,8 @@ properties:
- const: sf
- const: axi
- const: axi_s
+ - const: bclk
+ - const: 27m
required:
- compatible
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 0/2] Add clock to dt-bindings and Modify nor driver.
@ 2026-03-24 6:28 Meiker Gao
2026-03-24 6:28 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
2026-03-24 6:28 ` [PATCH 2/2] [v3] spi: spi-mtk-nor: Modify and optimization the SNFC Meiker Gao
0 siblings, 2 replies; 10+ messages in thread
From: Meiker Gao @ 2026-03-24 6:28 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Bayi Cheng, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Meiker Gao
This patch series refactors the clock management for the Mediatek SPI NOR driver,
making it more flexible and compatible with different platforms.
Patch 1 updates the device tree binding to support variable clock-names.
Patch 2 migrates the driver to use clk_bulk API and optimizes error handling.
Changes in v1:
- dt-bindings add clock for mt8196.
- Dynamically allocate clk_bulk_data array.
- Simplify error handling.
- Code cleanup and style improvements.
Meiker Gao (2):
dt-bindings: spi: Fix clock-names definition
[v3] spi: spi-mtk-nor: Modify and optimization the SNFC.
.../bindings/spi/mediatek,spi-mtk-nor.yaml | 6 ++++++
drivers/spi/spi-mtk-nor.c | 19 ++++++++-----------
2 files changed, 14 insertions(+), 11 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] dt-bindings: spi: Fix clock-names definition
2026-03-24 6:28 [PATCH 0/2] Add clock to dt-bindings and Modify nor driver Meiker Gao
@ 2026-03-24 6:28 ` Meiker Gao
2026-03-24 9:55 ` Krzysztof Kozlowski
2026-03-24 6:28 ` [PATCH 2/2] [v3] spi: spi-mtk-nor: Modify and optimization the SNFC Meiker Gao
1 sibling, 1 reply; 10+ messages in thread
From: Meiker Gao @ 2026-03-24 6:28 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Bayi Cheng, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Meiker Gao
Update the device tree binding for the Mediatek
MT8196 NOR controller to require that the 'clock-names'
property contains exactly six entries, in the strict order:
"spi", "sf", "axi", "axi_s", "bclk", "27m".
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
Change-Id: I0542d6d726f1af34ef76c1a58ba4e4b02ec45fe6
---
.../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
index a453996c13f2..f605a36e753c 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -56,6 +56,10 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
+ - description: clock used for bclk.
+ this depends on hardware design, so it is optional.
+ - description: clock used for 27m.
+ this depends on hardware design, so it is optional.
clock-names:
minItems: 2
@@ -64,6 +68,8 @@ properties:
- const: sf
- const: axi
- const: axi_s
+ - const: bclk
+ - const: 27m
required:
- compatible
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] [v3] spi: spi-mtk-nor: Modify and optimization the SNFC.
2026-03-24 6:28 [PATCH 0/2] Add clock to dt-bindings and Modify nor driver Meiker Gao
2026-03-24 6:28 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
@ 2026-03-24 6:28 ` Meiker Gao
2026-03-24 16:19 ` Mark Brown
1 sibling, 1 reply; 10+ messages in thread
From: Meiker Gao @ 2026-03-24 6:28 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Bayi Cheng, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Meiker Gao
Changes in v3:
-this patch is a further optimization for version v2.
Changes in v2:
-Use clk_bulk_xxx related functions to enable/disable clocks.
Changes in v1:
-Add new function mtk_nor_parse_clk() to parse nor clock parameters.
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
Change-Id: Ifa13f9f08aebf6feb376ca98b0fd69f379037ff3
---
drivers/spi/spi-mtk-nor.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
index 702339a6c817..6d24932053e5 100644
--- a/drivers/spi/spi-mtk-nor.c
+++ b/drivers/spi/spi-mtk-nor.c
@@ -100,7 +100,6 @@
#define CLK_TO_US(sp, clkcnt) DIV_ROUND_UP(clkcnt, sp->spi_freq / 1000000)
-#define MAX_CLOCK_CNT 6
struct mtk_nor_caps {
u8 dma_bits;
@@ -119,8 +118,8 @@ struct mtk_nor {
void __iomem *base;
u8 *buffer;
dma_addr_t buffer_dma;
- struct clk_bulk_data clocks[MAX_CLOCK_CNT];
- int clock_cnt;
+ struct clk_bulk_data *clocks;
+ u8 clock_cnt;
unsigned int spi_freq;
bool wbuf_en;
bool has_irq;
@@ -733,19 +732,16 @@ static int mtk_nor_enable_clk(struct mtk_nor *sp)
static int mtk_nor_parse_clk(struct device *dev, struct mtk_nor *sp)
{
struct device_node *np = dev->of_node;
- int ret;
const char *name;
- int cnt,i;
+ int cnt,i,ret;
cnt = of_property_count_strings(np, "clock-names");
if (!cnt || (cnt == -EINVAL)) {
dev_err(dev, "Unable to find clocks\n");
- ret = -EINVAL;
- goto out;
+ return -EINVAL;
} else if (cnt < 0) {
dev_err(dev, "Count clock strings failed, err %d\n", cnt);
- ret = cnt;
- goto out;
+ return cnt;
}
sp->clock_cnt = cnt;
@@ -760,9 +756,10 @@ static int mtk_nor_parse_clk(struct device *dev, struct mtk_nor *sp)
}
ret = devm_clk_bulk_get(dev, sp->clock_cnt, sp->clocks);
+ if (ret)
+ return ret;
-out:
- return ret;
+ return 0;
}
static void mtk_nor_init(struct mtk_nor *sp)
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: Fix clock-names definition
2026-03-24 3:26 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
@ 2026-03-24 9:54 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-24 9:54 UTC (permalink / raw)
To: Meiker Gao
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Project_Global_Chrome_Upstream_Group, sirius.wang, vince-wl.liu,
jh.hsu, linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Tue, Mar 24, 2026 at 11:26:17AM +0800, Meiker Gao wrote:
> Update the device tree binding for the Mediatek
> MT8196 NOR controller to require that the 'clock-names'
> property contains exactly six entries, in the strict order:
> "spi", "sf", "axi", "axi_s", "bclk", "27m".
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> Change-Id: I0542d6d726f1af34ef76c1a58ba4e4b02ec45fe6
Please do not send patches which were never checked with tools. Run
checkpatch.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: Fix clock-names definition
2026-03-24 6:28 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
@ 2026-03-24 9:55 ` Krzysztof Kozlowski
2026-03-24 9:56 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-24 9:55 UTC (permalink / raw)
To: Meiker Gao, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno
Cc: Bayi Cheng, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On 24/03/2026 07:28, Meiker Gao wrote:
> Update the device tree binding for the Mediatek
> MT8196 NOR controller to require that the 'clock-names'
> property contains exactly six entries, in the strict order:
> "spi", "sf", "axi", "axi_s", "bclk", "27m".
>
> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
> Change-Id: I0542d6d726f1af34ef76c1a58ba4e4b02ec45fe6
You just sent multiple same patches with same errors.
Same feedback.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: Fix clock-names definition
2026-03-24 9:55 ` Krzysztof Kozlowski
@ 2026-03-24 9:56 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-24 9:56 UTC (permalink / raw)
To: Meiker Gao, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno
Cc: Bayi Cheng, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On 24/03/2026 10:55, Krzysztof Kozlowski wrote:
> On 24/03/2026 07:28, Meiker Gao wrote:
>> Update the device tree binding for the Mediatek
>> MT8196 NOR controller to require that the 'clock-names'
>> property contains exactly six entries, in the strict order:
>> "spi", "sf", "axi", "axi_s", "bclk", "27m".
>>
>> Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
>> Change-Id: I0542d6d726f1af34ef76c1a58ba4e4b02ec45fe6
>
> You just sent multiple same patches with same errors.
>
> Same feedback.
Heh, I already asked you that last time, two weeks ago... so you keep
repeating same mistakes.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] [v3] spi: spi-mtk-nor: Modify and optimization the SNFC.
2026-03-24 6:28 ` [PATCH 2/2] [v3] spi: spi-mtk-nor: Modify and optimization the SNFC Meiker Gao
@ 2026-03-24 16:19 ` Mark Brown
0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2026-03-24 16:19 UTC (permalink / raw)
To: Meiker Gao
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Bayi Cheng,
Project_Global_Chrome_Upstream_Group, sirius.wang, vince-wl.liu,
jh.hsu, linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
On Tue, Mar 24, 2026 at 02:28:25PM +0800, Meiker Gao wrote:
> Changes in v3:
> -this patch is a further optimization for version v2.
>
> Changes in v2:
> -Use clk_bulk_xxx related functions to enable/disable clocks.
>
> Changes in v1:
> -Add new function mtk_nor_parse_clk() to parse nor clock parameters.
>
As covered in submtting-patches.rst inter-version changelogs should be
after the --- so they get cut out of the git commits by tools. There
doesn't appear ot be an actual changelog for this patch beyond the
(somewhat vague) subject.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] dt-bindings: spi: Fix clock-names definition
2026-03-25 3:18 [PATCH 0/2] Add nor dt-bindings new clock and modify driver Meiker Gao
@ 2026-03-25 3:18 ` Meiker Gao
2026-03-25 11:45 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Meiker Gao @ 2026-03-25 3:18 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Bayi Cheng, Project_Global_Chrome_Upstream_Group, sirius.wang,
vince-wl.liu, jh.hsu, linux-spi, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Meiker Gao
Update the device tree binding for the Mediatek.
Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
---
.../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml | 7 +++++--
1 file changed, 5 insertions(+), 2 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..0255e19efc8d 100644
--- a/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml
@@ -56,14 +56,17 @@ properties:
design, so this is optional.
- description: clock used for controller axi slave bus.
this depends on hardware design, so it is optional.
+ - description: clock used for controller axi_f, axi_h, and
+ axi_p to support the new platform.
clock-names:
minItems: 2
items:
- const: spi
- const: sf
- - const: axi
- - const: axi_s
+ - const: axi_f
+ - const: axi_h
+ - const: axi_p
required:
- compatible
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: Fix clock-names definition
2026-03-25 3:18 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
@ 2026-03-25 11:45 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-25 11:45 UTC (permalink / raw)
To: Meiker Gao
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Bayi Cheng,
Project_Global_Chrome_Upstream_Group, sirius.wang, vince-wl.liu,
jh.hsu, linux-spi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Wed, Mar 25, 2026 at 11:18:54AM +0800, Meiker Gao wrote:
> Update the device tree binding for the Mediatek.
That's too vague. Everything is update. Say WHY.
Anyway, you ignored multiple feedbacks, was spamming us with multiple
same postings and still did not improve. There is no versioning here, no
changelog, even subject is using incorrect prefixes.
Read submitting patches and other guidelines before you post, because
you are way past the point of making innocent mistakes and this looks
like wasting our time.
NAK
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-03-25 11:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 6:28 [PATCH 0/2] Add clock to dt-bindings and Modify nor driver Meiker Gao
2026-03-24 6:28 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
2026-03-24 9:55 ` Krzysztof Kozlowski
2026-03-24 9:56 ` Krzysztof Kozlowski
2026-03-24 6:28 ` [PATCH 2/2] [v3] spi: spi-mtk-nor: Modify and optimization the SNFC Meiker Gao
2026-03-24 16:19 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2026-03-25 3:18 [PATCH 0/2] Add nor dt-bindings new clock and modify driver Meiker Gao
2026-03-25 3:18 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
2026-03-25 11:45 ` Krzysztof Kozlowski
2026-03-24 3:26 [PATCH 0/2] *** SUBJECT HERE *** Meiker Gao
2026-03-24 3:26 ` [PATCH 1/2] dt-bindings: spi: Fix clock-names definition Meiker Gao
2026-03-24 9:54 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox