EXYNOS5: Add audio support for Snow
Subsystems (3)
v4 cover EXYNOS5: Add audio support for Snow
Driver for MAX98095 is added and support for same is incorporated in sound driver and Snow Board.
This patchset is based on top of
"EXYNOS5: SNOW: Add initial dts and config file"
Changes in V2:
- Corrected multi-line comment style
Changes in V3:
- Removed non DT support for MAX98095
- Config for both MAX98095 and WM8994 added in
exynos5 config file.
Changes in V4:
- Separated the patches to create initial dts and config file for Snow
- Modified XXTI clock source function as per Exynos naming convention
Rajeshwari Shinde (6):
EXYNOS5: Add function to enable XXTI clock source
Sound: MAX98095: Add the driver for codec
Sound: Support for MAX98095 codec in driver
EXYNOS5: GPIO to enable MAX98095
EXYNOS5: FDT: Add compatible strings for MAX98095
config: Snow: Enable MAX98095 codec
arch/arm/cpu/armv7/exynos/power.c | 17 + arch/arm/include/asm/arch-exynos/power.h | 11 + board/samsung/smdk5250/smdk5250.c | 15 + drivers/sound/Makefile | 1 + drivers/sound/max98095.c | 550 ++++++++++++++++++++++++++++++ drivers/sound/max98095.h | 311 +++++++++++++++++ drivers/sound/sound.c | 9 +- include/configs/exynos5250-dt.h | 1 + include/fdtdec.h | 1 + include/sound.h | 1 + lib/fdtdec.c | 1 + 11 files changed, 916 insertions(+), 2 deletions(-) create mode 100644 drivers/sound/max98095.c create mode 100644 drivers/sound/max98095.h
Signature · 1 line
1.7.4.4
PATCH v4 1/6 EXYNOS5: Add function to enable XXTI clock source
This patch adds funtion to enable XXTI clock source required by MAX98095 codec.
---
Changes in V2:
- Corrected multi-line comment style
Changes in V3:
- None
Changes in V4:
- Modified XXTI clock source function as per Exynos naming convention
arch/arm/cpu/armv7/exynos/power.c | 17 +++++++++++++++++ arch/arm/include/asm/arch-exynos/power.h | 11 +++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/exynos/power.c +17 -0
@@ -111,3 +111,20 @@ void set_ps_hold_ctrl(void)if (cpu_is_exynos5 ())exynos5_set_ps_hold_ctrl (); } + + +static void exynos5_set_xclkout (void ) +{ +struct exynos5_power *power = + (struct exynos5_power *)samsung_get_base_power (); + +/* use xxti for xclk out */ +clrsetbits_le32 (&power->pmu_debug,PMU_DEBUG_CLKOUT_SEL_MASK , +PMU_DEBUG_XXTI ); +} + +void set_xclkout (void ) +{ +if (cpu_is_exynos5 ()) +exynos5_set_xclkout (); +}
arch/arm/include/asm/arch-exynos/power.h +11 -0
@@ -873,4 +873,15 @@ void set_dp_phy_ctrl(unsigned int enable);* (e.g. power button). */ void set_ps_hold_ctrl (void ); + +/* PMU_DEBUG bits [12:8] = 0x1000 selects XXTI clock source */ +#define PMU_DEBUG_XXTI 0x1000 +/* Mask bit[12:8] for xxti clock selection */ +#define PMU_DEBUG_CLKOUT_SEL_MASK 0x1f00 + +/* +* Pmu debug is used for xclkout, enable xclkout with +* source as XXTI +*/ +void set_xclkout (void );#endif
Signature · 1 line
1.7.4.4
PATCH v4 2/6 Sound: MAX98095: Add the driver for codec
In reply to Rajeshwari ShindeThis patch adds the driver for codec MAX98095 required by Snow Board
---
Chnages in V2:
- None
Changes in V3:
- None
Changes in V4:
- None
drivers/sound/Makefile | 1 + drivers/sound/max98095.c | 550 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/sound/max98095.h | 311 ++++++++++++++++++++++++++ 3 files changed, 862 insertions(+), 0 deletions(-) create mode 100644 drivers/sound/max98095.c create mode 100644 drivers/sound/max98095.h
drivers/sound/Makefile +1 -0
@@ -28,6 +28,7 @@ LIB := $(obj)libsound.o COBJS-$(CONFIG_SOUND) += sound.o COBJS-$(CONFIG_I2S) += samsung-i2s.o COBJS-$(CONFIG_SOUND_WM8994) += wm8994.o +COBJS-$(CONFIG_SOUND_MAX98095) += max98095.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c)
drivers/sound/max98095.c new file +550 -0
550 lines not on this page · raw message
drivers/sound/max98095.h new file +311 -0
311 lines not on this page · raw message
Signature · 1 line
1.7.4.4
PATCH v4 2/6 Sound: MAX98095: Add the driver for codec
Quoted 4 lines · Rajeshwari Shinde
This patch adds the driver for codec MAX98095 required by Snow Board
Signed-off-by Rajeshwari Shinde <[email protected]>
PATCH v4 2/6 Sound: MAX98095: Add the driver for codec
Hi all,
I am working on ODROID PC Exynos-4 Board (Cortex-A9). In that board i am working MAX98089 Audio codec.
How to initialize this audio codec and how to test this one in UBOOT level.
Can you please help me on this.
Thanks
Prem V.
Quoted 13 lines · Simon Glass
Quoted 4 lines · Rajeshwari Shinde
This patch adds the driver for codec MAX98095 required by Snow Board
Signed-off-by Rajeshwari Shinde <[email protected]>Acked-by Simon Glass <[email protected]>_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 2/6 Sound: MAX98095: Add the driver for codec
Hi Prem S,
We initialise MAX98095 using device tree, if you don't have a device tree support u need to have a asm/arch/sound.h
which will initialise all values like sample rate, codec type, etc.. Actually in u-boot we have added audio support to play a beep sound. You can have look at drivers/sound/sound.c
To test the same you can have look at common/cmd_sound.c, where we have 2 commands
sound init and sound play.
Hope this information will help you.
Signature · 2 lines
Regards, Rajeshwari Shinde
Quoted 34 lines · prem s
Hi all,
I am working on ODROID PC Exynos-4 Board (Cortex-A9). In that board i am working MAX98089 Audio codec.
How to initialize this audio codec and how to test this one in UBOOT level.
Can you please help me on this.
Thanks
Prem V.
Quoted 5 lines · Simon Glass
Quoted 3 lines · Rajeshwari Shinde
This patch adds the driver for codec MAX98095 required by Snow Board
Quoted 8 lines
Quoted 1 line
Signed-off-by Rajeshwari Shinde <[email protected]>Acked-by Simon Glass <[email protected]>_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 3/6 Sound: Support for MAX98095 codec in driver
In reply to Rajeshwari ShindeThis patchs adds support for MAX98095 codec in
sound driver.
---
Changes in V2:
- None
Chnages in V3:
- Removed non DT support for MAX98095
Changes in V4:
- None
drivers/sound/sound.c | 9 +++++++-- include/sound.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-)
drivers/sound/sound.c +7 -2
@@ -31,6 +31,7 @@#include <sound.h> #include <asm/arch/sound.h> #include "wm8994.h" +#include "max98095.h" /* defines */ #define SOUND_400_HZ 400
@@ -149,11 +150,15 @@ static int codec_init(const void *blob, struct i2stx_info *pi2s_tx) pi2s_tx->samplingrate, (pi2s_tx->samplingrate * (pi2s_tx->rfs)), pi2s_tx->bitspersample, pi2s_tx->channels); + }else if (!strcmp (codectype,"max98095" )) { + ret =max98095_init (blob, pi2s_tx->samplingrate, + (pi2s_tx->samplingrate * (pi2s_tx->rfs)), + pi2s_tx->bitspersample); }else { -debug ("%s: Unknown code type %s\n" , __func__, - codectype); +debug ("%s: Unknown codec type %s\n" , __func__, codectype);return -1 ; } +if (ret) {debug ("%s: Codec init failed\n" , __func__);return -1 ;
include/sound.h +1 -0
@@ -28,6 +28,7 @@enum en_sound_codec {CODEC_WM_8994 ,CODEC_WM_8995 , +CODEC_MAX_98095 ,CODEC_MAX };
Signature · 1 line
1.7.4.4
PATCH v4 3/6 Sound: Support for MAX98095 codec in driver
Hi Rajeshwari,
Quoted 4 lines · Rajeshwari Shinde
This patchs adds support for MAX98095 codec in
sound driver.Signed-off-by Rajeshwari Shinde <[email protected]>
Quoted 11 lines
---
Changes in V2:
- None
Chnages in V3:
- Removed non DT support for MAX98095
Changes in V4:
- Nonedrivers/sound/sound.c | 9 +++++++-- include/sound.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-)
PATCH v4 4/6 EXYNOS5: GPIO to enable MAX98095
In reply to Rajeshwari ShindeThis patch sets high a GPIO to enable the codec MAX98095
---
Changes in V2:
- None
Changes in V3:
- None
Changes in V4:
- None
board/samsung/smdk5250/smdk5250.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
board/samsung/smdk5250/smdk5250.c +15 -0
@@ -56,6 +56,18 @@ int board_usb_vbus_init(void) }#endif +#ifdef CONFIG_SOUND_MAX98095 +static void board_enable_audio_codec (void ) +{ +struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *) +samsung_get_base_gpio_part1 (); + +/* Enable MAX98095 Codec */ +s5p_gpio_direction_output (&gpio1->x1,7 ,1 ); +s5p_gpio_set_pull (&gpio1->x1,7 ,GPIO_PULL_NONE ); +} +#endif +int board_init (void ) { gd->bd->bi_boot_params = (PHYS_SDRAM_1 +0x100UL );
@@ -65,6 +77,9 @@ int board_init(void)#ifdef CONFIG_USB_EHCI_EXYNOS board_usb_vbus_init ();#endif +#ifdef CONFIG_SOUND_MAX98095 +board_enable_audio_codec (); +#endif return 0 ; }
Signature · 1 line
1.7.4.4
PATCH v4 5/6 EXYNOS5: FDT: Add compatible strings for MAX98095
In reply to Rajeshwari ShindeAdd required compatible information for MAX98095 codec
---
Changes in V2:
- None
Changes in V3:
- None
Changes in V4:
- None
include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
include/fdtdec.h +1 -0
@@ -81,6 +81,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_EHCI ,/* Exynos EHCI controller */ COMPAT_SAMSUNG_EXYNOS_USB_PHY ,/* Exynos phy controller for usb2.0 */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ +COMPAT_MAXIM_98095_CODEC ,/* MAX98095 Codec */ COMPAT_COUNT, };
lib/fdtdec.c +1 -0
@@ -56,6 +56,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS_EHCI ,"samsung,exynos-ehci" ),COMPAT (SAMSUNG_EXYNOS_USB_PHY ,"samsung,exynos-usb-phy" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), + COMPAT(MAXIM_98095_CODEC, "maxim,max98095-codec"), };const char *fdtdec_get_compatible (enum fdt_compat_id id)
Signature · 1 line
1.7.4.4
PATCH v4 6/6 config: Snow: Enable MAX98095 codec
In reply to Rajeshwari ShindeThis patch enables MAX98095 codec required for Snow
---
Changes in V4
- New patch.
include/configs/exynos5250-dt.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/exynos5250-dt.h +1 -0
@@ -296,6 +296,7 @@#ifdef CONFIG_CMD_SOUND #define CONFIG_SOUND #define CONFIG_I2S +#define CONFIG_SOUND_MAX98095 #define CONFIG_SOUND_WM8994 #endif
Signature · 1 line
1.7.4.4
PATCH v4 6/6 config: Snow: Enable MAX98095 codec
Quoted 3 lines · Rajeshwari Shinde
This patch enables MAX98095 codec required for Snow
Signed-off-by Rajeshwari Shinde <[email protected]>
Quoted 21 lines
---
Changes in V4
- New patch.include/configs/exynos5250-dt.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)include/configs/exynos5250-dt.h +1
-1@@ -296,6 +296,7 @@#ifdef CONFIG_CMD_SOUND #define CONFIG_SOUND #define CONFIG_I2S +#define CONFIG_SOUND_MAX98095 #define CONFIG_SOUND_WM8994 #endif --1.7.4.4
v4 cover EXYNOS5: Add audio support for Snow
In reply to Rajeshwari ShindeQuoted 24 lines · Rajeshwari Shinde
Driver for MAX98095 is added and support for same is incorporated in sound driver and Snow Board.
This patchset is based on top of
"EXYNOS5: SNOW: Add initial dts and config file"Changes in V2:
- Corrected multi-line comment style
Changes in V3:
- Removed non DT support for MAX98095
- Config for both MAX98095 and WM8994 added in
exynos5 config file.
Changes in V4:
- Separated the patches to create initial dts and config file for Snow
- Modified XXTI clock source function as per Exynos naming conventionRajeshwari Shinde (6):
EXYNOS5: Add function to enable XXTI clock source
Sound: MAX98095: Add the driver for codec
Sound: Support for MAX98095 codec in driver
EXYNOS5: GPIO to enable MAX98095
EXYNOS5: FDT: Add compatible strings for MAX98095
config: Snow: Enable MAX98095 codec
Quoted 15 lines
arch/arm/cpu/armv7/exynos/power.c | 17 + arch/arm/include/asm/arch-exynos/power.h | 11 + board/samsung/smdk5250/smdk5250.c | 15 + drivers/sound/Makefile | 1 + drivers/sound/max98095.c | 550 ++++++++++++++++++++++++++++++ drivers/sound/max98095.h | 311 +++++++++++++++++ drivers/sound/sound.c | 9 +- include/configs/exynos5250-dt.h | 1 + include/fdtdec.h | 1 + include/sound.h | 1 + lib/fdtdec.c | 1 + 11 files changed, 916 insertions(+), 2 deletions(-) create mode 100644 drivers/sound/max98095.c create mode 100644 drivers/sound/max98095.h
applied to u-boot-samsung.
Thanks,
Minkyu Kang.