2022-08-11 03:44:37

by Tinghan Shen

[permalink] [raw]
Subject: [PATCH v6 00/20] Add driver nodes for MT8195 SoC

Add driver nodes for MT8195 SoC.

---
v5 -> v6:
- rebased on linux-next/next-20220809
- update the if/else condition comment in iommu.yaml
- some v5 patches are corrupted caused by extra line wrapping

v4 -> v5:
- rebased on linux-next/next-20220802
- fix indentation in scpsys.yaml
- rewrite if/else condition for infra iommu in iommu.yaml
- remove unused clock from infra iommu node

v3 -> v4:
- remove unit address of power-controller node name from v3 scpsys bindings
- v3 patchset 7 and v3 patchset 6 are combined as v4 patchset 6
- add more commit descriptions for updating mt81xx scpsys node

v2 -> v3:
- fix dsp node name
- add descriptions for iommu interrupts
- limit the levels of power domain nodes
- update maintainer list of power controller yaml
- support naming power controller node with unit address
- add SoC specific compatible string to scpsys yaml

v1 -> v2:
- add new dt-bindings: mfd/mediatek,scpsys.yaml
- update compatible string for mt81xx scpsys nodes
- apply comments for yaml files: iommu, smi-common, and power-controller
- apply comments for dts nodes: power domain, vdosys0.
- apply comments for commit message of watchdog, i2c, and smi-common.
- add review-by tags

---
Jason-JH.Lin (2):
arm64: dts: mt8195: Add gce node
arm64: dts: mt8195: Add display node for vdosys0

Tinghan Shen (14):
dt-bindings: iommu: mediatek: Increase max interrupt number
dt-bindings: memory: mediatek: Update condition for mt8195 smi node
dt-bindings: power: mediatek: Refine multiple level power domain nodes
dt-bindings: power: mediatek: Support naming power controller node
with unit address
dt-bindings: power: mediatek: Update maintainer list
dt-bindings: power: mediatek: Add bindings for MediaTek SCPSYS
arm64: dts: mediatek: Update mt81xx scpsys node to align with
dt-bindings
arm64: dts: mt8195: Disable watchdog external reset signal
arm64: dts: mt8195: Add vdosys and vppsys clock nodes
arm64: dts: mt8195: Add power domains controller
arm64: dts: mt8195: Add spmi node
arm64: dts: mt8195: Add scp node
arm64: dts: mt8195: Add audio related nodes
arm64: dts: mt8195: Add iommu and smi nodes

Trevor Wu (1):
arm64: dts: mt8195: Specify audio reset controller

Tzung-Bi Shih (1):
arm64: dts: mt8195: Disable I2C0 node

YC Hung (1):
arm64: dts: mt8195: Add adsp node and adsp mailbox nodes

YT Lee (1):
arm64: dts: mt8195: Add cpufreq node

.../bindings/iommu/mediatek,iommu.yaml | 29 +-
.../mediatek,smi-common.yaml | 11 +-
.../bindings/mfd/mediatek,mt8195-scpsys.yaml | 67 ++
.../power/mediatek,power-controller.yaml | 137 +--
arch/arm64/boot/dts/mediatek/mt8167.dtsi | 3 +-
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 3 +-
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 +-
arch/arm64/boot/dts/mediatek/mt8192.dtsi | 3 +-
arch/arm64/boot/dts/mediatek/mt8195.dtsi | 1054 ++++++++++++++++-
9 files changed, 1176 insertions(+), 134 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt8195-scpsys.yaml

--
2.18.0


2022-08-11 03:46:03

by Tinghan Shen

[permalink] [raw]
Subject: [PATCH v6 15/20] arm64: dts: mt8195: Add audio related nodes

Add audio related nodes for mt8195.

Signed-off-by: Trevor Wu <[email protected]>
Signed-off-by: Tinghan Shen <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt8195.dtsi | 58 ++++++++++++++++++++++++
1 file changed, 58 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index d10db01a360aa..bbea0acff3d2f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -226,6 +226,17 @@
<&cpu4>, <&cpu5>, <&cpu6>, <&cpu7>;
};

+ dmic_codec: dmic-codec {
+ compatible = "dmic-codec";
+ num-channels = <2>;
+ wakeup-delay-ms = <50>;
+ };
+
+ sound: mt8195-sound {
+ mediatek,platform = <&afe>;
+ status = "disabled";
+ };
+
clk26m: oscillator-26m {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -728,6 +739,53 @@
#clock-cells = <1>;
};

