linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: mediatek: Add fallback compatible for mt8192's flash
@ 2022-04-29 19:57 Nícolas F. R. A. Prado
  2022-05-02  8:35 ` AngeloGioacchino Del Regno
  2022-05-02 16:12 ` Nícolas F. R. A. Prado
  0 siblings, 2 replies; 3+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-04-29 19:57 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: AngeloGioacchino Del Regno, kernel, Nícolas F. R. A. Prado,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

The dt-binding for Mediatek's SPI NOR flash controller expects a mt8173
fallback compatible for mt8192, so add it in mt8192.dtsi.

The driver already sets custom data based on the mt8192 compatible, so
this fallback compatible won't be used and is added purely to suppress
the dt-binding warning.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

 arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
index 26dbe9ecc528..32a836105ea7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
@@ -896,7 +896,7 @@ pcie_intc0: interrupt-controller {
 		};
 
 		nor_flash: spi@11234000 {
-			compatible = "mediatek,mt8192-nor";
+			compatible = "mediatek,mt8192-nor", "mediatek,mt8173-nor";
 			reg = <0 0x11234000 0 0xe0>;
 			interrupts = <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH 0>;
 			clocks = <&topckgen CLK_TOP_SFLASH_SEL>,
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: mediatek: Add fallback compatible for mt8192's flash
  2022-04-29 19:57 [PATCH] arm64: dts: mediatek: Add fallback compatible for mt8192's flash Nícolas F. R. A. Prado
@ 2022-05-02  8:35 ` AngeloGioacchino Del Regno
  2022-05-02 16:12 ` Nícolas F. R. A. Prado
  1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-02  8:35 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Matthias Brugger
  Cc: kernel, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek

Il 29/04/22 21:57, Nícolas F. R. A. Prado ha scritto:
> The dt-binding for Mediatek's SPI NOR flash controller expects a mt8173
> fallback compatible for mt8192, so add it in mt8192.dtsi.
> 
> The driver already sets custom data based on the mt8192 compatible, so
> this fallback compatible won't be used and is added purely to suppress
> the dt-binding warning.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: mediatek: Add fallback compatible for mt8192's flash
  2022-04-29 19:57 [PATCH] arm64: dts: mediatek: Add fallback compatible for mt8192's flash Nícolas F. R. A. Prado
  2022-05-02  8:35 ` AngeloGioacchino Del Regno
@ 2022-05-02 16:12 ` Nícolas F. R. A. Prado
  1 sibling, 0 replies; 3+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-05-02 16:12 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: AngeloGioacchino Del Regno, kernel, Krzysztof Kozlowski,
	Rob Herring, devicetree, linux-arm-kernel, linux-kernel,
	linux-mediatek

On Fri, Apr 29, 2022 at 03:57:45PM -0400, Nícolas F. R. A. Prado wrote:
> The dt-binding for Mediatek's SPI NOR flash controller expects a mt8173
> fallback compatible for mt8192, so add it in mt8192.dtsi.
> 
> The driver already sets custom data based on the mt8192 compatible, so
> this fallback compatible won't be used and is added purely to suppress
> the dt-binding warning.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

By the way, I wonder if this patch should be accompanied by a patch adding the 
mediatek,mt8192-nor standalone compatible as deprecated in the dt-binding. I
feel like the answer is in theory yes, but in practice no.

The fact that the mediatek,mt8192-nor standalone compatible was accepted in the
devicetree means that it should show in the dt-binding, since it's an acceptable
binding. But since the binding already shows up there with a fallback binding,
then this standalone binding should be considered deprecated.

But in practice, the mediatek,mt8192-nor is the more specific binding so
documenting its standalone use as deprecated wouldn't accomplish much.

What do you think?

Thanks,
Nícolas

> 
> ---
> 
>  arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
> index 26dbe9ecc528..32a836105ea7 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
> @@ -896,7 +896,7 @@ pcie_intc0: interrupt-controller {
>  		};
>  
>  		nor_flash: spi@11234000 {
> -			compatible = "mediatek,mt8192-nor";
> +			compatible = "mediatek,mt8192-nor", "mediatek,mt8173-nor";
>  			reg = <0 0x11234000 0 0xe0>;
>  			interrupts = <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH 0>;
>  			clocks = <&topckgen CLK_TOP_SFLASH_SEL>,
> -- 
> 2.36.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-02 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 19:57 [PATCH] arm64: dts: mediatek: Add fallback compatible for mt8192's flash Nícolas F. R. A. Prado
2022-05-02  8:35 ` AngeloGioacchino Del Regno
2022-05-02 16:12 ` Nícolas F. R. A. Prado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).