From 6279f6669db51f02360951155dd9d44c32e11fb0 Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Thu, 28 Jun 2018 11:50:52 +0200 Subject: ARM64: dts: meson-axg: add s400 microphone card leds The microphone card connected to the s400 has 6 leds controlled through an additional i2c gpio controller. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'arch/arm64/boot/dts/amlogic/meson-axg-s400.dts') diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index 4b3331fbfe39..1dff41d0b797 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -62,6 +62,40 @@ clock-frequency = <32768>; pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */ }; + + speaker-leds { + compatible = "gpio-leds"; + + aled1 { + label = "speaker:aled1"; + gpios = <&gpio_speaker 7 0>; + }; + + aled2 { + label = "speaker:aled2"; + gpios = <&gpio_speaker 6 0>; + }; + + aled3 { + label = "speaker:aled3"; + gpios = <&gpio_speaker 5 0>; + }; + + aled4 { + label = "speaker:aled4"; + gpios = <&gpio_speaker 4 0>; + }; + + aled5 { + label = "speaker:aled5"; + gpios = <&gpio_speaker 3 0>; + }; + + aled6 { + label = "speaker:aled6"; + gpios = <&gpio_speaker 2 0>; + }; + }; }; ðmac { @@ -99,6 +133,14 @@ status = "okay"; pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>; pinctrl-names = "default"; + + gpio_speaker: gpio-controller@1f { + compatible = "nxp,pca9557"; + reg = <0x1f>; + gpio-controller; + #gpio-cells = <2>; + vcc-supply = <&vddao_3v3>; + }; }; &pwm_ab { -- cgit v1.2.3 From e120289cc094b11e8729fe97cafe7a7738212de6 Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Thu, 28 Jun 2018 11:50:53 +0200 Subject: ARM64: dts: meson-axg: add s400 main 12v supply Add a fixed regulator for the main 12v which is the main power supply of the board. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm64/boot/dts/amlogic/meson-axg-s400.dts') diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index 1dff41d0b797..c5fa32a6d1a9 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -16,6 +16,13 @@ serial1 = &uart_A; }; + main_12v: regulator-main_12v { + compatible = "regulator-fixed"; + regulator-name = "12V"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + }; + vddio_boot: regulator-vddio_boot { compatible = "regulator-fixed"; regulator-name = "VDDIO_BOOT"; -- cgit v1.2.3 From a90193b9a0e7dd91d12869577afebc0b47828df0 Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Thu, 28 Jun 2018 11:50:54 +0200 Subject: ARM64: dts: meson-axg: add s400 speaker amplifier Add the first of the two tas5707 power amplifier present on the speaker daughter board. According to the schematics of the S400 v3, only I2SB_DIN3 and I2SC_DOUT2 will be available to the speaker board. 9R83, 9R84 and 9R18 are not connected so no audio signal will be provided to the second amplifier. There is no point in enabling it even if it is visible on the i2c bus. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/arm64/boot/dts/amlogic/meson-axg-s400.dts') diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index c5fa32a6d1a9..346e3b016cae 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -134,6 +134,19 @@ status = "okay"; pinctrl-0 = <&i2c1_z_pins>; pinctrl-names = "default"; + + speaker_amp1: audio-codec@1b { + compatible = "ti,tas5707"; + reg = <0x1b>; + reset-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + AVDD-supply = <&vcc_3v3>; + DVDD-supply = <&vcc_3v3>; + PVDD_A-supply = <&main_12v>; + PVDD_B-supply = <&main_12v>; + PVDD_C-supply = <&main_12v>; + PVDD_D-supply = <&main_12v>; + }; }; &i2c_AO { -- cgit v1.2.3 From a51b74ea78ac11b7e632bb3ccfec469213177d6d Mon Sep 17 00:00:00 2001 From: Xingyu Chen Date: Mon, 2 Jul 2018 22:25:15 +0000 Subject: ARM64: dts: meson-axg: add saradc support Add the DT info for SAR ADC of the Amlogic's Meson-AXG SoC. Signed-off-by: Xingyu Chen Signed-off-by: Yixun Lan Signed-off-by: Kevin Hilman --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 5 +++++ arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'arch/arm64/boot/dts/amlogic/meson-axg-s400.dts') diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index 346e3b016cae..da84bc853d75 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -215,3 +215,8 @@ compatible = "brcm,bcm4329-fmac"; }; }; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao18>; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index e11fec2ba06d..5f4d49e2922e 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -91,6 +91,13 @@ 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 = ; status = "disabled"; }; + + saradc: adc@9000 { + compatible = "amlogic,meson-axg-saradc", + "amlogic,meson-saradc"; + reg = <0x0 0x9000 0x0 0x38>; + #io-channel-cells = <1>; + interrupts = ; + clocks = <&xtal>, + <&clkc_AO CLKID_AO_SAR_ADC>, + <&clkc_AO CLKID_AO_SAR_ADC_CLK>, + <&clkc_AO CLKID_AO_SAR_ADC_SEL>; + clock-names = "clkin", "core", "adc_clk", "adc_sel"; + status = "disabled"; + }; }; }; }; -- cgit v1.2.3 From aabe5d2d4fa8ab01eaf2ff6fe2161991c1e41e1a Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Mon, 16 Jul 2018 12:11:47 +0200 Subject: ARM64: dts: meson-axg: add adc buttons the S400 Add the 6 adc buttons of the amlogic S400 Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'arch/arm64/boot/dts/amlogic/meson-axg-s400.dts') diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index da84bc853d75..9189a5778d76 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -6,11 +6,55 @@ /dts-v1/; #include "meson-axg.dtsi" +#include / { 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 = ; + press-threshold-microvolt = <1116000>; /* 62% */ + }; + + button-prev { + label = "Previous"; + linux,code = ; + press-threshold-microvolt = <900000>; /* 50% */ + }; + + button-wifi { + label = "Wifi"; + linux,code = ; + press-threshold-microvolt = <684000>; /* 38% */ + }; + + button-up { + label = "Volume Up"; + linux,code = ; + press-threshold-microvolt = <468000>; /* 26% */ + }; + + button-down { + label = "Volume Down"; + linux,code = ; + press-threshold-microvolt = <252000>; /* 14% */ + }; + + button-voice { + label = "Voice"; + linux,code = ; + press-threshold-microvolt = <0>; /* 0% */ + }; + }; + aliases { serial0 = &uart_AO; serial1 = &uart_A; -- cgit v1.2.3