2019-09-05 17:04:47

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH 0/5] arm64: dts: meson: audio updates

The patchset features a few updates to prepare the addition of the audio
on sm1. It fixes the register range of audio fifo which was incorrect.

It also create another layer of dtsi, common to g12a and g12b but not sm1.
The audio related device are moved to this file.

This was done because the audio bus, which was at 0xff642000 on g12, has
moved 0xff660000 on sm1. Overwriting the reg property was option but it
would have left confusing node names on the sm1.

Jerome Brunet (5):
arm64: dts: meson: axg: fix audio fifo reg size
arm64: dts: meson: g12: fix audio fifo reg size
arm64: dts: meson: g12: add a g12 layer
arm64: dts: meson: g12: factor the power domain.
arm64: dts: meson: g12: move audio bus out of g12-common

arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 12 +-
.../boot/dts/amlogic/meson-g12-common.dtsi | 320 ----------------
arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 344 ++++++++++++++++++
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 15 +-
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 14 +-
5 files changed, 352 insertions(+), 353 deletions(-)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12.dtsi

--
2.21.0


2019-09-05 17:09:22

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH 1/5] arm64: dts: meson: axg: fix audio fifo reg size

The register region size initially is too small to access all
the fifo registers.

Fixes: f2b8f6a93357 ("arm64: dts: meson-axg: add audio fifos")
Signed-off-by: Jerome Brunet <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index 82919b106010..bb4a2acb9970 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -1162,7 +1162,7 @@

