* [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-10 12:24 ` Tinghan Shen
0 siblings, 0 replies; 18+ messages in thread
From: Tinghan Shen @ 2021-07-10 12:24 UTC (permalink / raw)
To: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg
Cc: linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream, tzungbi,
Project_Global_Chrome_Upstream_Group, Tinghan Shen
Add mt8195 compatible to binding document. The description of required
properties are also modified to reflect the hardware change between
mt8183 and mt8195. The mt8195 doesn't have to control the scp clock on
kernel side.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
changes in v2:
- fix missing 'compatible' line in binding document
Documentation/devicetree/bindings/remoteproc/mtk,scp.txt | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt b/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
index 3f5f78764b60..d64466eefbe3 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
@@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
Mediatek SoCs.
Required properties:
-- compatible Should be "mediatek,mt8183-scp"
+- compatible Should be one of:
+ "mediatek,mt8183-scp"
+ "mediatek,mt8195-scp"
- reg Should contain the address ranges for memory regions:
SRAM, CFG, and L1TCM.
- reg-names Contains the corresponding names for the memory regions:
"sram", "cfg", and "l1tcm".
-- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
-- clock-names Contains the corresponding name for the clock. This
+- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
+- clock-names Required by mt8183. Contains the corresponding name for the clock. This
should be named "main".
Subnodes
--
2.18.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-10 12:24 ` Tinghan Shen
0 siblings, 0 replies; 18+ messages in thread
From: Tinghan Shen @ 2021-07-10 12:24 UTC (permalink / raw)
To: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg
Cc: linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream, tzungbi,
Project_Global_Chrome_Upstream_Group, Tinghan Shen
Add mt8195 compatible to binding document. The description of required
properties are also modified to reflect the hardware change between
mt8183 and mt8195. The mt8195 doesn't have to control the scp clock on
kernel side.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
changes in v2:
- fix missing 'compatible' line in binding document
Documentation/devicetree/bindings/remoteproc/mtk,scp.txt | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt b/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
index 3f5f78764b60..d64466eefbe3 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
@@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
Mediatek SoCs.
Required properties:
-- compatible Should be "mediatek,mt8183-scp"
+- compatible Should be one of:
+ "mediatek,mt8183-scp"
+ "mediatek,mt8195-scp"
- reg Should contain the address ranges for memory regions:
SRAM, CFG, and L1TCM.
- reg-names Contains the corresponding names for the memory regions:
"sram", "cfg", and "l1tcm".
-- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
-- clock-names Contains the corresponding name for the clock. This
+- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
+- clock-names Required by mt8183. Contains the corresponding name for the clock. This
should be named "main".
Subnodes
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-10 12:24 ` Tinghan Shen
0 siblings, 0 replies; 18+ messages in thread
From: Tinghan Shen @ 2021-07-10 12:24 UTC (permalink / raw)
To: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg
Cc: linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream, tzungbi,
Project_Global_Chrome_Upstream_Group, Tinghan Shen
Add mt8195 compatible to binding document. The description of required
properties are also modified to reflect the hardware change between
mt8183 and mt8195. The mt8195 doesn't have to control the scp clock on
kernel side.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
changes in v2:
- fix missing 'compatible' line in binding document
Documentation/devicetree/bindings/remoteproc/mtk,scp.txt | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt b/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
index 3f5f78764b60..d64466eefbe3 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.txt
@@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
Mediatek SoCs.
Required properties:
-- compatible Should be "mediatek,mt8183-scp"
+- compatible Should be one of:
+ "mediatek,mt8183-scp"
+ "mediatek,mt8195-scp"
- reg Should contain the address ranges for memory regions:
SRAM, CFG, and L1TCM.
- reg-names Contains the corresponding names for the memory regions:
"sram", "cfg", and "l1tcm".
-- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
-- clock-names Contains the corresponding name for the clock. This
+- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
+- clock-names Required by mt8183. Contains the corresponding name for the clock. This
should be named "main".
Subnodes
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [v2 2/2] remoteproc: mediatek: Support mt8195 scp
2021-07-10 12:24 ` Tinghan Shen
(?)
@ 2021-07-10 12:24 ` Tinghan Shen
-1 siblings, 0 replies; 18+ messages in thread
From: Tinghan Shen @ 2021-07-10 12:24 UTC (permalink / raw)
To: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg
Cc: linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream, tzungbi,
Project_Global_Chrome_Upstream_Group, Tinghan Shen
The SCP clock design is changed on mt8195 that doesn't need to control
SCP clock on kernel side.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
drivers/remoteproc/mtk_scp.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 9679cc26895e..c31af75f947a 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev)
if (ret)
goto destroy_mutex;
- scp->clk = devm_clk_get(dev, "main");
- if (IS_ERR(scp->clk)) {
- dev_err(dev, "Failed to get clock\n");
- ret = PTR_ERR(scp->clk);
- goto release_dev_mem;
+ if (of_get_property(np, "clocks", NULL)) {
+ scp->clk = devm_clk_get(dev, "main");
+ if (IS_ERR(scp->clk)) {
+ dev_err(dev, "Failed to get clock\n");
+ ret = PTR_ERR(scp->clk);
+ goto release_dev_mem;
+ }
}
/* register SCP initialization IPI */
@@ -877,6 +879,7 @@ static const struct mtk_scp_of_data mt8192_of_data = {
static const struct of_device_id mtk_scp_of_match[] = {
{ .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data },
{ .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data },
+ { .compatible = "mediatek,mt8195-scp", .data = &mt8192_of_data },
{},
};
MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
--
2.18.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [v2 2/2] remoteproc: mediatek: Support mt8195 scp
@ 2021-07-10 12:24 ` Tinghan Shen
0 siblings, 0 replies; 18+ messages in thread
From: Tinghan Shen @ 2021-07-10 12:24 UTC (permalink / raw)
To: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg
Cc: linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream, tzungbi,
Project_Global_Chrome_Upstream_Group, Tinghan Shen
The SCP clock design is changed on mt8195 that doesn't need to control
SCP clock on kernel side.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
drivers/remoteproc/mtk_scp.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 9679cc26895e..c31af75f947a 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev)
if (ret)
goto destroy_mutex;
- scp->clk = devm_clk_get(dev, "main");
- if (IS_ERR(scp->clk)) {
- dev_err(dev, "Failed to get clock\n");
- ret = PTR_ERR(scp->clk);
- goto release_dev_mem;
+ if (of_get_property(np, "clocks", NULL)) {
+ scp->clk = devm_clk_get(dev, "main");
+ if (IS_ERR(scp->clk)) {
+ dev_err(dev, "Failed to get clock\n");
+ ret = PTR_ERR(scp->clk);
+ goto release_dev_mem;
+ }
}
/* register SCP initialization IPI */
@@ -877,6 +879,7 @@ static const struct mtk_scp_of_data mt8192_of_data = {
static const struct of_device_id mtk_scp_of_match[] = {
{ .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data },
{ .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data },
+ { .compatible = "mediatek,mt8195-scp", .data = &mt8192_of_data },
{},
};
MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [v2 2/2] remoteproc: mediatek: Support mt8195 scp
@ 2021-07-10 12:24 ` Tinghan Shen
0 siblings, 0 replies; 18+ messages in thread
From: Tinghan Shen @ 2021-07-10 12:24 UTC (permalink / raw)
To: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg
Cc: linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream, tzungbi,
Project_Global_Chrome_Upstream_Group, Tinghan Shen
The SCP clock design is changed on mt8195 that doesn't need to control
SCP clock on kernel side.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
drivers/remoteproc/mtk_scp.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index 9679cc26895e..c31af75f947a 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev)
if (ret)
goto destroy_mutex;
- scp->clk = devm_clk_get(dev, "main");
- if (IS_ERR(scp->clk)) {
- dev_err(dev, "Failed to get clock\n");
- ret = PTR_ERR(scp->clk);
- goto release_dev_mem;
+ if (of_get_property(np, "clocks", NULL)) {
+ scp->clk = devm_clk_get(dev, "main");
+ if (IS_ERR(scp->clk)) {
+ dev_err(dev, "Failed to get clock\n");
+ ret = PTR_ERR(scp->clk);
+ goto release_dev_mem;
+ }
}
/* register SCP initialization IPI */
@@ -877,6 +879,7 @@ static const struct mtk_scp_of_data mt8192_of_data = {
static const struct of_device_id mtk_scp_of_match[] = {
{ .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data },
{ .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data },
+ { .compatible = "mediatek,mt8195-scp", .data = &mt8192_of_data },
{},
};
MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
2021-07-10 12:24 ` Tinghan Shen
(?)
@ 2021-07-12 6:05 ` Tzung-Bi Shih
-1 siblings, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2021-07-12 6:05 UTC (permalink / raw)
To: Tinghan Shen
Cc: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg,
linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> Mediatek SoCs.
>
> Required properties:
> -- compatible Should be "mediatek,mt8183-scp"
> +- compatible Should be one of:
> + "mediatek,mt8183-scp"
> + "mediatek,mt8195-scp"
Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
Could you send another patch for adding the missing property?
[1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
> -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> -- clock-names Contains the corresponding name for the clock. This
> +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> should be named "main".
Let's move clocks and clock-names to "Optional properties". See [2]
for your reference. I guess it doesn't need to mention which chip
needs the properties. For those chips that need the clock properties,
they won't work correctly without correct clock properties.
[2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
Suggested to provide a cover letter for the series next time.
nit: other patches usually use "[PATCH v2 1/2]" in the email title
instead of the one used in the mail.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-12 6:05 ` Tzung-Bi Shih
0 siblings, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2021-07-12 6:05 UTC (permalink / raw)
To: Tinghan Shen
Cc: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg,
linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> Mediatek SoCs.
>
> Required properties:
> -- compatible Should be "mediatek,mt8183-scp"
> +- compatible Should be one of:
> + "mediatek,mt8183-scp"
> + "mediatek,mt8195-scp"
Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
Could you send another patch for adding the missing property?
[1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
> -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> -- clock-names Contains the corresponding name for the clock. This
> +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> should be named "main".
Let's move clocks and clock-names to "Optional properties". See [2]
for your reference. I guess it doesn't need to mention which chip
needs the properties. For those chips that need the clock properties,
they won't work correctly without correct clock properties.
[2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
Suggested to provide a cover letter for the series next time.
nit: other patches usually use "[PATCH v2 1/2]" in the email title
instead of the one used in the mail.
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-12 6:05 ` Tzung-Bi Shih
0 siblings, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2021-07-12 6:05 UTC (permalink / raw)
To: Tinghan Shen
Cc: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg,
linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> Mediatek SoCs.
>
> Required properties:
> -- compatible Should be "mediatek,mt8183-scp"
> +- compatible Should be one of:
> + "mediatek,mt8183-scp"
> + "mediatek,mt8195-scp"
Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
Could you send another patch for adding the missing property?
[1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
> -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> -- clock-names Contains the corresponding name for the clock. This
> +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> should be named "main".
Let's move clocks and clock-names to "Optional properties". See [2]
for your reference. I guess it doesn't need to mention which chip
needs the properties. For those chips that need the clock properties,
they won't work correctly without correct clock properties.
[2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
Suggested to provide a cover letter for the series next time.
nit: other patches usually use "[PATCH v2 1/2]" in the email title
instead of the one used in the mail.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 2/2] remoteproc: mediatek: Support mt8195 scp
2021-07-10 12:24 ` Tinghan Shen
(?)
@ 2021-07-12 6:06 ` Tzung-Bi Shih
-1 siblings, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2021-07-12 6:06 UTC (permalink / raw)
To: Tinghan Shen
Cc: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg,
linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> @@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev)
> if (ret)
> goto destroy_mutex;
>
> - scp->clk = devm_clk_get(dev, "main");
> - if (IS_ERR(scp->clk)) {
> - dev_err(dev, "Failed to get clock\n");
> - ret = PTR_ERR(scp->clk);
> - goto release_dev_mem;
> + if (of_get_property(np, "clocks", NULL)) {
> + scp->clk = devm_clk_get(dev, "main");
> + if (IS_ERR(scp->clk)) {
> + dev_err(dev, "Failed to get clock\n");
> + ret = PTR_ERR(scp->clk);
> + goto release_dev_mem;
> + }
Use devm_clk_get_optional().
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 2/2] remoteproc: mediatek: Support mt8195 scp
@ 2021-07-12 6:06 ` Tzung-Bi Shih
0 siblings, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2021-07-12 6:06 UTC (permalink / raw)
To: Tinghan Shen
Cc: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg,
linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> @@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev)
> if (ret)
> goto destroy_mutex;
>
> - scp->clk = devm_clk_get(dev, "main");
> - if (IS_ERR(scp->clk)) {
> - dev_err(dev, "Failed to get clock\n");
> - ret = PTR_ERR(scp->clk);
> - goto release_dev_mem;
> + if (of_get_property(np, "clocks", NULL)) {
> + scp->clk = devm_clk_get(dev, "main");
> + if (IS_ERR(scp->clk)) {
> + dev_err(dev, "Failed to get clock\n");
> + ret = PTR_ERR(scp->clk);
> + goto release_dev_mem;
> + }
Use devm_clk_get_optional().
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 2/2] remoteproc: mediatek: Support mt8195 scp
@ 2021-07-12 6:06 ` Tzung-Bi Shih
0 siblings, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2021-07-12 6:06 UTC (permalink / raw)
To: Tinghan Shen
Cc: ohad, bjorn.andersson, mathieu.poirier, robh+dt, matthias.bgg,
linux-remoteproc, devicetree, linux-arm-kernel, linux-mediatek,
linux-kernel, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> @@ -785,11 +785,13 @@ static int scp_probe(struct platform_device *pdev)
> if (ret)
> goto destroy_mutex;
>
> - scp->clk = devm_clk_get(dev, "main");
> - if (IS_ERR(scp->clk)) {
> - dev_err(dev, "Failed to get clock\n");
> - ret = PTR_ERR(scp->clk);
> - goto release_dev_mem;
> + if (of_get_property(np, "clocks", NULL)) {
> + scp->clk = devm_clk_get(dev, "main");
> + if (IS_ERR(scp->clk)) {
> + dev_err(dev, "Failed to get clock\n");
> + ret = PTR_ERR(scp->clk);
> + goto release_dev_mem;
> + }
Use devm_clk_get_optional().
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
2021-07-12 6:05 ` Tzung-Bi Shih
(?)
@ 2021-07-12 6:59 ` Chen-Yu Tsai
-1 siblings, 0 replies; 18+ messages in thread
From: Chen-Yu Tsai @ 2021-07-12 6:59 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Tinghan Shen, ohad, bjorn.andersson, mathieu.poirier,
Rob Herring, Matthias Brugger, linux-remoteproc, devicetree,
linux-arm-kernel, linux-mediatek, LKML, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Mon, Jul 12, 2021 at 2:06 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
>
> On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> > @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> > Mediatek SoCs.
> >
> > Required properties:
> > -- compatible Should be "mediatek,mt8183-scp"
> > +- compatible Should be one of:
> > + "mediatek,mt8183-scp"
> > + "mediatek,mt8195-scp"
> Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
> Could you send another patch for adding the missing property?
>
> [1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
>
> > -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> > -- clock-names Contains the corresponding name for the clock. This
> > +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> > +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> > should be named "main".
> Let's move clocks and clock-names to "Optional properties". See [2]
> for your reference. I guess it doesn't need to mention which chip
> needs the properties. For those chips that need the clock properties,
> they won't work correctly without correct clock properties.
I would suggest still adding them. We will need to describe the requirements
anyway then the binding is converted to DT schema.
ChenYu
> [2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
>
>
> Suggested to provide a cover letter for the series next time.
>
> nit: other patches usually use "[PATCH v2 1/2]" in the email title
> instead of the one used in the mail.
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-12 6:59 ` Chen-Yu Tsai
0 siblings, 0 replies; 18+ messages in thread
From: Chen-Yu Tsai @ 2021-07-12 6:59 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Tinghan Shen, ohad, bjorn.andersson, mathieu.poirier,
Rob Herring, Matthias Brugger, linux-remoteproc, devicetree,
linux-arm-kernel, linux-mediatek, LKML, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Mon, Jul 12, 2021 at 2:06 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
>
> On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> > @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> > Mediatek SoCs.
> >
> > Required properties:
> > -- compatible Should be "mediatek,mt8183-scp"
> > +- compatible Should be one of:
> > + "mediatek,mt8183-scp"
> > + "mediatek,mt8195-scp"
> Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
> Could you send another patch for adding the missing property?
>
> [1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
>
> > -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> > -- clock-names Contains the corresponding name for the clock. This
> > +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> > +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> > should be named "main".
> Let's move clocks and clock-names to "Optional properties". See [2]
> for your reference. I guess it doesn't need to mention which chip
> needs the properties. For those chips that need the clock properties,
> they won't work correctly without correct clock properties.
I would suggest still adding them. We will need to describe the requirements
anyway then the binding is converted to DT schema.
ChenYu
> [2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
>
>
> Suggested to provide a cover letter for the series next time.
>
> nit: other patches usually use "[PATCH v2 1/2]" in the email title
> instead of the one used in the mail.
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-12 6:59 ` Chen-Yu Tsai
0 siblings, 0 replies; 18+ messages in thread
From: Chen-Yu Tsai @ 2021-07-12 6:59 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Tinghan Shen, ohad, bjorn.andersson, mathieu.poirier,
Rob Herring, Matthias Brugger, linux-remoteproc, devicetree,
linux-arm-kernel, linux-mediatek, LKML, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Mon, Jul 12, 2021 at 2:06 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
>
> On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> > @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> > Mediatek SoCs.
> >
> > Required properties:
> > -- compatible Should be "mediatek,mt8183-scp"
> > +- compatible Should be one of:
> > + "mediatek,mt8183-scp"
> > + "mediatek,mt8195-scp"
> Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
> Could you send another patch for adding the missing property?
>
> [1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
>
> > -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> > -- clock-names Contains the corresponding name for the clock. This
> > +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> > +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> > should be named "main".
> Let's move clocks and clock-names to "Optional properties". See [2]
> for your reference. I guess it doesn't need to mention which chip
> needs the properties. For those chips that need the clock properties,
> they won't work correctly without correct clock properties.
I would suggest still adding them. We will need to describe the requirements
anyway then the binding is converted to DT schema.
ChenYu
> [2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
>
>
> Suggested to provide a cover letter for the series next time.
>
> nit: other patches usually use "[PATCH v2 1/2]" in the email title
> instead of the one used in the mail.
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
2021-07-12 6:59 ` Chen-Yu Tsai
(?)
@ 2021-07-12 7:01 ` Chen-Yu Tsai
-1 siblings, 0 replies; 18+ messages in thread
From: Chen-Yu Tsai @ 2021-07-12 7:01 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Tinghan Shen, ohad, bjorn.andersson, mathieu.poirier,
Rob Herring, Matthias Brugger, linux-remoteproc, devicetree,
linux-arm-kernel, linux-mediatek, LKML, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Mon, Jul 12, 2021 at 2:59 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> On Mon, Jul 12, 2021 at 2:06 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
> >
> > On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> > > @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> > > Mediatek SoCs.
> > >
> > > Required properties:
> > > -- compatible Should be "mediatek,mt8183-scp"
> > > +- compatible Should be one of:
> > > + "mediatek,mt8183-scp"
> > > + "mediatek,mt8195-scp"
> > Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
> > Could you send another patch for adding the missing property?
> >
> > [1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
> >
> > > -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> > > -- clock-names Contains the corresponding name for the clock. This
> > > +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> > > +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> > > should be named "main".
> > Let's move clocks and clock-names to "Optional properties". See [2]
> > for your reference. I guess it doesn't need to mention which chip
> > needs the properties. For those chips that need the clock properties,
> > they won't work correctly without correct clock properties.
>
> I would suggest still adding them. We will need to describe the requirements
> anyway then the binding is converted to DT schema.
Also, a coprocessor without any clock feeding it makes little sense.
Any processor requires a running clock. Whether that clock is controllable
is beside the point.
> ChenYu
>
> > [2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
> >
> >
> > Suggested to provide a cover letter for the series next time.
> >
> > nit: other patches usually use "[PATCH v2 1/2]" in the email title
> > instead of the one used in the mail.
> >
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-12 7:01 ` Chen-Yu Tsai
0 siblings, 0 replies; 18+ messages in thread
From: Chen-Yu Tsai @ 2021-07-12 7:01 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Tinghan Shen, ohad, bjorn.andersson, mathieu.poirier,
Rob Herring, Matthias Brugger, linux-remoteproc, devicetree,
linux-arm-kernel, linux-mediatek, LKML, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Mon, Jul 12, 2021 at 2:59 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> On Mon, Jul 12, 2021 at 2:06 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
> >
> > On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> > > @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> > > Mediatek SoCs.
> > >
> > > Required properties:
> > > -- compatible Should be "mediatek,mt8183-scp"
> > > +- compatible Should be one of:
> > > + "mediatek,mt8183-scp"
> > > + "mediatek,mt8195-scp"
> > Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
> > Could you send another patch for adding the missing property?
> >
> > [1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
> >
> > > -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> > > -- clock-names Contains the corresponding name for the clock. This
> > > +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> > > +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> > > should be named "main".
> > Let's move clocks and clock-names to "Optional properties". See [2]
> > for your reference. I guess it doesn't need to mention which chip
> > needs the properties. For those chips that need the clock properties,
> > they won't work correctly without correct clock properties.
>
> I would suggest still adding them. We will need to describe the requirements
> anyway then the binding is converted to DT schema.
Also, a coprocessor without any clock feeding it makes little sense.
Any processor requires a running clock. Whether that clock is controllable
is beside the point.
> ChenYu
>
> > [2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
> >
> >
> > Suggested to provide a cover letter for the series next time.
> >
> > nit: other patches usually use "[PATCH v2 1/2]" in the email title
> > instead of the one used in the mail.
> >
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp
@ 2021-07-12 7:01 ` Chen-Yu Tsai
0 siblings, 0 replies; 18+ messages in thread
From: Chen-Yu Tsai @ 2021-07-12 7:01 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Tinghan Shen, ohad, bjorn.andersson, mathieu.poirier,
Rob Herring, Matthias Brugger, linux-remoteproc, devicetree,
linux-arm-kernel, linux-mediatek, LKML, srv_heupstream,
Project_Global_Chrome_Upstream_Group
On Mon, Jul 12, 2021 at 2:59 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> On Mon, Jul 12, 2021 at 2:06 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
> >
> > On Sat, Jul 10, 2021 at 8:25 PM Tinghan Shen <tinghan.shen@mediatek.com> wrote:
> > > @@ -5,13 +5,15 @@ This binding provides support for ARM Cortex M4 Co-processor found on some
> > > Mediatek SoCs.
> > >
> > > Required properties:
> > > -- compatible Should be "mediatek,mt8183-scp"
> > > +- compatible Should be one of:
> > > + "mediatek,mt8183-scp"
> > > + "mediatek,mt8195-scp"
> > Just realized we forgot to add DT bindings for mediatek,mt8192-scp[1].
> > Could you send another patch for adding the missing property?
> >
> > [1]: https://elixir.bootlin.com/linux/v5.13.1/source/drivers/remoteproc/mtk_scp.c#L879
> >
> > > -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt)
> > > -- clock-names Contains the corresponding name for the clock. This
> > > +- clocks Required by mt8183. Clock for co-processor (See: ../clock/clock-bindings.txt)
> > > +- clock-names Required by mt8183. Contains the corresponding name for the clock. This
> > > should be named "main".
> > Let's move clocks and clock-names to "Optional properties". See [2]
> > for your reference. I guess it doesn't need to mention which chip
> > needs the properties. For those chips that need the clock properties,
> > they won't work correctly without correct clock properties.
>
> I would suggest still adding them. We will need to describe the requirements
> anyway then the binding is converted to DT schema.
Also, a coprocessor without any clock feeding it makes little sense.
Any processor requires a running clock. Whether that clock is controllable
is beside the point.
> ChenYu
>
> > [2]: https://elixir.bootlin.com/linux/v5.13.1/source/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt#L87
> >
> >
> > Suggested to provide a cover letter for the series next time.
> >
> > nit: other patches usually use "[PATCH v2 1/2]" in the email title
> > instead of the one used in the mail.
> >
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2021-07-12 7:10 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10 12:24 [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for mt8195 scp Tinghan Shen
2021-07-10 12:24 ` Tinghan Shen
2021-07-10 12:24 ` Tinghan Shen
2021-07-10 12:24 ` [v2 2/2] remoteproc: mediatek: Support " Tinghan Shen
2021-07-10 12:24 ` Tinghan Shen
2021-07-10 12:24 ` Tinghan Shen
2021-07-12 6:06 ` Tzung-Bi Shih
2021-07-12 6:06 ` Tzung-Bi Shih
2021-07-12 6:06 ` Tzung-Bi Shih
2021-07-12 6:05 ` [v2 1/2] dt-bindings: remoteproc: mediatek: Add binding for " Tzung-Bi Shih
2021-07-12 6:05 ` Tzung-Bi Shih
2021-07-12 6:05 ` Tzung-Bi Shih
2021-07-12 6:59 ` Chen-Yu Tsai
2021-07-12 6:59 ` Chen-Yu Tsai
2021-07-12 6:59 ` Chen-Yu Tsai
2021-07-12 7:01 ` Chen-Yu Tsai
2021-07-12 7:01 ` Chen-Yu Tsai
2021-07-12 7:01 ` Chen-Yu Tsai
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.