Hello SH Kim,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/46291
to review the following change.
Change subject: driver/i2c/max98390: Add max98390_init function to enabe beep sound ......................................................................
driver/i2c/max98390: Add max98390_init function to enabe beep sound
Add AMP on sequence into device init function to enable beep sound on firmware screen.
BUG=b:170143676 BRANCH=firmware-hatch-12672.B TEST=built and verified beep sound on nightfury board
Change-Id: Iba6565acd233ca662f7776a8bb8ad4317c17b397 Signed-off-by: Seunghwan Kim sh_.kim@samsung.corp-partner.google.com --- M src/drivers/i2c/max98390/max98390.c 1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/46291/1
diff --git a/src/drivers/i2c/max98390/max98390.c b/src/drivers/i2c/max98390/max98390.c index 24c500b..ed4cfae 100644 --- a/src/drivers/i2c/max98390/max98390.c +++ b/src/drivers/i2c/max98390/max98390.c @@ -5,6 +5,7 @@ #include <acpi/acpigen.h> #include <console/console.h> #include <device/i2c.h> +#include <device/i2c_bus.h> #include <device/device.h> #include <device/path.h> #include <stdint.h> @@ -82,9 +83,33 @@ return name; }
+static void max98390_init(struct device *dev) +{ + /* Max98390 AMP on sequence for beep */ + i2c_dev_writeb_at16(dev, 0x2012, 0x6c); + i2c_dev_writeb_at16(dev, 0x201b, 0x01); + i2c_dev_writeb_at16(dev, 0x201d, 0x01); + i2c_dev_writeb_at16(dev, 0x201f, 0xfe); + i2c_dev_writeb_at16(dev, 0x2021, 0x00); + i2c_dev_writeb_at16(dev, 0x2022, 0x10); + i2c_dev_writeb_at16(dev, 0x2024, 0x40); + i2c_dev_writeb_at16(dev, 0x2026, 0x33); + i2c_dev_writeb_at16(dev, 0x203f, 0x03); + i2c_dev_writeb_at16(dev, 0x2050, 0x2d); + i2c_dev_writeb_at16(dev, 0x2076, 0x0e); + i2c_dev_writeb_at16(dev, 0x207c, 0x46); + i2c_dev_writeb_at16(dev, 0x2081, 0x03); + i2c_dev_writeb_at16(dev, 0x23ba, 0x8a); + i2c_dev_writeb_at16(dev, 0x23e1, 0x00); + i2c_dev_writeb_at16(dev, 0x203a, 0x81); + i2c_dev_writeb_at16(dev, 0x23ff, 0x01); +} + + static struct device_operations max98390_ops = { .read_resources = noop_read_resources, .set_resources = noop_set_resources, + .init = max98390_init, .acpi_name = max98390_acpi_name, .acpi_fill_ssdt = max98390_fill_ssdt, };
shkim has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46291 )
Change subject: driver/i2c/max98390: Add max98390_init function to enabe beep sound ......................................................................
Patch Set 2:
Amp on sequence has been confirmed by our audio guy.
SH Kim has uploaded a new patch set (#3) to the change originally created by shkim. ( https://review.coreboot.org/c/coreboot/+/46291 )
Change subject: driver/i2c/max98390: Add max98390_init function to enable beep sound ......................................................................
driver/i2c/max98390: Add max98390_init function to enable beep sound
Add AMP on sequence into device init function to enable beep sound on firmware screen.
BUG=b:170143676 BRANCH=firmware-hatch-12672.B TEST=built and verified beep sound on nightfury board
Change-Id: Iba6565acd233ca662f7776a8bb8ad4317c17b397 Signed-off-by: Seunghwan Kim sh_.kim@samsung.corp-partner.google.com --- M src/drivers/i2c/max98390/max98390.c 1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/46291/3
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46291 )
Change subject: driver/i2c/max98390: Add max98390_init function to enable beep sound ......................................................................
Patch Set 3:
Does this need to happen in coreboot in order for the amp to be ready by the time depthcharge takes over?
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46291 )
Change subject: driver/i2c/max98390: Add max98390_init function to enable beep sound ......................................................................
Patch Set 3:
Patch Set 3:
Does this need to happen in coreboot in order for the amp to be ready by the time depthcharge takes over?
I think it would be better to defer this to depthcharge since not all boot paths are going to need this.
SH Kim has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46291 )
Change subject: driver/i2c/max98390: Add max98390_init function to enable beep sound ......................................................................
Patch Set 3:
Initial depthcharge CLs here. https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+... https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+... https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+...