toddr_a: audio-controller@100 {
compatible = "amlogic,axg-toddr";
- reg = <0x0 0x100 0x0 0x1c>;
+ reg = <0x0 0x100 0x0 0x2c>;
#sound-dai-cells = <0>;
sound-name-prefix = "TODDR_A";
interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>;
@@ -1173,7 +1173,7 @@

toddr_b: audio-controller@140 {
compatible = "amlogic,axg-toddr";
- reg = <0x0 0x140 0x0 0x1c>;
+ reg = <0x0 0x140 0x0 0x2c>;
#sound-dai-cells = <0>;
sound-name-prefix = "TODDR_B";
interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>;
@@ -1184,7 +1184,7 @@

toddr_c: audio-controller@180 {
compatible = "amlogic,axg-toddr";
- reg = <0x0 0x180 0x0 0x1c>;
+ reg = <0x0 0x180 0x0 0x2c>;
#sound-dai-cells = <0>;
sound-name-prefix = "TODDR_C";
interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>;
@@ -1195,7 +1195,7 @@

frddr_a: audio-controller@1c0 {
compatible = "amlogic,axg-frddr";
- reg = <0x0 0x1c0 0x0 0x1c>;
+ reg = <0x0 0x1c0 0x0 0x2c>;
#sound-dai-cells = <0>;
sound-name-prefix = "FRDDR_A";
interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
@@ -1206,7 +1206,7 @@

frddr_b: audio-controller@200 {
compatible = "amlogic,axg-frddr";
- reg = <0x0 0x200 0x0 0x1c>;
+ reg = <0x0 0x200 0x0 0x2c>;
#sound-dai-cells = <0>;
sound-name-prefix = "FRDDR_B";
interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
@@ -1217,7 +1217,7 @@

frddr_c: audio-controller@240 {
compatible = "amlogic,axg-frddr";
- reg = <0x0 0x240 0x0 0x1c>;
+ reg = <0x0 0x240 0x0 0x2c>;
#sound-dai-cells = <0>;
sound-name-prefix = "FRDDR_C";
interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
--
2.21.0

2019-09-05 17:09:22

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH 3/5] arm64: dts: meson: g12: add a g12 layer

While the sm1 is very close to the g12a/b family, somethings apply
differently on the g12a/b and not the sm1. This introduce a new layer
of dtsi for part which apply to the g12a and g12b but not the sm1.

Signed-off-by: Jerome Brunet <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 7 +++++++
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 2 +-
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12.dtsi

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
new file mode 100644
index 000000000000..1e30061fb2a7
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Jerome Brunet <[email protected]>
+ */
+
+#include "meson-g12-common.dtsi"
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index eb5d177d7a99..69339d69dfd4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -3,7 +3,7 @@
* Copyright (c) 2018 Amlogic, Inc. All rights reserved.
*/

-#include "meson-g12-common.dtsi"
+#include "meson-g12.dtsi"
#include <dt-bindings/power/meson-g12a-power.h>

/ {
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
index 5628ccd54531..eefac0ef092b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
@@ -4,7 +4,7 @@
* Author: Neil Armstrong <[email protected]>
*/

-#include "meson-g12-common.dtsi"
+#include "meson-g12.dtsi"
#include <dt-bindings/power/meson-g12a-power.h>

/ {
--
2.21.0

2019-09-05 17:09:22

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH 4/5] arm64: dts: meson: g12: factor the power domain.

The power domain declared in the g12a and g12b dtsi are the same.
Move the declaration of these power domains in the g12 common dtsi.

Signed-off-by: Jerome Brunet <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 13 +++++++++++++
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 -------------
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 12 ------------
3 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
index 1e30061fb2a7..ac5833781611 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
@@ -5,3 +5,16 @@
*/

#include "meson-g12-common.dtsi"
+#include <dt-bindings/power/meson-g12a-power.h>
+
+&ethmac {
+ power-domains = <&pwrc PWRC_G12A_ETH_ID>;
+};
+
+&vpu {
+ power-domains = <&pwrc PWRC_G12A_VPU_ID>;
+};
+
+&sd_emmc_a {
+ amlogic,dram-access-quirk;
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index 69339d69dfd4..07450c4babfc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -4,7 +4,6 @@
*/

#include "meson-g12.dtsi"
-#include <dt-bindings/power/meson-g12a-power.h>

/ {
compatible = "amlogic,g12a";
@@ -110,15 +109,3 @@
};
};
};
-
-&ethmac {
- power-domains = <&pwrc PWRC_G12A_ETH_ID>;
-};
-
-&vpu {
- power-domains = <&pwrc PWRC_G12A_VPU_ID>;
-};
-
-&sd_emmc_a {
- amlogic,dram-access-quirk;
-};
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
index eefac0ef092b..a9e1db0f1158 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi
@@ -5,7 +5,6 @@
*/

#include "meson-g12.dtsi"
-#include <dt-bindings/power/meson-g12a-power.h>

/ {
compatible = "amlogic,g12b";
@@ -102,14 +101,3 @@
compatible = "amlogic,g12b-clkc";
};

-&ethmac {
- power-domains = <&pwrc PWRC_G12A_ETH_ID>;
-};
-
-&vpu {
- power-domains = <&pwrc PWRC_G12A_VPU_ID>;
-};
-
-&sd_emmc_a {
- amlogic,dram-access-quirk;
-};
--
2.21.0

2019-09-26 08:38:35

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH 0/5] arm64: dts: meson: audio updates

Jerome Brunet <[email protected]> writes:

> The patchset features a few updates to prepare the addition of the audio
> on sm1. It fixes the register range of audio fifo which was incorrect.
>
> It also create another layer of dtsi, common to g12a and g12b but not sm1.
> The audio related device are moved to this file.
>
> This was done because the audio bus, which was at 0xff642000 on g12, has
> moved 0xff660000 on sm1. Overwriting the reg property was option but it
> would have left confusing node names on the sm1.
>
> Jerome Brunet (5):
> arm64: dts: meson: axg: fix audio fifo reg size
> arm64: dts: meson: g12: fix audio fifo reg size
> arm64: dts: meson: g12: add a g12 layer
> arm64: dts: meson: g12: factor the power domain.
> arm64: dts: meson: g12: move audio bus out of g12-common

Queued for v5.5,

Kevin