mb/system76/bonw14: Enable TAS5825M smart amp
The Bonobo has 2 AMPs: one for the speakers and one for the subwoofer. Smart AMP data was collected using a logic analyzer connected to the IC during system start on proprietary firmware. This data is then used to generate a C file [1]. [1]: https://github.com/system76/smart-amp Change-Id: I5389a9890563ebd3adb20096b6225f474bc006f9 Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
parent
388c34605a
commit
c4a2c09655
@ -8,6 +8,7 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select DRIVERS_GENERIC_CBFS_SERIAL
|
select DRIVERS_GENERIC_CBFS_SERIAL
|
||||||
select DRIVERS_GENERIC_CBFS_UUID
|
select DRIVERS_GENERIC_CBFS_UUID
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
|
select DRIVERS_I2C_TAS5825M
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
select EC_SYSTEM76_EC_DGPU
|
select EC_SYSTEM76_EC_DGPU
|
||||||
select HAVE_ACPI_RESUME
|
select HAVE_ACPI_RESUME
|
||||||
|
@ -10,3 +10,4 @@ romstage-y += romstage.c
|
|||||||
ramstage-y += ramstage.c
|
ramstage-y += ramstage.c
|
||||||
ramstage-y += gpio.c
|
ramstage-y += gpio.c
|
||||||
ramstage-y += hda_verb.c
|
ramstage-y += hda_verb.c
|
||||||
|
ramstage-y += tas5825m.c
|
||||||
|
@ -179,6 +179,15 @@ chip soc/intel/cannonlake
|
|||||||
device ref hda on
|
device ref hda on
|
||||||
register "PchHdaAudioLinkHda" = "1"
|
register "PchHdaAudioLinkHda" = "1"
|
||||||
end
|
end
|
||||||
device ref smbus on end
|
device ref smbus on
|
||||||
|
chip drivers/i2c/tas5825m
|
||||||
|
register "id" = "0"
|
||||||
|
device i2c 4e on end # (8bit address: 0x9c)
|
||||||
|
end
|
||||||
|
chip drivers/i2c/tas5825m
|
||||||
|
register "id" = "1"
|
||||||
|
device i2c 4f on end # (8bit address: 0x9e)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
1240
src/mainboard/system76/bonw14/tas5825m-normal.c
Normal file
1240
src/mainboard/system76/bonw14/tas5825m-normal.c
Normal file
File diff suppressed because it is too large
Load Diff
1240
src/mainboard/system76/bonw14/tas5825m-sub.c
Normal file
1240
src/mainboard/system76/bonw14/tas5825m-sub.c
Normal file
File diff suppressed because it is too large
Load Diff
15
src/mainboard/system76/bonw14/tas5825m.c
Normal file
15
src/mainboard/system76/bonw14/tas5825m.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <drivers/i2c/tas5825m/tas5825m.h>
|
||||||
|
|
||||||
|
#include "tas5825m-normal.c"
|
||||||
|
#include "tas5825m-sub.c"
|
||||||
|
|
||||||
|
int tas5825m_setup(struct device *dev, int id)
|
||||||
|
{
|
||||||
|
if (id == 0)
|
||||||
|
return tas5825m_setup_normal(dev);
|
||||||
|
if (id == 1)
|
||||||
|
return tas5825m_setup_sub(dev);
|
||||||
|
return -1;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user