+ afe: mt8195-afe-pcm@10890000 {
+ compatible = "mediatek,mt8195-audio";
+ reg = <0 0x10890000 0 0x10000>;
+ mediatek,topckgen = <&topckgen>;
+ power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>;
+ interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&clk26m>,
+ <&apmixedsys CLK_APMIXED_APLL1>,
+ <&apmixedsys CLK_APMIXED_APLL2>,
+ <&topckgen CLK_TOP_APLL12_DIV0>,
+ <&topckgen CLK_TOP_APLL12_DIV1>,
+ <&topckgen CLK_TOP_APLL12_DIV2>,
+ <&topckgen CLK_TOP_APLL12_DIV3>,
+ <&topckgen CLK_TOP_APLL12_DIV9>,
+ <&topckgen CLK_TOP_A1SYS_HP>,
+ <&topckgen CLK_TOP_AUD_INTBUS>,
+ <&topckgen CLK_TOP_AUDIO_H>,
+ <&topckgen CLK_TOP_AUDIO_LOCAL_BUS>,
+ <&topckgen CLK_TOP_DPTX_MCK>,
+ <&topckgen CLK_TOP_I2SO1_MCK>,
+ <&topckgen CLK_TOP_I2SO2_MCK>,
+ <&topckgen CLK_TOP_I2SI1_MCK>,
+ <&topckgen CLK_TOP_I2SI2_MCK>,
+ <&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>,
+ <&scp_adsp CLK_SCP_ADSP_AUDIODSP>;
+ clock-names = "clk26m",
+ "apll1_ck",
+ "apll2_ck",
+ "apll12_div0",
+ "apll12_div1",
+ "apll12_div2",
+ "apll12_div3",
+ "apll12_div9",
+ "a1sys_hp_sel",
+ "aud_intbus_sel",
+ "audio_h_sel",
+ "audio_local_bus_sel",
+ "dptx_m_sel",
+ "i2so1_m_sel",
+ "i2so2_m_sel",
+ "i2si1_m_sel",
+ "i2si2_m_sel",
+ "infra_ao_audio_26m_b",
+ "scp_adsp_audiodsp";
+ status = "disabled";
+ };
+
uart0: serial@11001100 {
compatible = "mediatek,mt8195-uart",
"mediatek,mt6577-uart";
--
2.18.0

2022-08-11 03:59:14

by Tinghan Shen

[permalink] [raw]
Subject: [PATCH v6 07/20] arm64: dts: mediatek: Update mt81xx scpsys node to align with dt-bindings

Update scpsys nodes using simple-mfd in mt81xx SoC devicetree
to align with the bindings.

Add specific compatibles for syscon node, even it's a dummy compatible,
because syscon node must come with a specific compatible.

Remove the '#power-domain-cells" propertry since the simple-mfd node is
not the power domain provider; the provider is the child node.

Signed-off-by: Tinghan Shen <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt8167.dtsi | 3 +--
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 3 +--
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 +--
arch/arm64/boot/dts/mediatek/mt8192.dtsi | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
index 54655f2feb04d..fbe1a1128cc6a 100644
--- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
@@ -36,9 +36,8 @@
};

