Subject: [PATCH 00/27] MediaTek Helio X10 - Mailbox, Display, MMC/SD/SDIO

In this series I'm adding support for the DDC (display) block found
in the MediaTek Helio X10, the MT6331 PMIC and its peripherals, and
eMMC, MicroSD slot and SDIO.
Support for the PMIC (...regulators!) is essential to get all of the
mtk-sd hardware to work, especially the eMMC where vol switching is
happening (3.3 -> 1.8V for DDR -> UHS timing switch!).

As for the GCE mailbox, MMSYS and IOMMU... these were included in
the previous series but couldn't make it due to the bindings not
being reviewed in time (btw, thanks Matthias for reducing my backlog
by partially picking the applicable commits in the previous one, that
was highly appreciated!), so they're making yet another appearance in
this series.

Regarding the display blocks, they're tested on the Sony Xperia M5
with its internal panel (on DSI0) but the panel node is not included
in this series because I have to cleanup the timings a bit before
upstreaming it.

...and regarding everything else, it's all, again, tested on that
same Xperia M5 smartphone :-)


* Important note: *

Devicetree commits of this series all depend on the dt-bindings
commits of this same series.
This series also depends on [1] for PMIC functionality, as all of the
(older only?) MediaTek smartphone platforms have two PMICs, a main
one and a companion one - in this specific case, it's MT6331+MT6332.

[1]: https://lore.kernel.org/all/[email protected]/

AngeloGioacchino Del Regno (27):
dt-bindings: pwm: Add compatible for MediaTek MT6795
dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio
X10
dt-bindings: display: mediatek: dpi: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: aal: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: dsi: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: ovl: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: rdma: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: wdma: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: color: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: gamma: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: merge: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: split: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: ufoe: Add compatible for MediaTek
MT6795
dt-bindings: display: mediatek: od: Add compatible for MediaTek MT6795
dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795
arm64: dts: mediatek: mt6795: Add support for the CMDQ/GCE mailbox
arm64: dts: mediatek: mt6795: Add MMSYS node for multimedia clocks
arm64: dts: mediatek: mt6795: Add support for IOMMU and LARBs
arm64: dts: mediatek: mt6795: Add support for display blocks and
DPI/DSI
arm64: dts: mediatek: mt6795: Add tertiary PWM node
arm64: dts: mediatek: mt6795: Add PMIC Wrapper node
arm64: dts: mediatek: mt6795: Copyright header additions
arm64: dts: mediatek: Add MT6331 PMIC devicetree
arm64: dts: mediatek: mt6795-xperia-m5: Add MT6331 Combo PMIC
arm64: dts: mediatek: mt6795-xperia-m5: Add eMMC, MicroSD slot, SDIO
arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMA255 Accelerometer
arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMM050 Magnetometer

.../display/mediatek/mediatek,aal.yaml | 1 +
.../display/mediatek/mediatek,color.yaml | 1 +
.../display/mediatek/mediatek,dpi.yaml | 23 +-
.../display/mediatek/mediatek,dsi.yaml | 19 +-
.../display/mediatek/mediatek,gamma.yaml | 4 +
.../display/mediatek/mediatek,merge.yaml | 3 +
.../display/mediatek/mediatek,od.yaml | 3 +
.../display/mediatek/mediatek,ovl.yaml | 4 +
.../display/mediatek/mediatek,rdma.yaml | 4 +
.../display/mediatek/mediatek,split.yaml | 3 +
.../display/mediatek/mediatek,ufoe.yaml | 3 +
.../display/mediatek/mediatek,wdma.yaml | 3 +
.../mailbox/mediatek,gce-mailbox.yaml | 20 +-
.../bindings/phy/mediatek,dsi-phy.yaml | 4 +
.../bindings/pwm/mediatek,pwm-disp.yaml | 4 +-
arch/arm64/boot/dts/mediatek/mt6331.dtsi | 284 ++++++++++++++
.../dts/mediatek/mt6795-sony-xperia-m5.dts | 121 ++++++
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 365 ++++++++++++++++++
include/dt-bindings/gce/mediatek,mt6795-gce.h | 123 ++++++
19 files changed, 968 insertions(+), 25 deletions(-)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6331.dtsi
create mode 100644 include/dt-bindings/gce/mediatek,mt6795-gce.h

--
2.40.0


Subject: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10

Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
the same DSI PHY as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
index 26f2b887cfc1..a9f78344efdb 100644
--- a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
@@ -24,6 +24,10 @@ properties:
- enum:
- mediatek,mt7623-mipi-tx
- const: mediatek,mt2701-mipi-tx
+ - items:
+ - enum:
+ - mediatek,mt6795-mipi-tx
+ - const: mediatek,mt8173-mipi-tx
- items:
- enum:
- mediatek,mt8365-mipi-tx
--
2.40.0

Subject: [PATCH 04/27] dt-bindings: display: mediatek: aal: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795: similarly to
MT8173, this SoC has the gamma LUT registers in DISP_AAL.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,aal.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
index 92741486c24d..7fd42c8fdc32 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
@@ -27,6 +27,7 @@ properties:
- items:
- enum:
- mediatek,mt2712-disp-aal
+ - mediatek,mt6795-disp-aal
- const: mediatek,mt8173-disp-aal
- items:
- enum:
--
2.40.0

Subject: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795

Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
the same parameters as MT8183.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../display/mediatek/mediatek,dpi.yaml | 23 +++++++++++--------
1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
index d976380801e3..803c00f26206 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
@@ -17,15 +17,20 @@ description: |

properties:
compatible:
- enum:
- - mediatek,mt2701-dpi
- - mediatek,mt7623-dpi
- - mediatek,mt8173-dpi
- - mediatek,mt8183-dpi
- - mediatek,mt8186-dpi
- - mediatek,mt8188-dp-intf
- - mediatek,mt8192-dpi
- - mediatek,mt8195-dp-intf
+ oneOf:
+ - enum:
+ - mediatek,mt2701-dpi
+ - mediatek,mt7623-dpi
+ - mediatek,mt8173-dpi
+ - mediatek,mt8183-dpi
+ - mediatek,mt8186-dpi
+ - mediatek,mt8188-dp-intf
+ - mediatek,mt8192-dpi
+ - mediatek,mt8195-dp-intf
+ - items:
+ - enum:
+ - mediatek,mt6795-dpi
+ - const: mediatek,mt8183-dpi

reg:
maxItems: 1
--
2.40.0

Subject: [PATCH 05/27] dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795, using the same
DSI block as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../display/mediatek/mediatek,dsi.yaml | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
index 4707b60238b0..12441b937684 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
@@ -22,13 +22,18 @@ allOf:

properties:
compatible:
- enum:
- - mediatek,mt2701-dsi
- - mediatek,mt7623-dsi
- - mediatek,mt8167-dsi
- - mediatek,mt8173-dsi
- - mediatek,mt8183-dsi
- - mediatek,mt8186-dsi
+ oneOf:
+ - enum:
+ - mediatek,mt2701-dsi
+ - mediatek,mt7623-dsi
+ - mediatek,mt8167-dsi
+ - mediatek,mt8173-dsi
+ - mediatek,mt8183-dsi
+ - mediatek,mt8186-dsi
+ - items:
+ - enum:
+ - mediatek,mt6795-dsi
+ - const: mediatek,mt8173-dsi

reg:
maxItems: 1
--
2.40.0

Subject: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's display PWM
block: this is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
index 0088bc8e7c54..153e146df7d4 100644
--- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
+++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
@@ -22,7 +22,9 @@ properties:
- mediatek,mt8173-disp-pwm
- mediatek,mt8183-disp-pwm
- items:
- - const: mediatek,mt8167-disp-pwm
+ - enum:
+ - mediatek,mt6795-disp-pwm
+ - mediatek,mt8167-disp-pwm
- const: mediatek,mt8173-disp-pwm
- items:
- enum:
--
2.40.0

Subject: [PATCH 08/27] dt-bindings: display: mediatek: wdma: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's WDMA block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,wdma.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml
index 7d7cc1ab526b..1a19b3ef036f 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml
@@ -23,6 +23,9 @@ properties:
oneOf:
- items:
- const: mediatek,mt8173-disp-wdma
+ - items:
+ - const: mediatek,mt6795-disp-wdma
+ - const: mediatek,mt8173-disp-wdma

reg:
maxItems: 1
--
2.40.0

Subject: [PATCH 07/27] dt-bindings: display: mediatek: rdma: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's RDMA block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,rdma.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml
index 3ade2ece3fed..2eb99d2dfbdc 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml
@@ -40,6 +40,10 @@ properties:
- mediatek,mt7623-disp-rdma
- mediatek,mt2712-disp-rdma
- const: mediatek,mt2701-disp-rdma
+ - items:
+ - enum:
+ - mediatek,mt6795-disp-rdma
+ - const: mediatek,mt8173-disp-rdma
- items:
- enum:
- mediatek,mt8186-disp-rdma
--
2.40.0

Subject: [PATCH 10/27] dt-bindings: display: mediatek: gamma: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's GAMMA block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,gamma.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml
index a5c6a91fac71..e07bce01ebdc 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml
@@ -25,6 +25,10 @@ properties:
- const: mediatek,mt8173-disp-gamma
- items:
- const: mediatek,mt8183-disp-gamma
+ - items:
+ - enum:
+ - mediatek,mt6795-disp-gamma
+ - const: mediatek,mt8173-disp-gamma
- items:
- enum:
- mediatek,mt8186-disp-gamma
--
2.40.0

Subject: [PATCH 09/27] dt-bindings: display: mediatek: color: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's COLOR block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,color.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml
index 62306c88f485..449b37c7560f 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml
@@ -35,6 +35,7 @@ properties:
- const: mediatek,mt2701-disp-color
- items:
- enum:
+ - mediatek,mt6795-disp-color
- mediatek,mt8183-disp-color
- mediatek,mt8186-disp-color
- mediatek,mt8188-disp-color
--
2.40.0

Subject: [PATCH 12/27] dt-bindings: display: mediatek: split: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's SPLIT block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,split.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml
index 35ace1f322e8..fa6dd9b649fe 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml
@@ -23,6 +23,9 @@ properties:
oneOf:
- items:
- const: mediatek,mt8173-disp-split
+ - items:
+ - const: mediatek,mt6795-disp-split
+ - const: mediatek,mt8173-disp-split

reg:
maxItems: 1
--
2.40.0

Subject: [PATCH 14/27] dt-bindings: display: mediatek: od: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's OverDrive (OD)
block: this is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,od.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml
index 853fcb9db2be..691a3644504f 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml
@@ -25,6 +25,9 @@ properties:
- const: mediatek,mt2712-disp-od
- items:
- const: mediatek,mt8173-disp-od
+ - items:
+ - const: mediatek,mt6795-disp-od
+ - const: mediatek,mt8173-disp-od

reg:
maxItems: 1
--
2.40.0

Subject: [PATCH 16/27] arm64: dts: mediatek: mt6795: Add support for the CMDQ/GCE mailbox

In preparation for adding multimedia blocks, add the CMDQ/GCE mailbox.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 090400d7fd61..99cc4918e6ba 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -7,6 +7,7 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
+#include <dt-bindings/gce/mediatek,mt6795-gce.h>
#include <dt-bindings/pinctrl/mt6795-pinfunc.h>
#include <dt-bindings/power/mt6795-power.h>
#include <dt-bindings/reset/mediatek,mt6795-resets.h>
@@ -401,6 +402,15 @@ fhctl: clock-controller@10209f00 {
status = "disabled";
};

