Skip to contentSkip to conversation

ARM64: dts: meson-axg: updates

PATCH Applied Jerome Brunet 2 participants 8 messages Jul 16, 2018 – Jul 17, 2018

Subsystems (2)
lore
Share & tools
lore

Jerome Brunet

author reviewer
#0 lore raw

cover ARM64: dts: meson-axg: updates

This patchset groups several updates targeted on amlogic's AXG device tree. Patch 1, 2 and 6 had been posted previously but I thought it would be more convenient for Kevin to get them as a single series.

Jerome Brunet (6):
ARM64: dts: meson-axg: remove vddio_ao18 from SoC dtsi
ARM64: dts: meson-axg: add adc buttons the S400
ARM64: dts: meson-axg: remove spdif out from gpio a7
ARM64: dts: meson-axg: add spdif input pins
ARM64: dts: meson-axg: add pdm pins
ARM64: dts: meson-axg: add the audio clock controller

 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts |  44 +++++++++
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi     | 127 ++++++++++++++++++++++---
 2 files changed, 157 insertions(+), 14 deletions(-)
Signature · 1 line
2.14.4
author reviewer
#1 lore raw

PATCH 1/6 ARM64: dts: meson-axg: remove vddio_ao18 from SoC dtsi

Regulator should not be defined inside the SoC dtsi file. vddio_ao18 is already defined in the S400 board dts anyway.

Fixes e1969df34357 ("ARM64: dts: meson-axg: add saradc support")
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 7 -------
 1 file changed, 7 deletions(-)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +0 -7
index c87bafc4b101..08e5f431c025 100644
@@ -91,13 +91,6 @@
 		method = "smc";
 	};
 
-	vddio_ao18: regulator-vddio_ao18 {
-		compatible = "regulator-fixed";
-		regulator-name = "VDDIO_AO18";
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-	};
-
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 13
Signature · 1 line
2.14.4
author reviewer
#2 lore raw

PATCH 2/6 ARM64: dts: meson-axg: add adc buttons the S400

In reply to Jerome Brunet

Add the 6 adc buttons of the amlogic S400

---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 44 ++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +44 -0
index f389f84be2e2..fd90fa4a282c 100644
@@ -6,11 +6,55 @@
 /dts-v1/;
 
 #include "meson-axg.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	compatible = "amlogic,s400", "amlogic,a113d", "amlogic,meson-axg";
 	model = "Amlogic Meson AXG S400 Development Board";
 
+	adc_keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+
+		button-next {
+			label = "Next";
+			linux,code = <KEY_NEXT>;
+			press-threshold-microvolt = <1116000>; /* 62% */
+		};
+
+		button-prev {
+			label = "Previous";
+			linux,code = <KEY_PREVIOUS>;
+			press-threshold-microvolt = <900000>; /* 50% */
+		};
+
+		button-wifi {
+			label = "Wifi";
+			linux,code = <KEY_WLAN>;
+			press-threshold-microvolt = <684000>; /* 38% */
+		};
+
+		button-up {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			press-threshold-microvolt = <468000>; /* 26% */
+		};
+
+		button-down {
+			label = "Volume Down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			press-threshold-microvolt = <252000>; /* 14% */
+		};
+
+		button-voice {
+			label = "Voice";
+			linux,code = <KEY_VOICECOMMAND>;
+			press-threshold-microvolt = <0>; /* 0% */
+		};
+	};
+
 	aliases {
 		serial0 = &uart_AO;
 		serial1 = &uart_A;
Signature · 1 line
2.14.4
author reviewer
#3 lore raw

PATCH 3/6 ARM64: dts: meson-axg: remove spdif out from gpio a7

In reply to Jerome Brunet

Spdif out in not multiplexed on gpio A7 (spdif in is) Remove this entry to fix the problem.

Fixes 53c03b0aff36 ("ARM64: dts: meson-axg: add spdif output pins")
---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 7 -------
 1 file changed, 7 deletions(-)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +0 -7
index 08e5f431c025..cc908c9b5306 100644
@@ -575,13 +575,6 @@
 					};
 				};
 
-				spdif_out_a7_pins: spdif_out_a7 {
-					mux {
-						groups = "spdif_out_a7";
-						function = "spdif_out";
-					};
-				};
-
 				spdif_out_a11_pins: spdif_out_a11 {
 					mux {
 						groups = "spdif_out_a11";
Signature · 1 line
2.14.4
author reviewer
#4 lore raw

PATCH 4/6 ARM64: dts: meson-axg: add spdif input pins

In reply to Jerome Brunet

Add spdif input pin definitions to meson AXG

---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 35 ++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +35 -0
index cc908c9b5306..277958ff516a 100644
@@ -561,6 +561,41 @@
 					};
 				};
 