scpsys: syscon@10006000 {
- compatible = "syscon", "simple-mfd";
+ compatible = "mediatek,mt8167-scpsys", "syscon", "simple-mfd";
reg = <0 0x10006000 0 0x1000>;
- #power-domain-cells = <1>;

spm: power-controller {
compatible = "mediatek,mt8167-power-controller";
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 6d9513c1f5bfb..b4d48f8b7eebb 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -444,9 +444,8 @@
};

scpsys: syscon@10006000 {
- compatible = "syscon", "simple-mfd";
+ compatible = "mediatek,mt8173-scpsys", "syscon", "simple-mfd";
reg = <0 0x10006000 0 0x1000>;
- #power-domain-cells = <1>;

/* System Power Manager */
spm: power-controller {
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 9d32871973a29..28d84f0054ee0 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -761,9 +761,8 @@
};

scpsys: syscon@10006000 {
- compatible = "syscon", "simple-mfd";
+ compatible = "mediatek,mt8183-scpsys", "syscon", "simple-mfd";
reg = <0 0x10006000 0 0x1000>;
- #power-domain-cells = <1>;

/* System Power Manager */
spm: power-controller {
diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
index cbae5a5ee4a0b..8cd5906fe3a89 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
@@ -306,9 +306,8 @@
};

scpsys: syscon@10006000 {
- compatible = "syscon", "simple-mfd";
+ compatible = "mediatek,mt8192-scpsys", "syscon", "simple-mfd";
reg = <0 0x10006000 0 0x1000>;
- #power-domain-cells = <1>;

/* System Power Manager */
spm: power-controller {
--
2.18.0

2022-08-25 15:04:24

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH v6 00/20] Add driver nodes for MT8195 SoC



On 11/08/2022 04:57, Tinghan Shen wrote:
> Add driver nodes for MT8195 SoC.
>

Applied 7-20 of this series.
Patches 3-5 were taken from v4 by accident but AFAICS didn't change.

Thanks,
Matthias

> ---
> v5 -> v6:
> - rebased on linux-next/next-20220809
> - update the if/else condition comment in iommu.yaml
> - some v5 patches are corrupted caused by extra line wrapping
>
> v4 -> v5:
> - rebased on linux-next/next-20220802
> - fix indentation in scpsys.yaml
> - rewrite if/else condition for infra iommu in iommu.yaml
> - remove unused clock from infra iommu node
>
> v3 -> v4:
> - remove unit address of power-controller node name from v3 scpsys bindings
> - v3 patchset 7 and v3 patchset 6 are combined as v4 patchset 6
> - add more commit descriptions for updating mt81xx scpsys node
>
> v2 -> v3:
> - fix dsp node name
> - add descriptions for iommu interrupts
> - limit the levels of power domain nodes
> - update maintainer list of power controller yaml
> - support naming power controller node with unit address
> - add SoC specific compatible string to scpsys yaml
>
> v1 -> v2:
> - add new dt-bindings: mfd/mediatek,scpsys.yaml
> - update compatible string for mt81xx scpsys nodes
> - apply comments for yaml files: iommu, smi-common, and power-controller
> - apply comments for dts nodes: power domain, vdosys0.
> - apply comments for commit message of watchdog, i2c, and smi-common.
> - add review-by tags
>
> ---
> Jason-JH.Lin (2):
> arm64: dts: mt8195: Add gce node
> arm64: dts: mt8195: Add display node for vdosys0
>
> Tinghan Shen (14):
> dt-bindings: iommu: mediatek: Increase max interrupt number
> dt-bindings: memory: mediatek: Update condition for mt8195 smi node
> dt-bindings: power: mediatek: Refine multiple level power domain nodes
> dt-bindings: power: mediatek: Support naming power controller node
> with unit address
> dt-bindings: power: mediatek: Update maintainer list
> dt-bindings: power: mediatek: Add bindings for MediaTek SCPSYS
> arm64: dts: mediatek: Update mt81xx scpsys node to align with
> dt-bindings
> arm64: dts: mt8195: Disable watchdog external reset signal
> arm64: dts: mt8195: Add vdosys and vppsys clock nodes
> arm64: dts: mt8195: Add power domains controller
> arm64: dts: mt8195: Add spmi node
> arm64: dts: mt8195: Add scp node
> arm64: dts: mt8195: Add audio related nodes
> arm64: dts: mt8195: Add iommu and smi nodes
>
> Trevor Wu (1):
> arm64: dts: mt8195: Specify audio reset controller
>
> Tzung-Bi Shih (1):
> arm64: dts: mt8195: Disable I2C0 node
>
> YC Hung (1):
> arm64: dts: mt8195: Add adsp node and adsp mailbox nodes
>
> YT Lee (1):
> arm64: dts: mt8195: Add cpufreq node
>
> .../bindings/iommu/mediatek,iommu.yaml | 29 +-
> .../mediatek,smi-common.yaml | 11 +-
> .../bindings/mfd/mediatek,mt8195-scpsys.yaml | 67 ++
> .../power/mediatek,power-controller.yaml | 137 +--
> arch/arm64/boot/dts/mediatek/mt8167.dtsi | 3 +-
> arch/arm64/boot/dts/mediatek/mt8173.dtsi | 3 +-
> arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 +-
> arch/arm64/boot/dts/mediatek/mt8192.dtsi | 3 +-
> arch/arm64/boot/dts/mediatek/mt8195.dtsi | 1054 ++++++++++++++++-
> 9 files changed, 1176 insertions(+), 134 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt8195-scpsys.yaml
>