* [PATCH 0/8] MT6795 Devicetrees and Sony Xperia M5
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
This series brings some more support for the MT6795 SoC, as it
adds support for basic clock controllers (and resets) and all
of the mtk-sd mmc controllers.
While at it, since now it's possible to get the "first signs of
life" out of a MT6795 smartphone platform, add a basic devicetree
for the Sony Xperia M5 (codename "Holly") device as to start
preparing the ground for a gradual bringup.
This series depends on [1] my mt6795 clocks series.
P.S.: Thumbs up for the first MediaTek-powered ARM64 smartphone
going upstream! :-) :-) :-)
[1]: https://patchwork.kernel.org/project/linux-mediatek/list/?series=662165
AngeloGioacchino Del Regno (8):
dt-bindings: dma: mediatek,uart-dma: Add binding for MT6795 SoC
dt-bindings: mmc: Add compatible for MT6795 Helio X10 SoC
arm64: dts: mediatek: mt6795: Add topckgen, infra, peri clocks/resets
arm64: dts: mediatek: mt6795: Replace UART dummy clocks with pericfg
arm64: dts: mediatek: mt6795: Add support for APDMA and wire up UART
DMAs
arm64: dts: mediatek: mt6795: Add support for eMMC/SD/SDIO controllers
dt-bindings: arm: mediatek: Add compatible for MT6795 Sony Xperia M5
arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
.../devicetree/bindings/arm/mediatek.yaml | 1 +
.../bindings/dma/mediatek,uart-dma.yaml | 1 +
.../devicetree/bindings/mmc/mtk-sd.yaml | 1 +
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 107 +++++++++++++++++-
6 files changed, 197 insertions(+), 4 deletions(-)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* [PATCH 1/8] dt-bindings: dma: mediatek,uart-dma: Add binding for MT6795 SoC
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add mediatek,mt6795-uart-dma to the compatibles list to support
the MT6795 Helio X10 SoC's UART APDMA.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml b/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml
index 19ea8dcbcbce..9ab4d81ead35 100644
--- a/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml
@@ -22,6 +22,7 @@ properties:
- items:
- enum:
- mediatek,mt2712-uart-dma
+ - mediatek,mt6795-uart-dma
- mediatek,mt8365-uart-dma
- mediatek,mt8516-uart-dma
- const: mediatek,mt6577-uart-dma
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 1/8] dt-bindings: dma: mediatek,uart-dma: Add binding for MT6795 SoC
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add mediatek,mt6795-uart-dma to the compatibles list to support
the MT6795 Helio X10 SoC's UART APDMA.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml b/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml
index 19ea8dcbcbce..9ab4d81ead35 100644
--- a/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/mediatek,uart-dma.yaml
@@ -22,6 +22,7 @@ properties:
- items:
- enum:
- mediatek,mt2712-uart-dma
+ - mediatek,mt6795-uart-dma
- mediatek,mt8365-uart-dma
- mediatek,mt8516-uart-dma
- const: mediatek,mt6577-uart-dma
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 1/8] dt-bindings: dma: mediatek,uart-dma: Add binding for MT6795 SoC
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-08-02 7:34 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 38+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-02 7:34 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 29/07/2022 12:44, AngeloGioacchino Del Regno wrote:
> Add mediatek,mt6795-uart-dma to the compatibles list to support
> the MT6795 Helio X10 SoC's UART APDMA.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/8] dt-bindings: dma: mediatek,uart-dma: Add binding for MT6795 SoC
@ 2022-08-02 7:34 ` Krzysztof Kozlowski
0 siblings, 0 replies; 38+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-02 7:34 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 29/07/2022 12:44, AngeloGioacchino Del Regno wrote:
> Add mediatek,mt6795-uart-dma to the compatibles list to support
> the MT6795 Helio X10 SoC's UART APDMA.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 1/8] dt-bindings: dma: mediatek,uart-dma: Add binding for MT6795 SoC
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-09-04 17:26 ` Vinod Koul
-1 siblings, 0 replies; 38+ messages in thread
From: Vinod Koul @ 2022-09-04 17:26 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: robh+dt, krzysztof.kozlowski+dt, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 29-07-22, 12:44, AngeloGioacchino Del Regno wrote:
> Add mediatek,mt6795-uart-dma to the compatibles list to support
> the MT6795 Helio X10 SoC's UART APDMA.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/8] dt-bindings: dma: mediatek,uart-dma: Add binding for MT6795 SoC
@ 2022-09-04 17:26 ` Vinod Koul
0 siblings, 0 replies; 38+ messages in thread
From: Vinod Koul @ 2022-09-04 17:26 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: robh+dt, krzysztof.kozlowski+dt, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 29-07-22, 12:44, AngeloGioacchino Del Regno wrote:
> Add mediatek,mt6795-uart-dma to the compatibles list to support
> the MT6795 Helio X10 SoC's UART APDMA.
Applied, thanks
--
~Vinod
_______________________________________________
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] 38+ messages in thread
* [PATCH 2/8] dt-bindings: mmc: Add compatible for MT6795 Helio X10 SoC
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a compatible string for the MT6795 SoC's mtk-sd mmc controllers.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
index be366cefffc2..e1ceefe0ae48 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
@@ -20,6 +20,7 @@ properties:
- mediatek,mt2701-mmc
- mediatek,mt2712-mmc
- mediatek,mt6779-mmc
+ - mediatek,mt6795-mmc
- mediatek,mt7620-mmc
- mediatek,mt7622-mmc
- mediatek,mt8135-mmc
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 2/8] dt-bindings: mmc: Add compatible for MT6795 Helio X10 SoC
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a compatible string for the MT6795 SoC's mtk-sd mmc controllers.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
index be366cefffc2..e1ceefe0ae48 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
@@ -20,6 +20,7 @@ properties:
- mediatek,mt2701-mmc
- mediatek,mt2712-mmc
- mediatek,mt6779-mmc
+ - mediatek,mt6795-mmc
- mediatek,mt7620-mmc
- mediatek,mt7622-mmc
- mediatek,mt8135-mmc
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 2/8] dt-bindings: mmc: Add compatible for MT6795 Helio X10 SoC
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 23:05 ` Rob Herring
-1 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2022-07-29 23:05 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: vkoul, wenbin.mei, robh+dt, dmaengine, sam.shih, phone-devel,
devicetree, long.cheng, fparent, ~postmarketos/upstreaming,
linux-kernel, hsinyi, linux-mediatek, ulf.hansson,
krzysztof.kozlowski+dt, linux-mmc, linux-arm-kernel,
chaotian.jing, nfraprado, sean.wang, allen-kh.cheng,
matthias.bgg
On Fri, 29 Jul 2022 12:44:34 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MT6795 SoC's mtk-sd mmc controllers.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 2/8] dt-bindings: mmc: Add compatible for MT6795 Helio X10 SoC
@ 2022-07-29 23:05 ` Rob Herring
0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2022-07-29 23:05 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: vkoul, wenbin.mei, robh+dt, dmaengine, sam.shih, phone-devel,
devicetree, long.cheng, fparent, ~postmarketos/upstreaming,
linux-kernel, hsinyi, linux-mediatek, ulf.hansson,
krzysztof.kozlowski+dt, linux-mmc, linux-arm-kernel,
chaotian.jing, nfraprado, sean.wang, allen-kh.cheng,
matthias.bgg
On Fri, 29 Jul 2022 12:44:34 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MT6795 SoC's mtk-sd mmc controllers.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 2/8] dt-bindings: mmc: Add compatible for MT6795 Helio X10 SoC
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-08-15 18:28 ` Ulf Hansson
-1 siblings, 0 replies; 38+ messages in thread
From: Ulf Hansson @ 2022-08-15 18:28 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: robh+dt, krzysztof.kozlowski+dt, vkoul, chaotian.jing,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On Fri, 29 Jul 2022 at 12:44, AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Add a compatible string for the MT6795 SoC's mtk-sd mmc controllers.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index be366cefffc2..e1ceefe0ae48 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -20,6 +20,7 @@ properties:
> - mediatek,mt2701-mmc
> - mediatek,mt2712-mmc
> - mediatek,mt6779-mmc
> + - mediatek,mt6795-mmc
> - mediatek,mt7620-mmc
> - mediatek,mt7622-mmc
> - mediatek,mt8135-mmc
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 2/8] dt-bindings: mmc: Add compatible for MT6795 Helio X10 SoC
@ 2022-08-15 18:28 ` Ulf Hansson
0 siblings, 0 replies; 38+ messages in thread
From: Ulf Hansson @ 2022-08-15 18:28 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: robh+dt, krzysztof.kozlowski+dt, vkoul, chaotian.jing,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On Fri, 29 Jul 2022 at 12:44, AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Add a compatible string for the MT6795 SoC's mtk-sd mmc controllers.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index be366cefffc2..e1ceefe0ae48 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -20,6 +20,7 @@ properties:
> - mediatek,mt2701-mmc
> - mediatek,mt2712-mmc
> - mediatek,mt6779-mmc
> + - mediatek,mt6795-mmc
> - mediatek,mt7620-mmc
> - mediatek,mt7622-mmc
> - mediatek,mt8135-mmc
> --
> 2.35.1
>
_______________________________________________
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] 38+ messages in thread
* [PATCH 3/8] arm64: dts: mediatek: mt6795: Add topckgen, infra, peri clocks/resets
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add nodes for topckgen, infracfg and pericfg, providing various
clocks and resets and needed to support basic IPs of this SoC.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 46f0e54be766..9166d481a366 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -192,6 +192,26 @@ soc {
compatible = "simple-bus";
ranges;
+ topckgen: syscon@10000000 {
+ compatible = "mediatek,mt6795-topckgen", "syscon";
+ reg = <0 0x10000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ infracfg: syscon@10001000 {
+ compatible = "mediatek,mt6795-infracfg", "syscon";
+ reg = <0 0x10001000 0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
+ pericfg: syscon@10003000 {
+ compatible = "mediatek,mt6795-pericfg", "syscon";
+ reg = <0 0x10003000 0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
pio: pinctrl@10005000 {
compatible = "mediatek,mt6795-pinctrl";
reg = <0 0x10005000 0 0x1000>, <0 0x1000b000 0 0x1000>;
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 3/8] arm64: dts: mediatek: mt6795: Add topckgen, infra, peri clocks/resets
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add nodes for topckgen, infracfg and pericfg, providing various
clocks and resets and needed to support basic IPs of this SoC.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 46f0e54be766..9166d481a366 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -192,6 +192,26 @@ soc {
compatible = "simple-bus";
ranges;
+ topckgen: syscon@10000000 {
+ compatible = "mediatek,mt6795-topckgen", "syscon";
+ reg = <0 0x10000000 0 0x1000>;
+ #clock-cells = <1>;
+ };
+
+ infracfg: syscon@10001000 {
+ compatible = "mediatek,mt6795-infracfg", "syscon";
+ reg = <0 0x10001000 0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
+ pericfg: syscon@10003000 {
+ compatible = "mediatek,mt6795-pericfg", "syscon";
+ reg = <0 0x10003000 0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
pio: pinctrl@10005000 {
compatible = "mediatek,mt6795-pinctrl";
reg = <0 0x10005000 0 0x1000>, <0 0x1000b000 0 0x1000>;
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* [PATCH 4/8] arm64: dts: mediatek: mt6795: Replace UART dummy clocks with pericfg
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
The UART nodes had a dummy clock for early bringup, as it is
expected that these are left on by the bootloader: now that
the pericfg clock controller is supported, we can replace
them with the real clocks.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 9166d481a366..559fec1ee123 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -312,7 +312,8 @@ uart0: serial@11002000 {
"mediatek,mt6577-uart";
reg = <0 0x11002000 0 0x400>;
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -321,7 +322,8 @@ uart1: serial@11003000 {
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -330,7 +332,8 @@ uart2: serial@11004000 {
"mediatek,mt6577-uart";
reg = <0 0x11004000 0 0x400>;
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -339,7 +342,8 @@ uart3: serial@11005000 {
"mediatek,mt6577-uart";
reg = <0 0x11005000 0 0x400>;
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
+ clock-names = "baud", "bus";
status = "disabled";
};
};
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 4/8] arm64: dts: mediatek: mt6795: Replace UART dummy clocks with pericfg
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
The UART nodes had a dummy clock for early bringup, as it is
expected that these are left on by the bootloader: now that
the pericfg clock controller is supported, we can replace
them with the real clocks.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 9166d481a366..559fec1ee123 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -312,7 +312,8 @@ uart0: serial@11002000 {
"mediatek,mt6577-uart";
reg = <0 0x11002000 0 0x400>;
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -321,7 +322,8 @@ uart1: serial@11003000 {
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -330,7 +332,8 @@ uart2: serial@11004000 {
"mediatek,mt6577-uart";
reg = <0 0x11004000 0 0x400>;
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
+ clock-names = "baud", "bus";
status = "disabled";
};
@@ -339,7 +342,8 @@ uart3: serial@11005000 {
"mediatek,mt6577-uart";
reg = <0 0x11005000 0 0x400>;
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&clk26m>;
+ clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
+ clock-names = "baud", "bus";
status = "disabled";
};
};
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* [PATCH 5/8] arm64: dts: mediatek: mt6795: Add support for APDMA and wire up UART DMAs
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
This SoC has a DMA controller with tx/rx channels for all of the
UART controller IPs: add the apdma node and wire up the DMAs on
all controllers.
When one of the UART controllers is used as a serial console,
the DMA will be automatically ignored.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 34 ++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 559fec1ee123..687e0ee63503 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -314,6 +314,8 @@ uart0: serial@11002000 {
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
clock-names = "baud", "bus";
+ dmas = <&apdma 0>, <&apdma 1>;
+ dma-names = "tx", "rx";
status = "disabled";
};
@@ -324,9 +326,37 @@ uart1: serial@11003000 {
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
clock-names = "baud", "bus";
+ dmas = <&apdma 2>, <&apdma 3>;
+ dma-names = "tx", "rx";
status = "disabled";
};
+ apdma: dma-controller@11000380 {
+ compatible = "mediatek,mt6795-uart-dma",
+ "mediatek,mt6577-uart-dma";
+ reg = <0 0x11000380 0 0x60>,
+ <0 0x11000400 0 0x60>,
+ <0 0x11000480 0 0x60>,
+ <0 0x11000500 0 0x60>,
+ <0 0x11000580 0 0x60>,
+ <0 0x11000600 0 0x60>,
+ <0 0x11000680 0 0x60>,
+ <0 0x11000700 0 0x60>;
+ interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>;
+ dma-requests = <8>;
+ clocks = <&pericfg CLK_PERI_AP_DMA>;
+ clock-names = "apdma";
+ mediatek,dma-33bits;
+ #dma-cells = <1>;
+ };
+
uart2: serial@11004000 {
compatible = "mediatek,mt6795-uart",
"mediatek,mt6577-uart";
@@ -334,6 +364,8 @@ uart2: serial@11004000 {
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
clock-names = "baud", "bus";
+ dmas = <&apdma 4>, <&apdma 5>;
+ dma-names = "tx", "rx";
status = "disabled";
};
@@ -344,6 +376,8 @@ uart3: serial@11005000 {
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
clock-names = "baud", "bus";
+ dmas = <&apdma 6>, <&apdma 7>;
+ dma-names = "tx", "rx";
status = "disabled";
};
};
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 5/8] arm64: dts: mediatek: mt6795: Add support for APDMA and wire up UART DMAs
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
This SoC has a DMA controller with tx/rx channels for all of the
UART controller IPs: add the apdma node and wire up the DMAs on
all controllers.
When one of the UART controllers is used as a serial console,
the DMA will be automatically ignored.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 34 ++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 559fec1ee123..687e0ee63503 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -314,6 +314,8 @@ uart0: serial@11002000 {
interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
clock-names = "baud", "bus";
+ dmas = <&apdma 0>, <&apdma 1>;
+ dma-names = "tx", "rx";
status = "disabled";
};
@@ -324,9 +326,37 @@ uart1: serial@11003000 {
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
clock-names = "baud", "bus";
+ dmas = <&apdma 2>, <&apdma 3>;
+ dma-names = "tx", "rx";
status = "disabled";
};
+ apdma: dma-controller@11000380 {
+ compatible = "mediatek,mt6795-uart-dma",
+ "mediatek,mt6577-uart-dma";
+ reg = <0 0x11000380 0 0x60>,
+ <0 0x11000400 0 0x60>,
+ <0 0x11000480 0 0x60>,
+ <0 0x11000500 0 0x60>,
+ <0 0x11000580 0 0x60>,
+ <0 0x11000600 0 0x60>,
+ <0 0x11000680 0 0x60>,
+ <0 0x11000700 0 0x60>;
+ interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 108 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>;
+ dma-requests = <8>;
+ clocks = <&pericfg CLK_PERI_AP_DMA>;
+ clock-names = "apdma";
+ mediatek,dma-33bits;
+ #dma-cells = <1>;
+ };
+
uart2: serial@11004000 {
compatible = "mediatek,mt6795-uart",
"mediatek,mt6577-uart";
@@ -334,6 +364,8 @@ uart2: serial@11004000 {
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
clock-names = "baud", "bus";
+ dmas = <&apdma 4>, <&apdma 5>;
+ dma-names = "tx", "rx";
status = "disabled";
};
@@ -344,6 +376,8 @@ uart3: serial@11005000 {
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
clock-names = "baud", "bus";
+ dmas = <&apdma 6>, <&apdma 7>;
+ dma-names = "tx", "rx";
status = "disabled";
};
};
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* [PATCH 6/8] arm64: dts: mediatek: mt6795: Add support for eMMC/SD/SDIO controllers
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add the mmc nodes to support all of the four controllers, used for
eMMC, SD/MicroSD and SDIO storage.
All of these controller nodes are left disabled by default, as
usage is board dependent.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 41 ++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 687e0ee63503..2548bfcf9755 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -380,5 +380,46 @@ uart3: serial@11005000 {
dma-names = "tx", "rx";
status = "disabled";
};
+
+ mmc0: mmc@11230000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11230000 0 0x1000>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_0>,
+ <&topckgen CLK_TOP_MSDC50_0_H_SEL>,
+ <&topckgen CLK_TOP_MSDC50_0_SEL>;
+ clock-names = "source", "hclk", "source_cg";
+ status = "disabled";
+ };
+
+ mmc1: mmc@11240000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11240000 0 0x1000>;
+ interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_1>,
+ <&topckgen CLK_TOP_AXI_SEL>;
+ clock-names = "source", "hclk";
+ status = "disabled";
+ };
+
+ mmc2: mmc@11250000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11250000 0 0x1000>;
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_2>,
+ <&topckgen CLK_TOP_AXI_SEL>;
+ clock-names = "source", "hclk";
+ status = "disabled";
+ };
+
+ mmc3: mmc@11260000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11260000 0 0x1000>;
+ interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_3>,
+ <&topckgen CLK_TOP_AXI_SEL>;
+ clock-names = "source", "hclk";
+ status = "disabled";
+ };
};
};
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 6/8] arm64: dts: mediatek: mt6795: Add support for eMMC/SD/SDIO controllers
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add the mmc nodes to support all of the four controllers, used for
eMMC, SD/MicroSD and SDIO storage.
All of these controller nodes are left disabled by default, as
usage is board dependent.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 41 ++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 687e0ee63503..2548bfcf9755 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -380,5 +380,46 @@ uart3: serial@11005000 {
dma-names = "tx", "rx";
status = "disabled";
};
+
+ mmc0: mmc@11230000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11230000 0 0x1000>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_0>,
+ <&topckgen CLK_TOP_MSDC50_0_H_SEL>,
+ <&topckgen CLK_TOP_MSDC50_0_SEL>;
+ clock-names = "source", "hclk", "source_cg";
+ status = "disabled";
+ };
+
+ mmc1: mmc@11240000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11240000 0 0x1000>;
+ interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_1>,
+ <&topckgen CLK_TOP_AXI_SEL>;
+ clock-names = "source", "hclk";
+ status = "disabled";
+ };
+
+ mmc2: mmc@11250000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11250000 0 0x1000>;
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_2>,
+ <&topckgen CLK_TOP_AXI_SEL>;
+ clock-names = "source", "hclk";
+ status = "disabled";
+ };
+
+ mmc3: mmc@11260000 {
+ compatible = "mediatek,mt6795-mmc", "mediatek,mt8173-mmc";
+ reg = <0 0x11260000 0 0x1000>;
+ interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_MSDC30_3>,
+ <&topckgen CLK_TOP_AXI_SEL>;
+ clock-names = "source", "hclk";
+ status = "disabled";
+ };
};
};
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a basic support for the Sony Xperia M5 (codename "Holly")
smartphone, powered by a MediaTek Helio X10 SoC.
This achieves a console boot.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
2 files changed, 91 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index af362a085a02..72fd683c9264 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
new file mode 100644
index 000000000000..94d011c4126c
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Collabora Ltd
+ * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+ */
+
+/dts-v1/;
+#include "mt6795.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Sony Xperia M5";
+ compatible = "sony,xperia-m5", "mediatek,mt6795";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x1E800000>;
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
+ bl31_secmon_reserved: secmon@43000000 {
+ no-map;
+ reg = <0 0x43000000 0 0x30000>;
+ };
+
+ /* preloader and bootloader regions cannot be touched */
+ preloader-region@44800000 {
+ no-map;
+ reg = <0 0x44800000 0 0x100000>;
+ };
+
+ bootloader-region@46000000 {
+ no-map;
+ reg = <0 0x46000000 0 0x400000>;
+ };
+ };
+};
+
+&pio {
+ uart0_pins: uart0-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
+ output-high;
+ };
+ };
+
+ uart2_pins: uart2-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+};
+
+&uart2 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+};
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a basic support for the Sony Xperia M5 (codename "Holly")
smartphone, powered by a MediaTek Helio X10 SoC.
This achieves a console boot.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
2 files changed, 91 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index af362a085a02..72fd683c9264 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
new file mode 100644
index 000000000000..94d011c4126c
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Collabora Ltd
+ * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+ */
+
+/dts-v1/;
+#include "mt6795.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Sony Xperia M5";
+ compatible = "sony,xperia-m5", "mediatek,mt6795";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x1E800000>;
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
+ bl31_secmon_reserved: secmon@43000000 {
+ no-map;
+ reg = <0 0x43000000 0 0x30000>;
+ };
+
+ /* preloader and bootloader regions cannot be touched */
+ preloader-region@44800000 {
+ no-map;
+ reg = <0 0x44800000 0 0x100000>;
+ };
+
+ bootloader-region@46000000 {
+ no-map;
+ reg = <0 0x46000000 0 0x400000>;
+ };
+ };
+};
+
+&pio {
+ uart0_pins: uart0-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
+ output-high;
+ };
+ };
+
+ uart2_pins: uart2-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+};
+
+&uart2 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+};
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 12:00 ` Konrad Dybcio
-1 siblings, 0 replies; 38+ messages in thread
From: Konrad Dybcio @ 2022-07-29 12:00 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
> Add a basic support for the Sony Xperia M5 (codename "Holly")
> smartphone, powered by a MediaTek Helio X10 SoC.
>
> This achieves a console boot.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 1 +
> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
> 2 files changed, 91 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index af362a085a02..72fd683c9264 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
-holly.dtb?
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> new file mode 100644
> index 000000000000..94d011c4126c
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> @@ -0,0 +1,90 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2022, Collabora Ltd
> + * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> + */
> +
> +/dts-v1/;
> +#include "mt6795.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
Looks unused.
> +
> +/ {
> + model = "Sony Xperia M5";
> + compatible = "sony,xperia-m5", "mediatek,mt6795";
sony,holly?
> + chassis-type = "handset";
> +
> + aliases {
> + mmc0 = &mmc0;
> + mmc1 = &mmc1;
> + serial0 = &uart0;
> + serial1 = &uart1;
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + reg = <0 0x40000000 0 0x1E800000>;
Lowercase hex in size. Also, doesn't the bootloader fill it in?
> + };
> +
> + reserved_memory: reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
Is that true for all devices with this SoC, or..? If so, it may be worth
moving this into mt6795.dtsi.
> + bl31_secmon_reserved: secmon@43000000 {
memory@, everywhere. Use labels to name the nodes.
> + no-map;
reg goes first.
> + reg = <0 0x43000000 0 0x30000>;
> + };
> +
> + /* preloader and bootloader regions cannot be touched */
> + preloader-region@44800000 {
> + no-map;
> + reg = <0 0x44800000 0 0x100000>;
> + };
> +
> + bootloader-region@46000000 {
> + no-map;
> + reg = <0 0x46000000 0 0x400000>;
> + };
> + };
> +};
> +
> +&pio {
> + uart0_pins: uart0-pins {
> + pins-rx {
> + pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
> + bias-pull-up;
> + input-enable;
> + };
> + pins-tx {
> + pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
> + output-high;
> + };
> + };
> +
> + uart2_pins: uart2-pins {
> + pins-rx {
> + pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
> + bias-pull-up;
> + input-enable;
> + };
> + pins-tx {
> + pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
> + };
> + };
> +};
> +
> +&uart0 {
> + status = "okay";
Status last here and below, please.
Konrad
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_pins>;
> +};
> +
> +&uart2 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart2_pins>;
> +};
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
@ 2022-07-29 12:00 ` Konrad Dybcio
0 siblings, 0 replies; 38+ messages in thread
From: Konrad Dybcio @ 2022-07-29 12:00 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
> Add a basic support for the Sony Xperia M5 (codename "Holly")
> smartphone, powered by a MediaTek Helio X10 SoC.
>
> This achieves a console boot.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 1 +
> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
> 2 files changed, 91 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index af362a085a02..72fd683c9264 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
-holly.dtb?
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> new file mode 100644
> index 000000000000..94d011c4126c
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> @@ -0,0 +1,90 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2022, Collabora Ltd
> + * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> + */
> +
> +/dts-v1/;
> +#include "mt6795.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
Looks unused.
> +
> +/ {
> + model = "Sony Xperia M5";
> + compatible = "sony,xperia-m5", "mediatek,mt6795";
sony,holly?
> + chassis-type = "handset";
> +
> + aliases {
> + mmc0 = &mmc0;
> + mmc1 = &mmc1;
> + serial0 = &uart0;
> + serial1 = &uart1;
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + reg = <0 0x40000000 0 0x1E800000>;
Lowercase hex in size. Also, doesn't the bootloader fill it in?
> + };
> +
> + reserved_memory: reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
Is that true for all devices with this SoC, or..? If so, it may be worth
moving this into mt6795.dtsi.
> + bl31_secmon_reserved: secmon@43000000 {
memory@, everywhere. Use labels to name the nodes.
> + no-map;
reg goes first.
> + reg = <0 0x43000000 0 0x30000>;
> + };
> +
> + /* preloader and bootloader regions cannot be touched */
> + preloader-region@44800000 {
> + no-map;
> + reg = <0 0x44800000 0 0x100000>;
> + };
> +
> + bootloader-region@46000000 {
> + no-map;
> + reg = <0 0x46000000 0 0x400000>;
> + };
> + };
> +};
> +
> +&pio {
> + uart0_pins: uart0-pins {
> + pins-rx {
> + pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
> + bias-pull-up;
> + input-enable;
> + };
> + pins-tx {
> + pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
> + output-high;
> + };
> + };
> +
> + uart2_pins: uart2-pins {
> + pins-rx {
> + pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
> + bias-pull-up;
> + input-enable;
> + };
> + pins-tx {
> + pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
> + };
> + };
> +};
> +
> +&uart0 {
> + status = "okay";
Status last here and below, please.
Konrad
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_pins>;
> +};
> +
> +&uart2 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart2_pins>;
> +};
>
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
2022-07-29 12:00 ` Konrad Dybcio
@ 2022-10-27 9:28 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-27 9:28 UTC (permalink / raw)
To: Konrad Dybcio, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
Il 29/07/22 14:00, Konrad Dybcio ha scritto:
>
>
> On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
>> Add a basic support for the Sony Xperia M5 (codename "Holly")
>> smartphone, powered by a MediaTek Helio X10 SoC.
>>
>> This achieves a console boot.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Hello Konrad,
First of all, I'm sorry for the very late reply.
>> ---
>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
>> 2 files changed, 91 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
>> index af362a085a02..72fd683c9264 100644
>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
> -holly.dtb?
>
I prefer using the commercial name to identify the device.
"Holly" is the smartphone project codename and that is mentioned almost nowhere:
the aim here is to enhance readability as to make it immediately understandable
that this devicetree is for the Xperia M5 device.
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>> new file mode 100644
>> index 000000000000..94d011c4126c
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>> @@ -0,0 +1,90 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2022, Collabora Ltd
>> + * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> + */
>> +
>> +/dts-v1/;
>> +#include "mt6795.dtsi"
>> +
>> +#include <dt-bindings/gpio/gpio.h>
> Looks unused.
>
Right, I'll remove that in v2.
>> +
>> +/ {
>> + model = "Sony Xperia M5";
>> + compatible = "sony,xperia-m5", "mediatek,mt6795";
> sony,holly?
>
I'm sorry, but I can't understand the sense of adding that compatible string to
the mix. To the kernel, it doesn't mean anything - and we already have another
string advertising the specific machine, which is "sony,xperia-m5".
Of course, there is no Xperia M5 with a different SoC and, even if there was a
xperia-m5 with a different SoC, we anyway have both a machine compatible and a
SoC compatible in here, so that would still not pose any issue.
>> + chassis-type = "handset";
>> +
>> + aliases {
>> + mmc0 = &mmc0;
>> + mmc1 = &mmc1;
>> + serial0 = &uart0;
>> + serial1 = &uart1;
>> + };
>> +
>> + memory@40000000 {
>> + device_type = "memory";
>> + reg = <0 0x40000000 0 0x1E800000>;
> Lowercase hex in size. Also, doesn't the bootloader fill it in?
>
Updating the device to the latest software version will give you a bootloader
that fills that in, but the first-ever software release contains one that will
not do that in particular conditions (fastboot boot).
>> + };
>> +
>> + reserved_memory: reserved-memory {
>> + #address-cells = <2>;
>> + #size-cells = <2>;
>> + ranges;
>> +
>> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
> Is that true for all devices with this SoC, or..? If so, it may be worth
> moving this into mt6795.dtsi.
>
>> + bl31_secmon_reserved: secmon@43000000 {
> memory@, everywhere. Use labels to name the nodes.
>
I'm afraid that's not possible, as the bootloader is reading the devicetree
and requires these nodes to follow this naming.
>> + no-map;
> reg goes first.
Will fix in v2.
Best regards,
Angelo
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
@ 2022-10-27 9:28 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-27 9:28 UTC (permalink / raw)
To: Konrad Dybcio, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
Il 29/07/22 14:00, Konrad Dybcio ha scritto:
>
>
> On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
>> Add a basic support for the Sony Xperia M5 (codename "Holly")
>> smartphone, powered by a MediaTek Helio X10 SoC.
>>
>> This achieves a console boot.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Hello Konrad,
First of all, I'm sorry for the very late reply.
>> ---
>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
>> 2 files changed, 91 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
>> index af362a085a02..72fd683c9264 100644
>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
> -holly.dtb?
>
I prefer using the commercial name to identify the device.
"Holly" is the smartphone project codename and that is mentioned almost nowhere:
the aim here is to enhance readability as to make it immediately understandable
that this devicetree is for the Xperia M5 device.
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>> new file mode 100644
>> index 000000000000..94d011c4126c
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>> @@ -0,0 +1,90 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2022, Collabora Ltd
>> + * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> + */
>> +
>> +/dts-v1/;
>> +#include "mt6795.dtsi"
>> +
>> +#include <dt-bindings/gpio/gpio.h>
> Looks unused.
>
Right, I'll remove that in v2.
>> +
>> +/ {
>> + model = "Sony Xperia M5";
>> + compatible = "sony,xperia-m5", "mediatek,mt6795";
> sony,holly?
>
I'm sorry, but I can't understand the sense of adding that compatible string to
the mix. To the kernel, it doesn't mean anything - and we already have another
string advertising the specific machine, which is "sony,xperia-m5".
Of course, there is no Xperia M5 with a different SoC and, even if there was a
xperia-m5 with a different SoC, we anyway have both a machine compatible and a
SoC compatible in here, so that would still not pose any issue.
>> + chassis-type = "handset";
>> +
>> + aliases {
>> + mmc0 = &mmc0;
>> + mmc1 = &mmc1;
>> + serial0 = &uart0;
>> + serial1 = &uart1;
>> + };
>> +
>> + memory@40000000 {
>> + device_type = "memory";
>> + reg = <0 0x40000000 0 0x1E800000>;
> Lowercase hex in size. Also, doesn't the bootloader fill it in?
>
Updating the device to the latest software version will give you a bootloader
that fills that in, but the first-ever software release contains one that will
not do that in particular conditions (fastboot boot).
>> + };
>> +
>> + reserved_memory: reserved-memory {
>> + #address-cells = <2>;
>> + #size-cells = <2>;
>> + ranges;
>> +
>> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
> Is that true for all devices with this SoC, or..? If so, it may be worth
> moving this into mt6795.dtsi.
>
>> + bl31_secmon_reserved: secmon@43000000 {
> memory@, everywhere. Use labels to name the nodes.
>
I'm afraid that's not possible, as the bootloader is reading the devicetree
and requires these nodes to follow this naming.
>> + no-map;
> reg goes first.
Will fix in v2.
Best regards,
Angelo
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
2022-10-27 9:28 ` AngeloGioacchino Del Regno
@ 2022-10-27 9:40 ` Konrad Dybcio
-1 siblings, 0 replies; 38+ messages in thread
From: Konrad Dybcio @ 2022-10-27 9:40 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 27/10/2022 11:28, AngeloGioacchino Del Regno wrote:
> Il 29/07/22 14:00, Konrad Dybcio ha scritto:
>>
>>
>> On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
>>> Add a basic support for the Sony Xperia M5 (codename "Holly")
>>> smartphone, powered by a MediaTek Helio X10 SoC.
>>>
>>> This achieves a console boot.
>>>
>>> Signed-off-by: AngeloGioacchino Del Regno
>>> <angelogioacchino.delregno@collabora.com>
>
> Hello Konrad,
> First of all, I'm sorry for the very late reply.
>
>>> ---
>>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>>> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90
>>> +++++++++++++++++++
>>> 2 files changed, 91 insertions(+)
>>> create mode 100644
>>> arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile
>>> b/arch/arm64/boot/dts/mediatek/Makefile
>>> index af362a085a02..72fd683c9264 100644
>>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>>> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
>>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
>> -holly.dtb?
>>
>
> I prefer using the commercial name to identify the device.
> "Holly" is the smartphone project codename and that is mentioned
> almost nowhere:
> the aim here is to enhance readability as to make it immediately
> understandable
> that this devicetree is for the Xperia M5 device.
Ok, sounds good.
>
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>> b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>> new file mode 100644
>>> index 000000000000..94d011c4126c
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>> @@ -0,0 +1,90 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only
>>> +/*
>>> + * Copyright (c) 2022, Collabora Ltd
>>> + * Author: AngeloGioacchino Del Regno
>>> <angelogioacchino.delregno@collabora.com>
>>> + */
>>> +
>>> +/dts-v1/;
>>> +#include "mt6795.dtsi"
>>> +
>>> +#include <dt-bindings/gpio/gpio.h>
>> Looks unused.
>>
>
> Right, I'll remove that in v2.
>
>>> +
>>> +/ {
>>> + model = "Sony Xperia M5";
>>> + compatible = "sony,xperia-m5", "mediatek,mt6795";
>> sony,holly?
>>
>
> I'm sorry, but I can't understand the sense of adding that compatible
> string to
> the mix. To the kernel, it doesn't mean anything - and we already have
> another
> string advertising the specific machine, which is "sony,xperia-m5".
I was suggesting replacing xperia-m5 with holly, but since we agreed on
keeping
m5 in the dtb name, I suppose it's fine for this one to stay too.
>
> Of course, there is no Xperia M5 with a different SoC and, even if
> there was a
> xperia-m5 with a different SoC, we anyway have both a machine
> compatible and a
> SoC compatible in here, so that would still not pose any issue.
>
>>> + chassis-type = "handset";
>>> +
>>> + aliases {
>>> + mmc0 = &mmc0;
>>> + mmc1 = &mmc1;
>>> + serial0 = &uart0;
>>> + serial1 = &uart1;
>>> + };
>>> +
>>> + memory@40000000 {
>>> + device_type = "memory";
>>> + reg = <0 0x40000000 0 0x1E800000>;
>> Lowercase hex in size. Also, doesn't the bootloader fill it in?
>>
>
> Updating the device to the latest software version will give you a
> bootloader
> that fills that in, but the first-ever software release contains one
> that will
> not do that in particular conditions (fastboot boot).
Ugh. If only vendors tested their software before shipping it to users..
I think it's worth to adding a comment mentioning that, though.
>
>>> + };
>>> +
>>> + reserved_memory: reserved-memory {
>>> + #address-cells = <2>;
>>> + #size-cells = <2>;
>>> + ranges;
>>> +
>>> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
>> Is that true for all devices with this SoC, or..? If so, it may be worth
>> moving this into mt6795.dtsi.
>>
>>> + bl31_secmon_reserved: secmon@43000000 {
>> memory@, everywhere. Use labels to name the nodes.
>>
>
> I'm afraid that's not possible, as the bootloader is reading the
> devicetree
> and requires these nodes to follow this naming.
Wow that's bad.. probably deserves a comment to prevent 'cleanups'
breaking this.
Konrad
>
>>> + no-map;
>> reg goes first.
>
> Will fix in v2.
>
> Best regards,
> Angelo
>
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
@ 2022-10-27 9:40 ` Konrad Dybcio
0 siblings, 0 replies; 38+ messages in thread
From: Konrad Dybcio @ 2022-10-27 9:40 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
On 27/10/2022 11:28, AngeloGioacchino Del Regno wrote:
> Il 29/07/22 14:00, Konrad Dybcio ha scritto:
>>
>>
>> On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
>>> Add a basic support for the Sony Xperia M5 (codename "Holly")
>>> smartphone, powered by a MediaTek Helio X10 SoC.
>>>
>>> This achieves a console boot.
>>>
>>> Signed-off-by: AngeloGioacchino Del Regno
>>> <angelogioacchino.delregno@collabora.com>
>
> Hello Konrad,
> First of all, I'm sorry for the very late reply.
>
>>> ---
>>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>>> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90
>>> +++++++++++++++++++
>>> 2 files changed, 91 insertions(+)
>>> create mode 100644
>>> arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile
>>> b/arch/arm64/boot/dts/mediatek/Makefile
>>> index af362a085a02..72fd683c9264 100644
>>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>>> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
>>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
>> -holly.dtb?
>>
>
> I prefer using the commercial name to identify the device.
> "Holly" is the smartphone project codename and that is mentioned
> almost nowhere:
> the aim here is to enhance readability as to make it immediately
> understandable
> that this devicetree is for the Xperia M5 device.
Ok, sounds good.
>
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>> b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>> new file mode 100644
>>> index 000000000000..94d011c4126c
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>> @@ -0,0 +1,90 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only
>>> +/*
>>> + * Copyright (c) 2022, Collabora Ltd
>>> + * Author: AngeloGioacchino Del Regno
>>> <angelogioacchino.delregno@collabora.com>
>>> + */
>>> +
>>> +/dts-v1/;
>>> +#include "mt6795.dtsi"
>>> +
>>> +#include <dt-bindings/gpio/gpio.h>
>> Looks unused.
>>
>
> Right, I'll remove that in v2.
>
>>> +
>>> +/ {
>>> + model = "Sony Xperia M5";
>>> + compatible = "sony,xperia-m5", "mediatek,mt6795";
>> sony,holly?
>>
>
> I'm sorry, but I can't understand the sense of adding that compatible
> string to
> the mix. To the kernel, it doesn't mean anything - and we already have
> another
> string advertising the specific machine, which is "sony,xperia-m5".
I was suggesting replacing xperia-m5 with holly, but since we agreed on
keeping
m5 in the dtb name, I suppose it's fine for this one to stay too.
>
> Of course, there is no Xperia M5 with a different SoC and, even if
> there was a
> xperia-m5 with a different SoC, we anyway have both a machine
> compatible and a
> SoC compatible in here, so that would still not pose any issue.
>
>>> + chassis-type = "handset";
>>> +
>>> + aliases {
>>> + mmc0 = &mmc0;
>>> + mmc1 = &mmc1;
>>> + serial0 = &uart0;
>>> + serial1 = &uart1;
>>> + };
>>> +
>>> + memory@40000000 {
>>> + device_type = "memory";
>>> + reg = <0 0x40000000 0 0x1E800000>;
>> Lowercase hex in size. Also, doesn't the bootloader fill it in?
>>
>
> Updating the device to the latest software version will give you a
> bootloader
> that fills that in, but the first-ever software release contains one
> that will
> not do that in particular conditions (fastboot boot).
Ugh. If only vendors tested their software before shipping it to users..
I think it's worth to adding a comment mentioning that, though.
>
>>> + };
>>> +
>>> + reserved_memory: reserved-memory {
>>> + #address-cells = <2>;
>>> + #size-cells = <2>;
>>> + ranges;
>>> +
>>> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
>> Is that true for all devices with this SoC, or..? If so, it may be worth
>> moving this into mt6795.dtsi.
>>
>>> + bl31_secmon_reserved: secmon@43000000 {
>> memory@, everywhere. Use labels to name the nodes.
>>
>
> I'm afraid that's not possible, as the bootloader is reading the
> devicetree
> and requires these nodes to follow this naming.
Wow that's bad.. probably deserves a comment to prevent 'cleanups'
breaking this.
Konrad
>
>>> + no-map;
>> reg goes first.
>
> Will fix in v2.
>
> Best regards,
> Angelo
>
>
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
2022-10-27 9:40 ` Konrad Dybcio
@ 2022-10-27 10:01 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-27 10:01 UTC (permalink / raw)
To: Konrad Dybcio, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
Il 27/10/22 11:40, Konrad Dybcio ha scritto:
>
> On 27/10/2022 11:28, AngeloGioacchino Del Regno wrote:
>> Il 29/07/22 14:00, Konrad Dybcio ha scritto:
>>>
>>>
>>> On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
>>>> Add a basic support for the Sony Xperia M5 (codename "Holly")
>>>> smartphone, powered by a MediaTek Helio X10 SoC.
>>>>
>>>> This achieves a console boot.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno
>>>> <angelogioacchino.delregno@collabora.com>
>>
>> Hello Konrad,
>> First of all, I'm sorry for the very late reply.
>>
>>>> ---
>>>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>>>> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
>>>> 2 files changed, 91 insertions(+)
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile
>>>> b/arch/arm64/boot/dts/mediatek/Makefile
>>>> index af362a085a02..72fd683c9264 100644
>>>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>>>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>>>> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
>>>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
>>> -holly.dtb?
>>>
>>
>> I prefer using the commercial name to identify the device.
>> "Holly" is the smartphone project codename and that is mentioned almost nowhere:
>> the aim here is to enhance readability as to make it immediately understandable
>> that this devicetree is for the Xperia M5 device.
>
> Ok, sounds good.
>
>
>>
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>> b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>> new file mode 100644
>>>> index 000000000000..94d011c4126c
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>> @@ -0,0 +1,90 @@
>>>> +// SPDX-License-Identifier: GPL-2.0-only
>>>> +/*
>>>> + * Copyright (c) 2022, Collabora Ltd
>>>> + * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>>> + */
>>>> +
>>>> +/dts-v1/;
>>>> +#include "mt6795.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>> Looks unused.
>>>
>>
>> Right, I'll remove that in v2.
>>
>>>> +
>>>> +/ {
>>>> + model = "Sony Xperia M5";
>>>> + compatible = "sony,xperia-m5", "mediatek,mt6795";
>>> sony,holly?
>>>
>>
>> I'm sorry, but I can't understand the sense of adding that compatible string to
>> the mix. To the kernel, it doesn't mean anything - and we already have another
>> string advertising the specific machine, which is "sony,xperia-m5".
>
> I was suggesting replacing xperia-m5 with holly, but since we agreed on keeping
>
> m5 in the dtb name, I suppose it's fine for this one to stay too.
>
>
>>
>> Of course, there is no Xperia M5 with a different SoC and, even if there was a
>> xperia-m5 with a different SoC, we anyway have both a machine compatible and a
>> SoC compatible in here, so that would still not pose any issue.
>>
>>>> + chassis-type = "handset";
>>>> +
>>>> + aliases {
>>>> + mmc0 = &mmc0;
>>>> + mmc1 = &mmc1;
>>>> + serial0 = &uart0;
>>>> + serial1 = &uart1;
>>>> + };
>>>> +
>>>> + memory@40000000 {
>>>> + device_type = "memory";
>>>> + reg = <0 0x40000000 0 0x1E800000>;
>>> Lowercase hex in size. Also, doesn't the bootloader fill it in?
>>>
>>
>> Updating the device to the latest software version will give you a bootloader
>> that fills that in, but the first-ever software release contains one that will
>> not do that in particular conditions (fastboot boot).
>
> Ugh. If only vendors tested their software before shipping it to users..
>
> I think it's worth to adding a comment mentioning that, though.
>
>
>>
>>>> + };
>>>> +
>>>> + reserved_memory: reserved-memory {
>>>> + #address-cells = <2>;
>>>> + #size-cells = <2>;
>>>> + ranges;
>>>> +
>>>> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
>>> Is that true for all devices with this SoC, or..? If so, it may be worth
>>> moving this into mt6795.dtsi.
>>>
Sorry again, I forgot to reply to this question, so addressing that now:
no, that's not true for all devices with this SoC.
I'm practically sure that all commercial devices that were shipped at that time
require the same, but here upstream we also have a MT6795 dev board devicetree,
which uses a much newer bootloader and possibly needs a different secmon carveout,
if any at all.
Hence, this one cannot be transferred to mt6795.dtsi.
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 7/7] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
@ 2022-10-27 10:01 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-27 10:01 UTC (permalink / raw)
To: Konrad Dybcio, robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, hsinyi, nfraprado, allen-kh.cheng, fparent,
sam.shih, sean.wang, long.cheng, wenbin.mei, devicetree,
linux-kernel, dmaengine, linux-mmc, linux-arm-kernel,
linux-mediatek, phone-devel, ~postmarketos/upstreaming
Il 27/10/22 11:40, Konrad Dybcio ha scritto:
>
> On 27/10/2022 11:28, AngeloGioacchino Del Regno wrote:
>> Il 29/07/22 14:00, Konrad Dybcio ha scritto:
>>>
>>>
>>> On 29.07.2022 12:44, AngeloGioacchino Del Regno wrote:
>>>> Add a basic support for the Sony Xperia M5 (codename "Holly")
>>>> smartphone, powered by a MediaTek Helio X10 SoC.
>>>>
>>>> This achieves a console boot.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno
>>>> <angelogioacchino.delregno@collabora.com>
>>
>> Hello Konrad,
>> First of all, I'm sorry for the very late reply.
>>
>>>> ---
>>>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>>>> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
>>>> 2 files changed, 91 insertions(+)
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile
>>>> b/arch/arm64/boot/dts/mediatek/Makefile
>>>> index af362a085a02..72fd683c9264 100644
>>>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>>>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>>>> @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
>>>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
>>> -holly.dtb?
>>>
>>
>> I prefer using the commercial name to identify the device.
>> "Holly" is the smartphone project codename and that is mentioned almost nowhere:
>> the aim here is to enhance readability as to make it immediately understandable
>> that this devicetree is for the Xperia M5 device.
>
> Ok, sounds good.
>
>
>>
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
>>>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>> b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>> new file mode 100644
>>>> index 000000000000..94d011c4126c
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
>>>> @@ -0,0 +1,90 @@
>>>> +// SPDX-License-Identifier: GPL-2.0-only
>>>> +/*
>>>> + * Copyright (c) 2022, Collabora Ltd
>>>> + * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>>> + */
>>>> +
>>>> +/dts-v1/;
>>>> +#include "mt6795.dtsi"
>>>> +
>>>> +#include <dt-bindings/gpio/gpio.h>
>>> Looks unused.
>>>
>>
>> Right, I'll remove that in v2.
>>
>>>> +
>>>> +/ {
>>>> + model = "Sony Xperia M5";
>>>> + compatible = "sony,xperia-m5", "mediatek,mt6795";
>>> sony,holly?
>>>
>>
>> I'm sorry, but I can't understand the sense of adding that compatible string to
>> the mix. To the kernel, it doesn't mean anything - and we already have another
>> string advertising the specific machine, which is "sony,xperia-m5".
>
> I was suggesting replacing xperia-m5 with holly, but since we agreed on keeping
>
> m5 in the dtb name, I suppose it's fine for this one to stay too.
>
>
>>
>> Of course, there is no Xperia M5 with a different SoC and, even if there was a
>> xperia-m5 with a different SoC, we anyway have both a machine compatible and a
>> SoC compatible in here, so that would still not pose any issue.
>>
>>>> + chassis-type = "handset";
>>>> +
>>>> + aliases {
>>>> + mmc0 = &mmc0;
>>>> + mmc1 = &mmc1;
>>>> + serial0 = &uart0;
>>>> + serial1 = &uart1;
>>>> + };
>>>> +
>>>> + memory@40000000 {
>>>> + device_type = "memory";
>>>> + reg = <0 0x40000000 0 0x1E800000>;
>>> Lowercase hex in size. Also, doesn't the bootloader fill it in?
>>>
>>
>> Updating the device to the latest software version will give you a bootloader
>> that fills that in, but the first-ever software release contains one that will
>> not do that in particular conditions (fastboot boot).
>
> Ugh. If only vendors tested their software before shipping it to users..
>
> I think it's worth to adding a comment mentioning that, though.
>
>
>>
>>>> + };
>>>> +
>>>> + reserved_memory: reserved-memory {
>>>> + #address-cells = <2>;
>>>> + #size-cells = <2>;
>>>> + ranges;
>>>> +
>>>> + /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
>>> Is that true for all devices with this SoC, or..? If so, it may be worth
>>> moving this into mt6795.dtsi.
>>>
Sorry again, I forgot to reply to this question, so addressing that now:
no, that's not true for all devices with this SoC.
I'm practically sure that all commercial devices that were shipped at that time
require the same, but here upstream we also have a MT6795 dev board devicetree,
which uses a much newer bootloader and possibly needs a different secmon carveout,
if any at all.
Hence, this one cannot be transferred to mt6795.dtsi.
_______________________________________________
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] 38+ messages in thread
* [PATCH 7/8] dt-bindings: arm: mediatek: Add compatible for MT6795 Sony Xperia M5
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a compatible for the Sony Xperia M5 smartphone.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 07c0ea94e850..c162b0df299b 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -58,6 +58,7 @@ properties:
- items:
- enum:
- mediatek,mt6795-evb
+ - sony,xperia-m5
- const: mediatek,mt6795
- items:
- enum:
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 7/8] dt-bindings: arm: mediatek: Add compatible for MT6795 Sony Xperia M5
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a compatible for the Sony Xperia M5 smartphone.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 07c0ea94e850..c162b0df299b 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -58,6 +58,7 @@ properties:
- items:
- enum:
- mediatek,mt6795-evb
+ - sony,xperia-m5
- const: mediatek,mt6795
- items:
- enum:
--
2.35.1
_______________________________________________
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] 38+ messages in thread
* Re: [PATCH 7/8] dt-bindings: arm: mediatek: Add compatible for MT6795 Sony Xperia M5
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 23:05 ` Rob Herring
-1 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2022-07-29 23:05 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: long.cheng, linux-arm-kernel, linux-mediatek, devicetree,
nfraprado, ~postmarketos/upstreaming, hsinyi, matthias.bgg,
robh+dt, fparent, linux-kernel, phone-devel, linux-mmc, vkoul,
sam.shih, allen-kh.cheng, dmaengine, ulf.hansson, wenbin.mei,
sean.wang, krzysztof.kozlowski+dt, chaotian.jing
On Fri, 29 Jul 2022 12:44:40 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible for the Sony Xperia M5 smartphone.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 7/8] dt-bindings: arm: mediatek: Add compatible for MT6795 Sony Xperia M5
@ 2022-07-29 23:05 ` Rob Herring
0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2022-07-29 23:05 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: long.cheng, linux-arm-kernel, linux-mediatek, devicetree,
nfraprado, ~postmarketos/upstreaming, hsinyi, matthias.bgg,
robh+dt, fparent, linux-kernel, phone-devel, linux-mmc, vkoul,
sam.shih, allen-kh.cheng, dmaengine, ulf.hansson, wenbin.mei,
sean.wang, krzysztof.kozlowski+dt, chaotian.jing
On Fri, 29 Jul 2022 12:44:40 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible for the Sony Xperia M5 smartphone.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
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] 38+ messages in thread
* [PATCH 8/8] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
2022-07-29 10:44 ` AngeloGioacchino Del Regno
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a basic support for the Sony Xperia M5 (codename "Holly")
smartphone, powered by a MediaTek Helio X10 SoC.
This achieves a console boot.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
2 files changed, 91 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index af362a085a02..72fd683c9264 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
new file mode 100644
index 000000000000..94d011c4126c
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Collabora Ltd
+ * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+ */
+
+/dts-v1/;
+#include "mt6795.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Sony Xperia M5";
+ compatible = "sony,xperia-m5", "mediatek,mt6795";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x1E800000>;
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
+ bl31_secmon_reserved: secmon@43000000 {
+ no-map;
+ reg = <0 0x43000000 0 0x30000>;
+ };
+
+ /* preloader and bootloader regions cannot be touched */
+ preloader-region@44800000 {
+ no-map;
+ reg = <0 0x44800000 0 0x100000>;
+ };
+
+ bootloader-region@46000000 {
+ no-map;
+ reg = <0 0x46000000 0 0x400000>;
+ };
+ };
+};
+
+&pio {
+ uart0_pins: uart0-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
+ output-high;
+ };
+ };
+
+ uart2_pins: uart2-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+};
+
+&uart2 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+};
--
2.35.1
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCH 8/8] arm64: dts: mediatek: Add support for MT6795 Sony Xperia M5 smartphone
@ 2022-07-29 10:44 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 38+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-29 10:44 UTC (permalink / raw)
To: robh+dt
Cc: krzysztof.kozlowski+dt, vkoul, chaotian.jing, ulf.hansson,
matthias.bgg, angelogioacchino.delregno, hsinyi, nfraprado,
allen-kh.cheng, fparent, sam.shih, sean.wang, long.cheng,
wenbin.mei, devicetree, linux-kernel, dmaengine, linux-mmc,
linux-arm-kernel, linux-mediatek, phone-devel,
~postmarketos/upstreaming
Add a basic support for the Sony Xperia M5 (codename "Holly")
smartphone, powered by a MediaTek Helio X10 SoC.
This achieves a console boot.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../dts/mediatek/mt6795-sony-xperia-m5.dts | 90 +++++++++++++++++++
2 files changed, 91 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index af362a085a02..72fd683c9264 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6779-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-sony-xperia-m5.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
new file mode 100644
index 000000000000..94d011c4126c
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022, Collabora Ltd
+ * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
+ */
+
+/dts-v1/;
+#include "mt6795.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Sony Xperia M5";
+ compatible = "sony,xperia-m5", "mediatek,mt6795";
+ chassis-type = "handset";
+
+ aliases {
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ serial0 = &uart0;
+ serial1 = &uart1;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x1E800000>;
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
+ bl31_secmon_reserved: secmon@43000000 {
+ no-map;
+ reg = <0 0x43000000 0 0x30000>;
+ };
+
+ /* preloader and bootloader regions cannot be touched */
+ preloader-region@44800000 {
+ no-map;
+ reg = <0 0x44800000 0 0x100000>;
+ };
+
+ bootloader-region@46000000 {
+ no-map;
+ reg = <0 0x46000000 0 0x400000>;
+ };
+ };
+};
+
+&pio {
+ uart0_pins: uart0-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
+ output-high;
+ };
+ };
+
+ uart2_pins: uart2-pins {
+ pins-rx {
+ pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
+ bias-pull-up;
+ input-enable;
+ };
+ pins-tx {
+ pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+};
+
+&uart2 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+};
--
2.35.1
_______________________________________________
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] 38+ messages in thread