Commit 920925f9 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Paul Mundt

sh: audio support for the sh7722 Migo-R board

Configure SIU port B pins and register the WM8978 audio codec.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 331af0c1
...@@ -419,6 +419,9 @@ static struct i2c_board_info migor_i2c_devices[] = { ...@@ -419,6 +419,9 @@ static struct i2c_board_info migor_i2c_devices[] = {
I2C_BOARD_INFO("migor_ts", 0x51), I2C_BOARD_INFO("migor_ts", 0x51),
.irq = 38, /* IRQ6 */ .irq = 38, /* IRQ6 */
}, },
{
I2C_BOARD_INFO("wm8978", 0x1a),
},
}; };
static struct i2c_board_info migor_i2c_camera[] = { static struct i2c_board_info migor_i2c_camera[] = {
...@@ -619,6 +622,19 @@ static int __init migor_devices_setup(void) ...@@ -619,6 +622,19 @@ static int __init migor_devices_setup(void)
platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20); platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20);
/* SIU: Port B */
gpio_request(GPIO_FN_SIUBOLR, NULL);
gpio_request(GPIO_FN_SIUBOBT, NULL);
gpio_request(GPIO_FN_SIUBISLD, NULL);
gpio_request(GPIO_FN_SIUBOSLD, NULL);
gpio_request(GPIO_FN_SIUMCKB, NULL);
/*
* The original driver sets SIUB OLR/OBT, ILR/IBT, and SIUA OLR/OBT to
* output. Need only SIUB, set to output for master mode (table 34.2)
*/
ctrl_outw(ctrl_inw(PORT_MSELCRA) | 1, PORT_MSELCRA);
i2c_register_board_info(0, migor_i2c_devices, i2c_register_board_info(0, migor_i2c_devices,
ARRAY_SIZE(migor_i2c_devices)); ARRAY_SIZE(migor_i2c_devices));
......
#ifndef __ASM_SH_MIGOR_H #ifndef __ASM_SH_MIGOR_H
#define __ASM_SH_MIGOR_H #define __ASM_SH_MIGOR_H
#define PORT_MSELCRA 0xa4050180
#define PORT_MSELCRB 0xa4050182 #define PORT_MSELCRB 0xa4050182
#define BSC_CS4BCR 0xfec10010 #define BSC_CS4BCR 0xfec10010
#define BSC_CS6ABCR 0xfec1001c #define BSC_CS6ABCR 0xfec1001c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment