* [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements @ 2015-11-06 17:54 Priit Laes 2015-11-06 17:54 ` [PATCH v3 1/3] ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes Priit Laes ` (3 more replies) 0 siblings, 4 replies; 12+ messages in thread From: Priit Laes @ 2015-11-06 17:54 UTC (permalink / raw) To: linux-arm-kernel Improvements to devicetree setup: - Converted to use axp209 regulator nodes - Fix invalid regulator for LRADC keys - Enable audio codec node Changes sinve v2: - Dropped applied "Added IRQ configuration for bma250 accelerometer" patch Changes since v1: - Dropped NAND patch because driver is not yet ready - Dropped applied KEYBOARD_SUN4I_LRADC patch - Added sun4i audio codec patch Priit Laes (3): ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 42 +++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) -- 2.6.3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/3] ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes 2015-11-06 17:54 [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Priit Laes @ 2015-11-06 17:54 ` Priit Laes 2015-11-09 4:08 ` Chen-Yu Tsai 2015-11-06 17:54 ` [PATCH v3 2/3] ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 Priit Laes ` (2 subsequent siblings) 3 siblings, 1 reply; 12+ messages in thread From: Priit Laes @ 2015-11-06 17:54 UTC (permalink / raw) To: linux-arm-kernel Add regulator nodes for axp209 using the axp209.dtsi include. Signed-off-by: Priit Laes <plaes@plaes.org> --- Changes in v3: - Drop the ohci0 node. It's not needed. Changes in v2: - Add the ohci0 node. arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 35 ++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts index 3f0aeb8..6b4c29d 100644 --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts @@ -72,6 +72,10 @@ * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 */ +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + &ehci0 { status = "okay"; }; @@ -86,15 +90,13 @@ status = "okay"; axp209: pmic at 34 { - compatible = "x-powers,axp209"; reg = <0x34>; interrupts = <0>; - - interrupt-controller; - #interrupt-cells = <1>; }; }; +#include "axp209.dtsi" + &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins_a>; @@ -146,6 +148,31 @@ status = "okay"; }; +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; + regulator-name = "vdd-int-dll"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + ®_usb1_vbus { status = "okay"; }; -- 2.6.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 1/3] ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes 2015-11-06 17:54 ` [PATCH v3 1/3] ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes Priit Laes @ 2015-11-09 4:08 ` Chen-Yu Tsai 0 siblings, 0 replies; 12+ messages in thread From: Chen-Yu Tsai @ 2015-11-09 4:08 UTC (permalink / raw) To: linux-arm-kernel Hi, On Sat, Nov 7, 2015 at 1:54 AM, Priit Laes <plaes@plaes.org> wrote: > Add regulator nodes for axp209 using the axp209.dtsi include. > > Signed-off-by: Priit Laes <plaes@plaes.org> > --- > Changes in v3: > - Drop the ohci0 node. It's not needed. > > Changes in v2: > - Add the ohci0 node. > > > arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 35 ++++++++++++++++++++++++++++---- > 1 file changed, 31 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > index 3f0aeb8..6b4c29d 100644 > --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > @@ -72,6 +72,10 @@ > * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 > */ > > +&cpu0 { > + cpu-supply = <®_dcdc2>; > +}; > + > &ehci0 { > status = "okay"; > }; > @@ -86,15 +90,13 @@ > status = "okay"; > > axp209: pmic at 34 { > - compatible = "x-powers,axp209"; > reg = <0x34>; > interrupts = <0>; > - > - interrupt-controller; > - #interrupt-cells = <1>; > }; > }; > > +#include "axp209.dtsi" > + > &i2c1 { > pinctrl-names = "default"; > pinctrl-0 = <&i2c1_pins_a>; > @@ -146,6 +148,31 @@ > status = "okay"; > }; > > +®_dcdc2 { > + regulator-always-on; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1400000>; > + regulator-name = "vdd-cpu"; > +}; > + > +®_dcdc3 { > + regulator-always-on; > + regulator-min-microvolt = <1250000>; > + regulator-max-microvolt = <1250000>; > + regulator-name = "vdd-int-dll"; > +}; The latest consensus for these system critical regulators is to use the recommended range from the datasheet. The voltage is set by the bootloader and never touched by Linux, thus avoiding any mismatch issues. > + > +®_ldo1 { > + regulator-name = "vdd-rtc"; > +}; > + > +®_ldo2 { > + regulator-always-on; > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-name = "avcc"; That goes for this one as well. Regards ChenYu > +}; > + > ®_usb1_vbus { > status = "okay"; > }; > -- > 2.6.3 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 2/3] ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 2015-11-06 17:54 [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Priit Laes 2015-11-06 17:54 ` [PATCH v3 1/3] ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes Priit Laes @ 2015-11-06 17:54 ` Priit Laes 2015-11-09 4:17 ` Chen-Yu Tsai 2015-11-06 17:54 ` [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support Priit Laes 2015-11-09 2:02 ` [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Maxime Ripard 3 siblings, 1 reply; 12+ messages in thread From: Priit Laes @ 2015-11-06 17:54 UTC (permalink / raw) To: linux-arm-kernel ADC seems to be using ldo2 for reference voltage. Signed-off-by: Priit Laes <plaes@plaes.org> --- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts index 6b4c29d..16c1a67 100644 --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts @@ -112,7 +112,7 @@ }; &lradc { - vref-supply = <®_vcc3v0>; + vref-supply = <®_ldo2>; status = "okay"; -- 2.6.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/3] ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 2015-11-06 17:54 ` [PATCH v3 2/3] ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 Priit Laes @ 2015-11-09 4:17 ` Chen-Yu Tsai 0 siblings, 0 replies; 12+ messages in thread From: Chen-Yu Tsai @ 2015-11-09 4:17 UTC (permalink / raw) To: linux-arm-kernel On Sat, Nov 7, 2015 at 1:54 AM, Priit Laes <plaes@plaes.org> wrote: > ADC seems to be using ldo2 for reference voltage. > > Signed-off-by: Priit Laes <plaes@plaes.org> I assume this is from some reference design and there is no way to actually confirm it without exact schematics? There's no mention of it in the FEX file. If so you should probably expand the commit message to include the source of such an assumption. > --- > arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support 2015-11-06 17:54 [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Priit Laes 2015-11-06 17:54 ` [PATCH v3 1/3] ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes Priit Laes 2015-11-06 17:54 ` [PATCH v3 2/3] ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 Priit Laes @ 2015-11-06 17:54 ` Priit Laes 2015-11-09 3:59 ` Chen-Yu Tsai 2015-11-09 2:02 ` [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Maxime Ripard 3 siblings, 1 reply; 12+ messages in thread From: Priit Laes @ 2015-11-06 17:54 UTC (permalink / raw) To: linux-arm-kernel Gemei G9 has internal speakers and headphone jack. Audio switching from internal speakers to headphones is automatically handled by extra FT2012Q audio amplifier chip that works out of the box. Signed-off-by: Priit Laes <plaes@plaes.org> --- Changes since v2: - Dropped routing property. arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts index 16c1a67..1d73a98 100644 --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts @@ -65,12 +65,15 @@ /* * TODO: * 2x cameras via CSI - * audio + * audio input * AXP battery management * NAND * OTG * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 */ +&codec { + status = "okay"; +}; &cpu0 { cpu-supply = <®_dcdc2>; -- 2.6.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support 2015-11-06 17:54 ` [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support Priit Laes @ 2015-11-09 3:59 ` Chen-Yu Tsai 2015-11-12 18:53 ` [linux-sunxi] " Priit Laes 0 siblings, 1 reply; 12+ messages in thread From: Chen-Yu Tsai @ 2015-11-09 3:59 UTC (permalink / raw) To: linux-arm-kernel On Sat, Nov 7, 2015 at 1:54 AM, Priit Laes <plaes@plaes.org> wrote: > Gemei G9 has internal speakers and headphone jack. Audio switching > from internal speakers to headphones is automatically handled by > extra FT2012Q audio amplifier chip that works out of the box. Nice that it works out of the box. The FEX file does mention: audio_pa_ctrl = port:PH15<1><default><default><0> So either it is floating or pulled up by default? Since it works now I don't see any reason to block it. On the other hand once that binding is introduced it would be nice to add it for power management reasons. Acked-by: Chen-Yu Tsai <wens@csie.org> > Signed-off-by: Priit Laes <plaes@plaes.org> > --- > Changes since v2: > - Dropped routing property. > > arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > index 16c1a67..1d73a98 100644 > --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > @@ -65,12 +65,15 @@ > /* > * TODO: > * 2x cameras via CSI > - * audio > + * audio input > * AXP battery management > * NAND > * OTG > * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 > */ > +&codec { > + status = "okay"; > +}; > > &cpu0 { > cpu-supply = <®_dcdc2>; > -- > 2.6.3 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [linux-sunxi] Re: [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support 2015-11-09 3:59 ` Chen-Yu Tsai @ 2015-11-12 18:53 ` Priit Laes 2015-11-19 16:09 ` Maxime Ripard 0 siblings, 1 reply; 12+ messages in thread From: Priit Laes @ 2015-11-12 18:53 UTC (permalink / raw) To: linux-arm-kernel On Mon, 2015-11-09 at 11:59 +0800, Chen-Yu Tsai wrote: > On Sat, Nov 7, 2015 at 1:54 AM, Priit Laes <plaes@plaes.org> wrote: > > Gemei G9 has internal speakers and headphone jack. Audio switching > > from internal speakers to headphones is automatically handled by > > extra FT2012Q audio amplifier chip that works out of the box. > > Nice that it works out of the box. The FEX file does mention: > > audio_pa_ctrl???= port:PH15<1><default><default><0> Nice catch. Setting it low mutes audio, and setting it back high unmutes. > So either it is floating or pulled up by default? Since it works > now I don't see any reason to block it. On the other hand once > that binding is introduced it would be nice to add it for power > management reasons. Should I just add comment about it or do something like this: &codec { ? status = "okay"; ? /* ? ?* TODO: Add codec_ext_pwr_pin to turn off external audio AMP ? ?&pio { ? ? ?codec_ext_pwr_pin:?codec_ext_pwr_pin at 0?{ ? ? ? ?allwinner,pins = "PH15"; ? ? ? ?allwinner,function = "gpio_out"; ? ? ? ?allwinner,drive = <SUN4I_PINCTRL_10_MA>; ? ? ? ?allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; ? ? ?} ? ?} ? ?*/ } > > Acked-by: Chen-Yu Tsai <wens@csie.org> > > > Signed-off-by: Priit Laes <plaes@plaes.org> > > --- > > Changes since v2: > > ?- Dropped routing property. > > > > ?arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 5 ++++- > > ?1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > > b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > > index 16c1a67..1d73a98 100644 > > --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > > +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts > > @@ -65,12 +65,15 @@ > > ?/* > > ? * TODO: > > ? *???2x cameras via CSI > > - *???audio > > + *???audio input > > ? *???AXP battery management > > ? *???NAND > > ? *???OTG > > ? *???Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 > > ? */ > > +&codec { > > +???????status = "okay"; > > +}; > > > > ?&cpu0 { > > ????????cpu-supply = <®_dcdc2>; > > -- > > 2.6.3 > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [linux-sunxi] Re: [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support 2015-11-12 18:53 ` [linux-sunxi] " Priit Laes @ 2015-11-19 16:09 ` Maxime Ripard 2015-11-20 2:56 ` Chen-Yu Tsai 0 siblings, 1 reply; 12+ messages in thread From: Maxime Ripard @ 2015-11-19 16:09 UTC (permalink / raw) To: linux-arm-kernel Hi, On Thu, Nov 12, 2015 at 08:53:19PM +0200, Priit Laes wrote: > On Mon, 2015-11-09 at 11:59 +0800, Chen-Yu Tsai wrote: > > On Sat, Nov 7, 2015 at 1:54 AM, Priit Laes <plaes@plaes.org> wrote: > > > Gemei G9 has internal speakers and headphone jack. Audio switching > > > from internal speakers to headphones is automatically handled by > > > extra FT2012Q audio amplifier chip that works out of the box. > > > > Nice that it works out of the box. The FEX file does mention: > > > > audio_pa_ctrl???= port:PH15<1><default><default><0> > > Nice catch. > > Setting it low mutes audio, and setting it back high unmutes. Then you just volunteered yourself to fix the FIXME in the driver ;) > > So either it is floating or pulled up by default? Since it works > > now I don't see any reason to block it. On the other hand once > > that binding is introduced it would be nice to add it for power > > management reasons. > > Should I just add comment about it or do something like this: > > &codec { > ? status = "okay"; > ? /* > ? ?* TODO: Add codec_ext_pwr_pin to turn off external audio AMP > ? ?&pio { > ? ? ?codec_ext_pwr_pin:?codec_ext_pwr_pin at 0?{ > ? ? ? ?allwinner,pins = "PH15"; > ? ? ? ?allwinner,function = "gpio_out"; > ? ? ? ?allwinner,drive = <SUN4I_PINCTRL_10_MA>; > ? ? ? ?allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; > ? ? ?} > ? ?} > ? ?*/ > } More like &pio { codec_ext_pwr_pin: codec_ext_pwr_pin at 0 { allwinner,pins = "PH15"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; }; }; &codec { /* This pin is used to turn off the GPIO amp pin */ pinctrl-names = "default"; pinctrl-0 <&codec_ext_pwr_pin>; status = "okay"; }; Of course, that's a temporary measure, and you should actually use that GPIO to enable / disable the Amplifier when you are playing sound. It shouldn't be that hard with ASoC. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151119/0b76ebe7/attachment.sig> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [linux-sunxi] Re: [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support 2015-11-19 16:09 ` Maxime Ripard @ 2015-11-20 2:56 ` Chen-Yu Tsai 2015-11-20 8:23 ` Hans de Goede 0 siblings, 1 reply; 12+ messages in thread From: Chen-Yu Tsai @ 2015-11-20 2:56 UTC (permalink / raw) To: linux-arm-kernel On Fri, Nov 20, 2015 at 12:09 AM, Maxime Ripard <maxime.ripard@free-electrons.com> wrote: > Hi, > > On Thu, Nov 12, 2015 at 08:53:19PM +0200, Priit Laes wrote: >> On Mon, 2015-11-09 at 11:59 +0800, Chen-Yu Tsai wrote: >> > On Sat, Nov 7, 2015 at 1:54 AM, Priit Laes <plaes@plaes.org> wrote: >> > > Gemei G9 has internal speakers and headphone jack. Audio switching >> > > from internal speakers to headphones is automatically handled by >> > > extra FT2012Q audio amplifier chip that works out of the box. >> > >> > Nice that it works out of the box. The FEX file does mention: >> > >> > audio_pa_ctrl = port:PH15<1><default><default><0> >> >> Nice catch. >> >> Setting it low mutes audio, and setting it back high unmutes. > > Then you just volunteered yourself to fix the FIXME in the driver ;) > Hans seems to have a patch for this in his sunxi-wip branch. I haven't looked at it though. ChenYu >> > So either it is floating or pulled up by default? Since it works >> > now I don't see any reason to block it. On the other hand once >> > that binding is introduced it would be nice to add it for power >> > management reasons. >> >> Should I just add comment about it or do something like this: >> >> &codec { >> status = "okay"; >> /* >> * TODO: Add codec_ext_pwr_pin to turn off external audio AMP >> &pio { >> codec_ext_pwr_pin: codec_ext_pwr_pin at 0 { >> allwinner,pins = "PH15"; >> allwinner,function = "gpio_out"; >> allwinner,drive = <SUN4I_PINCTRL_10_MA>; >> allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; >> } >> } >> */ >> } > > More like > > &pio { > codec_ext_pwr_pin: codec_ext_pwr_pin at 0 { > allwinner,pins = "PH15"; > allwinner,function = "gpio_out"; > allwinner,drive = <SUN4I_PINCTRL_10_MA>; > allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; > }; > }; > > &codec { > /* This pin is used to turn off the GPIO amp pin */ > pinctrl-names = "default"; > pinctrl-0 <&codec_ext_pwr_pin>; > status = "okay"; > }; > > Of course, that's a temporary measure, and you should actually use > that GPIO to enable / disable the Amplifier when you are playing > sound. It shouldn't be that hard with ASoC. > > Maxime > > -- > Maxime Ripard, Free Electrons > Embedded Linux, Kernel and Android engineering > http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [linux-sunxi] Re: [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support 2015-11-20 2:56 ` Chen-Yu Tsai @ 2015-11-20 8:23 ` Hans de Goede 0 siblings, 0 replies; 12+ messages in thread From: Hans de Goede @ 2015-11-20 8:23 UTC (permalink / raw) To: linux-arm-kernel Hi, On 20-11-15 03:56, Chen-Yu Tsai wrote: > On Fri, Nov 20, 2015 at 12:09 AM, Maxime Ripard > <maxime.ripard@free-electrons.com> wrote: >> Hi, >> >> On Thu, Nov 12, 2015 at 08:53:19PM +0200, Priit Laes wrote: >>> On Mon, 2015-11-09 at 11:59 +0800, Chen-Yu Tsai wrote: >>>> On Sat, Nov 7, 2015 at 1:54 AM, Priit Laes <plaes@plaes.org> wrote: >>>>> Gemei G9 has internal speakers and headphone jack. Audio switching >>>>> from internal speakers to headphones is automatically handled by >>>>> extra FT2012Q audio amplifier chip that works out of the box. >>>> >>>> Nice that it works out of the box. The FEX file does mention: >>>> >>>> audio_pa_ctrl = port:PH15<1><default><default><0> >>> >>> Nice catch. >>> >>> Setting it low mutes audio, and setting it back high unmutes. >> >> Then you just volunteered yourself to fix the FIXME in the driver ;) >> > > Hans seems to have a patch for this in his sunxi-wip branch. > I haven't looked at it though. Right, I needed support for the pa pin on one of my own tablets, and there things just did not work without it. Note this patch is ready for upstream submission, I just did not get around to submitting it yet (I wrote it Tuesday evening). Regards, Hans > > ChenYu > >>>> So either it is floating or pulled up by default? Since it works >>>> now I don't see any reason to block it. On the other hand once >>>> that binding is introduced it would be nice to add it for power >>>> management reasons. >>> >>> Should I just add comment about it or do something like this: >>> >>> &codec { >>> status = "okay"; >>> /* >>> * TODO: Add codec_ext_pwr_pin to turn off external audio AMP >>> &pio { >>> codec_ext_pwr_pin: codec_ext_pwr_pin at 0 { >>> allwinner,pins = "PH15"; >>> allwinner,function = "gpio_out"; >>> allwinner,drive = <SUN4I_PINCTRL_10_MA>; >>> allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; >>> } >>> } >>> */ >>> } >> >> More like >> >> &pio { >> codec_ext_pwr_pin: codec_ext_pwr_pin at 0 { >> allwinner,pins = "PH15"; >> allwinner,function = "gpio_out"; >> allwinner,drive = <SUN4I_PINCTRL_10_MA>; >> allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; >> }; >> }; >> >> &codec { >> /* This pin is used to turn off the GPIO amp pin */ >> pinctrl-names = "default"; >> pinctrl-0 <&codec_ext_pwr_pin>; >> status = "okay"; >> }; >> >> Of course, that's a temporary measure, and you should actually use >> that GPIO to enable / disable the Amplifier when you are playing >> sound. It shouldn't be that hard with ASoC. >> >> Maxime >> >> -- >> Maxime Ripard, Free Electrons >> Embedded Linux, Kernel and Android engineering >> http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements 2015-11-06 17:54 [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Priit Laes ` (2 preceding siblings ...) 2015-11-06 17:54 ` [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support Priit Laes @ 2015-11-09 2:02 ` Maxime Ripard 3 siblings, 0 replies; 12+ messages in thread From: Maxime Ripard @ 2015-11-09 2:02 UTC (permalink / raw) To: linux-arm-kernel On Fri, Nov 06, 2015 at 07:54:43PM +0200, Priit Laes wrote: > Improvements to devicetree setup: > - Converted to use axp209 regulator nodes > - Fix invalid regulator for LRADC keys > - Enable audio codec node > > Changes sinve v2: > - Dropped applied "Added IRQ configuration for bma250 accelerometer" patch > > Changes since v1: > - Dropped NAND patch because driver is not yet ready > - Dropped applied KEYBOARD_SUN4I_LRADC patch > - Added sun4i audio codec patch > > > Priit Laes (3): > ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes > ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 > ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support > > arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 42 +++++++++++++++++++++++++++----- > 1 file changed, 36 insertions(+), 6 deletions(-) Applied, thanks ! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151108/71789b29/attachment.sig> ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-11-20 8:23 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-11-06 17:54 [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Priit Laes 2015-11-06 17:54 ` [PATCH v3 1/3] ARM: dts: sun4i: gemei-g9: Convert to use axp209 regulator nodes Priit Laes 2015-11-09 4:08 ` Chen-Yu Tsai 2015-11-06 17:54 ` [PATCH v3 2/3] ARM: dts: sun4i: gemei-g9: Use reg_ldo2 instead of reg_vcc3v0 Priit Laes 2015-11-09 4:17 ` Chen-Yu Tsai 2015-11-06 17:54 ` [PATCH v3 3/3] ARM: dts: sun4i: gemei-g9: Enable sun4i audio codec support Priit Laes 2015-11-09 3:59 ` Chen-Yu Tsai 2015-11-12 18:53 ` [linux-sunxi] " Priit Laes 2015-11-19 16:09 ` Maxime Ripard 2015-11-20 2:56 ` Chen-Yu Tsai 2015-11-20 8:23 ` Hans de Goede 2015-11-09 2:02 ` [PATCH v3 0/3] ARM: dts: sun4i: gemei-g9: Devicetree improvements Maxime Ripard
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.