+				spdif_in_z_pins: spdif_in_z {
+					mux {
+						groups = "spdif_in_z";
+						function = "spdif_in";
+					};
+				};
+
+				spdif_in_a1_pins: spdif_in_a1 {
+					mux {
+						groups = "spdif_in_a1";
+						function = "spdif_in";
+					};
+				};
+
+				spdif_in_a7_pins: spdif_in_a7 {
+					mux {
+						groups = "spdif_in_a7";
+						function = "spdif_in";
+					};
+				};
+
+				spdif_in_a19_pins: spdif_in_a19 {
+					mux {
+						groups = "spdif_in_a19";
+						function = "spdif_in";
+					};
+				};
+
+				spdif_in_a20_pins: spdif_in_a20 {
+					mux {
+						groups = "spdif_in_a20";
+						function = "spdif_in";
+					};
+				};
+
 				spdif_out_z_pins: spdif_out_z {
 					mux {
 						groups = "spdif_out_z";
Signature · 1 line
2.14.4
author reviewer
#5 lore raw

PATCH 5/6 ARM64: dts: meson-axg: add pdm pins

In reply to Jerome Brunet

Add pdm input pin definitions to meson AXG

---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 42 ++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +42 -0
index 277958ff516a..461be4a35f92 100644
@@ -477,6 +477,48 @@
 					};
 				};
 
+				pdm_dclk_a14_pins: pdm_dclk_a14 {
+					mux {
+						groups = "pdm_dclk_a14";
+						function = "pdm";
+					};
+				};
+
+				pdm_dclk_a19_pins: pdm_dclk_a19 {
+					mux {
+						groups = "pdm_dclk_a19";
+						function = "pdm";
+					};
+				};
+
+				pdm_din0_pins: pdm_din0 {
+					mux {
+						groups = "pdm_din0";
+						function = "pdm";
+					};
+				};
+
+				pdm_din1_pins: pdm_din1 {
+					mux {
+						groups = "pdm_din1";
+						function = "pdm";
+					};
+				};
+
+				pdm_din2_pins: pdm_din2 {
+					mux {
+						groups = "pdm_din2";
+						function = "pdm";
+					};
+				};
+
+				pdm_din3_pins: pdm_din3 {
+					mux {
+						groups = "pdm_din3";
+						function = "pdm";
+					};
+				};
+
 				pwm_a_a_pins: pwm_a_a {
 					mux {
 						groups = "pwm_a_a";
Signature · 1 line
2.14.4
author reviewer
#6 lore raw

PATCH 6/6 ARM64: dts: meson-axg: add the audio clock controller

In reply to Jerome Brunet

Add the audio clock controller which is part of the audio bus This controller takes 8 input plls, and the usual clock gate, from the main clock controller. It provides the clocs for the all the devices of the audio subsystem, such as tdms, spdif, pdm, etc.

---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 36 ++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +36 -0
index 461be4a35f92..6adc8d3dbf0a 100644
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/axg-audio-clkc.h>
 #include <dt-bindings/clock/axg-clkc.h>
 #include <dt-bindings/clock/axg-aoclkc.h>
 #include <dt-bindings/gpio/meson-axg-gpio.h>
@@ -155,6 +156,41 @@
 			};
 		};
 
+		audio: bus at ff642000 {
+			compatible = "simple-bus";
+			reg = <0x0 0xff642000 0x0 0x2000>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges = <0x0 0x0 0x0 0xff642000 0x0 0x2000>;
+
+			clkc_audio: clock-controller at 0 {
+				compatible = "amlogic,axg-audio-clkc";
+				reg = <0x0 0x0 0x0 0xb4>;
+				#clock-cells = <1>;
+
+				clocks = <&clkc CLKID_AUDIO>,
+					 <&clkc CLKID_MPLL0>,
+					 <&clkc CLKID_MPLL1>,
+					 <&clkc CLKID_MPLL2>,
+					 <&clkc CLKID_MPLL3>,
+					 <&clkc CLKID_HIFI_PLL>,
+					 <&clkc CLKID_FCLK_DIV3>,
+					 <&clkc CLKID_FCLK_DIV4>,
+					 <&clkc CLKID_GP0_PLL>;
+				clock-names = "pclk",
+					      "mst_in0",
+					      "mst_in1",
+					      "mst_in2",
+					      "mst_in3",
+					      "mst_in4",
+					      "mst_in5",
+					      "mst_in6",
+					      "mst_in7";
+
+				resets = <&reset RESET_AUDIO>;
+			};
+		};
+
 		cbus: bus at ffd00000 {
 			compatible = "simple-bus";
 			reg = <0x0 0xffd00000 0x0 0x25000>;
Signature · 1 line
2.14.4
maintainer Applied
#7 lore raw
In reply to Jerome Brunet
Quoted 10 lines · Jerome Brunet

This patchset groups several updates targeted on amlogic's AXG device tree. Patch 1, 2 and 6 had been posted previously but I thought it would be more convenient for Kevin to get them as a single series.

Jerome Brunet (6):
ARM64: dts: meson-axg: remove vddio_ao18 from SoC dtsi
ARM64: dts: meson-axg: add adc buttons the S400
ARM64: dts: meson-axg: remove spdif out from gpio a7
ARM64: dts: meson-axg: add spdif input pins
ARM64: dts: meson-axg: add pdm pins

Applied to v4.19/dt64, queued for the first DT64 pull to arm-soc.

Quoted 1 line

ARM64: dts: meson-axg: add the audio clock controller

I'll queue this for a follow-up pull with the dependency tag from the clock tree.

Kevin