+ gce: mailbox@10212000 {
+ compatible = "mediatek,mt6795-gce", "mediatek,mt8173-gce";
+ reg = <0 0x10212000 0 0x1000>;
+ interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&infracfg CLK_INFRA_GCE>;
+ clock-names = "gce";
+ #mbox-cells = <2>;
+ };
+
gic: interrupt-controller@10221000 {
compatible = "arm,gic-400";
#interrupt-cells = <3>;
--
2.40.0

Subject: [PATCH 11/27] dt-bindings: display: mediatek: merge: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's MERGE block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,merge.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml
index 69ba75777dac..be330be1399a 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml
@@ -25,6 +25,9 @@ properties:
- const: mediatek,mt8173-disp-merge
- items:
- const: mediatek,mt8195-disp-merge
+ - items:
+ - const: mediatek,mt6795-disp-merge
+ - const: mediatek,mt8173-disp-merge

reg:
maxItems: 1
--
2.40.0

Subject: [PATCH 13/27] dt-bindings: display: mediatek: ufoe: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's UFOE block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,ufoe.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
index b8bb135fe96b..282925a73804 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
@@ -24,6 +24,9 @@ properties:
oneOf:
- items:
- const: mediatek,mt8173-disp-ufoe
+ - items:
+ - const: mediatek,mt6795-disp-ufoe
+ - const: mediatek,mt8173-disp-ufoe

reg:
maxItems: 1
--
2.40.0

Subject: [PATCH 17/27] arm64: dts: mediatek: mt6795: Add MMSYS node for multimedia clocks

Add the MultiMedia System node, providing clocks for the multimedia
hardware blocks and their IOMMU/SMIs.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 99cc4918e6ba..a8b2c4517e79 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -635,6 +635,19 @@ mmc3: mmc@11260000 {
status = "disabled";
};

+ mmsys: syscon@14000000 {
+ compatible = "mediatek,mt6795-mmsys", "syscon";
+ reg = <0 0x14000000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ assigned-clocks = <&topckgen CLK_TOP_MM_SEL>;
+ assigned-clock-rates = <400000000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ mboxes = <&gce 0 CMDQ_THR_PRIO_HIGHEST>,
+ <&gce 1 CMDQ_THR_PRIO_HIGHEST>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>;
+ };
+
vdecsys: clock-controller@16000000 {
compatible = "mediatek,mt6795-vdecsys";
reg = <0 0x16000000 0 0x1000>;
--
2.40.0

Subject: [PATCH 15/27] dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795

Add a compatible string for the MT6795 Helio X10 SoC using MT8173
binding and add a header for the MT6795's GCE mailbox.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../mailbox/mediatek,gce-mailbox.yaml | 20 +--
include/dt-bindings/gce/mediatek,mt6795-gce.h | 123 ++++++++++++++++++
2 files changed, 135 insertions(+), 8 deletions(-)
create mode 100644 include/dt-bindings/gce/mediatek,mt6795-gce.h

diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
index d383b2ab3ce8..cef9d7601398 100644
--- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
+++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
@@ -16,14 +16,18 @@ description:

properties:
compatible:
- enum:
- - mediatek,mt6779-gce
- - mediatek,mt8173-gce
- - mediatek,mt8183-gce
- - mediatek,mt8186-gce
- - mediatek,mt8188-gce
- - mediatek,mt8192-gce
- - mediatek,mt8195-gce
+ oneOf:
+ - enum:
+ - mediatek,mt6779-gce
+ - mediatek,mt8173-gce
+ - mediatek,mt8183-gce
+ - mediatek,mt8186-gce
+ - mediatek,mt8188-gce
+ - mediatek,mt8192-gce
+ - mediatek,mt8195-gce
+ - items:
+ - const: mediatek,mt6795-gce
+ - const: mediatek,mt8173-gce

"#mbox-cells":
const: 2
diff --git a/include/dt-bindings/gce/mediatek,mt6795-gce.h b/include/dt-bindings/gce/mediatek,mt6795-gce.h
new file mode 100644
index 000000000000..97d5ba2d2b44
--- /dev/null
+++ b/include/dt-bindings/gce/mediatek,mt6795-gce.h
@@ -0,0 +1,123 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023 Collabora Ltd.
+ * Author: AngeloGioacchino Del Regno <[email protected]>
+ */
+#ifndef _DT_BINDINGS_GCE_MT6795_H
+#define _DT_BINDINGS_GCE_MT6795_H
+
+/* GCE HW thread priority */
+#define CMDQ_THR_PRIO_LOWEST 0
+#define CMDQ_THR_PRIO_NORMAL 1
+#define CMDQ_THR_PRIO_NORMAL_2 2
+#define CMDQ_THR_PRIO_MEDIUM 3
+#define CMDQ_THR_PRIO_MEDIUM_2 4
+#define CMDQ_THR_PRIO_HIGH 5
+#define CMDQ_THR_PRIO_HIGHER 6
+#define CMDQ_THR_PRIO_HIGHEST 7
+
+/* GCE SUBSYS */
+#define SUBSYS_1300XXXX 0
+#define SUBSYS_1400XXXX 1
+#define SUBSYS_1401XXXX 2
+#define SUBSYS_1402XXXX 3
+#define SUBSYS_1500XXXX 4
+#define SUBSYS_1600XXXX 5
+#define SUBSYS_1700XXXX 6
+#define SUBSYS_1800XXXX 7
+#define SUBSYS_1000XXXX 8
+#define SUBSYS_1001XXXX 9
+#define SUBSYS_1002XXXX 10
+#define SUBSYS_1003XXXX 11
+#define SUBSYS_1004XXXX 12
+#define SUBSYS_1005XXXX 13
+#define SUBSYS_1020XXXX 14
+#define SUBSYS_1021XXXX 15
+#define SUBSYS_1120XXXX 16
+#define SUBSYS_1121XXXX 17
+#define SUBSYS_1122XXXX 18
+#define SUBSYS_1123XXXX 19
+#define SUBSYS_1124XXXX 20
+#define SUBSYS_1125XXXX 21
+#define SUBSYS_1126XXXX 22
+
+/* GCE HW EVENT */
+#define CMDQ_EVENT_MDP_RDMA0_SOF 0
+#define CMDQ_EVENT_MDP_RDMA1_SOF 1
+#define CMDQ_EVENT_MDP_DSI0_TE_SOF 2
+#define CMDQ_EVENT_MDP_DSI1_TE_SOF 3
+#define CMDQ_EVENT_MDP_MVW_SOF 4
+#define CMDQ_EVENT_MDP_TDSHP0_SOF 5
+#define CMDQ_EVENT_MDP_TDSHP1_SOF 6
+#define CMDQ_EVENT_MDP_WDMA_SOF 7
+#define CMDQ_EVENT_MDP_WROT0_SOF 8
+#define CMDQ_EVENT_MDP_WROT1_SOF 9
+#define CMDQ_EVENT_MDP_CROP_SOF 10
+#define CMDQ_EVENT_DISP_OVL0_SOF 11
+#define CMDQ_EVENT_DISP_OVL1_SOF 12
+#define CMDQ_EVENT_DISP_RDMA0_SOF 13
+#define CMDQ_EVENT_DISP_RDMA1_SOF 14
+#define CMDQ_EVENT_DISP_RDMA2_SOF 15
+#define CMDQ_EVENT_DISP_WDMA0_SOF 16
+#define CMDQ_EVENT_DISP_WDMA1_SOF 17
+#define CMDQ_EVENT_DISP_COLOR0_SOF 18
+#define CMDQ_EVENT_DISP_COLOR1_SOF 19
+#define CMDQ_EVENT_DISP_AAL_SOF 20
+#define CMDQ_EVENT_DISP_GAMMA_SOF 21
+#define CMDQ_EVENT_DISP_UFOE_SOF 22
+#define CMDQ_EVENT_DISP_PWM0_SOF 23
+#define CMDQ_EVENT_DISP_PWM1_SOF 24
+#define CMDQ_EVENT_DISP_OD_SOF 25
+#define CMDQ_EVENT_MDP_RDMA0_EOF 26
+#define CMDQ_EVENT_MDP_RDMA1_EOF 27
+#define CMDQ_EVENT_MDP_RSZ0_EOF 28
+#define CMDQ_EVENT_MDP_RSZ1_EOF 29
+#define CMDQ_EVENT_MDP_RSZ2_EOF 30
+#define CMDQ_EVENT_MDP_TDSHP0_EOF 31
+#define CMDQ_EVENT_MDP_TDSHP1_EOF 32
+#define CMDQ_EVENT_MDP_WDMA_EOF 33
+#define CMDQ_EVENT_MDP_WROT0_WRITE_EOF 34
+#define CMDQ_EVENT_MDP_WROT0_READ_EOF 35
+#define CMDQ_EVENT_MDP_WROT1_WRITE_EOF 36
+#define CMDQ_EVENT_MDP_WROT1_READ_EOF 37
+#define CMDQ_EVENT_MDP_CROP_EOF 38
+#define CMDQ_EVENT_DISP_OVL0_EOF 39
+#define CMDQ_EVENT_DISP_OVL1_EOF 40
+#define CMDQ_EVENT_DISP_RDMA0_EOF 41
+#define CMDQ_EVENT_DISP_RDMA1_EOF 42
+#define CMDQ_EVENT_DISP_RDMA2_EOF 43
+#define CMDQ_EVENT_DISP_WDMA0_EOF 44
+#define CMDQ_EVENT_DISP_WDMA1_EOF 45
+#define CMDQ_EVENT_DISP_COLOR0_EOF 46
+#define CMDQ_EVENT_DISP_COLOR1_EOF 47
+#define CMDQ_EVENT_DISP_AAL_EOF 48
+#define CMDQ_EVENT_DISP_GAMMA_EOF 49
+#define CMDQ_EVENT_DISP_UFOE_EOF 50
+#define CMDQ_EVENT_DISP_DPI0_EOF 51
+#define CMDQ_EVENT_MUTEX0_STREAM_EOF 52
+#define CMDQ_EVENT_MUTEX1_STREAM_EOF 53
+#define CMDQ_EVENT_MUTEX2_STREAM_EOF 54
+#define CMDQ_EVENT_MUTEX3_STREAM_EOF 55
+#define CMDQ_EVENT_MUTEX4_STREAM_EOF 56
+#define CMDQ_EVENT_MUTEX5_STREAM_EOF 57
+#define CMDQ_EVENT_MUTEX6_STREAM_EOF 58
+#define CMDQ_EVENT_MUTEX7_STREAM_EOF 59
+#define CMDQ_EVENT_MUTEX8_STREAM_EOF 60
+#define CMDQ_EVENT_MUTEX9_STREAM_EOF 61
+#define CMDQ_EVENT_DISP_RDMA0_UNDERRUN 62
+#define CMDQ_EVENT_DISP_RDMA1_UNDERRUN 63
+#define CMDQ_EVENT_DISP_RDMA2_UNDERRUN 64
+#define CMDQ_EVENT_ISP_PASS2_2_EOF 129
+#define CMDQ_EVENT_ISP_PASS2_1_EOF 130
+#define CMDQ_EVENT_ISP_PASS2_0_EOF 131
+#define CMDQ_EVENT_ISP_PASS1_1_EOF 132
+#define CMDQ_EVENT_ISP_PASS1_0_EOF 133
+#define CMDQ_EVENT_CAMSV_2_PASS1_EOF 134
+#define CMDQ_EVENT_CAMSV_1_PASS1_EOF 135
+#define CMDQ_EVENT_SENINF_CAM1_2_3_FIFO_FULL 136
+#define CMDQ_EVENT_SENINF_CAM0_FIFO_FULL 137
+#define CMDQ_EVENT_JPGENC_PASS2_EOF 257
+#define CMDQ_EVENT_JPGENC_PASS1_EOF 258
+#define CMDQ_EVENT_JPGDEC_EOF 259
+
+#endif
--
2.40.0

Subject: [PATCH 18/27] arm64: dts: mediatek: mt6795: Add support for IOMMU and LARBs

Add nodes for the multimedia IOMMU and its LARBs: this includes all but
the MJC LARB, which cannot currently be used and will be added later.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 60 ++++++++++++++++++++++++
1 file changed, 60 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index a8b2c4517e79..9cfa02085f61 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/mediatek,mt6795-clk.h>
#include <dt-bindings/gce/mediatek,mt6795-gce.h>
+#include <dt-bindings/memory/mt6795-larb-port.h>
#include <dt-bindings/pinctrl/mt6795-pinfunc.h>
#include <dt-bindings/power/mt6795-power.h>
#include <dt-bindings/reset/mediatek,mt6795-resets.h>
@@ -390,6 +391,17 @@ systimer: timer@10200670 {
clock-names = "clk13m";
};

+ iommu: iommu@10205000 {
+ compatible = "mediatek,mt6795-m4u";
+ reg = <0 0x10205000 0 0x1000>;
+ clocks = <&infracfg CLK_INFRA_M4U>;
+ clock-names = "bclk";
+ interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_LOW>;
+ mediatek,larbs = <&larb0 &larb1 &larb2 &larb3>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ #iommu-cells = <1>;
+ };
+
apmixedsys: syscon@10209000 {
compatible = "mediatek,mt6795-apmixedsys", "syscon";
reg = <0 0x10209000 0 0x1000>;
@@ -648,16 +660,64 @@ mmsys: syscon@14000000 {
mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>;
};

+ larb0: larb@14021000 {
+ compatible = "mediatek,mt6795-smi-larb";
+ reg = <0 0x14021000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_SMI_COMMON>, <&mmsys CLK_MM_SMI_LARB0>;
+ clock-names = "apb", "smi";
+ mediatek,smi = <&smi_common>;
+ mediatek,larb-id = <0>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ };
+
+ smi_common: smi@14022000 {
+ compatible = "mediatek,mt6795-smi-common";
+ reg = <0 0x14022000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&infracfg CLK_INFRA_SMI>, <&mmsys CLK_MM_SMI_COMMON>;
+ clock-names = "apb", "smi";
+ };
+
+ larb2: larb@15001000 {
+ compatible = "mediatek,mt6795-smi-larb";
+ reg = <0 0x15001000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_SMI_COMMON>, <&infracfg CLK_INFRA_SMI>;
+ clock-names = "apb", "smi";
+ mediatek,smi = <&smi_common>;
+ mediatek,larb-id = <2>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_ISP>;
+ };
+
vdecsys: clock-controller@16000000 {
compatible = "mediatek,mt6795-vdecsys";
reg = <0 0x16000000 0 0x1000>;
#clock-cells = <1>;
};

+ larb1: larb@16010000 {
+ compatible = "mediatek,mt6795-smi-larb";
+ reg = <0 0x16010000 0 0x1000>;
+ mediatek,smi = <&smi_common>;
+ mediatek,larb-id = <1>;
+ clocks = <&vdecsys CLK_VDEC_CKEN>, <&vdecsys CLK_VDEC_LARB_CKEN>;
+ clock-names = "apb", "smi";
+ power-domains = <&spm MT6795_POWER_DOMAIN_VDEC>;
+ };
+
vencsys: clock-controller@18000000 {
compatible = "mediatek,mt6795-vencsys";
reg = <0 0x18000000 0 0x1000>;
#clock-cells = <1>;
};
+
+ larb3: larb@18001000 {
+ compatible = "mediatek,mt6795-smi-larb";
+ reg = <0 0x18001000 0 0x1000>;
+ clocks = <&vencsys CLK_VENC_VENC>, <&vencsys CLK_VENC_LARB>;
+ clock-names = "apb", "smi";
+ mediatek,smi = <&smi_common>;
+ mediatek,larb-id = <3>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_VENC>;
+ };
};
};
--
2.40.0

Subject: [PATCH 06/27] dt-bindings: display: mediatek: ovl: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's OVL block: this
is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../devicetree/bindings/display/mediatek/mediatek,ovl.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml
index 065e526f950e..7671c01dabdd 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml
@@ -34,6 +34,10 @@ properties:
- mediatek,mt7623-disp-ovl
- mediatek,mt2712-disp-ovl
- const: mediatek,mt2701-disp-ovl
+ - items:
+ - enum:
+ - mediatek,mt6795-disp-ovl
+ - const: mediatek,mt8173-disp-ovl
- items:
- enum:
- mediatek,mt8188-disp-ovl
--
2.40.0

Subject: [PATCH 20/27] arm64: dts: mediatek: mt6795: Add tertiary PWM node

The PWM at 0x11006000 is the tertiary PWM; unlike PWM0, PWM1, this is
not display specific and can be used as a generic PWM controller.

This node is left disabled as usage is board-specific.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index cf45cb4ad3d2..50d9276d18c6 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -583,6 +583,25 @@ uart3: serial@11005000 {
status = "disabled";
};

+ pwm2: pwm@11006000 {
+ compatible = "mediatek,mt6795-pwm";
+ reg = <0 0x11006000 0 0x1000>;
+ #pwm-cells = <2>;
+ interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&topckgen CLK_TOP_PWM_SEL>,
+ <&pericfg CLK_PERI_PWM>,
+ <&pericfg CLK_PERI_PWM1>,
+ <&pericfg CLK_PERI_PWM2>,
+ <&pericfg CLK_PERI_PWM3>,
+ <&pericfg CLK_PERI_PWM4>,
+ <&pericfg CLK_PERI_PWM5>,
+ <&pericfg CLK_PERI_PWM6>,
+ <&pericfg CLK_PERI_PWM7>;
+ clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
+ "pwm4", "pwm5", "pwm6", "pwm7";
+ status = "disabled";
+ };
+
i2c0: i2c@11007000 {
compatible = "mediatek,mt6795-i2c", "mediatek,mt8173-i2c";
reg = <0 0x11007000 0 0x70>, <0 0x11000100 0 0x80>;
--
2.40.0

Subject: [PATCH 19/27] arm64: dts: mediatek: mt6795: Add support for display blocks and DPI/DSI

Introduce all nodes for all of the display blocks in the MediaTek Helio
X10 MT6795 SoC, including the DSI PHY and DSI/DPI interfaces: those are
left disabled as usage is board specific.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 249 +++++++++++++++++++++++
1 file changed, 249 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 9cfa02085f61..cf45cb4ad3d2 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -19,6 +19,23 @@ / {
#address-cells = <2>;
#size-cells = <2>;

+ aliases {
+ ovl0 = &ovl0;
+ ovl1 = &ovl1;
+ rdma0 = &rdma0;
+ rdma1 = &rdma1;
+ rdma2 = &rdma2;
+ wdma0 = &wdma0;
+ wdma1 = &wdma1;
+ color0 = &color0;
+ color1 = &color1;
+ split0 = &split0;
+ split1 = &split1;
+ dpi0 = &dpi0;
+ dsi0 = &dsi0;
+ dsi1 = &dsi1;
+ };
+
psci {
compatible = "arm,psci-0.2";
method = "smc";
@@ -423,6 +440,26 @@ gce: mailbox@10212000 {
#mbox-cells = <2>;
};

+ mipi_tx0: dsi-phy@10215000 {
+ compatible = "mediatek,mt8173-mipi-tx";
+ reg = <0 0x10215000 0 0x1000>;
+ clocks = <&clk26m>;
+ clock-output-names = "mipi_tx0_pll";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
+ mipi_tx1: dsi-phy@10216000 {
+ compatible = "mediatek,mt8173-mipi-tx";
+ reg = <0 0x10216000 0 0x1000>;
+ clocks = <&clk26m>;
+ clock-output-names = "mipi_tx1_pll";
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ status = "disabled";
+ };
+
gic: interrupt-controller@10221000 {
compatible = "arm,gic-400";
#interrupt-cells = <3>;
@@ -660,6 +697,211 @@ mmsys: syscon@14000000 {
mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>;
};

+ ovl0: ovl@1400c000 {
+ compatible = "mediatek,mt6795-disp-ovl", "mediatek,mt8173-disp-ovl";
+ reg = <0 0x1400c000 0 0x1000>;
+ interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_OVL0>;
+ iommus = <&iommu M4U_PORT_DISP_OVL0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xc000 0x1000>;
+ };
+
+ ovl1: ovl@1400d000 {
+ compatible = "mediatek,mt6795-disp-ovl", "mediatek,mt8173-disp-ovl";
+ reg = <0 0x1400d000 0 0x1000>;
+ interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_OVL1>;
+ iommus = <&iommu M4U_PORT_DISP_OVL1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xd000 0x1000>;
+ };
+
+ rdma0: rdma@1400e000 {
+ compatible = "mediatek,mt6795-disp-rdma", "mediatek,mt8173-disp-rdma";
+ reg = <0 0x1400e000 0 0x1000>;
+ interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA0>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xe000 0x1000>;
+ };
+
+ rdma1: rdma@1400f000 {
+ compatible = "mediatek,mt6795-disp-rdma", "mediatek,mt8173-disp-rdma";
+ reg = <0 0x1400f000 0 0x1000>;
+ interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA1>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0xf000 0x1000>;
+ };
+
+ rdma2: rdma@14010000 {
+ compatible = "mediatek,mt6795-disp-rdma", "mediatek,mt8173-disp-rdma";
+ reg = <0 0x14010000 0 0x1000>;
+ interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_RDMA2>;
+ iommus = <&iommu M4U_PORT_DISP_RDMA2>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0 0x1000>;
+ };
+
+ wdma0: wdma@14011000 {
+ compatible = "mediatek,mt6795-disp-wdma", "mediatek,mt8173-disp-wdma";
+ reg = <0 0x14011000 0 0x1000>;
+ interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_WDMA0>;
+ iommus = <&iommu M4U_PORT_DISP_WDMA0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x1000 0x1000>;
+ };
+
+ wdma1: wdma@14012000 {
+ compatible = "mediatek,mt6795-disp-wdma", "mediatek,mt8173-disp-wdma";
+ reg = <0 0x14012000 0 0x1000>;
+ interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_WDMA1>;
+ iommus = <&iommu M4U_PORT_DISP_WDMA1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x2000 0x1000>;
+ };
+
+ color0: color@14013000 {
+ compatible = "mediatek,mt6795-disp-color", "mediatek,mt8173-disp-color";
+ reg = <0 0x14013000 0 0x1000>;
+ interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_COLOR0>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x3000 0x1000>;
+ };
+
+ color1: color@14014000 {
+ compatible = "mediatek,mt6795-disp-color", "mediatek,mt8173-disp-color";
+ reg = <0 0x14014000 0 0x1000>;
+ interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_COLOR1>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x4000 0x1000>;
+ };
+
+ aal@14015000 {
+ compatible = "mediatek,mt6795-disp-aal", "mediatek,mt8173-disp-aal";
+ reg = <0 0x14015000 0 0x1000>;
+ interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_AAL>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x5000 0x1000>;
+ };
+
+ gamma@14016000 {
+ compatible = "mediatek,mt6795-disp-gamma", "mediatek,mt8173-disp-gamma";
+ reg = <0 0x14016000 0 0x1000>;
+ interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_GAMMA>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0x6000 0x1000>;
+ };
+
+ merge@14017000 {
+ compatible = "mediatek,mt6795-disp-merge", "mediatek,mt8173-disp-merge";
+ reg = <0 0x14017000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_MERGE>;
+ };
+
+ split0: split@14018000 {
+ compatible = "mediatek,mt6795-disp-split", "mediatek,mt8173-disp-split";
+ reg = <0 0x14018000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_SPLIT0>;
+ };
+
+ split1: split@14019000 {
+ compatible = "mediatek,mt6795-disp-split", "mediatek,mt8173-disp-split";
+ reg = <0 0x14019000 0 0x1000>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_SPLIT1>;
+ };
+
+ ufoe@1401a000 {
+ compatible = "mediatek,mt6795-disp-ufoe", "mediatek,mt8173-disp-ufoe";
+ reg = <0 0x1401a000 0 0x1000>;
+ interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DISP_UFOE>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xa000 0x1000>;
+ };
+
+ dsi0: dsi@1401b000 {
+ compatible = "mediatek,mt6795-dsi", "mediatek,mt8173-dsi";
+ reg = <0 0x1401b000 0 0x1000>;
+ interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DSI0_ENGINE>,
+ <&mmsys CLK_MM_DSI0_DIGITAL>,
+ <&mipi_tx0>;
+ clock-names = "engine", "digital", "hs";
+ phys = <&mipi_tx0>;
+ phy-names = "dphy";
+ status = "disabled";
+ };
+
+ dsi1: dsi@1401c000 {
+ compatible = "mediatek,mt6795-dsi", "mediatek,mt8173-dsi";
+ reg = <0 0x1401c000 0 0x1000>;
+ interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DSI1_ENGINE>,
+ <&mmsys CLK_MM_DSI1_DIGITAL>,
+ <&mipi_tx1>;
+ clock-names = "engine", "digital", "hs";
+ phys = <&mipi_tx1>;
+ phy-names = "dphy";
+ status = "disabled";
+ };
+
+ dpi0: dpi@1401d000 {
+ compatible = "mediatek,mt6795-dpi", "mediatek,mt8173-dpi";
+ reg = <0 0x1401d000 0 0x1000>;
+ interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_DPI_PIXEL>,
+ <&mmsys CLK_MM_DPI_ENGINE>,
+ <&apmixedsys CLK_APMIXED_TVDPLL>;
+ clock-names = "pixel", "engine", "pll";
+ status = "disabled";
+ };
+
+ pwm0: pwm@1401e000 {
+ compatible = "mediatek,mt6595-disp-pwm", "mediatek,mt8173-disp-pwm";
+ reg = <0 0x1401e000 0 0x1000>;
+ #pwm-cells = <2>;
+ clocks = <&mmsys CLK_MM_DISP_PWM026M>, <&mmsys CLK_MM_DISP_PWM0MM>;
+ clock-names = "main", "mm";
+ status = "disabled";
+ };
+
+ pwm1: pwm@1401f000 {
+ compatible = "mediatek,mt6595-disp-pwm", "mediatek,mt8173-disp-pwm";
+ reg = <0 0x1401f000 0 0x1000>;
+ #pwm-cells = <2>;
+ clocks = <&mmsys CLK_MM_DISP_PWM126M>, <&mmsys CLK_MM_DISP_PWM1MM>;
+ clock-names = "main", "mm";
+ status = "disabled";
+ };
+
+ mutex: mutex@14020000 {
+ compatible = "mediatek,mt8173-disp-mutex";
+ reg = <0 0x14020000 0 0x1000>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
+ clocks = <&mmsys CLK_MM_MUTEX_32K>;
+ mediatek,gce-events = <CMDQ_EVENT_MUTEX0_STREAM_EOF>,
+ <CMDQ_EVENT_MUTEX1_STREAM_EOF>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1402XXXX 0 0x1000>;
+ };
+
larb0: larb@14021000 {
compatible = "mediatek,mt6795-smi-larb";
reg = <0 0x14021000 0 0x1000>;
@@ -678,6 +920,13 @@ smi_common: smi@14022000 {
clock-names = "apb", "smi";
};

+ od@14023000 {
+ compatible = "mediatek,mt6795-disp-od", "mediatek,mt8173-disp-od";
+ reg = <0 0x14023000 0 0x1000>;
+ clocks = <&mmsys CLK_MM_DISP_OD>;
+ mediatek,gce-client-reg = <&gce SUBSYS_1402XXXX 0x3000 0x1000>;
+ };
+
larb2: larb@15001000 {
compatible = "mediatek,mt6795-smi-larb";
reg = <0 0x15001000 0 0x1000>;
--
2.40.0

Subject: [PATCH 21/27] arm64: dts: mediatek: mt6795: Add PMIC Wrapper node

Add the pwrap node: this is used to communicate with the PMIC(s).

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 50d9276d18c6..29ca9a7bf0b3 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -391,6 +391,17 @@ timer: timer@10008000 {
clocks = <&system_clk>, <&clk32k>;
};

+ pwrap: pwrap@1000d000 {
+ compatible = "mediatek,mt6795-pwrap";
+ reg = <0 0x1000d000 0 0x1000>;
+ reg-names = "pwrap";
+ interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&infracfg MT6795_INFRA_RST0_PMIC_WRAP_RST>;
+ reset-names = "pwrap";
+ clocks = <&topckgen CLK_TOP_PMICSPI_SEL>, <&clk26m>;
+ clock-names = "spi", "wrap";
+ };
+
sysirq: intpol-controller@10200620 {
compatible = "mediatek,mt6795-sysirq",
"mediatek,mt6577-sysirq";
--
2.40.0

Subject: [PATCH 22/27] arm64: dts: mediatek: mt6795: Copyright header additions

I have added more than 800 lines to this devicetree: adding myself to
the copyright header.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795.dtsi | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index 29ca9a7bf0b3..a4c950b65006 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -2,6 +2,9 @@
/*
* Copyright (c) 2015 MediaTek Inc.
* Author: Mars.C <[email protected]>
+ *
+ * Copyright (C) 2023 Collabora Ltd.
+ * AngeloGioacchino Del Regno <[email protected]>
*/

#include <dt-bindings/interrupt-controller/irq.h>
--
2.40.0

Subject: [PATCH 23/27] arm64: dts: mediatek: Add MT6331 PMIC devicetree

MT6331 is the primary PMIC for the MediaTek Helio X10 MT6795 smartphone
platforms: add a devicetree describing its regulators, Real Time Clock
and PMIC-keys.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6331.dtsi | 284 +++++++++++++++++++++++
1 file changed, 289 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6331.dtsi

diff --git a/arch/arm64/boot/dts/mediatek/mt6331.dtsi b/arch/arm64/boot/dts/mediatek/mt6331.dtsi
new file mode 100644
index 000000000000..fcec8c07fe39
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6331.dtsi
@@ -0,0 +1,284 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (c) 2023 Collabora Ltd.
+ * Author: AngeloGioacchino Del Regno <[email protected]>
+ */
+#include <dt-bindings/input/input.h>
+
+&pwrap {
+ pmic: mt6331 {
+ compatible = "mediatek,mt6331";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ mt6331regulator: mt6331regulator {
+ compatible = "mediatek,mt6331-regulator";
+
+ mt6331_vdvfs11_reg: buck-vdvfs11 {
+ regulator-name = "vdvfs11";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1493750>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6331_vdvfs12_reg: buck-vdvfs12 {
+ regulator-name = "vdvfs12";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1493750>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6331_vdvfs13_reg: buck-vdvfs13 {
+ regulator-name = "vdvfs13";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1493750>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6331_vdvfs14_reg: buck-vdvfs14 {
+ regulator-name = "vdvfs14";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1493750>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6331_vcore2_reg: buck-vcore2 {
+ regulator-name = "vcore2";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1493750>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6331_vio18_reg: buck-vio18 {
+ regulator-name = "vio18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6331_vtcxo1_reg: ldo-vtcxo1 {
+ regulator-name = "vtcxo1";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ mt6331_vtcxo2_reg: ldo-vtcxo2 {
+ regulator-name = "vtcxo2";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ mt6331_avdd32_aud_reg: ldo-avdd32aud {
+ regulator-name = "avdd32_aud";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ mt6331_vauxa32_reg: ldo-vauxa32 {
+ regulator-name = "vauxa32";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vcama_reg: ldo-vcama {
+ regulator-name = "vcama";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vio28_reg: ldo-vio28 {
+ regulator-name = "vio28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ mt6331_vcamaf_reg: ldo-vcamaf {
+ regulator-name = "vcam_af";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vmc_reg: ldo-vmc {
+ regulator-name = "vmc";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vmch_reg: ldo-vmch {
+ regulator-name = "vmch";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vemc33_reg: ldo-vemc33 {
+ regulator-name = "vemc33";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vgp1_reg: ldo-vgp1 {
+ regulator-name = "vgp1";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vsim1_reg: ldo-vsim1 {
+ regulator-name = "vsim1";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vsim2_reg: ldo-vsim2 {
+ regulator-name = "vsim2";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vmipi_reg: ldo-vmipi {
+ regulator-name = "vmipi";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vibr_reg: ldo-vibr {
+ regulator-name = "vibr";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vgp4_reg: ldo-vgp4 {
+ regulator-name = "vgp4";
+ regulator-min-microvolt = <1600000>;
+ regulator-max-microvolt = <2200000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vcamd_reg: ldo-vcamd {
+ regulator-name = "vcamd";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vusb10_reg: ldo-vusb10 {
+ regulator-name = "vusb";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ mt6331_vcamio_reg: ldo-vcamio {
+ regulator-name = "vcam_io";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <0>;
+ };
+
+ mt6331_vsram_reg: ldo-vsram {
+ regulator-name = "vsram";
+ regulator-min-microvolt = <1012500>;
+ regulator-max-microvolt = <1012500>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ mt6331_vgp2_reg: ldo-vgp2 {
+ regulator-name = "vgp2";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ mt6331_vgp3_reg: ldo-vgp3 {
+ regulator-name = "vgp3";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vrtc_reg: ldo-vrtc {
+ regulator-name = "vrtc";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6331_vdig18_reg: ldo-vdig18 {
+ regulator-name = "dvdd18_dig";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-ramp-delay = <0>;
+ regulator-always-on;
+ };
+ };
+
+ mt6331rtc: mt6331rtc {
+ compatible = "mediatek,mt6331-rtc";
+ };
+
+ mt6331keys: mt6331keys {
+ compatible = "mediatek,mt6331-keys";
+ power {
+ linux,keycodes = <KEY_POWER>;
+ wakeup-source;
+ };
+ home {
+ linux,keycodes = <KEY_HOME>;
+ };
+ };
+ };
+};
--
2.40.0

Subject: [PATCH 24/27] arm64: dts: mediatek: mt6795-xperia-m5: Add MT6331 Combo PMIC

This smartphone uses the Helio X10 standard MT6331+MT6332 combo PMICs:
include the mt6331 devicetree and add the required interrupt.

Note that despite there being two interrupts, one for MT6331 and one
for MT6332, in configurations using the companion PMIC, the interrupt
of the latter fires for both events on MT6331 and for ones on MT6332,
while the interrupt for the main PMIC fires only for events of the
main PMIC.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
index a0e01a756f03..debe0f2553d9 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -7,6 +7,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "mt6795.dtsi"
+#include "mt6331.dtsi"

/ {
model = "Sony Xperia M5";
@@ -219,6 +220,15 @@ pins-tx {
};
};

+&pmic {
+ /*
+ * Smartphones, including the Xperia M5, are equipped with a companion
+ * MT6332 PMIC: when this is present, the main MT6331 PMIC will fire
+ * an interrupt on the companion, so we use the MT6332 IRQ GPIO.
+ */
+ interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
+};
+
&uart0 {
status = "okay";

--
2.40.0

Subject: [PATCH 25/27] arm64: dts: mediatek: mt6795-xperia-m5: Add eMMC, MicroSD slot, SDIO

Configure and enable the MMC0/1/2 controllers, used for the eMMC chip,
MicroSD card slot and SDIO (WiFi) respectively.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../dts/mediatek/mt6795-sony-xperia-m5.dts | 91 +++++++++++++++++++
1 file changed, 91 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
index debe0f2553d9..155a573eac4c 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -17,6 +17,7 @@ / {
aliases {
mmc0 = &mmc0;
mmc1 = &mmc1;
+ mmc2 = &mmc2;
serial0 = &uart0;
serial1 = &uart1;
};
@@ -121,7 +122,97 @@ proximity@48 {
};
};

+&mmc0 {
+ /* eMMC controller */
+ mediatek,latch-ck = <0x14>; /* hs400 */
+ mediatek,hs200-cmd-int-delay = <1>;
+ mediatek,hs400-cmd-int-delay = <1>;
+ mediatek,hs400-ds-dly3 = <0x1a>;
+ non-removable;
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc0_pins_default>;
+ pinctrl-1 = <&mmc0_pins_uhs>;
+ vmmc-supply = <&mt6331_vemc33_reg>;
+ vqmmc-supply = <&mt6331_vio18_reg>;
+ status = "okay";
+};
+
+&mmc1 {
+ /* MicroSD card slot */
+ vmmc-supply = <&mt6331_vmc_reg>;
+ vqmmc-supply = <&mt6331_vmch_reg>;
+ status = "okay";
+};
+
+&mmc2 {
+ /* SDIO WiFi on MMC2 */
+ vmmc-supply = <&mt6331_vmc_reg>;
+ vqmmc-supply = <&mt6331_vmch_reg>;
+ status = "okay";
+};
+
&pio {
+ mmc0_pins_default: emmc-sdr-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>,
+ <PINMUX_GPIO155__FUNC_MSDC0_DAT1>,
+ <PINMUX_GPIO156__FUNC_MSDC0_DAT2>,
+ <PINMUX_GPIO157__FUNC_MSDC0_DAT3>,
+ <PINMUX_GPIO158__FUNC_MSDC0_DAT4>,
+ <PINMUX_GPIO159__FUNC_MSDC0_DAT5>,
+ <PINMUX_GPIO160__FUNC_MSDC0_DAT6>,
+ <PINMUX_GPIO161__FUNC_MSDC0_DAT7>,
+ <PINMUX_GPIO162__FUNC_MSDC0_CMD>;
+ input-enable;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-clk {
+ pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
+ };
+ };
+
+ mmc0_pins_uhs: emmc-uhs-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>,
+ <PINMUX_GPIO155__FUNC_MSDC0_DAT1>,
+ <PINMUX_GPIO156__FUNC_MSDC0_DAT2>,
+ <PINMUX_GPIO157__FUNC_MSDC0_DAT3>,
+ <PINMUX_GPIO158__FUNC_MSDC0_DAT4>,
+ <PINMUX_GPIO159__FUNC_MSDC0_DAT5>,
+ <PINMUX_GPIO160__FUNC_MSDC0_DAT6>,
+ <PINMUX_GPIO161__FUNC_MSDC0_DAT7>,
+ <PINMUX_GPIO162__FUNC_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-clk {
+ pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-ds {
+ pinmux = <PINMUX_GPIO164__FUNC_MSDC0_DSL>;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+ };
+
nfc_pins: nfc-pins {
pins-irq {
pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
--
2.40.0

Subject: [PATCH 26/27] arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMA255 Accelerometer

Add the BMA255 Accelerometer on I2C3 and its pin definitions.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
.../boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
index 155a573eac4c..0b0519f6b2f1 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -68,6 +68,13 @@ &i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
status = "okay";
+
+ accelerometer@10 {
+ compatible = "bosch,bma255";
+ reg = <0x10>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&accel_pins>;
+ };
};

&i2c2 {
@@ -247,6 +254,14 @@ pins-irq {
};
};

+ accel_pins: accelerometer-pins {
+ pins-irq {
+ pinmux = <PINMUX_GPIO12__FUNC_GPIO12>;
+ bias-pull-up;
+ input-enable;
+ };
+ };
+
i2c0_pins: i2c0-pins {
pins-bus {
pinmux = <PINMUX_GPIO45__FUNC_SDA0>,
--
2.40.0

Subject: [PATCH 27/27] arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMM050 Magnetometer

This smartphone features a Bosch BMM050 Magnetometer on I2C3: enable
it with the BMM150 binding, as that driver supports BMM050 as well.
For this sensor, there is no interrupt pin;
readings were validated in sysfs.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
index 0b0519f6b2f1..b5746e6d0b15 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
+++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
@@ -75,6 +75,11 @@ accelerometer@10 {
pinctrl-names = "default";
pinctrl-0 = <&accel_pins>;
};
+
+ magnetometer@12 {
+ compatible = "bosch,bmm150";
+ reg = <0x12>;
+ };
};

&i2c2 {
--
2.40.0

2023-04-12 12:35:17

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Reviewed-by: Matthias Brugger <[email protected]>

> ---
> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> index 0088bc8e7c54..153e146df7d4 100644
> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> @@ -22,7 +22,9 @@ properties:
> - mediatek,mt8173-disp-pwm
> - mediatek,mt8183-disp-pwm
> - items:
> - - const: mediatek,mt8167-disp-pwm
> + - enum:
> + - mediatek,mt6795-disp-pwm
> + - mediatek,mt8167-disp-pwm
> - const: mediatek,mt8173-disp-pwm
> - items:
> - enum:

2023-04-12 12:36:03

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
> the same DSI PHY as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
> index 26f2b887cfc1..a9f78344efdb 100644
> --- a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
> @@ -24,6 +24,10 @@ properties:
> - enum:
> - mediatek,mt7623-mipi-tx
> - const: mediatek,mt2701-mipi-tx
> + - items:
> + - enum:
> + - mediatek,mt6795-mipi-tx
> + - const: mediatek,mt8173-mipi-tx

I suppose you expect more SoCs to share the same fallback in the future, apart
from keeping in sync with other comaptibles described here, so:

Reviewed-by: Matthias Brugger <[email protected]>



> - items:
> - enum:
> - mediatek,mt8365-mipi-tx

2023-04-12 12:36:40

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
> the same parameters as MT8183.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../display/mediatek/mediatek,dpi.yaml | 23 +++++++++++--------
> 1 file changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> index d976380801e3..803c00f26206 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> @@ -17,15 +17,20 @@ description: |
>
> properties:
> compatible:
> - enum:
> - - mediatek,mt2701-dpi
> - - mediatek,mt7623-dpi
> - - mediatek,mt8173-dpi
> - - mediatek,mt8183-dpi
> - - mediatek,mt8186-dpi
> - - mediatek,mt8188-dp-intf
> - - mediatek,mt8192-dpi
> - - mediatek,mt8195-dp-intf
> + oneOf:
> + - enum:
> + - mediatek,mt2701-dpi
> + - mediatek,mt7623-dpi
> + - mediatek,mt8173-dpi
> + - mediatek,mt8183-dpi
> + - mediatek,mt8186-dpi
> + - mediatek,mt8188-dp-intf
> + - mediatek,mt8192-dpi
> + - mediatek,mt8195-dp-intf
> + - items:
> + - enum:
> + - mediatek,mt6795-dpi
> + - const: mediatek,mt8183-dpi

Shouldn't we declare both const: ?

2023-04-12 12:37:09

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 04/27] dt-bindings: display: mediatek: aal: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795: similarly to
> MT8173, this SoC has the gamma LUT registers in DISP_AAL.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Reviewed-by: Matthias Brugger <[email protected]>

> ---
> .../devicetree/bindings/display/mediatek/mediatek,aal.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
> index 92741486c24d..7fd42c8fdc32 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml
> @@ -27,6 +27,7 @@ properties:
> - items:
> - enum:
> - mediatek,mt2712-disp-aal
> + - mediatek,mt6795-disp-aal
> - const: mediatek,mt8173-disp-aal
> - items:
> - enum:

2023-04-12 12:37:27

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 05/27] dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795, using the same
> DSI block as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../display/mediatek/mediatek,dsi.yaml | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
> index 4707b60238b0..12441b937684 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
> @@ -22,13 +22,18 @@ allOf:
>
> properties:
> compatible:
> - enum:
> - - mediatek,mt2701-dsi
> - - mediatek,mt7623-dsi
> - - mediatek,mt8167-dsi
> - - mediatek,mt8173-dsi
> - - mediatek,mt8183-dsi
> - - mediatek,mt8186-dsi
> + oneOf:
> + - enum:
> + - mediatek,mt2701-dsi
> + - mediatek,mt7623-dsi
> + - mediatek,mt8167-dsi
> + - mediatek,mt8173-dsi
> + - mediatek,mt8183-dsi
> + - mediatek,mt8186-dsi
> + - items:
> + - enum:
> + - mediatek,mt6795-dsi
> + - const: mediatek,mt8173-dsi

Same here, why not const?

>
> reg:
> maxItems: 1

2023-04-12 12:37:47

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 08/27] dt-bindings: display: mediatek: wdma: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's WDMA block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,wdma.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml
> index 7d7cc1ab526b..1a19b3ef036f 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,wdma.yaml
> @@ -23,6 +23,9 @@ properties:
> oneOf:
> - items:
> - const: mediatek,mt8173-disp-wdma
> + - items:
> + - const: mediatek,mt6795-disp-wdma
> + - const: mediatek,mt8173-disp-wdma

:D

Reviewed-by: Matthias Brugger <[email protected]>

>
> reg:
> maxItems: 1

2023-04-12 12:38:30

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 09/27] dt-bindings: display: mediatek: color: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's COLOR block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Reviewed-by: Matthias Brugger <[email protected]>

> ---
> .../devicetree/bindings/display/mediatek/mediatek,color.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml
> index 62306c88f485..449b37c7560f 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml
> @@ -35,6 +35,7 @@ properties:
> - const: mediatek,mt2701-disp-color
> - items:
> - enum:
> + - mediatek,mt6795-disp-color
> - mediatek,mt8183-disp-color
> - mediatek,mt8186-disp-color
> - mediatek,mt8188-disp-color

2023-04-12 12:38:40

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 11/27] dt-bindings: display: mediatek: merge: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's MERGE block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,merge.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml
> index 69ba75777dac..be330be1399a 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,merge.yaml
> @@ -25,6 +25,9 @@ properties:
> - const: mediatek,mt8173-disp-merge
> - items:
> - const: mediatek,mt8195-disp-merge
> + - items:
> + - const: mediatek,mt6795-disp-merge
> + - const: mediatek,mt8173-disp-merge

Reviewed-by: Matthias Brugger <[email protected]>

>
> reg:
> maxItems: 1

2023-04-12 12:38:50

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 12/27] dt-bindings: display: mediatek: split: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's SPLIT block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,split.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml
> index 35ace1f322e8..fa6dd9b649fe 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,split.yaml
> @@ -23,6 +23,9 @@ properties:
> oneOf:
> - items:
> - const: mediatek,mt8173-disp-split
> + - items:
> + - const: mediatek,mt6795-disp-split
> + - const: mediatek,mt8173-disp-split

Reviewed-by: Matthias Brugger <[email protected]>

>
> reg:
> maxItems: 1

2023-04-12 12:39:08

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 13/27] dt-bindings: display: mediatek: ufoe: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's UFOE block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,ufoe.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
> index b8bb135fe96b..282925a73804 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ufoe.yaml
> @@ -24,6 +24,9 @@ properties:
> oneOf:
> - items:
> - const: mediatek,mt8173-disp-ufoe
> + - items:
> + - const: mediatek,mt6795-disp-ufoe
> + - const: mediatek,mt8173-disp-ufoe

Reviewed-by: Matthias Brugger <[email protected]>

>
> reg:
> maxItems: 1

2023-04-12 12:39:25

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 14/27] dt-bindings: display: mediatek: od: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's OverDrive (OD)
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,od.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml
> index 853fcb9db2be..691a3644504f 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,od.yaml
> @@ -25,6 +25,9 @@ properties:
> - const: mediatek,mt2712-disp-od
> - items:
> - const: mediatek,mt8173-disp-od
> + - items:
> + - const: mediatek,mt6795-disp-od
> + - const: mediatek,mt8173-disp-od

Reviewed-by: Matthias Brugger <[email protected]>

>
> reg:
> maxItems: 1

2023-04-12 12:39:26

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 15/27] dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MT6795 Helio X10 SoC using MT8173
> binding and add a header for the MT6795's GCE mailbox.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>

Reviewed-by: Matthias Brugger <[email protected]>

> ---
> .../mailbox/mediatek,gce-mailbox.yaml | 20 +--
> include/dt-bindings/gce/mediatek,mt6795-gce.h | 123 ++++++++++++++++++
> 2 files changed, 135 insertions(+), 8 deletions(-)
> create mode 100644 include/dt-bindings/gce/mediatek,mt6795-gce.h
>
> diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> index d383b2ab3ce8..cef9d7601398 100644
> --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> @@ -16,14 +16,18 @@ description:
>
> properties:
> compatible:
> - enum:
> - - mediatek,mt6779-gce
> - - mediatek,mt8173-gce
> - - mediatek,mt8183-gce
> - - mediatek,mt8186-gce
> - - mediatek,mt8188-gce
> - - mediatek,mt8192-gce
> - - mediatek,mt8195-gce
> + oneOf:
> + - enum:
> + - mediatek,mt6779-gce
> + - mediatek,mt8173-gce
> + - mediatek,mt8183-gce
> + - mediatek,mt8186-gce
> + - mediatek,mt8188-gce
> + - mediatek,mt8192-gce
> + - mediatek,mt8195-gce
> + - items:
> + - const: mediatek,mt6795-gce
> + - const: mediatek,mt8173-gce
>
> "#mbox-cells":
> const: 2
> diff --git a/include/dt-bindings/gce/mediatek,mt6795-gce.h b/include/dt-bindings/gce/mediatek,mt6795-gce.h
> new file mode 100644
> index 000000000000..97d5ba2d2b44
> --- /dev/null
> +++ b/include/dt-bindings/gce/mediatek,mt6795-gce.h
> @@ -0,0 +1,123 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Copyright (c) 2023 Collabora Ltd.
> + * Author: AngeloGioacchino Del Regno <[email protected]>
> + */
> +#ifndef _DT_BINDINGS_GCE_MT6795_H
> +#define _DT_BINDINGS_GCE_MT6795_H
> +
> +/* GCE HW thread priority */
> +#define CMDQ_THR_PRIO_LOWEST 0
> +#define CMDQ_THR_PRIO_NORMAL 1
> +#define CMDQ_THR_PRIO_NORMAL_2 2
> +#define CMDQ_THR_PRIO_MEDIUM 3
> +#define CMDQ_THR_PRIO_MEDIUM_2 4
> +#define CMDQ_THR_PRIO_HIGH 5
> +#define CMDQ_THR_PRIO_HIGHER 6
> +#define CMDQ_THR_PRIO_HIGHEST 7
> +
> +/* GCE SUBSYS */
> +#define SUBSYS_1300XXXX 0
> +#define SUBSYS_1400XXXX 1
> +#define SUBSYS_1401XXXX 2
> +#define SUBSYS_1402XXXX 3
> +#define SUBSYS_1500XXXX 4
> +#define SUBSYS_1600XXXX 5
> +#define SUBSYS_1700XXXX 6
> +#define SUBSYS_1800XXXX 7
> +#define SUBSYS_1000XXXX 8
> +#define SUBSYS_1001XXXX 9
> +#define SUBSYS_1002XXXX 10
> +#define SUBSYS_1003XXXX 11
> +#define SUBSYS_1004XXXX 12
> +#define SUBSYS_1005XXXX 13
> +#define SUBSYS_1020XXXX 14
> +#define SUBSYS_1021XXXX 15
> +#define SUBSYS_1120XXXX 16
> +#define SUBSYS_1121XXXX 17
> +#define SUBSYS_1122XXXX 18
> +#define SUBSYS_1123XXXX 19
> +#define SUBSYS_1124XXXX 20
> +#define SUBSYS_1125XXXX 21
> +#define SUBSYS_1126XXXX 22
> +
> +/* GCE HW EVENT */
> +#define CMDQ_EVENT_MDP_RDMA0_SOF 0
> +#define CMDQ_EVENT_MDP_RDMA1_SOF 1
> +#define CMDQ_EVENT_MDP_DSI0_TE_SOF 2
> +#define CMDQ_EVENT_MDP_DSI1_TE_SOF 3
> +#define CMDQ_EVENT_MDP_MVW_SOF 4
> +#define CMDQ_EVENT_MDP_TDSHP0_SOF 5
> +#define CMDQ_EVENT_MDP_TDSHP1_SOF 6
> +#define CMDQ_EVENT_MDP_WDMA_SOF 7
> +#define CMDQ_EVENT_MDP_WROT0_SOF 8
> +#define CMDQ_EVENT_MDP_WROT1_SOF 9
> +#define CMDQ_EVENT_MDP_CROP_SOF 10
> +#define CMDQ_EVENT_DISP_OVL0_SOF 11
> +#define CMDQ_EVENT_DISP_OVL1_SOF 12
> +#define CMDQ_EVENT_DISP_RDMA0_SOF 13
> +#define CMDQ_EVENT_DISP_RDMA1_SOF 14
> +#define CMDQ_EVENT_DISP_RDMA2_SOF 15
> +#define CMDQ_EVENT_DISP_WDMA0_SOF 16
> +#define CMDQ_EVENT_DISP_WDMA1_SOF 17
> +#define CMDQ_EVENT_DISP_COLOR0_SOF 18
> +#define CMDQ_EVENT_DISP_COLOR1_SOF 19
> +#define CMDQ_EVENT_DISP_AAL_SOF 20
> +#define CMDQ_EVENT_DISP_GAMMA_SOF 21
> +#define CMDQ_EVENT_DISP_UFOE_SOF 22
> +#define CMDQ_EVENT_DISP_PWM0_SOF 23
> +#define CMDQ_EVENT_DISP_PWM1_SOF 24
> +#define CMDQ_EVENT_DISP_OD_SOF 25
> +#define CMDQ_EVENT_MDP_RDMA0_EOF 26
> +#define CMDQ_EVENT_MDP_RDMA1_EOF 27
> +#define CMDQ_EVENT_MDP_RSZ0_EOF 28
> +#define CMDQ_EVENT_MDP_RSZ1_EOF 29
> +#define CMDQ_EVENT_MDP_RSZ2_EOF 30
> +#define CMDQ_EVENT_MDP_TDSHP0_EOF 31
> +#define CMDQ_EVENT_MDP_TDSHP1_EOF 32
> +#define CMDQ_EVENT_MDP_WDMA_EOF 33
> +#define CMDQ_EVENT_MDP_WROT0_WRITE_EOF 34
> +#define CMDQ_EVENT_MDP_WROT0_READ_EOF 35
> +#define CMDQ_EVENT_MDP_WROT1_WRITE_EOF 36
> +#define CMDQ_EVENT_MDP_WROT1_READ_EOF 37
> +#define CMDQ_EVENT_MDP_CROP_EOF 38
> +#define CMDQ_EVENT_DISP_OVL0_EOF 39
> +#define CMDQ_EVENT_DISP_OVL1_EOF 40
> +#define CMDQ_EVENT_DISP_RDMA0_EOF 41
> +#define CMDQ_EVENT_DISP_RDMA1_EOF 42
> +#define CMDQ_EVENT_DISP_RDMA2_EOF 43
> +#define CMDQ_EVENT_DISP_WDMA0_EOF 44
> +#define CMDQ_EVENT_DISP_WDMA1_EOF 45
> +#define CMDQ_EVENT_DISP_COLOR0_EOF 46
> +#define CMDQ_EVENT_DISP_COLOR1_EOF 47
> +#define CMDQ_EVENT_DISP_AAL_EOF 48
> +#define CMDQ_EVENT_DISP_GAMMA_EOF 49
> +#define CMDQ_EVENT_DISP_UFOE_EOF 50
> +#define CMDQ_EVENT_DISP_DPI0_EOF 51
> +#define CMDQ_EVENT_MUTEX0_STREAM_EOF 52
> +#define CMDQ_EVENT_MUTEX1_STREAM_EOF 53
> +#define CMDQ_EVENT_MUTEX2_STREAM_EOF 54
> +#define CMDQ_EVENT_MUTEX3_STREAM_EOF 55
> +#define CMDQ_EVENT_MUTEX4_STREAM_EOF 56
> +#define CMDQ_EVENT_MUTEX5_STREAM_EOF 57
> +#define CMDQ_EVENT_MUTEX6_STREAM_EOF 58
> +#define CMDQ_EVENT_MUTEX7_STREAM_EOF 59
> +#define CMDQ_EVENT_MUTEX8_STREAM_EOF 60
> +#define CMDQ_EVENT_MUTEX9_STREAM_EOF 61
> +#define CMDQ_EVENT_DISP_RDMA0_UNDERRUN 62
> +#define CMDQ_EVENT_DISP_RDMA1_UNDERRUN 63
> +#define CMDQ_EVENT_DISP_RDMA2_UNDERRUN 64
> +#define CMDQ_EVENT_ISP_PASS2_2_EOF 129
> +#define CMDQ_EVENT_ISP_PASS2_1_EOF 130
> +#define CMDQ_EVENT_ISP_PASS2_0_EOF 131
> +#define CMDQ_EVENT_ISP_PASS1_1_EOF 132
> +#define CMDQ_EVENT_ISP_PASS1_0_EOF 133
> +#define CMDQ_EVENT_CAMSV_2_PASS1_EOF 134
> +#define CMDQ_EVENT_CAMSV_1_PASS1_EOF 135
> +#define CMDQ_EVENT_SENINF_CAM1_2_3_FIFO_FULL 136
> +#define CMDQ_EVENT_SENINF_CAM0_FIFO_FULL 137
> +#define CMDQ_EVENT_JPGENC_PASS2_EOF 257
> +#define CMDQ_EVENT_JPGENC_PASS1_EOF 258
> +#define CMDQ_EVENT_JPGDEC_EOF 259
> +
> +#endif

2023-04-12 12:47:26

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 22/27] arm64: dts: mediatek: mt6795: Copyright header additions



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> I have added more than 800 lines to this devicetree: adding myself to
> the copyright header.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> index 29ca9a7bf0b3..a4c950b65006 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> @@ -2,6 +2,9 @@
> /*
> * Copyright (c) 2015 MediaTek Inc.
> * Author: Mars.C <[email protected]>
> + *
> + * Copyright (C) 2023 Collabora Ltd.
> + * AngeloGioacchino Del Regno <[email protected]>

Indentation?

BTW from what I understand the copyright will be by your employer, Collabora not
you, but I'm not an legal expert :)

> */
>
> #include <dt-bindings/interrupt-controller/irq.h>

2023-04-12 12:48:41

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 20/27] arm64: dts: mediatek: mt6795: Add tertiary PWM node



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> The PWM at 0x11006000 is the tertiary PWM; unlike PWM0, PWM1, this is
> not display specific and can be used as a generic PWM controller.
>
> This node is left disabled as usage is board-specific.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks!

> ---
> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> index cf45cb4ad3d2..50d9276d18c6 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> @@ -583,6 +583,25 @@ uart3: serial@11005000 {
> status = "disabled";
> };
>
> + pwm2: pwm@11006000 {
> + compatible = "mediatek,mt6795-pwm";
> + reg = <0 0x11006000 0 0x1000>;
> + #pwm-cells = <2>;
> + interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&topckgen CLK_TOP_PWM_SEL>,
> + <&pericfg CLK_PERI_PWM>,
> + <&pericfg CLK_PERI_PWM1>,
> + <&pericfg CLK_PERI_PWM2>,
> + <&pericfg CLK_PERI_PWM3>,
> + <&pericfg CLK_PERI_PWM4>,
> + <&pericfg CLK_PERI_PWM5>,
> + <&pericfg CLK_PERI_PWM6>,
> + <&pericfg CLK_PERI_PWM7>;
> + clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
> + "pwm4", "pwm5", "pwm6", "pwm7";
> + status = "disabled";
> + };
> +
> i2c0: i2c@11007000 {
> compatible = "mediatek,mt6795-i2c", "mediatek,mt8173-i2c";
> reg = <0 0x11007000 0 0x70>, <0 0x11000100 0 0x80>;

2023-04-12 12:49:57

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 26/27] arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMA255 Accelerometer



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add the BMA255 Accelerometer on I2C3 and its pin definitions.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks

> ---
> .../boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> index 155a573eac4c..0b0519f6b2f1 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> @@ -68,6 +68,13 @@ &i2c1 {
> pinctrl-names = "default";
> pinctrl-0 = <&i2c1_pins>;
> status = "okay";
> +
> + accelerometer@10 {
> + compatible = "bosch,bma255";
> + reg = <0x10>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&accel_pins>;
> + };
> };
>
> &i2c2 {
> @@ -247,6 +254,14 @@ pins-irq {
> };
> };
>
> + accel_pins: accelerometer-pins {
> + pins-irq {
> + pinmux = <PINMUX_GPIO12__FUNC_GPIO12>;
> + bias-pull-up;
> + input-enable;
> + };
> + };
> +
> i2c0_pins: i2c0-pins {
> pins-bus {
> pinmux = <PINMUX_GPIO45__FUNC_SDA0>,

2023-04-12 12:51:09

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 27/27] arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMM050 Magnetometer



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> This smartphone features a Bosch BMM050 Magnetometer on I2C3: enable
> it with the BMM150 binding, as that driver supports BMM050 as well.
> For this sensor, there is no interrupt pin;
> readings were validated in sysfs.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied :)

> ---
> arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> index 0b0519f6b2f1..b5746e6d0b15 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> @@ -75,6 +75,11 @@ accelerometer@10 {
> pinctrl-names = "default";
> pinctrl-0 = <&accel_pins>;
> };
> +
> + magnetometer@12 {
> + compatible = "bosch,bmm150";
> + reg = <0x12>;
> + };
> };
>
> &i2c2 {

2023-04-12 13:10:20

by Alexandre Mergnat

[permalink] [raw]
Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
> the same DSI PHY as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
> index 26f2b887cfc1..a9f78344efdb 100644
> --- a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
> @@ -24,6 +24,10 @@ properties:
> - enum:
> - mediatek,mt7623-mipi-tx
> - const: mediatek,mt2701-mipi-tx
> + - items:
> + - enum:
> + - mediatek,mt6795-mipi-tx
> + - const: mediatek,mt8173-mipi-tx

AFAIK, it should be:
- items:
- const: mediatek,mt6795-mipi-tx
- const: mediatek,mt8173-mipi-tx

Since it isn't respected above for mt7623, it may be tolerated.
Please, take this comment as a suggestion, isn't a NAK from me.

> - items:
> - enum:
> - mediatek,mt8365-mipi-tx

Reviewed-by: Alexandre Mergnat <[email protected]>

--
Regards,
Alexandre

2023-04-12 13:10:35

by Alexandre Mergnat

[permalink] [raw]
Subject: Re: [PATCH 04/27] dt-bindings: display: mediatek: aal: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795: similarly to
> MT8173, this SoC has the gamma LUT registers in DISP_AAL.
>
> Signed-off-by: AngeloGioacchino Del Regno<[email protected]>

Reviewed-by: Alexandre Mergnat <[email protected]>

--
Regards,
Alexandre

Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10

Il 12/04/23 14:59, Alexandre Mergnat ha scritto:
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
>> the same DSI PHY as MT8173.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>>   Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>> b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>> index 26f2b887cfc1..a9f78344efdb 100644
>> --- a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>> +++ b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>> @@ -24,6 +24,10 @@ properties:
>>             - enum:
>>                 - mediatek,mt7623-mipi-tx
>>             - const: mediatek,mt2701-mipi-tx
>> +      - items:
>> +          - enum:
>> +              - mediatek,mt6795-mipi-tx
>> +          - const: mediatek,mt8173-mipi-tx
>
> AFAIK, it should be:
>       - items:
>           - const: mediatek,mt6795-mipi-tx
>           - const: mediatek,mt8173-mipi-tx
>
> Since it isn't respected above for mt7623, it may be tolerated.
> Please, take this comment as a suggestion, isn't a NAK from me.
>

First of all, Thanks!
I want to explain, though, the reason for that.

If you check all the commits, on some I did it as you just proposed, while
on some others I did it with an enum before const: that's simply because I
*totally expect* some to grow, while others (const - const) I was either
unsure, or totally *not* expecting them to grow soon!

>>         - items:
>>             - enum:
>>                 - mediatek,mt8365-mipi-tx
>
> Reviewed-by: Alexandre Mergnat <[email protected]>
>

Thanks again!

Cheers,
Angelo

2023-04-12 13:14:33

by Alexandre Mergnat

[permalink] [raw]
Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10

On 12/04/2023 15:03, AngeloGioacchino Del Regno wrote:
> Il 12/04/23 14:59, Alexandre Mergnat ha scritto:
>> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>>> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
>>> the same DSI PHY as MT8173.
>>>
>>> Signed-off-by: AngeloGioacchino Del Regno
>>> <[email protected]>
>>> ---
>>>   Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git
>>> a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>> b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>> index 26f2b887cfc1..a9f78344efdb 100644
>>> --- a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>> +++ b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>> @@ -24,6 +24,10 @@ properties:
>>>             - enum:
>>>                 - mediatek,mt7623-mipi-tx
>>>             - const: mediatek,mt2701-mipi-tx
>>> +      - items:
>>> +          - enum:
>>> +              - mediatek,mt6795-mipi-tx
>>> +          - const: mediatek,mt8173-mipi-tx
>>
>> AFAIK, it should be:
>>        - items:
>>            - const: mediatek,mt6795-mipi-tx
>>            - const: mediatek,mt8173-mipi-tx
>>
>> Since it isn't respected above for mt7623, it may be tolerated.
>> Please, take this comment as a suggestion, isn't a NAK from me.
>>
>
> First of all, Thanks!
> I want to explain, though, the reason for that.
>
> If you check all the commits, on some I did it as you just proposed, while
> on some others I did it with an enum before const: that's simply because I
> *totally expect* some to grow, while others (const - const) I was either
> unsure, or totally *not* expecting them to grow soon!


That's what I thought. IMHO, if someone add another compat later, he
will be on charge to change the const by enum front of your
"mediatek,mt6795-mipi-tx". But my opinion is probably not the most popular.

I will not make the same feedback for the other patches in this series.

--
Regards,
Alexandre

2023-04-12 13:22:41

by Alexandre Mergnat

[permalink] [raw]
Subject: Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
> the same parameters as MT8183.
>
> Signed-off-by: AngeloGioacchino Del Regno<[email protected]>

Reviewed-by: Alexandre Mergnat <[email protected]>

--
Regards,
Alexandre

Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10

Il 12/04/23 15:12, Alexandre Mergnat ha scritto:
> On 12/04/2023 15:03, AngeloGioacchino Del Regno wrote:
>> Il 12/04/23 14:59, Alexandre Mergnat ha scritto:
>>> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>>>> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
>>>> the same DSI PHY as MT8173.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno
>>>> <[email protected]>
>>>> ---
>>>>   Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
>>>>   1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>> b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>> index 26f2b887cfc1..a9f78344efdb 100644
>>>> --- a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>> +++ b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>> @@ -24,6 +24,10 @@ properties:
>>>>             - enum:
>>>>                 - mediatek,mt7623-mipi-tx
>>>>             - const: mediatek,mt2701-mipi-tx
>>>> +      - items:
>>>> +          - enum:
>>>> +              - mediatek,mt6795-mipi-tx
>>>> +          - const: mediatek,mt8173-mipi-tx
>>>
>>> AFAIK, it should be:
>>>        - items:
>>>            - const: mediatek,mt6795-mipi-tx
>>>            - const: mediatek,mt8173-mipi-tx
>>>
>>> Since it isn't respected above for mt7623, it may be tolerated.
>>> Please, take this comment as a suggestion, isn't a NAK from me.
>>>
>>
>> First of all, Thanks!
>> I want to explain, though, the reason for that.
>>
>> If you check all the commits, on some I did it as you just proposed, while
>> on some others I did it with an enum before const: that's simply because I
>> *totally expect* some to grow, while others (const - const) I was either
>> unsure, or totally *not* expecting them to grow soon!
>
>
> That's what I thought. IMHO, if someone add another compat later, he will be on
> charge to change the const by enum front of your "mediatek,mt6795-mipi-tx". But my
> opinion is probably not the most popular.
>
> I will not make the same feedback for the other patches in this series.
>

I honestly don't know what's the most popular opinion about that... but whatever,
in any case... just want to make sure to communicate that I don't really have
strong opinions about doing it one way or the other.

The arguments in favor and against that are probably 1:1... :-D

Cheers!
Angelo

Subject: Re: [PATCH 05/27] dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT6795

Il 12/04/23 14:36, Matthias Brugger ha scritto:
>
>
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>> Add a compatible string for MediaTek Helio X10 MT6795, using the same
>> DSI block as MT8173.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>>   .../display/mediatek/mediatek,dsi.yaml        | 19 ++++++++++++-------
>>   1 file changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
>> b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
>> index 4707b60238b0..12441b937684 100644
>> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml
>> @@ -22,13 +22,18 @@ allOf:
>>   properties:
>>     compatible:
>> -    enum:
>> -      - mediatek,mt2701-dsi
>> -      - mediatek,mt7623-dsi
>> -      - mediatek,mt8167-dsi
>> -      - mediatek,mt8173-dsi
>> -      - mediatek,mt8183-dsi
>> -      - mediatek,mt8186-dsi
>> +    oneOf:
>> +      - enum:
>> +          - mediatek,mt2701-dsi
>> +          - mediatek,mt7623-dsi
>> +          - mediatek,mt8167-dsi
>> +          - mediatek,mt8173-dsi
>> +          - mediatek,mt8183-dsi
>> +          - mediatek,mt8186-dsi
>> +      - items:
>> +          - enum:
>> +              - mediatek,mt6795-dsi
>> +          - const: mediatek,mt8173-dsi
>
> Same here, why not const?
>

For both DPI and DSI: many other SoCs can work with the same handling
as MT8173, that's all the ones from the same era, one example is MT6765,
MT6755... as well as MT6752 and 67533 afaik.

...that's why :-)

Cheers,
Angelo

>>     reg:
>>       maxItems: 1


Subject: Re: [PATCH 22/27] arm64: dts: mediatek: mt6795: Copyright header additions

Il 12/04/23 14:41, Matthias Brugger ha scritto:
>
>
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>> I have added more than 800 lines to this devicetree: adding myself to
>> the copyright header.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>>   arch/arm64/boot/dts/mediatek/mt6795.dtsi | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
>> b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
>> index 29ca9a7bf0b3..a4c950b65006 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
>> @@ -2,6 +2,9 @@
>>   /*
>>    * Copyright (c) 2015 MediaTek Inc.
>>    * Author: Mars.C <[email protected]>
>> + *
>> + * Copyright (C) 2023 Collabora Ltd.
>> + *                    AngeloGioacchino Del Regno
>> <[email protected]>
>
> Indentation?
>
> BTW from what I understand the copyright will be by your employer, Collabora not
> you, but I'm not an legal expert :)
>

The copyright *is* by my employer ... but at the same time I'm adding my name,
because it's me performing the work.

I didn't write (c) myname, but (c) employer, myname - that's ok :-)

Or was the comment about the commit description? Should that be reworded?

Cheers,
Angelo

2023-04-12 21:05:35

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:13 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


pwm@1100e000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+'
arch/arm64/boot/dts/mediatek/mt8183-evb.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kappa.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku0.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku1.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku16.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku272.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku288.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku32.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dtb
arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dtb

pwm@1400a000: compatible: 'oneOf' conditional failed, one must be fixed:
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

pwm@1401e000: compatible: 'oneOf' conditional failed, one must be fixed:
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

pwm@1401f000: compatible: 'oneOf' conditional failed, one must be fixed:
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

2023-04-12 21:05:38

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 05/27] dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:17 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795, using the same
> DSI block as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../display/mediatek/mediatek,dsi.yaml | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


dsi@1400c000: compatible: 'oneOf' conditional failed, one must be fixed:
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

dsi@14014000: 'port' is a required property
arch/arm64/boot/dts/mediatek/mt8183-evb.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kappa.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku0.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku1.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku16.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku272.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku288.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku32.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dtb

dsi@14014000: Unevaluated properties are not allowed ('ports' was unexpected)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kappa.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku0.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku1.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku16.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku272.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku288.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku32.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dtb
arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dtb

dsi@1401b000: 'port' is a required property
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb

dsi@1401b000: Unevaluated properties are not allowed ('ports' was unexpected)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb

2023-04-12 21:05:45

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 06/27] dt-bindings: display: mediatek: ovl: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:18 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's OVL block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,ovl.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


ovl@14007000: 'power-domains' is a required property
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

2023-04-12 21:06:03

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 09/27] dt-bindings: display: mediatek: color: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:21 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's COLOR block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,color.yaml | 1 +
> 1 file changed, 1 insertion(+)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


color@1400b000: 'power-domains' is a required property
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

2023-04-12 21:07:10

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:15 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
> the same parameters as MT8183.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../display/mediatek/mediatek,dpi.yaml | 23 +++++++++++--------
> 1 file changed, 14 insertions(+), 9 deletions(-)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


dpi@14014000: Additional properties are not allowed ('ports' was unexpected)
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

dpi@14014000: compatible: 'oneOf' conditional failed, one must be fixed:
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

dpi@14014000: 'port' is a required property
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

dpi@1401d000: Additional properties are not allowed ('power-domains' was unexpected)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

dp-intf@1c015000: clock-names:0: 'pixel' was expected
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dtb
arch/arm64/boot/dts/mediatek/mt8195-demo.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dtb

dp-intf@1c015000: clock-names:1: 'engine' was expected
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dtb
arch/arm64/boot/dts/mediatek/mt8195-demo.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dtb

dp-intf@1c113000: Additional properties are not allowed ('power-domains' was unexpected)
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dtb
arch/arm64/boot/dts/mediatek/mt8195-demo.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dtb

dp-intf@1c113000: clock-names:0: 'pixel' was expected
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dtb
arch/arm64/boot/dts/mediatek/mt8195-demo.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dtb

dp-intf@1c113000: clock-names:1: 'engine' was expected
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dtb
arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dtb
arch/arm64/boot/dts/mediatek/mt8195-demo.dtb
arch/arm64/boot/dts/mediatek/mt8195-evb.dtb

2023-04-12 21:07:27

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 14/27] dt-bindings: display: mediatek: od: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:26 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's OverDrive (OD)
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,od.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


od@14023000: 'mediatek,gce-client-reg' does not match any of the regexes: 'pinctrl-[0-9]+'
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

2023-04-12 21:07:38

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 13/27] dt-bindings: display: mediatek: ufoe: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:25 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's UFOE block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,ufoe.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


ufoe@1401a000: 'mediatek,gce-client-reg' does not match any of the regexes: 'pinctrl-[0-9]+'
arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

2023-04-12 21:08:09

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 07/27] dt-bindings: display: mediatek: rdma: Add compatible for MediaTek MT6795


On Wed, 12 Apr 2023 13:27:19 +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's RDMA block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,rdma.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]


rdma@14008000: 'power-domains' is a required property
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

rdma@14012000: 'power-domains' is a required property
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
arch/arm/boot/dts/mt7623n-rfb-emmc.dtb

2023-04-13 08:54:27

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795



On 12/04/2023 23:03, Rob Herring wrote:
>
> On Wed, 12 Apr 2023 13:27:13 +0200, AngeloGioacchino Del Regno wrote:
>> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
>> block: this is the same as MT8173.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
>

These are not new warnings. I think we should address them in a different patch.
In my opinion it shouldn't block this patch. In the end it only add as
compatible here.

Regards,
Matthias

> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
>
> Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
>
>
> pwm@1100e000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+'
> arch/arm64/boot/dts/mediatek/mt8183-evb.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kappa.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku0.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku1.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku16.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku272.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku288.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku32.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dtb
> arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dtb
> arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dtb
>
> pwm@1400a000: compatible: 'oneOf' conditional failed, one must be fixed:
> arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
> arch/arm/boot/dts/mt7623n-rfb-emmc.dtb
>
> pwm@1401e000: compatible: 'oneOf' conditional failed, one must be fixed:
> arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
> arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
> arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
> arch/arm64/boot/dts/mediatek/mt8173-evb.dtb
>
> pwm@1401f000: compatible: 'oneOf' conditional failed, one must be fixed:
> arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
> arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
> arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
> arch/arm64/boot/dts/mediatek/mt8173-evb.dtb
>

2023-04-13 09:07:23

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10



On 12/04/2023 15:17, AngeloGioacchino Del Regno wrote:
> Il 12/04/23 15:12, Alexandre Mergnat ha scritto:
>> On 12/04/2023 15:03, AngeloGioacchino Del Regno wrote:
>>> Il 12/04/23 14:59, Alexandre Mergnat ha scritto:
>>>> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>>>>> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
>>>>> the same DSI PHY as MT8173.
>>>>>
>>>>> Signed-off-by: AngeloGioacchino Del Regno
>>>>> <[email protected]>
>>>>> ---
>>>>>   Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
>>>>>   1 file changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>>> b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>>> index 26f2b887cfc1..a9f78344efdb 100644
>>>>> --- a/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>>> +++ b/Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml
>>>>> @@ -24,6 +24,10 @@ properties:
>>>>>             - enum:
>>>>>                 - mediatek,mt7623-mipi-tx
>>>>>             - const: mediatek,mt2701-mipi-tx
>>>>> +      - items:
>>>>> +          - enum:
>>>>> +              - mediatek,mt6795-mipi-tx
>>>>> +          - const: mediatek,mt8173-mipi-tx
>>>>
>>>> AFAIK, it should be:
>>>>        - items:
>>>>            - const: mediatek,mt6795-mipi-tx
>>>>            - const: mediatek,mt8173-mipi-tx
>>>>
>>>> Since it isn't respected above for mt7623, it may be tolerated.
>>>> Please, take this comment as a suggestion, isn't a NAK from me.
>>>>
>>>
>>> First of all, Thanks!
>>> I want to explain, though, the reason for that.
>>>
>>> If you check all the commits, on some I did it as you just proposed, while
>>> on some others I did it with an enum before const: that's simply because I
>>> *totally expect* some to grow, while others (const - const) I was either
>>> unsure, or totally *not* expecting them to grow soon!
>>
>>
>> That's what I thought. IMHO, if someone add another compat later, he will be
>> on charge to change the const by enum front of your "mediatek,mt6795-mipi-tx".
>> But my opinion is probably not the most popular.
>>
>> I will not make the same feedback for the other patches in this series.
>>
>
> I honestly don't know what's the most popular opinion about that... but whatever,
> in any case... just want to make sure to communicate that I don't really have
> strong opinions about doing it one way or the other.
>
> The arguments in favor and against that are probably 1:1... :-D
>

Then let me throw in another one :)

Take into account that if we expect the compatible to be added somtimes in the
future (not the near future) this code will lay around for some time. People
will take this code as an example for new code, then we will need to explain
it... In that sense it would make more sense to have all made const: const: and
change this to enum once a new compatible is added to the mix.

Said all this, I leave it to the DT maintainers to decide :D

Regards,
Matthias

Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

Il 13/04/23 10:52, Matthias Brugger ha scritto:
>
>
> On 12/04/2023 23:03, Rob Herring wrote:
>>
>> On Wed, 12 Apr 2023 13:27:13 +0200, AngeloGioacchino Del Regno wrote:
>>> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
>>> block: this is the same as MT8173.
>>>
>>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>>> ---
>>>   Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>
>> Running 'make dtbs_check' with the schema in this patch gives the
>> following warnings. Consider if they are expected or the schema is
>> incorrect. These may not be new warnings.
>>
>
> These are not new warnings. I think we should address them in a different patch. In
> my opinion it shouldn't block this patch. In the end it only add as compatible here.
>

I agree. These warnings should not block this patch, as they're totally unrelated
to it.

Regards,
Angelo

2023-04-14 05:54:09

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

Hello,

On Wed, Apr 12, 2023 at 01:27:13PM +0200, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Acked-by: Uwe Kleine-K?nig <[email protected]>

I assume this patch will go in together with the other patches in this
series via an ARM tree? (I.e. not via pwm.)

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (649.00 B)
signature.asc (499.00 B)
Download all attachments

2023-04-14 08:23:14

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> index 0088bc8e7c54..153e146df7d4 100644
> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> @@ -22,7 +22,9 @@ properties:
> - mediatek,mt8173-disp-pwm
> - mediatek,mt8183-disp-pwm
> - items:
> - - const: mediatek,mt8167-disp-pwm
> + - enum:
> + - mediatek,mt6795-disp-pwm
> + - mediatek,mt8167-disp-pwm

This does not look correct. You do not add compatible, you replace
breaking all mt8167-disp-pwm. At least it looks like this from context.

Best regards,
Krzysztof

2023-04-14 08:25:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
> the same DSI PHY as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
> 1 file changed, 4 insertions(+)

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:25:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
> the same parameters as MT8183.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:25:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795

On 12/04/2023 14:35, Matthias Brugger wrote:
>
>
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>> Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
>> the same parameters as MT8183.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>> .../display/mediatek/mediatek,dpi.yaml | 23 +++++++++++--------
>> 1 file changed, 14 insertions(+), 9 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
>> index d976380801e3..803c00f26206 100644
>> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
>> @@ -17,15 +17,20 @@ description: |
>>
>> properties:
>> compatible:
>> - enum:
>> - - mediatek,mt2701-dpi
>> - - mediatek,mt7623-dpi
>> - - mediatek,mt8173-dpi
>> - - mediatek,mt8183-dpi
>> - - mediatek,mt8186-dpi
>> - - mediatek,mt8188-dp-intf
>> - - mediatek,mt8192-dpi
>> - - mediatek,mt8195-dp-intf
>> + oneOf:
>> + - enum:
>> + - mediatek,mt2701-dpi
>> + - mediatek,mt7623-dpi
>> + - mediatek,mt8173-dpi
>> + - mediatek,mt8183-dpi
>> + - mediatek,mt8186-dpi
>> + - mediatek,mt8188-dp-intf
>> + - mediatek,mt8192-dpi
>> + - mediatek,mt8195-dp-intf
>> + - items:
>> + - enum:
>> + - mediatek,mt6795-dpi
>> + - const: mediatek,mt8183-dpi
>
> Shouldn't we declare both const: ?

I assume it is likely the enum will grow. If this is reasonably
anticipated, keep enum.

Best regards,
Krzysztof

2023-04-14 08:26:18

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 04/27] dt-bindings: display: mediatek: aal: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795: similarly to
> MT8173, this SoC has the gamma LUT registers in DISP_AAL.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:26:29

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 06/27] dt-bindings: display: mediatek: ovl: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's OVL block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:27:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 05/27] dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795, using the same
> DSI block as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../display/mediatek/mediatek,dsi.yaml | 19 ++++++++++++-------

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:27:39

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 08/27] dt-bindings: display: mediatek: wdma: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's WDMA block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,wdma.yaml | 3 +++

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:27:49

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 09/27] dt-bindings: display: mediatek: color: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's COLOR block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,color.yaml | 1 +

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:27:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 07/27] dt-bindings: display: mediatek: rdma: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's RDMA block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,rdma.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:28:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 10/27] dt-bindings: display: mediatek: gamma: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's GAMMA block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,gamma.yaml | 4 ++++
> 1 file changed, 4 insertions(+)


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:37:00

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 11/27] dt-bindings: display: mediatek: merge: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's MERGE block: this
> is the same as MT8173.
>


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:42:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

On 14/04/2023 10:30, Uwe Kleine-König wrote:
> On Fri, Apr 14, 2023 at 10:21:05AM +0200, Krzysztof Kozlowski wrote:
>> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>>> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
>>> block: this is the same as MT8173.
>>>
>>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>>> ---
>>> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>> index 0088bc8e7c54..153e146df7d4 100644
>>> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>> @@ -22,7 +22,9 @@ properties:
>>> - mediatek,mt8173-disp-pwm
>>> - mediatek,mt8183-disp-pwm
>>> - items:
>>> - - const: mediatek,mt8167-disp-pwm
>>> + - enum:
>>> + - mediatek,mt6795-disp-pwm
>>> + - mediatek,mt8167-disp-pwm
>>
>> This does not look correct. You do not add compatible, you replace
>> breaking all mt8167-disp-pwm. At least it looks like this from context.
>
> I thought the old semantic to be:
>
> "mediatek,mt8167-disp-pwm"
>
> and the new
>
> "mediatek,mt6795-disp-pwm" or "mediatek,mt8167-disp-pwm"
>
> . What am I missing?

The new is ok for mt6795 but it is not valid for mt8167.

Best regards,
Krzysztof

2023-04-14 08:42:51

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 12/27] dt-bindings: display: mediatek: split: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's SPLIT block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,split.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:44:46

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

On Fri, Apr 14, 2023 at 10:21:05AM +0200, Krzysztof Kozlowski wrote:
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> > Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> > block: this is the same as MT8173.
> >
> > Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> > ---
> > Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > index 0088bc8e7c54..153e146df7d4 100644
> > --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > @@ -22,7 +22,9 @@ properties:
> > - mediatek,mt8173-disp-pwm
> > - mediatek,mt8183-disp-pwm
> > - items:
> > - - const: mediatek,mt8167-disp-pwm
> > + - enum:
> > + - mediatek,mt6795-disp-pwm
> > + - mediatek,mt8167-disp-pwm
>
> This does not look correct. You do not add compatible, you replace
> breaking all mt8167-disp-pwm. At least it looks like this from context.

I thought the old semantic to be:

"mediatek,mt8167-disp-pwm"

and the new

"mediatek,mt6795-disp-pwm" or "mediatek,mt8167-disp-pwm"

. What am I missing?

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (1.58 kB)
signature.asc (499.00 B)
Download all attachments

2023-04-14 08:47:48

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 13/27] dt-bindings: display: mediatek: ufoe: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's UFOE block: this
> is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../devicetree/bindings/display/mediatek/mediatek,ufoe.yaml | 3 +++
> 1 file changed, 3 insertions(+)


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:48:20

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 14/27] dt-bindings: display: mediatek: od: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's OverDrive (OD)
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-14 08:48:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 22/27] arm64: dts: mediatek: mt6795: Copyright header additions

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> I have added more than 800 lines to this devicetree: adding myself to
> the copyright header.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> index 29ca9a7bf0b3..a4c950b65006 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> @@ -2,6 +2,9 @@
> /*
> * Copyright (c) 2015 MediaTek Inc.
> * Author: Mars.C <[email protected]>
> + *
> + * Copyright (C) 2023 Collabora Ltd.
> + * AngeloGioacchino Del Regno <[email protected]>

Copyright is a result of significant changes, thus it is a part of
commit(s) making these changes. Adding copyrights in separate commits
looks like you are spreading them unjustified. Squash it.

Best regards,
Krzysztof

Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

Il 14/04/23 10:34, Krzysztof Kozlowski ha scritto:
> On 14/04/2023 10:30, Uwe Kleine-König wrote:
>> On Fri, Apr 14, 2023 at 10:21:05AM +0200, Krzysztof Kozlowski wrote:
>>> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>>>> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
>>>> block: this is the same as MT8173.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>>>> ---
>>>> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>>> index 0088bc8e7c54..153e146df7d4 100644
>>>> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>>> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>>> @@ -22,7 +22,9 @@ properties:
>>>> - mediatek,mt8173-disp-pwm
>>>> - mediatek,mt8183-disp-pwm
>>>> - items:
>>>> - - const: mediatek,mt8167-disp-pwm
>>>> + - enum:
>>>> + - mediatek,mt6795-disp-pwm
>>>> + - mediatek,mt8167-disp-pwm
>>>
>>> This does not look correct. You do not add compatible, you replace
>>> breaking all mt8167-disp-pwm. At least it looks like this from context.
>>
>> I thought the old semantic to be:
>>
>> "mediatek,mt8167-disp-pwm"
>>
>> and the new
>>
>> "mediatek,mt6795-disp-pwm" or "mediatek,mt8167-disp-pwm"
>>
>> . What am I missing?
>
> The new is ok for mt6795 but it is not valid for mt8167.
>

Sorry, why is it not valid for MT8167?

This is changing the doc from:

OLD:
- items:
- const: mediatek,mt8167-disp-pwm
- const: mediatek,mt8173-disp-pwm
NEW:

- items:
- enum:
- mediatek,mt6795-disp-pwm
- mediatek,mt8167-disp-pwm
- const: mediatek,mt8173-disp-pwm

For me, that's totally valid, as the old semantic was:

compatible = "mediatek,mt8167-disp-pwm", "mediatek,mt8173-disp-pwm";

...and the new semantic is .. the same; this commit only *adds* the
possibility to get a

compatible = "mediatek,mt6795-disp-pwm", "mediatek,mt8173-disp-pwm";

without breaking anything.

Regards,
Angelo

Subject: Re: [PATCH 22/27] arm64: dts: mediatek: mt6795: Copyright header additions

Il 14/04/23 10:46, Krzysztof Kozlowski ha scritto:
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>> I have added more than 800 lines to this devicetree: adding myself to
>> the copyright header.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
>> index 29ca9a7bf0b3..a4c950b65006 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
>> @@ -2,6 +2,9 @@
>> /*
>> * Copyright (c) 2015 MediaTek Inc.
>> * Author: Mars.C <[email protected]>
>> + *
>> + * Copyright (C) 2023 Collabora Ltd.
>> + * AngeloGioacchino Del Regno <[email protected]>
>
> Copyright is a result of significant changes, thus it is a part of
> commit(s) making these changes. Adding copyrights in separate commits
> looks like you are spreading them unjustified. Squash it.
>

Ok, I'll squash it in one of the commits of this series.

Regards,
Angelo

2023-04-14 10:32:27

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

On 14/04/2023 12:25, AngeloGioacchino Del Regno wrote:
> Il 14/04/23 10:34, Krzysztof Kozlowski ha scritto:
>> On 14/04/2023 10:30, Uwe Kleine-König wrote:
>>> On Fri, Apr 14, 2023 at 10:21:05AM +0200, Krzysztof Kozlowski wrote:
>>>> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>>>>> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
>>>>> block: this is the same as MT8173.
>>>>>
>>>>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>>>>> ---
>>>>> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
>>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>>>> index 0088bc8e7c54..153e146df7d4 100644
>>>>> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>>>> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
>>>>> @@ -22,7 +22,9 @@ properties:
>>>>> - mediatek,mt8173-disp-pwm
>>>>> - mediatek,mt8183-disp-pwm
>>>>> - items:
>>>>> - - const: mediatek,mt8167-disp-pwm
>>>>> + - enum:
>>>>> + - mediatek,mt6795-disp-pwm
>>>>> + - mediatek,mt8167-disp-pwm
>>>>
>>>> This does not look correct. You do not add compatible, you replace
>>>> breaking all mt8167-disp-pwm. At least it looks like this from context.
>>>
>>> I thought the old semantic to be:
>>>
>>> "mediatek,mt8167-disp-pwm"
>>>
>>> and the new
>>>
>>> "mediatek,mt6795-disp-pwm" or "mediatek,mt8167-disp-pwm"
>>>
>>> . What am I missing?
>>
>> The new is ok for mt6795 but it is not valid for mt8167.
>>
>
> Sorry, why is it not valid for MT8167?

Eh, above example did not help me, because it missed mt8173, but I see
now the context I missed. It's already a list of two compatibles, so the
patch is fine.

Best regards,
Krzysztof

2023-04-14 10:32:41

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-18 01:02:11

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795

On Thu, Apr 13, 2023 at 10:52:28AM +0200, Matthias Brugger wrote:
>
>
> On 12/04/2023 23:03, Rob Herring wrote:
> >
> > On Wed, 12 Apr 2023 13:27:13 +0200, AngeloGioacchino Del Regno wrote:
> > > Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> > > block: this is the same as MT8173.
> > >
> > > Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> > > ---
> > > Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
> > > 1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> >
> > Running 'make dtbs_check' with the schema in this patch gives the
> > following warnings. Consider if they are expected or the schema is
> > incorrect. These may not be new warnings.
> >
>
> These are not new warnings. I think we should address them in a different
> patch. In my opinion it shouldn't block this patch. In the end it only add
> as compatible here.

I disagree if it's the schema that needs fixing. From the looks of
it, I'd say it's probably at least some schema fixes needed.

>
> Regards,
> Matthias
>
> > Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> > This will change in the future.
> >
> > Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
> >
> >
> > pwm@1100e000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+'

Are you saying the MT6795 has no power-domains?

> > arch/arm64/boot/dts/mediatek/mt8183-evb.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel14-sku2.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku6.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-fennel-sku7.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-juniper-sku16.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kappa.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku0.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow-sku1.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-kakadu-sku22.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku16.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku272.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku288.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-kodama-sku32.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dtb
> > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dtb
> >
> > pwm@1400a000: compatible: 'oneOf' conditional failed, one must be fixed:
> > arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb
> > arch/arm/boot/dts/mt7623n-rfb-emmc.dtb
> >
> > pwm@1401e000: compatible: 'oneOf' conditional failed, one must be fixed:
> > arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
> > arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
> > arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
> > arch/arm64/boot/dts/mediatek/mt8173-evb.dtb
> >
> > pwm@1401f000: compatible: 'oneOf' conditional failed, one must be fixed:
> > arch/arm64/boot/dts/mediatek/mt8173-elm.dtb
> > arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtb
> > arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dtb
> > arch/arm64/boot/dts/mediatek/mt8173-evb.dtb

The commit message says the MT6795 is the same as the MT8173. Which is
wrong here, the dtb or the schema?

Rob

2023-04-18 12:09:58

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795



On 14/04/2023 07:43, Uwe Kleine-König wrote:
> Hello,
>
> On Wed, Apr 12, 2023 at 01:27:13PM +0200, AngeloGioacchino Del Regno wrote:
>> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
>> block: this is the same as MT8173.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>
> Acked-by: Uwe Kleine-König <[email protected]>
>
> I assume this patch will go in together with the other patches in this
> series via an ARM tree? (I.e. not via pwm.)
>

That's totally fine, I'll take this patch through my tree once everything is ready.

Regards,
Matthias

2023-05-29 14:01:44

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 17/27] arm64: dts: mediatek: mt6795: Add MMSYS node for multimedia clocks



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add the MultiMedia System node, providing clocks for the multimedia
> hardware blocks and their IOMMU/SMIs.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks

> ---
> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> index 99cc4918e6ba..a8b2c4517e79 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> @@ -635,6 +635,19 @@ mmc3: mmc@11260000 {
> status = "disabled";
> };
>
> + mmsys: syscon@14000000 {
> + compatible = "mediatek,mt6795-mmsys", "syscon";
> + reg = <0 0x14000000 0 0x1000>;
> + power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
> + assigned-clocks = <&topckgen CLK_TOP_MM_SEL>;
> + assigned-clock-rates = <400000000>;
> + #clock-cells = <1>;
> + #reset-cells = <1>;
> + mboxes = <&gce 0 CMDQ_THR_PRIO_HIGHEST>,
> + <&gce 1 CMDQ_THR_PRIO_HIGHEST>;
> + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>;
> + };
> +
> vdecsys: clock-controller@16000000 {
> compatible = "mediatek,mt6795-vdecsys";
> reg = <0 0x16000000 0 0x1000>;

2023-05-29 14:06:13

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 01/27] dt-bindings: pwm: Add compatible for MediaTek MT6795



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for MediaTek Helio X10 MT6795's display PWM
> block: this is the same as MT8173.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks!

> ---
> Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> index 0088bc8e7c54..153e146df7d4 100644
> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> @@ -22,7 +22,9 @@ properties:
> - mediatek,mt8173-disp-pwm
> - mediatek,mt8183-disp-pwm
> - items:
> - - const: mediatek,mt8167-disp-pwm
> + - enum:
> + - mediatek,mt6795-disp-pwm
> + - mediatek,mt8167-disp-pwm
> - const: mediatek,mt8173-disp-pwm
> - items:
> - enum:

2023-05-29 14:08:48

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 25/27] arm64: dts: mediatek: mt6795-xperia-m5: Add eMMC, MicroSD slot, SDIO



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Configure and enable the MMC0/1/2 controllers, used for the eMMC chip,
> MicroSD card slot and SDIO (WiFi) respectively.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks

> ---
> .../dts/mediatek/mt6795-sony-xperia-m5.dts | 91 +++++++++++++++++++
> 1 file changed, 91 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> index debe0f2553d9..155a573eac4c 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> @@ -17,6 +17,7 @@ / {
> aliases {
> mmc0 = &mmc0;
> mmc1 = &mmc1;
> + mmc2 = &mmc2;
> serial0 = &uart0;
> serial1 = &uart1;
> };
> @@ -121,7 +122,97 @@ proximity@48 {
> };
> };
>
> +&mmc0 {
> + /* eMMC controller */
> + mediatek,latch-ck = <0x14>; /* hs400 */
> + mediatek,hs200-cmd-int-delay = <1>;
> + mediatek,hs400-cmd-int-delay = <1>;
> + mediatek,hs400-ds-dly3 = <0x1a>;
> + non-removable;
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc0_pins_default>;
> + pinctrl-1 = <&mmc0_pins_uhs>;
> + vmmc-supply = <&mt6331_vemc33_reg>;
> + vqmmc-supply = <&mt6331_vio18_reg>;
> + status = "okay";
> +};
> +
> +&mmc1 {
> + /* MicroSD card slot */
> + vmmc-supply = <&mt6331_vmc_reg>;
> + vqmmc-supply = <&mt6331_vmch_reg>;
> + status = "okay";
> +};
> +
> +&mmc2 {
> + /* SDIO WiFi on MMC2 */
> + vmmc-supply = <&mt6331_vmc_reg>;
> + vqmmc-supply = <&mt6331_vmch_reg>;
> + status = "okay";
> +};
> +
> &pio {
> + mmc0_pins_default: emmc-sdr-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>,
> + <PINMUX_GPIO155__FUNC_MSDC0_DAT1>,
> + <PINMUX_GPIO156__FUNC_MSDC0_DAT2>,
> + <PINMUX_GPIO157__FUNC_MSDC0_DAT3>,
> + <PINMUX_GPIO158__FUNC_MSDC0_DAT4>,
> + <PINMUX_GPIO159__FUNC_MSDC0_DAT5>,
> + <PINMUX_GPIO160__FUNC_MSDC0_DAT6>,
> + <PINMUX_GPIO161__FUNC_MSDC0_DAT7>,
> + <PINMUX_GPIO162__FUNC_MSDC0_CMD>;
> + input-enable;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + pins-clk {
> + pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + pins-rst {
> + pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
> + };
> + };
> +
> + mmc0_pins_uhs: emmc-uhs-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>,
> + <PINMUX_GPIO155__FUNC_MSDC0_DAT1>,
> + <PINMUX_GPIO156__FUNC_MSDC0_DAT2>,
> + <PINMUX_GPIO157__FUNC_MSDC0_DAT3>,
> + <PINMUX_GPIO158__FUNC_MSDC0_DAT4>,
> + <PINMUX_GPIO159__FUNC_MSDC0_DAT5>,
> + <PINMUX_GPIO160__FUNC_MSDC0_DAT6>,
> + <PINMUX_GPIO161__FUNC_MSDC0_DAT7>,
> + <PINMUX_GPIO162__FUNC_MSDC0_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_6mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + pins-clk {
> + pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>;
> + drive-strength = <MTK_DRIVE_6mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + pins-rst {
> + pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>;
> + drive-strength = <MTK_DRIVE_6mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + pins-ds {
> + pinmux = <PINMUX_GPIO164__FUNC_MSDC0_DSL>;
> + drive-strength = <MTK_DRIVE_6mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> + };
> +
> nfc_pins: nfc-pins {
> pins-irq {
> pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;

2023-05-29 14:08:56

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 16/27] arm64: dts: mediatek: mt6795: Add support for the CMDQ/GCE mailbox



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> In preparation for adding multimedia blocks, add the CMDQ/GCE mailbox.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks

> ---
> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> index 090400d7fd61..99cc4918e6ba 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> @@ -7,6 +7,7 @@
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/mediatek,mt6795-clk.h>
> +#include <dt-bindings/gce/mediatek,mt6795-gce.h>
> #include <dt-bindings/pinctrl/mt6795-pinfunc.h>
> #include <dt-bindings/power/mt6795-power.h>
> #include <dt-bindings/reset/mediatek,mt6795-resets.h>
> @@ -401,6 +402,15 @@ fhctl: clock-controller@10209f00 {
> status = "disabled";
> };
>
> + gce: mailbox@10212000 {
> + compatible = "mediatek,mt6795-gce", "mediatek,mt8173-gce";
> + reg = <0 0x10212000 0 0x1000>;
> + interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&infracfg CLK_INFRA_GCE>;
> + clock-names = "gce";
> + #mbox-cells = <2>;
> + };
> +
> gic: interrupt-controller@10221000 {
> compatible = "arm,gic-400";
> #interrupt-cells = <3>;

2023-05-29 14:09:42

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 21/27] arm64: dts: mediatek: mt6795: Add PMIC Wrapper node



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add the pwrap node: this is used to communicate with the PMIC(s).
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied thanks!

> ---
> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> index 50d9276d18c6..29ca9a7bf0b3 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> @@ -391,6 +391,17 @@ timer: timer@10008000 {
> clocks = <&system_clk>, <&clk32k>;
> };
>
> + pwrap: pwrap@1000d000 {
> + compatible = "mediatek,mt6795-pwrap";
> + reg = <0 0x1000d000 0 0x1000>;
> + reg-names = "pwrap";
> + interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
> + resets = <&infracfg MT6795_INFRA_RST0_PMIC_WRAP_RST>;
> + reset-names = "pwrap";
> + clocks = <&topckgen CLK_TOP_PMICSPI_SEL>, <&clk26m>;
> + clock-names = "spi", "wrap";
> + };
> +
> sysirq: intpol-controller@10200620 {
> compatible = "mediatek,mt6795-sysirq",
> "mediatek,mt6577-sysirq";

2023-05-29 14:10:02

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 23/27] arm64: dts: mediatek: Add MT6331 PMIC devicetree



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> MT6331 is the primary PMIC for the MediaTek Helio X10 MT6795 smartphone
> platforms: add a devicetree describing its regulators, Real Time Clock
> and PMIC-keys.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks


> ---
> arch/arm64/boot/dts/mediatek/mt6331.dtsi | 284 +++++++++++++++++++++++
> 1 file changed, 289 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt6331.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6331.dtsi b/arch/arm64/boot/dts/mediatek/mt6331.dtsi
> new file mode 100644
> index 000000000000..fcec8c07fe39
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt6331.dtsi
> @@ -0,0 +1,284 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (c) 2023 Collabora Ltd.
> + * Author: AngeloGioacchino Del Regno <[email protected]>
> + */
> +#include <dt-bindings/input/input.h>
> +
> +&pwrap {
> + pmic: mt6331 {
> + compatible = "mediatek,mt6331";
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + mt6331regulator: mt6331regulator {
> + compatible = "mediatek,mt6331-regulator";
> +
> + mt6331_vdvfs11_reg: buck-vdvfs11 {
> + regulator-name = "vdvfs11";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <1493750>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <0>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6331_vdvfs12_reg: buck-vdvfs12 {
> + regulator-name = "vdvfs12";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <1493750>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <0>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6331_vdvfs13_reg: buck-vdvfs13 {
> + regulator-name = "vdvfs13";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <1493750>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <0>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6331_vdvfs14_reg: buck-vdvfs14 {
> + regulator-name = "vdvfs14";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <1493750>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <0>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6331_vcore2_reg: buck-vcore2 {
> + regulator-name = "vcore2";
> + regulator-min-microvolt = <700000>;
> + regulator-max-microvolt = <1493750>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <0>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6331_vio18_reg: buck-vio18 {
> + regulator-name = "vio18";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <0>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6331_vtcxo1_reg: ldo-vtcxo1 {
> + regulator-name = "vtcxo1";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <2800000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + mt6331_vtcxo2_reg: ldo-vtcxo2 {
> + regulator-name = "vtcxo2";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <2800000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + mt6331_avdd32_aud_reg: ldo-avdd32aud {
> + regulator-name = "avdd32_aud";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <3200000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + mt6331_vauxa32_reg: ldo-vauxa32 {
> + regulator-name = "vauxa32";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <3200000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vcama_reg: ldo-vcama {
> + regulator-name = "vcama";
> + regulator-min-microvolt = <1500000>;
> + regulator-max-microvolt = <2800000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vio28_reg: ldo-vio28 {
> + regulator-name = "vio28";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <2800000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + mt6331_vcamaf_reg: ldo-vcamaf {
> + regulator-name = "vcam_af";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vmc_reg: ldo-vmc {
> + regulator-name = "vmc";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vmch_reg: ldo-vmch {
> + regulator-name = "vmch";
> + regulator-min-microvolt = <3000000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vemc33_reg: ldo-vemc33 {
> + regulator-name = "vemc33";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vgp1_reg: ldo-vgp1 {
> + regulator-name = "vgp1";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vsim1_reg: ldo-vsim1 {
> + regulator-name = "vsim1";
> + regulator-min-microvolt = <1700000>;
> + regulator-max-microvolt = <3100000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vsim2_reg: ldo-vsim2 {
> + regulator-name = "vsim2";
> + regulator-min-microvolt = <1700000>;
> + regulator-max-microvolt = <3100000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vmipi_reg: ldo-vmipi {
> + regulator-name = "vmipi";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vibr_reg: ldo-vibr {
> + regulator-name = "vibr";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vgp4_reg: ldo-vgp4 {
> + regulator-name = "vgp4";
> + regulator-min-microvolt = <1600000>;
> + regulator-max-microvolt = <2200000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vcamd_reg: ldo-vcamd {
> + regulator-name = "vcamd";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <1500000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vusb10_reg: ldo-vusb10 {
> + regulator-name = "vusb";
> + regulator-min-microvolt = <1000000>;
> + regulator-max-microvolt = <1300000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + mt6331_vcamio_reg: ldo-vcamio {
> + regulator-name = "vcam_io";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-ramp-delay = <0>;
> + };
> +
> + mt6331_vsram_reg: ldo-vsram {
> + regulator-name = "vsram";
> + regulator-min-microvolt = <1012500>;
> + regulator-max-microvolt = <1012500>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + mt6331_vgp2_reg: ldo-vgp2 {
> + regulator-name = "vgp2";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1500000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + mt6331_vgp3_reg: ldo-vgp3 {
> + regulator-name = "vgp3";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vrtc_reg: ldo-vrtc {
> + regulator-name = "vrtc";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <2800000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> +
> + mt6331_vdig18_reg: ldo-vdig18 {
> + regulator-name = "dvdd18_dig";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-ramp-delay = <0>;
> + regulator-always-on;
> + };
> + };
> +
> + mt6331rtc: mt6331rtc {
> + compatible = "mediatek,mt6331-rtc";
> + };
> +
> + mt6331keys: mt6331keys {
> + compatible = "mediatek,mt6331-keys";
> + power {
> + linux,keycodes = <KEY_POWER>;
> + wakeup-source;
> + };
> + home {
> + linux,keycodes = <KEY_HOME>;
> + };
> + };
> + };
> +};

2023-05-29 14:10:22

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 18/27] arm64: dts: mediatek: mt6795: Add support for IOMMU and LARBs



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add nodes for the multimedia IOMMU and its LARBs: this includes all but
> the MJC LARB, which cannot currently be used and will be added later.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks

> ---
> arch/arm64/boot/dts/mediatek/mt6795.dtsi | 60 ++++++++++++++++++++++++
> 1 file changed, 60 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> index a8b2c4517e79..9cfa02085f61 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
> @@ -8,6 +8,7 @@
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/mediatek,mt6795-clk.h>
> #include <dt-bindings/gce/mediatek,mt6795-gce.h>
> +#include <dt-bindings/memory/mt6795-larb-port.h>
> #include <dt-bindings/pinctrl/mt6795-pinfunc.h>
> #include <dt-bindings/power/mt6795-power.h>
> #include <dt-bindings/reset/mediatek,mt6795-resets.h>
> @@ -390,6 +391,17 @@ systimer: timer@10200670 {
> clock-names = "clk13m";
> };
>
> + iommu: iommu@10205000 {
> + compatible = "mediatek,mt6795-m4u";
> + reg = <0 0x10205000 0 0x1000>;
> + clocks = <&infracfg CLK_INFRA_M4U>;
> + clock-names = "bclk";
> + interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_LOW>;
> + mediatek,larbs = <&larb0 &larb1 &larb2 &larb3>;
> + power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
> + #iommu-cells = <1>;
> + };
> +
> apmixedsys: syscon@10209000 {
> compatible = "mediatek,mt6795-apmixedsys", "syscon";
> reg = <0 0x10209000 0 0x1000>;
> @@ -648,16 +660,64 @@ mmsys: syscon@14000000 {
> mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>;
> };
>
> + larb0: larb@14021000 {
> + compatible = "mediatek,mt6795-smi-larb";
> + reg = <0 0x14021000 0 0x1000>;
> + clocks = <&mmsys CLK_MM_SMI_COMMON>, <&mmsys CLK_MM_SMI_LARB0>;
> + clock-names = "apb", "smi";
> + mediatek,smi = <&smi_common>;
> + mediatek,larb-id = <0>;
> + power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
> + };
> +
> + smi_common: smi@14022000 {
> + compatible = "mediatek,mt6795-smi-common";
> + reg = <0 0x14022000 0 0x1000>;
> + power-domains = <&spm MT6795_POWER_DOMAIN_MM>;
> + clocks = <&infracfg CLK_INFRA_SMI>, <&mmsys CLK_MM_SMI_COMMON>;
> + clock-names = "apb", "smi";
> + };
> +
> + larb2: larb@15001000 {
> + compatible = "mediatek,mt6795-smi-larb";
> + reg = <0 0x15001000 0 0x1000>;
> + clocks = <&mmsys CLK_MM_SMI_COMMON>, <&infracfg CLK_INFRA_SMI>;
> + clock-names = "apb", "smi";
> + mediatek,smi = <&smi_common>;
> + mediatek,larb-id = <2>;
> + power-domains = <&spm MT6795_POWER_DOMAIN_ISP>;
> + };
> +
> vdecsys: clock-controller@16000000 {
> compatible = "mediatek,mt6795-vdecsys";
> reg = <0 0x16000000 0 0x1000>;
> #clock-cells = <1>;
> };
>
> + larb1: larb@16010000 {
> + compatible = "mediatek,mt6795-smi-larb";
> + reg = <0 0x16010000 0 0x1000>;
> + mediatek,smi = <&smi_common>;
> + mediatek,larb-id = <1>;
> + clocks = <&vdecsys CLK_VDEC_CKEN>, <&vdecsys CLK_VDEC_LARB_CKEN>;
> + clock-names = "apb", "smi";
> + power-domains = <&spm MT6795_POWER_DOMAIN_VDEC>;
> + };
> +
> vencsys: clock-controller@18000000 {
> compatible = "mediatek,mt6795-vencsys";
> reg = <0 0x18000000 0 0x1000>;
> #clock-cells = <1>;
> };
> +
> + larb3: larb@18001000 {
> + compatible = "mediatek,mt6795-smi-larb";
> + reg = <0 0x18001000 0 0x1000>;
> + clocks = <&vencsys CLK_VENC_VENC>, <&vencsys CLK_VENC_LARB>;
> + clock-names = "apb", "smi";
> + mediatek,smi = <&smi_common>;
> + mediatek,larb-id = <3>;
> + power-domains = <&spm MT6795_POWER_DOMAIN_VENC>;
> + };
> };
> };

2023-05-29 14:11:08

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 02/27] dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10



On 14/04/2023 10:22, Krzysztof Kozlowski wrote:
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
>> Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
>> the same DSI PHY as MT8173.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>> Documentation/devicetree/bindings/phy/mediatek,dsi-phy.yaml | 4 ++++
>> 1 file changed, 4 insertions(+)
>
> Acked-by: Krzysztof Kozlowski <[email protected]>
>
> Best regards,
> Krzysztof
>

Applied, thanks!

2023-05-29 14:12:49

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795

Hi Chun-Kuang Hu,

Can you help to merge the missing DT-binding patches in this series?

Thanks a lot,
Matthias

On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
> the same parameters as MT8183.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> .../display/mediatek/mediatek,dpi.yaml | 23 +++++++++++--------
> 1 file changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> index d976380801e3..803c00f26206 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> @@ -17,15 +17,20 @@ description: |
>
> properties:
> compatible:
> - enum:
> - - mediatek,mt2701-dpi
> - - mediatek,mt7623-dpi
> - - mediatek,mt8173-dpi
> - - mediatek,mt8183-dpi
> - - mediatek,mt8186-dpi
> - - mediatek,mt8188-dp-intf
> - - mediatek,mt8192-dpi
> - - mediatek,mt8195-dp-intf
> + oneOf:
> + - enum:
> + - mediatek,mt2701-dpi
> + - mediatek,mt7623-dpi
> + - mediatek,mt8173-dpi
> + - mediatek,mt8183-dpi
> + - mediatek,mt8186-dpi
> + - mediatek,mt8188-dp-intf
> + - mediatek,mt8192-dpi
> + - mediatek,mt8195-dp-intf
> + - items:
> + - enum:
> + - mediatek,mt6795-dpi
> + - const: mediatek,mt8183-dpi
>
> reg:
> maxItems: 1

2023-05-29 14:27:46

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 24/27] arm64: dts: mediatek: mt6795-xperia-m5: Add MT6331 Combo PMIC



On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> This smartphone uses the Helio X10 standard MT6331+MT6332 combo PMICs:
> include the mt6331 devicetree and add the required interrupt.
>
> Note that despite there being two interrupts, one for MT6331 and one
> for MT6332, in configurations using the companion PMIC, the interrupt
> of the latter fires for both events on MT6331 and for ones on MT6332,
> while the interrupt for the main PMIC fires only for events of the
> main PMIC.
>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Applied, thanks

> ---
> arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> index a0e01a756f03..debe0f2553d9 100644
> --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts
> @@ -7,6 +7,7 @@
> /dts-v1/;
> #include <dt-bindings/gpio/gpio.h>
> #include "mt6795.dtsi"
> +#include "mt6331.dtsi"
>
> / {
> model = "Sony Xperia M5";
> @@ -219,6 +220,15 @@ pins-tx {
> };
> };
>
> +&pmic {
> + /*
> + * Smartphones, including the Xperia M5, are equipped with a companion
> + * MT6332 PMIC: when this is present, the main MT6331 PMIC will fire
> + * an interrupt on the companion, so we use the MT6332 IRQ GPIO.
> + */
> + interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
> +};
> +
> &uart0 {
> status = "okay";
>

2023-06-13 00:46:03

by Chun-Kuang Hu

[permalink] [raw]
Subject: Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795

Hi, Matthias:

Matthias Brugger <[email protected]> 於 2023年5月29日 週一 下午10:07寫道:
>
> Hi Chun-Kuang Hu,
>
> Can you help to merge the missing DT-binding patches in this series?

Apply display binding of this series to mediatek-drm-next [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

>
> Thanks a lot,
> Matthias
>
> On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote:
> > Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using
> > the same parameters as MT8183.
> >
> > Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> > ---
> > .../display/mediatek/mediatek,dpi.yaml | 23 +++++++++++--------
> > 1 file changed, 14 insertions(+), 9 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> > index d976380801e3..803c00f26206 100644
> > --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> > +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
> > @@ -17,15 +17,20 @@ description: |
> >
> > properties:
> > compatible:
> > - enum:
> > - - mediatek,mt2701-dpi
> > - - mediatek,mt7623-dpi
> > - - mediatek,mt8173-dpi
> > - - mediatek,mt8183-dpi
> > - - mediatek,mt8186-dpi
> > - - mediatek,mt8188-dp-intf
> > - - mediatek,mt8192-dpi
> > - - mediatek,mt8195-dp-intf
> > + oneOf:
> > + - enum:
> > + - mediatek,mt2701-dpi
> > + - mediatek,mt7623-dpi
> > + - mediatek,mt8173-dpi
> > + - mediatek,mt8183-dpi
> > + - mediatek,mt8186-dpi
> > + - mediatek,mt8188-dp-intf
> > + - mediatek,mt8192-dpi
> > + - mediatek,mt8195-dp-intf
> > + - items:
> > + - enum:
> > + - mediatek,mt6795-dpi
> > + - const: mediatek,mt8183-dpi
> >
> > reg:
> > maxItems: 1