Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: tas571x: add support for TAS5733

This adds support for TAS5733.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Link: https://lore.kernel.org/r/20230222083300.218523-3-kamel.bouhara@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kamel Bouhara and committed by
Mark Brown
f5db4d00 95a29d5f

+59
+59
sound/soc/codecs/tas571x.c
··· 718 718 .volatile_table = &tas571x_volatile_regs, 719 719 }; 720 720 721 + static const char *const tas5733_supply_names[] = { 722 + "AVDD", 723 + "DVDD", 724 + "PVDD", 725 + }; 726 + 727 + static const struct reg_default tas5733_reg_defaults[] = { 728 + {TAS571X_CLK_CTRL_REG, 0x6c}, 729 + {TAS571X_DEV_ID_REG, 0x00}, 730 + {TAS571X_ERR_STATUS_REG, 0x00}, 731 + {TAS571X_SYS_CTRL_1_REG, 0xa0}, 732 + {TAS571X_SDI_REG, 0x05}, 733 + {TAS571X_SYS_CTRL_2_REG, 0x40}, 734 + {TAS571X_SOFT_MUTE_REG, 0x07}, 735 + {TAS571X_MVOL_REG, 0x03ff}, 736 + {TAS571X_CH1_VOL_REG, 0x00c0}, 737 + {TAS571X_CH2_VOL_REG, 0x00c0}, 738 + {TAS571X_CH3_VOL_REG, 0x00c0}, 739 + {TAS571X_VOL_CFG_REG, 0xf0}, 740 + {TAS571X_MODULATION_LIMIT_REG, 0x07}, 741 + {TAS571X_IC_DELAY_CH1_REG, 0xb8}, 742 + {TAS571X_IC_DELAY_CH2_REG, 0x60}, 743 + {TAS571X_IC_DELAY_CH3_REG, 0xa0}, 744 + {TAS571X_IC_DELAY_CH4_REG, 0x48}, 745 + {TAS571X_PWM_CH_SDN_GROUP_REG, 0x30}, 746 + {TAS571X_START_STOP_PERIOD_REG, 0x68}, 747 + {TAS571X_OSC_TRIM_REG, 0x82}, 748 + {TAS571X_BKND_ERR_REG, 0x02}, 749 + {TAS571X_INPUT_MUX_REG, 0x00897772}, 750 + {TAS571X_PWM_MUX_REG, 0x01021345}, 751 + {TAS5717_CH1_RIGHT_CH_MIX_REG, 0x00}, 752 + {TAS5717_CH1_LEFT_CH_MIX_REG, 0x800000}, 753 + {TAS5717_CH2_LEFT_CH_MIX_REG, 0x00}, 754 + {TAS5717_CH2_RIGHT_CH_MIX_REG, 0x800000}, 755 + }; 756 + 757 + static const struct regmap_config tas5733_regmap_config = { 758 + .reg_bits = 8, 759 + .val_bits = 32, 760 + .max_register = 0xff, 761 + .reg_read = tas571x_reg_read, 762 + .reg_write = tas571x_reg_write, 763 + .reg_defaults = tas5733_reg_defaults, 764 + .num_reg_defaults = ARRAY_SIZE(tas5733_reg_defaults), 765 + .cache_type = REGCACHE_RBTREE, 766 + .wr_table = &tas571x_write_regs, 767 + .volatile_table = &tas571x_volatile_regs, 768 + }; 769 + 770 + static const struct tas571x_chip tas5733_chip = { 771 + .supply_names = tas5733_supply_names, 772 + .num_supply_names = ARRAY_SIZE(tas5733_supply_names), 773 + .controls = tas5717_controls, 774 + .num_controls = ARRAY_SIZE(tas5717_controls), 775 + .regmap_config = &tas5733_regmap_config, 776 + .vol_reg_size = 2, 777 + }; 721 778 722 779 static const struct tas571x_chip tas5721_chip = { 723 780 .supply_names = tas5721_supply_names, ··· 954 897 { .compatible = "ti,tas5717", .data = &tas5717_chip, }, 955 898 { .compatible = "ti,tas5719", .data = &tas5717_chip, }, 956 899 { .compatible = "ti,tas5721", .data = &tas5721_chip, }, 900 + { .compatible = "ti,tas5733", .data = &tas5733_chip, }, 957 901 { } 958 902 }; 959 903 MODULE_DEVICE_TABLE(of, tas571x_of_match); ··· 965 907 { "tas5717", (kernel_ulong_t) &tas5717_chip }, 966 908 { "tas5719", (kernel_ulong_t) &tas5717_chip }, 967 909 { "tas5721", (kernel_ulong_t) &tas5721_chip }, 910 + { "tas5733", (kernel_ulong_t) &tas5733_chip }, 968 911 { } 969 912 }; 970 913 MODULE_DEVICE_TABLE(i2c, tas571x_i2c_id);