diff mbox series

[v1,09/10] staging: dsp: add support for Fortemedia FM34NE DSP

Message ID 20230221183211.21964-10-clamor95@gmail.com
State New
Headers show
Series Fix sound on ASUS Transformers | expand

Commit Message

Svyatoslav Ryhel Feb. 21, 2023, 6:32 p.m. UTC
FM34NE is digital sound processing chip used for active
noise suppression mainly on ASUS Transformers.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/staging/Kconfig          |   2 +
 drivers/staging/Makefile         |   1 +
 drivers/staging/dsp/Kconfig      |   7 +
 drivers/staging/dsp/Makefile     |   2 +
 drivers/staging/dsp/dsp-fm34ne.c | 364 +++++++++++++
 drivers/staging/dsp/dsp-fm34ne.h | 845 +++++++++++++++++++++++++++++++
 6 files changed, 1221 insertions(+)
 create mode 100644 drivers/staging/dsp/Kconfig
 create mode 100644 drivers/staging/dsp/Makefile
 create mode 100644 drivers/staging/dsp/dsp-fm34ne.c
 create mode 100644 drivers/staging/dsp/dsp-fm34ne.h

Comments

Mark Brown Feb. 21, 2023, 10:41 p.m. UTC | #1
On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
> FM34NE is digital sound processing chip used for active
> noise suppression mainly on ASUS Transformers.

This looks like it should be fairly straightforward to support
within ASoC without too much work, and since it's in the audio
path it should probably be referenced from the sound card it'll
end up having an ABI impact on the card.  Take a look at wm9090
for a moderately complex example of an analogue only device
(which this appears to be in terms of system integration).
Svyatoslav Ryhel Feb. 22, 2023, 8:06 a.m. UTC | #2
вт, 21 лют. 2023 р. о 21:39 Dan Carpenter <error27@gmail.com> пише:
>
> On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
> > +static int fm34ne_dsp_set_config(struct fm34ne_dsp_data *fm34, int state)
> > +{
> > +     struct device *dev = &fm34->client->dev;
> > +
> > +     const u8 *enable_ns_parameter = fm34->data->enable_noise_suppression;
> > +     int enable_ns_length = fm34->data->enable_ns_length;
> > +
> > +     const u8 *disable_ns_parameter = fm34->data->disable_noise_suppression;
> > +     int disable_ns_length = fm34->data->disable_ns_length;
> > +
> > +     int ret;
> > +
> > +     gpiod_set_value_cansleep(fm34->bypass_gpio, 1);
> > +     msleep(20);
> > +
> > +     switch (state) {
> > +     case FM34NE_NS_ENABLE:
> > +             ret = fm34ne_dsp_write_config(fm34->client, enable_parameter,
> > +                                           sizeof(enable_parameter));
> > +             if (ret < 0) {
> > +                     dev_err(dev, "failed to set DSP enable with %d\n", ret);
> > +                     goto exit;
> > +             }
> > +
> > +             ret = fm34ne_dsp_write_config(fm34->client, enable_ns_parameter,
> > +                                           enable_ns_length);
> > +             if (ret < 0) {
> > +                     dev_err(dev, "failed to enable DSP noise suppression with %d\n", ret);
> > +                     goto exit;
> > +             }
> > +
> > +             dev_info(dev, "noise suppression enable DSP parameter written\n");
>
> Delete this type of debug code.
>
> > +             break;
> > +
> > +     case FM34NE_NS_DISABLE:
> > +             ret = fm34ne_dsp_write_config(fm34->client, enable_parameter,
> > +                                           sizeof(enable_parameter));
> > +             if (ret < 0) {
> > +                     dev_err(dev, "failed to set DSP enable with %d\n", ret);
> > +                     goto exit;
> > +             }
> > +
> > +             ret = fm34ne_dsp_write_config(fm34->client, disable_ns_parameter,
> > +                                           disable_ns_length);
> > +             if (ret < 0) {
> > +                     dev_err(dev, "failed to disable DSP noise suppression with %d\n", ret);
> > +                     goto exit;
> > +             }
> > +
> > +             dev_info(dev, "noise suppression disable DSP parameter written\n");
>
> Same etc.
>
> > +             break;
> > +
> > +     case FM34NE_BYPASS:
> > +     default:
> > +             ret = fm34ne_dsp_write_config(fm34->client, bypass_parameter,
> > +                                           sizeof(bypass_parameter));
> > +             if (ret < 0) {
> > +                     dev_err(dev, "failed to set DSP bypass with %d\n", ret);
> > +                     goto exit;
> > +             }
> > +
> > +             dev_info(dev, "bypass DSP parameter written\n");
> > +             break;
> > +     }
> > +
> > +exit:
> > +     gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
> > +
> > +     return ret;
> > +}
> > +
> > +static int fm34ne_dsp_set_hw(struct fm34ne_dsp_data *fm34)
> > +{
> > +     struct device *dev = &fm34->client->dev;
> > +     int ret;
> > +
> > +     ret = clk_prepare_enable(fm34->dap_mclk);
> > +     if (ret) {
> > +             dev_err(dev, "failed to enable the DSP MCLK: %d\n", ret);
> > +             return ret;
> > +     }
> > +
> > +     ret = regulator_enable(fm34->vdd_supply);
> > +     if (ret < 0) {
> > +             dev_err(dev, "failed to enable vdd power supply\n");
>
> clk_disable_unprepare(fm34->dap_mclk);

No, dap_mclk has to be on, else there will be no sound on the device.

> > +             return ret;
> > +     }
> > +
> > +     return 0;
> > +}
> > +
> > +static void fm34ne_dsp_reset(struct fm34ne_dsp_data *fm34)
> > +{
> > +     gpiod_set_value_cansleep(fm34->reset_gpio, 1);
> > +     msleep(20);
> > +
> > +     gpiod_set_value_cansleep(fm34->reset_gpio, 0);
> > +     msleep(100);
> > +}
> > +
> > +static int fm34ne_dsp_init_chip(struct fm34ne_dsp_data *fm34)
> > +{
> > +     const u8 *input_parameter = fm34->data->input_parameter;
> > +     int input_parameter_length = fm34->data->input_parameter_length;
> > +     int ret;
> > +
> > +     ret = fm34ne_dsp_set_hw(fm34);
> > +     if (ret)
> > +             return ret;
> > +
> > +     fm34ne_dsp_reset(fm34);
> > +
> > +     gpiod_set_value_cansleep(fm34->bypass_gpio, 1);
> > +     msleep(20);
> > +
> > +     ret = i2c_smbus_write_byte(fm34->client, FM34NE_I2C_CHECK);
> > +     if (ret < 0) {
> > +             dev_info(&fm34->client->dev, "initial write failed\n");
>
> dev_warn()?
>
> > +             msleep(50);
> > +
> > +             fm34ne_dsp_reset(fm34);
> > +             gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
> > +
> > +             return ret;
> > +     }
> > +
> > +     ret = fm34ne_dsp_write_config(fm34->client, input_parameter,
> > +                                   input_parameter_length);
> > +     if (ret < 0)
> > +             return -EINVAL;
>
> Why not propagate the error code from fm34ne_dsp_write_config()?
>
> > +
> > +     msleep(100);
> > +     gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
> > +
> > +     dev_info(&fm34->client->dev, "%s detected\n", fm34->data->model);
> > +
> > +     /* Constantly set DSP to bypass mode for now */
> > +     ret = fm34ne_dsp_set_config(fm34, FM34NE_BYPASS);
> > +     if (ret)
> > +             return ret;
> > +
> > +     return 0;
> > +}
>
> regards,
> dan carpenter

All other notes are reasonable. Thanks

Best regards,
Svyatoslav R.
Svyatoslav Ryhel Feb. 22, 2023, 8:14 a.m. UTC | #3
ср, 22 лют. 2023 р. о 00:41 Mark Brown <broonie@kernel.org> пише:
>
> On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
> > FM34NE is digital sound processing chip used for active
> > noise suppression mainly on ASUS Transformers.
>
> This looks like it should be fairly straightforward to support
> within ASoC without too much work, and since it's in the audio
> path it should probably be referenced from the sound card it'll
> end up having an ABI impact on the card.  Take a look at wm9090

wm9090 is a sound codec, like rt5631 or wm8903 while fm34 is NOT a
sound codec. It is sound processing device which must be active only
when DMIC is used. In all other cases it has to be bypassed. At the same time,
it has to be set up because else there will be no sound on the actual device.
In the current state the driver sets up DSP and sets in constant bypass mode.

> for a moderately complex example of an analogue only device
> (which this appears to be in terms of system integration).
Svyatoslav Ryhel Feb. 22, 2023, 8:19 a.m. UTC | #4
вт, 21 лют. 2023 р. о 21:27 Greg Kroah-Hartman
<gregkh@linuxfoundation.org> пише:
>
> On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
> > FM34NE is digital sound processing chip used for active
> > noise suppression mainly on ASUS Transformers.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> >  drivers/staging/Kconfig          |   2 +
> >  drivers/staging/Makefile         |   1 +
> >  drivers/staging/dsp/Kconfig      |   7 +
> >  drivers/staging/dsp/Makefile     |   2 +
> >  drivers/staging/dsp/dsp-fm34ne.c | 364 +++++++++++++
> >  drivers/staging/dsp/dsp-fm34ne.h | 845 +++++++++++++++++++++++++++++++
> >  6 files changed, 1221 insertions(+)
> >  create mode 100644 drivers/staging/dsp/Kconfig
> >  create mode 100644 drivers/staging/dsp/Makefile
> >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.c
> >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.h
>
>
> Sorry, but why is this going into drivers/staging/ at all?  What is
> needed to be done to get this out of staging?  Why not do that work
> right now?  At the least, we need a TODO file in the directory that
> lists what needs to be done and who is responsible for it.

Because this driver sets up fm34 and switches it to bypass mode allowing
sound to work on the device. There is no dsp framework in kernel which could
be called to operate dsp from the actual sound codec. (If there is, I
would be glad
if you show me). Fm34 must be active only on DMIC use, all other cases require
it to be in bypass.

> But again, just do the work now, it's faster and simpler to do it before
> you submit it instead of waiting until after it is merged.
>
> Also, no need for a .h file when you only have one .c file.  Just put
> them all together into one file please.

I understand, but the header contains sets of configuration sequences.
Including those into .c will make it barely readable.

> thanks,
>
> greg k-h
Claudiu Beznea Feb. 22, 2023, 9:20 a.m. UTC | #5
On 21.02.2023 20:32, Svyatoslav Ryhel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> FM34NE is digital sound processing chip used for active
> noise suppression mainly on ASUS Transformers.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  drivers/staging/Kconfig          |   2 +
>  drivers/staging/Makefile         |   1 +
>  drivers/staging/dsp/Kconfig      |   7 +
>  drivers/staging/dsp/Makefile     |   2 +
>  drivers/staging/dsp/dsp-fm34ne.c | 364 +++++++++++++
>  drivers/staging/dsp/dsp-fm34ne.h | 845 +++++++++++++++++++++++++++++++
>  6 files changed, 1221 insertions(+)
>  create mode 100644 drivers/staging/dsp/Kconfig
>  create mode 100644 drivers/staging/dsp/Makefile
>  create mode 100644 drivers/staging/dsp/dsp-fm34ne.c
>  create mode 100644 drivers/staging/dsp/dsp-fm34ne.h
> 
> diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
> index 5cfabd5376cc..cd22b7f36b08 100644
> --- a/drivers/staging/Kconfig
> +++ b/drivers/staging/Kconfig
> @@ -80,4 +80,6 @@ source "drivers/staging/qlge/Kconfig"
> 
>  source "drivers/staging/vme_user/Kconfig"
> 
> +source "drivers/staging/dsp/Kconfig"
> +
>  endif # STAGING
> diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
> index f8c3aa9c2418..a7250a0b5fca 100644
> --- a/drivers/staging/Makefile
> +++ b/drivers/staging/Makefile
> @@ -2,6 +2,7 @@
>  # Makefile for staging directory
> 
>  obj-y                          += media/
> +obj-y                          += dsp/
>  obj-$(CONFIG_PRISM2_USB)       += wlan-ng/
>  obj-$(CONFIG_FB_OLPC_DCON)     += olpc_dcon/
>  obj-$(CONFIG_RTL8192U)         += rtl8192u/
> diff --git a/drivers/staging/dsp/Kconfig b/drivers/staging/dsp/Kconfig
> new file mode 100644
> index 000000000000..d295ea063ad5
> --- /dev/null
> +++ b/drivers/staging/dsp/Kconfig
> @@ -0,0 +1,7 @@
> +# SPDX-License-Identifier: GPL-2.0
> +config DSP_FM34NE
> +       tristate "DSP FM34NE driver"
> +       depends on I2C && GPIOLIB
> +       help
> +         Say Y or M here if you want to add support for Fortemedia FM34NE
> +         DSP mainly used on ASUS T20/T30 Transformers.
> diff --git a/drivers/staging/dsp/Makefile b/drivers/staging/dsp/Makefile
> new file mode 100644
> index 000000000000..e60ba3c88e08
> --- /dev/null
> +++ b/drivers/staging/dsp/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0
> +obj-$(CONFIG_DSP_FM34NE) += dsp-fm34ne.o
> diff --git a/drivers/staging/dsp/dsp-fm34ne.c b/drivers/staging/dsp/dsp-fm34ne.c
> new file mode 100644
> index 000000000000..93a464a7bb4b
> --- /dev/null
> +++ b/drivers/staging/dsp/dsp-fm34ne.c
> @@ -0,0 +1,364 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Fortemedia FM34NE DSP driver
> + */
> +
> +#include <linux/clk.h>
> +#include <linux/clk/tegra.h>
> +#include <linux/delay.h>
> +#include <linux/gpio/consumer.h>
> +#include <linux/i2c.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
> +#include <linux/of_device.h>
> +#include <linux/regulator/consumer.h>
> +
> +#include "dsp-fm34ne.h"
> +
> +#define FM34NE_I2C_CHECK 0xC0
> +#define FM34NE_MAX_RETRY 5
> +
> +enum state {
> +       FM34NE_BYPASS,
> +       FM34NE_NS_ENABLE,
> +       FM34NE_NS_DISABLE,
> +       FM34NE_MAX,
> +};
> +
> +struct fm34ne_dsp_data {
> +       struct i2c_client *client;
> +
> +       struct gpio_desc *bypass_gpio;
> +       struct gpio_desc *reset_gpio;
> +
> +       struct clk *dap_mclk;
> +       struct regulator *vdd_supply;
> +
> +       const struct fm34ne_dsp_devdata *data;
> +};
> +
> +static int fm34ne_dsp_write_config(struct i2c_client *client,
> +                                  const u8 *config, size_t size)
> +{
> +       int ret, i;
> +
> +       for (i = 0; i < FM34NE_MAX_RETRY; i++) {
> +               ret = i2c_master_send(client, config, size);
> +               if (ret > 0)
> +                       return 0;
> +
> +               usleep_range(5000, 6000);
> +       }
> +
> +       return ret;
> +}
> +
> +static int fm34ne_dsp_set_config(struct fm34ne_dsp_data *fm34, int state)
> +{
> +       struct device *dev = &fm34->client->dev;
> +
> +       const u8 *enable_ns_parameter = fm34->data->enable_noise_suppression;
> +       int enable_ns_length = fm34->data->enable_ns_length;
> +
> +       const u8 *disable_ns_parameter = fm34->data->disable_noise_suppression;
> +       int disable_ns_length = fm34->data->disable_ns_length;
> +
> +       int ret;
> +
> +       gpiod_set_value_cansleep(fm34->bypass_gpio, 1);
> +       msleep(20);
> +
> +       switch (state) {
> +       case FM34NE_NS_ENABLE:
> +               ret = fm34ne_dsp_write_config(fm34->client, enable_parameter,
> +                                             sizeof(enable_parameter));
> +               if (ret < 0) {
> +                       dev_err(dev, "failed to set DSP enable with %d\n", ret);
> +                       goto exit;
> +               }
> +
> +               ret = fm34ne_dsp_write_config(fm34->client, enable_ns_parameter,
> +                                             enable_ns_length);
> +               if (ret < 0) {
> +                       dev_err(dev, "failed to enable DSP noise suppression with %d\n", ret);
> +                       goto exit;
> +               }
> +
> +               dev_info(dev, "noise suppression enable DSP parameter written\n");
> +               break;
> +
> +       case FM34NE_NS_DISABLE:
> +               ret = fm34ne_dsp_write_config(fm34->client, enable_parameter,
> +                                             sizeof(enable_parameter));
> +               if (ret < 0) {
> +                       dev_err(dev, "failed to set DSP enable with %d\n", ret);
> +                       goto exit;
> +               }
> +
> +               ret = fm34ne_dsp_write_config(fm34->client, disable_ns_parameter,
> +                                             disable_ns_length);
> +               if (ret < 0) {
> +                       dev_err(dev, "failed to disable DSP noise suppression with %d\n", ret);
> +                       goto exit;
> +               }
> +
> +               dev_info(dev, "noise suppression disable DSP parameter written\n");
> +               break;
> +
> +       case FM34NE_BYPASS:
> +       default:
> +               ret = fm34ne_dsp_write_config(fm34->client, bypass_parameter,
> +                                             sizeof(bypass_parameter));
> +               if (ret < 0) {
> +                       dev_err(dev, "failed to set DSP bypass with %d\n", ret);
> +                       goto exit;
> +               }
> +
> +               dev_info(dev, "bypass DSP parameter written\n");
> +               break;
> +       }
> +
> +exit:
> +       gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
> +
> +       return ret;
> +}
> +
> +static int fm34ne_dsp_set_hw(struct fm34ne_dsp_data *fm34)
> +{
> +       struct device *dev = &fm34->client->dev;
> +       int ret;
> +
> +       ret = clk_prepare_enable(fm34->dap_mclk);
> +       if (ret) {
> +               dev_err(dev, "failed to enable the DSP MCLK: %d\n", ret);
> +               return ret;
> +       }
> +
> +       ret = regulator_enable(fm34->vdd_supply);
> +       if (ret < 0) {
> +               dev_err(dev, "failed to enable vdd power supply\n");
> +               return ret;
> +       }
> +
> +       return 0;
> +}
> +
> +static void fm34ne_dsp_reset(struct fm34ne_dsp_data *fm34)
> +{
> +       gpiod_set_value_cansleep(fm34->reset_gpio, 1);
> +       msleep(20);
> +
> +       gpiod_set_value_cansleep(fm34->reset_gpio, 0);
> +       msleep(100);
> +}
> +
> +static int fm34ne_dsp_init_chip(struct fm34ne_dsp_data *fm34)
> +{
> +       const u8 *input_parameter = fm34->data->input_parameter;
> +       int input_parameter_length = fm34->data->input_parameter_length;
> +       int ret;
> +
> +       ret = fm34ne_dsp_set_hw(fm34);
> +       if (ret)
> +               return ret;
> +
> +       fm34ne_dsp_reset(fm34);
> +
> +       gpiod_set_value_cansleep(fm34->bypass_gpio, 1);
> +       msleep(20);
> +
> +       ret = i2c_smbus_write_byte(fm34->client, FM34NE_I2C_CHECK);
> +       if (ret < 0) {
> +               dev_info(&fm34->client->dev, "initial write failed\n");
> +               msleep(50);
> +
> +               fm34ne_dsp_reset(fm34);
> +               gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
> +
> +               return ret;
> +       }
> +
> +       ret = fm34ne_dsp_write_config(fm34->client, input_parameter,
> +                                     input_parameter_length);
> +       if (ret < 0)
> +               return -EINVAL;
> +
> +       msleep(100);
> +       gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
> +
> +       dev_info(&fm34->client->dev, "%s detected\n", fm34->data->model);
> +
> +       /* Constantly set DSP to bypass mode for now */
> +       ret = fm34ne_dsp_set_config(fm34, FM34NE_BYPASS);
> +       if (ret)
> +               return ret;
> +
> +       return 0;

You can directly
	return ret;
or:
	return fm34ne_dsp_set_config();

> +}
> +
> +static int fm34ne_dsp_probe(struct i2c_client *client,
> +                           const struct i2c_device_id *id)
> +{
> +       struct device *dev = &client->dev;
> +       struct fm34ne_dsp_data *fm34;
> +       int ret;
> +
> +       fm34 = devm_kzalloc(dev, sizeof(*fm34), GFP_KERNEL);
> +       if (!fm34)
> +               return -ENOMEM;
> +
> +       i2c_set_clientdata(client, fm34);
> +       fm34->client = client;
> +
> +       fm34->dap_mclk = devm_clk_get_optional(dev, "mclk");
> +       if (IS_ERR(fm34->dap_mclk))
> +               return dev_err_probe(dev, PTR_ERR(fm34->dap_mclk),
> +                                    "can't retrieve DSP MCLK\n");
> +
> +       fm34->vdd_supply = devm_regulator_get(dev, "vdd");
> +       if (IS_ERR(fm34->vdd_supply))
> +               return dev_err_probe(dev, PTR_ERR(fm34->vdd_supply),
> +                                    "failed to get vdd regulator\n");
> +
> +       fm34->reset_gpio = devm_gpiod_get_optional(dev, "reset",
> +                                                  GPIOD_OUT_LOW);
> +       if (IS_ERR(fm34->reset_gpio))
> +               return dev_err_probe(dev, PTR_ERR(fm34->reset_gpio),
> +                                    "failed to get reset GPIO\n");
> +
> +       /*
> +        * Bypass gpio is used to set audio into bypass mode
> +        * in relation to dsp to be able to program it. Once
> +        * programming is done, bypass gpio has to be set to
> +        * low to return dsp into audio processing.
> +        */
> +       fm34->bypass_gpio = devm_gpiod_get_optional(dev, "bypass",
> +                                                   GPIOD_OUT_LOW);
> +       if (IS_ERR(fm34->bypass_gpio))
> +               return dev_err_probe(dev, PTR_ERR(fm34->bypass_gpio),
> +                                    "failed to get bypass GPIO\n");
> +
> +       fm34->data = of_device_get_match_data(dev);
> +       if (!fm34->data)
> +               return -ENODEV;
> +
> +       ret = fm34ne_dsp_init_chip(fm34);
> +       if (ret)
> +               return dev_err_probe(dev, ret,
> +                                    "failed to init DSP chip\n");
> +
> +       return 0;
> +}
> +
> +static int fm34ne_dsp_suspend(struct device *dev)
> +{
> +       struct i2c_client *client = to_i2c_client(dev);
> +       struct fm34ne_dsp_data *fm34 = i2c_get_clientdata(client);
> +
> +       gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
> +
> +       regulator_disable(fm34->vdd_supply);
> +
> +       clk_disable_unprepare(fm34->dap_mclk);
> +
> +       return 0;
> +}
> +
> +static int fm34ne_dsp_resume(struct device *dev)
> +{
> +       struct i2c_client *client = to_i2c_client(dev);
> +       struct fm34ne_dsp_data *fm34 = i2c_get_clientdata(client);
> +       int ret;
> +
> +       ret = fm34ne_dsp_init_chip(fm34);
> +       if (ret)
> +               dev_err(&client->dev, "failed to re-init DSP chip with %d\n", ret);
> +
> +       return 0;
> +}
> +
> +static DEFINE_SIMPLE_DEV_PM_OPS(fm34ne_dsp_pm_ops,
> +                        fm34ne_dsp_suspend, fm34ne_dsp_resume);
> +
> +static const struct fm34ne_dsp_devdata tf101_dsp_data = {
> +       .model = "ASUS Eee Pad Trnasformer TF101",
> +       .input_parameter = TF101_input_parameter,
> +       .input_parameter_length = sizeof(TF101_input_parameter),
> +       .enable_noise_suppression = TF101_enable_NS,
> +       .enable_ns_length = sizeof(TF101_enable_NS),
> +       .disable_noise_suppression = TF101_disable_NS,
> +       .disable_ns_length = sizeof(TF101_disable_NS),
> +};
> +
> +static const struct fm34ne_dsp_devdata tf201_dsp_data = {
> +       .model = "ASUS Transformer Prime TF201",
> +       .input_parameter = TF201_input_parameter,
> +       .input_parameter_length = sizeof(TF201_input_parameter),
> +       .enable_noise_suppression = TF201_enable_NS,
> +       .enable_ns_length = sizeof(TF201_enable_NS),
> +       .disable_noise_suppression = TF201_disable_NS,
> +       .disable_ns_length = sizeof(TF201_disable_NS),
> +};
> +
> +static const struct fm34ne_dsp_devdata tf300t_dsp_data = {
> +       .model = "ASUS Transformer PAD TF300T",
> +       .input_parameter = TF300T_input_parameter,
> +       .input_parameter_length = sizeof(TF300T_input_parameter),
> +       .enable_noise_suppression = TF201_enable_NS,
> +       .enable_ns_length = sizeof(TF201_enable_NS),
> +       .disable_noise_suppression = TF201_disable_NS,
> +       .disable_ns_length = sizeof(TF201_disable_NS),
> +};
> +
> +static const struct fm34ne_dsp_devdata tf700t_dsp_data = {
> +       .model = "ASUS Transformer Infinity TF700T",
> +       .input_parameter = TF700T_input_parameter,
> +       .input_parameter_length = sizeof(TF700T_input_parameter),
> +       .enable_noise_suppression = TF700T_enable_NS,
> +       .enable_ns_length = sizeof(TF700T_enable_NS),
> +       .disable_noise_suppression = TF700T_disable_NS,
> +       .disable_ns_length = sizeof(TF700T_disable_NS),
> +};
> +
> +static const struct fm34ne_dsp_devdata chagall_dsp_data = {
> +       .model = "Pegatron Chagall",
> +       .input_parameter = TF300T_input_parameter,
> +       .input_parameter_length = sizeof(TF300T_input_parameter),
> +       .enable_noise_suppression = TF201_enable_NS,
> +       .enable_ns_length = sizeof(TF201_enable_NS),
> +       .disable_noise_suppression = TF201_disable_NS,
> +       .disable_ns_length = sizeof(TF201_disable_NS),
> +};
> +
> +static const struct of_device_id fm34ne_dsp_match[] = {
> +       { .compatible = "asus,tf101-dsp", .data = &tf101_dsp_data },
> +       { .compatible = "asus,tf201-dsp", .data = &tf201_dsp_data },
> +       { .compatible = "asus,tf300t-dsp", .data = &tf300t_dsp_data },
> +       { .compatible = "asus,tf700t-dsp", .data = &tf700t_dsp_data },
> +       { .compatible = "pegatron,chagall-dsp", .data = &chagall_dsp_data },
> +       { }
> +};
> +MODULE_DEVICE_TABLE(of, fm34ne_dsp_match);
> +
> +static const struct i2c_device_id fm34ne_dsp_id[] = {
> +       { "dsp_fm34ne", 0 },
> +       { }
> +};
> +MODULE_DEVICE_TABLE(i2c, fm34ne_dsp_id);
> +
> +static struct i2c_driver fm34ne_dsp_driver = {
> +       .driver = {
> +               .name = "fm34ne-dsp",
> +               .pm = pm_sleep_ptr(&fm34ne_dsp_pm_ops),
> +               .of_match_table = fm34ne_dsp_match,
> +       },
> +       .probe = fm34ne_dsp_probe,
> +       .id_table = fm34ne_dsp_id,
> +};
> +module_i2c_driver(fm34ne_dsp_driver);
> +
> +MODULE_AUTHOR("Svyatoslav Ryhel <clamor95@gmail.com>");
> +MODULE_DESCRIPTION("Fortemedia FM34NE DSP driver");
> +MODULE_LICENSE("GPL");
> diff --git a/drivers/staging/dsp/dsp-fm34ne.h b/drivers/staging/dsp/dsp-fm34ne.h
> new file mode 100644
> index 000000000000..428ac33dd310
> --- /dev/null
> +++ b/drivers/staging/dsp/dsp-fm34ne.h
> @@ -0,0 +1,845 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +
> +#ifndef __DSP_FM34NE_H__
> +#define __DSP_FM34NE_H__
> +
> +struct fm34ne_dsp_devdata {
> +       const char *model;
> +
> +       const u8 *input_parameter;
> +       int input_parameter_length;
> +
> +       const u8 *enable_noise_suppression;
> +       int enable_ns_length;
> +
> +       const u8 *disable_noise_suppression;
> +       int disable_ns_length;
> +};
> +
> +/* Common section */
> +static const u8 bypass_parameter[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04
> +};
> +
> +static const u8 enable_parameter[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x00
> +};
> +
> +/* TF201 section */
> +static const u8 TF201_input_parameter[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x68, 0x64, 0x04,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x09, 0x19, 0x01, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0A, 0x27, 0x90, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0B, 0x19, 0x01, 0x10,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0C, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0D, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0E, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0F, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x10, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x11, 0x82, 0x2D, 0x20,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x12, 0x27, 0x98, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x13, 0x19, 0x01, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x14, 0x80, 0x50, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x15, 0x90, 0x50, 0x3A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x16, 0x80, 0x50, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x17, 0x90, 0x50, 0x4F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x18, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x19, 0x19, 0x00, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1A, 0x80, 0x00, 0xAC,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1B, 0x26, 0x7C, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1C, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1D, 0x19, 0x1D, 0x82,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1E, 0x19, 0x1C, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1F, 0x80, 0x53, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x20, 0x93, 0xE2, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x21, 0x80, 0x4F, 0xBA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x22, 0x22, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x23, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x24, 0x18, 0x2F, 0xD0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x25, 0x94, 0x4F, 0xB6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x26, 0x80, 0x4F, 0x6A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x27, 0x26, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x28, 0x18, 0x2F, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x29, 0x18, 0x2B, 0xCF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2A, 0x95, 0x62, 0x06,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2B, 0x95, 0x61, 0x46,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2C, 0x40, 0xFA, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2D, 0x40, 0xE5, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2E, 0x82, 0x30, 0x14,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2F, 0x27, 0x00, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x30, 0x22, 0x78, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x31, 0x83, 0xFD, 0x44,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x32, 0x26, 0xE2, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x33, 0x19, 0x03, 0x90,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x34, 0x93, 0xFD, 0x4A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x35, 0x83, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x36, 0x23, 0xA2, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x37, 0x93, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x38, 0x00, 0x00, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x39, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3A, 0x18, 0x3F, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3B, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3C, 0x19, 0x6C, 0xA4,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3D, 0x19, 0x66, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3E, 0x80, 0x79, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3F, 0x82, 0x2D, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x40, 0x27, 0x97, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x41, 0x19, 0x04, 0x40,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x42, 0x94, 0x7B, 0xD6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x43, 0x80, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x44, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x45, 0x18, 0x48, 0xDF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x46, 0x38, 0x00, 0x87,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x47, 0x09, 0x00, 0x1B,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x48, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x49, 0x18, 0x2D, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4A, 0x18, 0x21, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4B, 0x88, 0x4F, 0x47,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4C, 0x82, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4D, 0x22, 0x62, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4E, 0x26, 0x62, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4F, 0x19, 0x05, 0x25,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x50, 0x3B, 0xFF, 0xC7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x51, 0x19, 0x05, 0x3F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x52, 0x0D, 0x01, 0xA6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x53, 0x92, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x54, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x55, 0x18, 0x23, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x56, 0x96, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x57, 0x96, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x58, 0x9A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x59, 0x9A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5A, 0x96, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5B, 0x38, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5C, 0x83, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5D, 0x3B, 0x20, 0x02,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5E, 0x36, 0x2B, 0x01,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5F, 0x36, 0x2B, 0x60,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x60, 0x1C, 0x72, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x61, 0x93, 0xFF, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x62, 0x93, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x63, 0x86, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x64, 0x86, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x65, 0x8A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x66, 0x8A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x67, 0x86, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x68, 0x0D, 0x08, 0x28,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x69, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6A, 0x18, 0x24, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6B, 0x83, 0xFC, 0xFA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6C, 0x23, 0x8A, 0xBF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6D, 0x82, 0x2D, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6E, 0x27, 0x97, 0xDF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6F, 0x23, 0xAA, 0x91,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x70, 0x93, 0xFC, 0xFA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x71, 0x83, 0x80, 0x30,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x72, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x73, 0x18, 0x3E, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x74, 0x80, 0x7A, 0x4A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x75, 0x19, 0x07, 0xE2,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x76, 0x23, 0x3E, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x77, 0x0D, 0x00, 0xEA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x78, 0x80, 0x7B, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x79, 0x38, 0x7E, 0x02,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7A, 0x1C, 0x76, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7B, 0x90, 0x7B, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7C, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7D, 0x19, 0x75, 0xCF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7E, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7F, 0x19, 0x75, 0x9F,
> +       0xFC, 0xF3, 0x68, 0x64, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA0, 0x91, 0xCB,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB0, 0x50, 0x1A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA1, 0x82, 0xF3,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB1, 0x02, 0xF5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA2, 0x82, 0xB5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB2, 0x50, 0x1F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA3, 0x83, 0xF4,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB3, 0x50, 0x2A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA4, 0x96, 0x66,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB4, 0x50, 0x3B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA5, 0x82, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB5, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA6, 0xC2, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB6, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA7, 0xC2, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB7, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA8, 0x82, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB8, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA9, 0x82, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB9, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAA, 0xC2, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBA, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAB, 0x82, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBB, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAC, 0xC2, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBC, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAD, 0x83, 0xE8,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBD, 0x50, 0x6B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAE, 0x97, 0x58,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBE, 0x50, 0x74,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF8, 0x80, 0x05,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC8, 0x00, 0x29,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xEE, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF9, 0x08, 0x5F,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFA, 0x24, 0x81,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x05, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x01, 0x00, 0x02,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x07, 0xF0, 0xF0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x09, 0x08, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0D, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x08, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF2, 0x00, 0x44,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF6, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC6, 0x00, 0x06,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC7, 0x00, 0x08,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xD2, 0x8A, 0x94,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00
> +};
> +
> +static const u8 TF201_enable_NS[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x01
> +};
> +
> +static const u8 TF201_disable_NS[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10
> +};
> +
> +/* TF700T section */
> +static const u8 TF700T_input_parameter[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x68, 0x64, 0x04,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x09, 0x19, 0x01, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0A, 0x27, 0x90, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0B, 0x19, 0x01, 0x10,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0C, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0D, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0E, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0F, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x10, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x11, 0x82, 0x2D, 0x20,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x12, 0x27, 0x98, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x13, 0x19, 0x01, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x14, 0x80, 0x50, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x15, 0x90, 0x50, 0x3A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x16, 0x80, 0x50, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x17, 0x90, 0x50, 0x4F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x18, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x19, 0x19, 0x00, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1A, 0x80, 0x00, 0xAC,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1B, 0x26, 0x7C, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1C, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1D, 0x19, 0x1D, 0x82,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1E, 0x19, 0x1C, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1F, 0x80, 0x53, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x20, 0x93, 0xE2, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x21, 0x80, 0x4F, 0xBA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x22, 0x22, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x23, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x24, 0x18, 0x2F, 0xD0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x25, 0x94, 0x4F, 0xB6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x26, 0x80, 0x4F, 0x6A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x27, 0x26, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x28, 0x18, 0x2F, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x29, 0x18, 0x2B, 0xCF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2A, 0x95, 0x62, 0x06,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2B, 0x95, 0x61, 0x46,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2C, 0x40, 0xFA, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2D, 0x40, 0xE5, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2E, 0x82, 0x30, 0x14,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2F, 0x27, 0x00, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x30, 0x22, 0x78, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x31, 0x83, 0xFD, 0x44,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x32, 0x26, 0xE2, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x33, 0x19, 0x03, 0x90,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x34, 0x93, 0xFD, 0x4A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x35, 0x83, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x36, 0x23, 0xA2, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x37, 0x93, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x38, 0x00, 0x00, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x39, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3A, 0x18, 0x3F, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3B, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3C, 0x19, 0x6C, 0xA4,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3D, 0x19, 0x66, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3E, 0x80, 0x79, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3F, 0x82, 0x2D, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x40, 0x27, 0x97, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x41, 0x19, 0x04, 0x40,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x42, 0x94, 0x7B, 0xD6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x43, 0x80, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x44, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x45, 0x18, 0x48, 0xDF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x46, 0x38, 0x00, 0x87,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x47, 0x09, 0x00, 0x1B,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x48, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x49, 0x18, 0x2D, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4A, 0x18, 0x21, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4B, 0x88, 0x4F, 0x47,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4C, 0x82, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4D, 0x22, 0x62, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4E, 0x26, 0x62, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4F, 0x19, 0x05, 0x25,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x50, 0x3B, 0xFF, 0xC7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x51, 0x19, 0x05, 0x3F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x52, 0x0D, 0x01, 0xA6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x53, 0x92, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x54, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x55, 0x18, 0x23, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x56, 0x96, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x57, 0x96, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x58, 0x9A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x59, 0x9A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5A, 0x96, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5B, 0x38, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5C, 0x83, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5D, 0x3B, 0x20, 0x02,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5E, 0x36, 0x2B, 0x01,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5F, 0x36, 0x2B, 0x60,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x60, 0x1C, 0x72, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x61, 0x93, 0xFF, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x62, 0x93, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x63, 0x86, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x64, 0x86, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x65, 0x8A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x66, 0x8A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x67, 0x86, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x68, 0x0D, 0x08, 0x28,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x69, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6A, 0x18, 0x24, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6B, 0x83, 0xFC, 0xFA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6C, 0x23, 0x8A, 0xBF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6D, 0x82, 0x2D, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6E, 0x27, 0x97, 0xDF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6F, 0x23, 0xAA, 0x91,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x70, 0x93, 0xFC, 0xFA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x71, 0x83, 0x80, 0x30,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x72, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x73, 0x18, 0x3E, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x74, 0x80, 0x7A, 0x4A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x75, 0x19, 0x07, 0xE2,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x76, 0x23, 0x3E, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x77, 0x0D, 0x00, 0xEA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x78, 0x80, 0x7B, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x79, 0x38, 0x7E, 0x02,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7A, 0x1C, 0x76, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7B, 0x90, 0x7B, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7C, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7D, 0x19, 0x75, 0xCF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7E, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7F, 0x19, 0x75, 0x9F,
> +       0xFC, 0xF3, 0x68, 0x64, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA0, 0x91, 0xCB,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB0, 0x50, 0x1A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA1, 0x82, 0xF3,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB1, 0x02, 0xF5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA2, 0x82, 0xB5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB2, 0x50, 0x1F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA3, 0x83, 0xF4,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB3, 0x50, 0x2A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA4, 0x96, 0x66,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB4, 0x50, 0x3B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA5, 0x82, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB5, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA6, 0xC2, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB6, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA7, 0xC2, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB7, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA8, 0x82, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB8, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA9, 0x82, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB9, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAA, 0xC2, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBA, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAB, 0x82, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBB, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAC, 0xC2, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBC, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAD, 0x83, 0xE8,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBD, 0x50, 0x6B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAE, 0x97, 0x58,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBE, 0x50, 0x74,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF8, 0x80, 0x05,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC8, 0x00, 0x29,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xEE, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF9, 0x08, 0x5F,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFA, 0x24, 0x81,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x05, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x01, 0x00, 0x02,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x07, 0xF0, 0xF0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x09, 0x08, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0D, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x0E, 0x20,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF2, 0x00, 0x44,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF6, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC6, 0x00, 0x06,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC7, 0x00, 0x08,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xD2, 0x8A, 0x94,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x02,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x91, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x92, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x93, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x94, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x95, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00
> +};
> +
> +static const u8 TF700T_enable_NS[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x08, 0x00
> +};
> +
> +static const u8 TF700T_disable_NS[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x15, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x7F, 0xFF,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x02, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x02, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x10, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x84, 0x00, 0x03
> +};
> +
> +/* TF300T section */
> +static const u8 TF300T_input_parameter[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x68, 0x64, 0x04,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x09, 0x19, 0x01, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0A, 0x27, 0x90, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0B, 0x19, 0x01, 0x10,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0C, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0D, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0E, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0F, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x10, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x11, 0x82, 0x2D, 0x20,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x12, 0x27, 0x98, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x13, 0x19, 0x01, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x14, 0x80, 0x50, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x15, 0x90, 0x50, 0x3A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x16, 0x80, 0x50, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x17, 0x90, 0x50, 0x4F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x18, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x19, 0x19, 0x00, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1A, 0x80, 0x00, 0xAC,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1B, 0x26, 0x7C, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1C, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1D, 0x19, 0x1D, 0x82,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1E, 0x19, 0x1C, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1F, 0x80, 0x53, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x20, 0x93, 0xE2, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x21, 0x80, 0x4F, 0xBA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x22, 0x22, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x23, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x24, 0x18, 0x2F, 0xD0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x25, 0x94, 0x4F, 0xB6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x26, 0x80, 0x4F, 0x6A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x27, 0x26, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x28, 0x18, 0x2F, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x29, 0x18, 0x2B, 0xCF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2A, 0x95, 0x62, 0x06,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2B, 0x95, 0x61, 0x46,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2C, 0x40, 0xFA, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2D, 0x40, 0xE5, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2E, 0x82, 0x30, 0x14,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2F, 0x27, 0x00, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x30, 0x22, 0x78, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x31, 0x83, 0xFD, 0x44,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x32, 0x26, 0xE2, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x33, 0x19, 0x03, 0x90,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x34, 0x93, 0xFD, 0x4A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x35, 0x83, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x36, 0x23, 0xA2, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x37, 0x93, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x38, 0x00, 0x00, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x39, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3A, 0x18, 0x3F, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3B, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3C, 0x19, 0x6C, 0xA4,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3D, 0x19, 0x66, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3E, 0x80, 0x79, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3F, 0x82, 0x2D, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x40, 0x27, 0x97, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x41, 0x19, 0x04, 0x40,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x42, 0x94, 0x7B, 0xD6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x43, 0x80, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x44, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x45, 0x18, 0x48, 0xDF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x46, 0x38, 0x00, 0x87,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x47, 0x09, 0x00, 0x1B,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x48, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x49, 0x18, 0x2D, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4A, 0x18, 0x21, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4B, 0x88, 0x4F, 0x47,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4C, 0x82, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4D, 0x22, 0x62, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4E, 0x26, 0x62, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4F, 0x19, 0x05, 0x25,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x50, 0x3B, 0xFF, 0xC7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x51, 0x19, 0x05, 0x3F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x52, 0x0D, 0x01, 0xA6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x53, 0x92, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x54, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x55, 0x18, 0x23, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x56, 0x96, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x57, 0x96, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x58, 0x9A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x59, 0x9A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5A, 0x96, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5B, 0x38, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5C, 0x83, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5D, 0x3B, 0x20, 0x02,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5E, 0x36, 0x2B, 0x01,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5F, 0x36, 0x2B, 0x60,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x60, 0x1C, 0x72, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x61, 0x93, 0xFF, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x62, 0x93, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x63, 0x86, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x64, 0x86, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x65, 0x8A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x66, 0x8A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x67, 0x86, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x68, 0x0D, 0x08, 0x28,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x69, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6A, 0x18, 0x24, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6B, 0x83, 0xFC, 0xFA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6C, 0x23, 0x8A, 0xBF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6D, 0x82, 0x2D, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6E, 0x27, 0x97, 0xDF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6F, 0x23, 0xAA, 0x91,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x70, 0x93, 0xFC, 0xFA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x71, 0x83, 0x80, 0x30,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x72, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x73, 0x18, 0x3E, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x74, 0x80, 0x7A, 0x4A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x75, 0x19, 0x07, 0xE2,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x76, 0x23, 0x3E, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x77, 0x0D, 0x00, 0xEA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x78, 0x80, 0x7B, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x79, 0x38, 0x7E, 0x02,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7A, 0x1C, 0x76, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7B, 0x90, 0x7B, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7C, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7D, 0x19, 0x75, 0xCF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7E, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x7F, 0x19, 0x75, 0x9F,
> +       0xFC, 0xF3, 0x68, 0x64, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA0, 0x91, 0xCB,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB0, 0x50, 0x1A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA1, 0x82, 0xF3,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB1, 0x02, 0xF5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA2, 0x82, 0xB5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB2, 0x50, 0x1F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA3, 0x83, 0xF4,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB3, 0x50, 0x2A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA4, 0x96, 0x66,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB4, 0x50, 0x3B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA5, 0x82, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB5, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA6, 0xC2, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB6, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA7, 0xC2, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB7, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA8, 0x82, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB8, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA9, 0x82, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB9, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAA, 0xC2, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBA, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAB, 0x82, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBB, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAC, 0xC2, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBC, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAD, 0x83, 0xE8,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBD, 0x50, 0x6B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAE, 0x97, 0x58,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBE, 0x50, 0x74,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF8, 0x80, 0x05,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC8, 0x00, 0x29,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xEE, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF9, 0x08, 0x5F,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFA, 0x24, 0x81,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x05, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x01, 0x00, 0x02,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x07, 0xF0, 0xF0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x09, 0x08, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0D, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x0E, 0x20,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF2, 0x00, 0x44,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF6, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC6, 0x00, 0x06,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC7, 0x00, 0x08,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xD2, 0x8A, 0x94,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00
> +};
> +
> +/* TF101 section */
> +static const u8 TF101_input_parameter[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x68, 0x64, 0x04,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x09, 0x19, 0x01, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0A, 0x27, 0x90, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0B, 0x19, 0x01, 0x10,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0C, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0D, 0x90, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0E, 0x80, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x0F, 0x1C, 0x58, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x10, 0x90, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x11, 0x82, 0x2D, 0x20,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x12, 0x27, 0x98, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x13, 0x19, 0x01, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x14, 0x80, 0x50, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x15, 0x90, 0x50, 0x3A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x16, 0x80, 0x50, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x17, 0x90, 0x50, 0x4F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x18, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x19, 0x19, 0x00, 0x6F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1A, 0x80, 0x00, 0xAC,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1B, 0x26, 0x7C, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1C, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1D, 0x19, 0x1D, 0x82,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1E, 0x19, 0x1C, 0xEF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x1F, 0x80, 0x53, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x20, 0x93, 0xE2, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x21, 0x80, 0x4F, 0xBA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x22, 0x22, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x23, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x24, 0x18, 0x2F, 0xD0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x25, 0x94, 0x4F, 0xB6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x26, 0x80, 0x4F, 0x6A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x27, 0x26, 0x7A, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x28, 0x18, 0x2F, 0x80,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x29, 0x18, 0x2B, 0xCF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2A, 0x95, 0x62, 0x06,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2B, 0x95, 0x61, 0x46,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2C, 0x40, 0xFA, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2D, 0x40, 0xE5, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2E, 0x82, 0x30, 0x14,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x2F, 0x27, 0x00, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x30, 0x22, 0x78, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x31, 0x83, 0xFD, 0x44,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x32, 0x26, 0xE2, 0x0F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x33, 0x19, 0x03, 0x90,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x34, 0x93, 0xFD, 0x4A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x35, 0x83, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x36, 0x23, 0xA2, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x37, 0x93, 0xFD, 0x5A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x38, 0x00, 0x00, 0x00,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x39, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3A, 0x18, 0x3F, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3B, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3C, 0x19, 0x6C, 0xA4,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3D, 0x19, 0x66, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3E, 0x80, 0x79, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x3F, 0x82, 0x2D, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x40, 0x27, 0x97, 0x9F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x41, 0x19, 0x04, 0x40,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x42, 0x94, 0x7B, 0xD6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x43, 0x80, 0x00, 0x1A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x44, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x45, 0x18, 0x48, 0xDF,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x46, 0x38, 0x00, 0x87,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x47, 0x09, 0x00, 0x1B,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x48, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x49, 0x18, 0x2D, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4A, 0x18, 0x21, 0x5F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4B, 0x88, 0x4F, 0x47,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4C, 0x82, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4D, 0x22, 0x62, 0x1F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4E, 0x26, 0x62, 0x7F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x4F, 0x19, 0x05, 0x25,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x50, 0x3B, 0xFF, 0xC7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x51, 0x19, 0x05, 0x3F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x52, 0x0D, 0x01, 0xA6,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x53, 0x92, 0x2A, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x54, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x55, 0x18, 0x23, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x56, 0x96, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x57, 0x96, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x58, 0x9A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x59, 0x9A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5A, 0x96, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5B, 0x38, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5C, 0x83, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5D, 0x3B, 0x20, 0x02,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5E, 0x36, 0x2B, 0x01,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x5F, 0x36, 0x2B, 0x60,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x60, 0x1C, 0x72, 0x2F,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x61, 0x93, 0xFF, 0x9A,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x62, 0x93, 0xFF, 0xAA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x63, 0x86, 0x2A, 0xA1,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x64, 0x86, 0x2A, 0xB0,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x65, 0x8A, 0x2A, 0xCA,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x66, 0x8A, 0x2A, 0xD7,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x67, 0x86, 0x2A, 0xE8,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x68, 0x0D, 0x08, 0x28,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x69, 0x34, 0x00, 0x0E,
> +       0xFC, 0xF3, 0x0D, 0x10, 0x6A, 0x18, 0x24, 0x0F,
> +       0xFC, 0xF3, 0x68, 0x64, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA0, 0x90, 0x05,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB0, 0x50, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA1, 0x91, 0xCB,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB1, 0x50, 0x1A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA2, 0x82, 0xF3,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB2, 0x02, 0xF5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA3, 0x82, 0xB5,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB3, 0x50, 0x1F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA4, 0x83, 0xF4,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB4, 0x50, 0x2A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA5, 0x96, 0x66,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB5, 0x50, 0x3B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA6, 0x84, 0x8C,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB6, 0x50, 0x3E,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA7, 0xC4, 0x8C,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB7, 0x50, 0x3E,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA8, 0x82, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB8, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xA9, 0xC2, 0xCC,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xB9, 0x50, 0x46,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAA, 0xC2, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBA, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAB, 0x82, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBB, 0x50, 0x4A,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAC, 0x82, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBC, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAD, 0xC2, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBD, 0x50, 0x4B,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAE, 0x82, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBE, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xAF, 0xC2, 0x3F,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xBF, 0x50, 0x56,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF8, 0x80, 0x05,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC8, 0x00, 0x09,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xEE, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF9, 0x08, 0x5F,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFA, 0x24, 0x81,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x05, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x01, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x07, 0xF0, 0xF0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x09, 0x08, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0D, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x0E, 0x20,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF2, 0x00, 0x44,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xF6, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC6, 0x00, 0x31,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xC7, 0x00, 0x50,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xD2, 0x82, 0x94,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A,
> +       0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32,
> +       0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00
> +};
> +
> +static const u8 TF101_enable_NS[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10
> +};
> +
> +static const u8 TF101_disable_NS[] = {
> +       0xC0,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00,
> +       0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10
> +};
> +
> +#endif
> --
> 2.37.2
>
Greg Kroah-Hartman Feb. 22, 2023, 9:21 a.m. UTC | #6
On Wed, Feb 22, 2023 at 10:19:47AM +0200, Svyatoslav Ryhel wrote:
> вт, 21 лют. 2023 р. о 21:27 Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> пише:
> >
> > On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
> > > FM34NE is digital sound processing chip used for active
> > > noise suppression mainly on ASUS Transformers.
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > ---
> > >  drivers/staging/Kconfig          |   2 +
> > >  drivers/staging/Makefile         |   1 +
> > >  drivers/staging/dsp/Kconfig      |   7 +
> > >  drivers/staging/dsp/Makefile     |   2 +
> > >  drivers/staging/dsp/dsp-fm34ne.c | 364 +++++++++++++
> > >  drivers/staging/dsp/dsp-fm34ne.h | 845 +++++++++++++++++++++++++++++++
> > >  6 files changed, 1221 insertions(+)
> > >  create mode 100644 drivers/staging/dsp/Kconfig
> > >  create mode 100644 drivers/staging/dsp/Makefile
> > >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.c
> > >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.h
> >
> >
> > Sorry, but why is this going into drivers/staging/ at all?  What is
> > needed to be done to get this out of staging?  Why not do that work
> > right now?  At the least, we need a TODO file in the directory that
> > lists what needs to be done and who is responsible for it.
> 
> Because this driver sets up fm34 and switches it to bypass mode allowing
> sound to work on the device. There is no dsp framework in kernel which could
> be called to operate dsp from the actual sound codec. (If there is, I
> would be glad
> if you show me). Fm34 must be active only on DMIC use, all other cases require
> it to be in bypass.

That does not explain at all why this needs to go into drivers/staging/
and not the normal portion of the kernel.  Why this specific location?
What is wrong with it that requires it to go here?

In other words, you need to document _WHY_ it must go here as it is not
obvious at all.

thanks,

greg k-h
Svyatoslav Ryhel Feb. 22, 2023, 9:39 a.m. UTC | #7
22 лютого 2023 р. 11:21:02 GMT+02:00, Greg Kroah-Hartman <gregkh@linuxfoundation.org> написав(-ла):
>On Wed, Feb 22, 2023 at 10:19:47AM +0200, Svyatoslav Ryhel wrote:
>> вт, 21 лют. 2023 р. о 21:27 Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> пише:
>> >
>> > On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
>> > > FM34NE is digital sound processing chip used for active
>> > > noise suppression mainly on ASUS Transformers.
>> > >
>> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
>> > > ---
>> > >  drivers/staging/Kconfig          |   2 +
>> > >  drivers/staging/Makefile         |   1 +
>> > >  drivers/staging/dsp/Kconfig      |   7 +
>> > >  drivers/staging/dsp/Makefile     |   2 +
>> > >  drivers/staging/dsp/dsp-fm34ne.c | 364 +++++++++++++
>> > >  drivers/staging/dsp/dsp-fm34ne.h | 845 +++++++++++++++++++++++++++++++
>> > >  6 files changed, 1221 insertions(+)
>> > >  create mode 100644 drivers/staging/dsp/Kconfig
>> > >  create mode 100644 drivers/staging/dsp/Makefile
>> > >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.c
>> > >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.h
>> >
>> >
>> > Sorry, but why is this going into drivers/staging/ at all?  What is
>> > needed to be done to get this out of staging?  Why not do that work
>> > right now?  At the least, we need a TODO file in the directory that
>> > lists what needs to be done and who is responsible for it.
>> 
>> Because this driver sets up fm34 and switches it to bypass mode allowing
>> sound to work on the device. There is no dsp framework in kernel which could
>> be called to operate dsp from the actual sound codec. (If there is, I
>> would be glad
>> if you show me). Fm34 must be active only on DMIC use, all other cases require
>> it to be in bypass.
>
>That does not explain at all why this needs to go into drivers/staging/
>and not the normal portion of the kernel.  Why this specific location?
>What is wrong with it that requires it to go here?

It is not fully functional and does not perform its main function (noise cancellation) because it has to be called only for DMIC. Same time it is essential to be set so that audio could work on device.

Once there is such a framework in kernel, which allows to control dsp from, I assume, asoc machine driver, this driver can be moved wherever it should be. Currently I can not tell where it should be since I haven't seen dsp drivers like this in kernel.

>In other words, you need to document _WHY_ it must go here as it is not
>obvious at all.
>
>thanks,
>
>greg k-h
Greg Kroah-Hartman Feb. 22, 2023, 11:15 a.m. UTC | #8
On Wed, Feb 22, 2023 at 11:39:59AM +0200, Святослав Ригель wrote:
> 
> 
> 22 лютого 2023 р. 11:21:02 GMT+02:00, Greg Kroah-Hartman <gregkh@linuxfoundation.org> написав(-ла):
> >On Wed, Feb 22, 2023 at 10:19:47AM +0200, Svyatoslav Ryhel wrote:
> >> вт, 21 лют. 2023 р. о 21:27 Greg Kroah-Hartman
> >> <gregkh@linuxfoundation.org> пише:
> >> >
> >> > On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
> >> > > FM34NE is digital sound processing chip used for active
> >> > > noise suppression mainly on ASUS Transformers.
> >> > >
> >> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> >> > > ---
> >> > >  drivers/staging/Kconfig          |   2 +
> >> > >  drivers/staging/Makefile         |   1 +
> >> > >  drivers/staging/dsp/Kconfig      |   7 +
> >> > >  drivers/staging/dsp/Makefile     |   2 +
> >> > >  drivers/staging/dsp/dsp-fm34ne.c | 364 +++++++++++++
> >> > >  drivers/staging/dsp/dsp-fm34ne.h | 845 +++++++++++++++++++++++++++++++
> >> > >  6 files changed, 1221 insertions(+)
> >> > >  create mode 100644 drivers/staging/dsp/Kconfig
> >> > >  create mode 100644 drivers/staging/dsp/Makefile
> >> > >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.c
> >> > >  create mode 100644 drivers/staging/dsp/dsp-fm34ne.h
> >> >
> >> >
> >> > Sorry, but why is this going into drivers/staging/ at all?  What is
> >> > needed to be done to get this out of staging?  Why not do that work
> >> > right now?  At the least, we need a TODO file in the directory that
> >> > lists what needs to be done and who is responsible for it.
> >> 
> >> Because this driver sets up fm34 and switches it to bypass mode allowing
> >> sound to work on the device. There is no dsp framework in kernel which could
> >> be called to operate dsp from the actual sound codec. (If there is, I
> >> would be glad
> >> if you show me). Fm34 must be active only on DMIC use, all other cases require
> >> it to be in bypass.
> >
> >That does not explain at all why this needs to go into drivers/staging/
> >and not the normal portion of the kernel.  Why this specific location?
> >What is wrong with it that requires it to go here?
> 
> It is not fully functional and does not perform its main function
> (noise cancellation) because it has to be called only for DMIC. Same
> time it is essential to be set so that audio could work on device.

But why does that mean it should go to drivers/staging/?  That's not
what staging is for (broken code).

> Once there is such a framework in kernel, which allows to control dsp
> from, I assume, asoc machine driver, this driver can be moved wherever
> it should be. Currently I can not tell where it should be since I
> haven't seen dsp drivers like this in kernel.

Then work to create that, don't dump stuff in drivers/staging/ for no
valid reason.

thanks,

greg k-h
Mark Brown Feb. 22, 2023, 12:19 p.m. UTC | #9
On Wed, Feb 22, 2023 at 10:19:47AM +0200, Svyatoslav Ryhel wrote:

> Because this driver sets up fm34 and switches it to bypass mode allowing
> sound to work on the device. There is no dsp framework in kernel which could
> be called to operate dsp from the actual sound codec. (If there is, I
> would be glad

> if you show me). Fm34 must be active only on DMIC use, all other cases require
> it to be in bypass.

Sure there is, like I said in my other reply it looks like an aux
device.
Mark Brown Feb. 22, 2023, 12:36 p.m. UTC | #10
On Wed, Feb 22, 2023 at 10:14:02AM +0200, Svyatoslav Ryhel wrote:
> ср, 22 лют. 2023 р. о 00:41 Mark Brown <broonie@kernel.org> пише:
> >
> > On Tue, Feb 21, 2023 at 08:32:10PM +0200, Svyatoslav Ryhel wrote:
> > > FM34NE is digital sound processing chip used for active
> > > noise suppression mainly on ASUS Transformers.
> >
> > This looks like it should be fairly straightforward to support
> > within ASoC without too much work, and since it's in the audio
> > path it should probably be referenced from the sound card it'll
> > end up having an ABI impact on the card.  Take a look at wm9090
> 
> wm9090 is a sound codec, like rt5631 or wm8903 while fm34 is NOT a
> sound codec. It is sound processing device which must be active only

The WM9090 is not a CODEC, it is an analog amplifier with no digital
inputs or outputs.  That is exactly the same from a system integration
point of view, it takes an audio stream in and routes it to an output
with some processing.

> when DMIC is used. In all other cases it has to be bypassed. At the same time,
> it has to be set up because else there will be no sound on the actual device.

DAPM can sort all that out for you.
kernel test robot Feb. 22, 2023, 1:31 p.m. UTC | #11
On Wed, Feb 22, 2023 at 10:06:23AM +0200, Svyatoslav Ryhel wrote:
> > > +static int fm34ne_dsp_set_hw(struct fm34ne_dsp_data *fm34)
> > > +{
> > > +     struct device *dev = &fm34->client->dev;
> > > +     int ret;
> > > +
> > > +     ret = clk_prepare_enable(fm34->dap_mclk);
> > > +     if (ret) {
> > > +             dev_err(dev, "failed to enable the DSP MCLK: %d\n", ret);
> > > +             return ret;
> > > +     }
> > > +
> > > +     ret = regulator_enable(fm34->vdd_supply);
> > > +     if (ret < 0) {
> > > +             dev_err(dev, "failed to enable vdd power supply\n");
> >
> > clk_disable_unprepare(fm34->dap_mclk);
> 
> No, dap_mclk has to be on, else there will be no sound on the device.
> 

If regulator_enable(fm34->vdd_supply); fails then the probe() is going
to fail so the sound isn't going to work anyway.  (I have a static
checker warning for missing calls to clk_disable_unprepare(), so it's
important for me to find out if we are deliberately not cleaning up).

> > > +             return ret;
> > > +     }
> > > +
> > > +     return 0;
> > > +}

regards,
dan carpenter
diff mbox series

Patch

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 5cfabd5376cc..cd22b7f36b08 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -80,4 +80,6 @@  source "drivers/staging/qlge/Kconfig"
 
 source "drivers/staging/vme_user/Kconfig"
 
+source "drivers/staging/dsp/Kconfig"
+
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index f8c3aa9c2418..a7250a0b5fca 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -2,6 +2,7 @@ 
 # Makefile for staging directory
 
 obj-y				+= media/
+obj-y				+= dsp/
 obj-$(CONFIG_PRISM2_USB)	+= wlan-ng/
 obj-$(CONFIG_FB_OLPC_DCON)	+= olpc_dcon/
 obj-$(CONFIG_RTL8192U)		+= rtl8192u/
diff --git a/drivers/staging/dsp/Kconfig b/drivers/staging/dsp/Kconfig
new file mode 100644
index 000000000000..d295ea063ad5
--- /dev/null
+++ b/drivers/staging/dsp/Kconfig
@@ -0,0 +1,7 @@ 
+# SPDX-License-Identifier: GPL-2.0
+config DSP_FM34NE
+	tristate "DSP FM34NE driver"
+	depends on I2C && GPIOLIB
+	help
+	  Say Y or M here if you want to add support for Fortemedia FM34NE
+	  DSP mainly used on ASUS T20/T30 Transformers.
diff --git a/drivers/staging/dsp/Makefile b/drivers/staging/dsp/Makefile
new file mode 100644
index 000000000000..e60ba3c88e08
--- /dev/null
+++ b/drivers/staging/dsp/Makefile
@@ -0,0 +1,2 @@ 
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_DSP_FM34NE) += dsp-fm34ne.o
diff --git a/drivers/staging/dsp/dsp-fm34ne.c b/drivers/staging/dsp/dsp-fm34ne.c
new file mode 100644
index 000000000000..93a464a7bb4b
--- /dev/null
+++ b/drivers/staging/dsp/dsp-fm34ne.c
@@ -0,0 +1,364 @@ 
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Fortemedia FM34NE DSP driver
+ */
+
+#include <linux/clk.h>
+#include <linux/clk/tegra.h>
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
+#include <linux/of_device.h>
+#include <linux/regulator/consumer.h>
+
+#include "dsp-fm34ne.h"
+
+#define FM34NE_I2C_CHECK 0xC0
+#define FM34NE_MAX_RETRY 5
+
+enum state {
+	FM34NE_BYPASS,
+	FM34NE_NS_ENABLE,
+	FM34NE_NS_DISABLE,
+	FM34NE_MAX,
+};
+
+struct fm34ne_dsp_data {
+	struct i2c_client *client;
+
+	struct gpio_desc *bypass_gpio;
+	struct gpio_desc *reset_gpio;
+
+	struct clk *dap_mclk;
+	struct regulator *vdd_supply;
+
+	const struct fm34ne_dsp_devdata *data;
+};
+
+static int fm34ne_dsp_write_config(struct i2c_client *client,
+				   const u8 *config, size_t size)
+{
+	int ret, i;
+
+	for (i = 0; i < FM34NE_MAX_RETRY; i++) {
+		ret = i2c_master_send(client, config, size);
+		if (ret > 0)
+			return 0;
+
+		usleep_range(5000, 6000);
+	}
+
+	return ret;
+}
+
+static int fm34ne_dsp_set_config(struct fm34ne_dsp_data *fm34, int state)
+{
+	struct device *dev = &fm34->client->dev;
+
+	const u8 *enable_ns_parameter = fm34->data->enable_noise_suppression;
+	int enable_ns_length = fm34->data->enable_ns_length;
+
+	const u8 *disable_ns_parameter = fm34->data->disable_noise_suppression;
+	int disable_ns_length = fm34->data->disable_ns_length;
+
+	int ret;
+
+	gpiod_set_value_cansleep(fm34->bypass_gpio, 1);
+	msleep(20);
+
+	switch (state) {
+	case FM34NE_NS_ENABLE:
+		ret = fm34ne_dsp_write_config(fm34->client, enable_parameter,
+					      sizeof(enable_parameter));
+		if (ret < 0) {
+			dev_err(dev, "failed to set DSP enable with %d\n", ret);
+			goto exit;
+		}
+
+		ret = fm34ne_dsp_write_config(fm34->client, enable_ns_parameter,
+					      enable_ns_length);
+		if (ret < 0) {
+			dev_err(dev, "failed to enable DSP noise suppression with %d\n", ret);
+			goto exit;
+		}
+
+		dev_info(dev, "noise suppression enable DSP parameter written\n");
+		break;
+
+	case FM34NE_NS_DISABLE:
+		ret = fm34ne_dsp_write_config(fm34->client, enable_parameter,
+					      sizeof(enable_parameter));
+		if (ret < 0) {
+			dev_err(dev, "failed to set DSP enable with %d\n", ret);
+			goto exit;
+		}
+
+		ret = fm34ne_dsp_write_config(fm34->client, disable_ns_parameter,
+					      disable_ns_length);
+		if (ret < 0) {
+			dev_err(dev, "failed to disable DSP noise suppression with %d\n", ret);
+			goto exit;
+		}
+
+		dev_info(dev, "noise suppression disable DSP parameter written\n");
+		break;
+
+	case FM34NE_BYPASS:
+	default:
+		ret = fm34ne_dsp_write_config(fm34->client, bypass_parameter,
+					      sizeof(bypass_parameter));
+		if (ret < 0) {
+			dev_err(dev, "failed to set DSP bypass with %d\n", ret);
+			goto exit;
+		}
+
+		dev_info(dev, "bypass DSP parameter written\n");
+		break;
+	}
+
+exit:
+	gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
+
+	return ret;
+}
+
+static int fm34ne_dsp_set_hw(struct fm34ne_dsp_data *fm34)
+{
+	struct device *dev = &fm34->client->dev;
+	int ret;
+
+	ret = clk_prepare_enable(fm34->dap_mclk);
+	if (ret) {
+		dev_err(dev, "failed to enable the DSP MCLK: %d\n", ret);
+		return ret;
+	}
+
+	ret = regulator_enable(fm34->vdd_supply);
+	if (ret < 0) {
+		dev_err(dev, "failed to enable vdd power supply\n");
+		return ret;
+	}
+
+	return 0;
+}
+
+static void fm34ne_dsp_reset(struct fm34ne_dsp_data *fm34)
+{
+	gpiod_set_value_cansleep(fm34->reset_gpio, 1);
+	msleep(20);
+
+	gpiod_set_value_cansleep(fm34->reset_gpio, 0);
+	msleep(100);
+}
+
+static int fm34ne_dsp_init_chip(struct fm34ne_dsp_data *fm34)
+{
+	const u8 *input_parameter = fm34->data->input_parameter;
+	int input_parameter_length = fm34->data->input_parameter_length;
+	int ret;
+
+	ret = fm34ne_dsp_set_hw(fm34);
+	if (ret)
+		return ret;
+
+	fm34ne_dsp_reset(fm34);
+
+	gpiod_set_value_cansleep(fm34->bypass_gpio, 1);
+	msleep(20);
+
+	ret = i2c_smbus_write_byte(fm34->client, FM34NE_I2C_CHECK);
+	if (ret < 0) {
+		dev_info(&fm34->client->dev, "initial write failed\n");
+		msleep(50);
+
+		fm34ne_dsp_reset(fm34);
+		gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
+
+		return ret;
+	}
+
+	ret = fm34ne_dsp_write_config(fm34->client, input_parameter,
+				      input_parameter_length);
+	if (ret < 0)
+		return -EINVAL;
+
+	msleep(100);
+	gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
+
+	dev_info(&fm34->client->dev, "%s detected\n", fm34->data->model);
+
+	/* Constantly set DSP to bypass mode for now */
+	ret = fm34ne_dsp_set_config(fm34, FM34NE_BYPASS);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static int fm34ne_dsp_probe(struct i2c_client *client,
+			    const struct i2c_device_id *id)
+{
+	struct device *dev = &client->dev;
+	struct fm34ne_dsp_data *fm34;
+	int ret;
+
+	fm34 = devm_kzalloc(dev, sizeof(*fm34), GFP_KERNEL);
+	if (!fm34)
+		return -ENOMEM;
+
+	i2c_set_clientdata(client, fm34);
+	fm34->client = client;
+
+	fm34->dap_mclk = devm_clk_get_optional(dev, "mclk");
+	if (IS_ERR(fm34->dap_mclk))
+		return dev_err_probe(dev, PTR_ERR(fm34->dap_mclk),
+				     "can't retrieve DSP MCLK\n");
+
+	fm34->vdd_supply = devm_regulator_get(dev, "vdd");
+	if (IS_ERR(fm34->vdd_supply))
+		return dev_err_probe(dev, PTR_ERR(fm34->vdd_supply),
+				     "failed to get vdd regulator\n");
+
+	fm34->reset_gpio = devm_gpiod_get_optional(dev, "reset",
+						   GPIOD_OUT_LOW);
+	if (IS_ERR(fm34->reset_gpio))
+		return dev_err_probe(dev, PTR_ERR(fm34->reset_gpio),
+				     "failed to get reset GPIO\n");
+
+	/*
+	 * Bypass gpio is used to set audio into bypass mode
+	 * in relation to dsp to be able to program it. Once
+	 * programming is done, bypass gpio has to be set to
+	 * low to return dsp into audio processing.
+	 */
+	fm34->bypass_gpio = devm_gpiod_get_optional(dev, "bypass",
+						    GPIOD_OUT_LOW);
+	if (IS_ERR(fm34->bypass_gpio))
+		return dev_err_probe(dev, PTR_ERR(fm34->bypass_gpio),
+				     "failed to get bypass GPIO\n");
+
+	fm34->data = of_device_get_match_data(dev);
+	if (!fm34->data)
+		return -ENODEV;
+
+	ret = fm34ne_dsp_init_chip(fm34);
+	if (ret)
+		return dev_err_probe(dev, ret,
+				     "failed to init DSP chip\n");
+
+	return 0;
+}
+
+static int fm34ne_dsp_suspend(struct device *dev)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	struct fm34ne_dsp_data *fm34 = i2c_get_clientdata(client);
+
+	gpiod_set_value_cansleep(fm34->bypass_gpio, 0);
+
+	regulator_disable(fm34->vdd_supply);
+
+	clk_disable_unprepare(fm34->dap_mclk);
+
+	return 0;
+}
+
+static int fm34ne_dsp_resume(struct device *dev)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	struct fm34ne_dsp_data *fm34 = i2c_get_clientdata(client);
+	int ret;
+
+	ret = fm34ne_dsp_init_chip(fm34);
+	if (ret)
+		dev_err(&client->dev, "failed to re-init DSP chip with %d\n", ret);
+
+	return 0;
+}
+
+static DEFINE_SIMPLE_DEV_PM_OPS(fm34ne_dsp_pm_ops,
+			 fm34ne_dsp_suspend, fm34ne_dsp_resume);
+
+static const struct fm34ne_dsp_devdata tf101_dsp_data = {
+	.model = "ASUS Eee Pad Trnasformer TF101",
+	.input_parameter = TF101_input_parameter,
+	.input_parameter_length = sizeof(TF101_input_parameter),
+	.enable_noise_suppression = TF101_enable_NS,
+	.enable_ns_length = sizeof(TF101_enable_NS),
+	.disable_noise_suppression = TF101_disable_NS,
+	.disable_ns_length = sizeof(TF101_disable_NS),
+};
+
+static const struct fm34ne_dsp_devdata tf201_dsp_data = {
+	.model = "ASUS Transformer Prime TF201",
+	.input_parameter = TF201_input_parameter,
+	.input_parameter_length = sizeof(TF201_input_parameter),
+	.enable_noise_suppression = TF201_enable_NS,
+	.enable_ns_length = sizeof(TF201_enable_NS),
+	.disable_noise_suppression = TF201_disable_NS,
+	.disable_ns_length = sizeof(TF201_disable_NS),
+};
+
+static const struct fm34ne_dsp_devdata tf300t_dsp_data = {
+	.model = "ASUS Transformer PAD TF300T",
+	.input_parameter = TF300T_input_parameter,
+	.input_parameter_length = sizeof(TF300T_input_parameter),
+	.enable_noise_suppression = TF201_enable_NS,
+	.enable_ns_length = sizeof(TF201_enable_NS),
+	.disable_noise_suppression = TF201_disable_NS,
+	.disable_ns_length = sizeof(TF201_disable_NS),
+};
+
+static const struct fm34ne_dsp_devdata tf700t_dsp_data = {
+	.model = "ASUS Transformer Infinity TF700T",
+	.input_parameter = TF700T_input_parameter,
+	.input_parameter_length = sizeof(TF700T_input_parameter),
+	.enable_noise_suppression = TF700T_enable_NS,
+	.enable_ns_length = sizeof(TF700T_enable_NS),
+	.disable_noise_suppression = TF700T_disable_NS,
+	.disable_ns_length = sizeof(TF700T_disable_NS),
+};
+
+static const struct fm34ne_dsp_devdata chagall_dsp_data = {
+	.model = "Pegatron Chagall",
+	.input_parameter = TF300T_input_parameter,
+	.input_parameter_length = sizeof(TF300T_input_parameter),
+	.enable_noise_suppression = TF201_enable_NS,
+	.enable_ns_length = sizeof(TF201_enable_NS),
+	.disable_noise_suppression = TF201_disable_NS,
+	.disable_ns_length = sizeof(TF201_disable_NS),
+};
+
+static const struct of_device_id fm34ne_dsp_match[] = {
+	{ .compatible = "asus,tf101-dsp", .data = &tf101_dsp_data },
+	{ .compatible = "asus,tf201-dsp", .data = &tf201_dsp_data },
+	{ .compatible = "asus,tf300t-dsp", .data = &tf300t_dsp_data },
+	{ .compatible = "asus,tf700t-dsp", .data = &tf700t_dsp_data },
+	{ .compatible = "pegatron,chagall-dsp", .data = &chagall_dsp_data },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, fm34ne_dsp_match);
+
+static const struct i2c_device_id fm34ne_dsp_id[] = {
+	{ "dsp_fm34ne", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, fm34ne_dsp_id);
+
+static struct i2c_driver fm34ne_dsp_driver = {
+	.driver = {
+		.name = "fm34ne-dsp",
+		.pm = pm_sleep_ptr(&fm34ne_dsp_pm_ops),
+		.of_match_table = fm34ne_dsp_match,
+	},
+	.probe = fm34ne_dsp_probe,
+	.id_table = fm34ne_dsp_id,
+};
+module_i2c_driver(fm34ne_dsp_driver);
+
+MODULE_AUTHOR("Svyatoslav Ryhel <clamor95@gmail.com>");
+MODULE_DESCRIPTION("Fortemedia FM34NE DSP driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/dsp/dsp-fm34ne.h b/drivers/staging/dsp/dsp-fm34ne.h
new file mode 100644
index 000000000000..428ac33dd310
--- /dev/null
+++ b/drivers/staging/dsp/dsp-fm34ne.h
@@ -0,0 +1,845 @@ 
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef __DSP_FM34NE_H__
+#define __DSP_FM34NE_H__
+
+struct fm34ne_dsp_devdata {
+	const char *model;
+
+	const u8 *input_parameter;
+	int input_parameter_length;
+
+	const u8 *enable_noise_suppression;
+	int enable_ns_length;
+
+	const u8 *disable_noise_suppression;
+	int disable_ns_length;
+};
+
+/* Common section */
+static const u8 bypass_parameter[] = {
+	0xC0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04
+};
+
+static const u8 enable_parameter[] = {
+	0xC0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x00
+};
+
+/* TF201 section */
+static const u8 TF201_input_parameter[] = {
+	0xC0,
+	0xFC, 0xF3, 0x68, 0x64, 0x04,
+	0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50,
+	0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F,
+	0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0,
+	0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF,
+	0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A,
+	0xFC, 0xF3, 0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0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32,
+	0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00
+};
+
+static const u8 TF201_enable_NS[] = {
+	0xC0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
+	0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x01
+};
+
+static const u8 TF201_disable_NS[] = {
+	0xC0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10
+};
+
+/* TF700T section */
+static const u8 TF700T_input_parameter[] = {
+	0xC0,
+	0xFC, 0xF3, 0x68, 0x64, 0x04,
+	0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50,
+	0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F,
+	0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0,
+	0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF,
+	0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF,
+	0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x09, 0x19, 0x01, 0x1F,
+	0xFC, 0xF3, 0x0D, 0x10, 0x0A, 0x27, 0x90, 0x5F,
+	0xFC, 0xF3, 0x0D, 0x10, 0x0B, 0x19, 0x01, 0x10,
+	0xFC, 0xF3, 0x0D, 0x10, 0x0C, 0x1C, 0x58, 0xEF,
+	0xFC, 0xF3, 0x0D, 0x10, 0x0D, 0x90, 0x00, 0x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+	0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x01,
+	0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x08, 0x00
+};
+
+static const u8 TF700T_disable_NS[] = {
+	0xC0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10,
+	0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x15, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x7F, 0xFF,
+	0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x02, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x02, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x10, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x84, 0x00, 0x03
+};
+
+/* TF300T section */
+static const u8 TF300T_input_parameter[] = {
+	0xC0,
+	0xFC, 0xF3, 0x68, 0x64, 0x04,
+	0xFC, 0xF3, 0x0D, 0x10, 0x00, 0x90, 0x00, 0x1A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x01, 0x82, 0x30, 0x50,
+	0xFC, 0xF3, 0x0D, 0x10, 0x02, 0x27, 0x90, 0x9F,
+	0xFC, 0xF3, 0x0D, 0x10, 0x03, 0x19, 0x00, 0xA0,
+	0xFC, 0xF3, 0x0D, 0x10, 0x04, 0x1C, 0x5A, 0xAF,
+	0xFC, 0xF3, 0x0D, 0x10, 0x05, 0x90, 0x00, 0x1A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x06, 0x80, 0x00, 0x0A,
+	0xFC, 0xF3, 0x0D, 0x10, 0x07, 0x1C, 0x5A, 0xAF,
+	0xFC, 0xF3, 0x0D, 0x10, 0x08, 0x90, 0x00, 0x0A,
+	0xFC, 0xF3,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x3B, 0x23, 0x07, 0xF0, 0xF0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x09, 0x08, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x0D, 0x01, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x0C, 0x0E, 0x20,
+	0xFC, 0xF3, 0x3B, 0x22, 0xF2, 0x00, 0x44,
+	0xFC, 0xF3, 0x3B, 0x22, 0xF6, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x22, 0xC6, 0x00, 0x06,
+	0xFC, 0xF3, 0x3B, 0x22, 0xC7, 0x00, 0x08,
+	0xFC, 0xF3, 0x3B, 0x22, 0xD2, 0x8A, 0x94,
+	0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
+	0xFC, 0xF3, 0x3B, 0x23, 0x00, 0x00, 0x04,
+	0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10,
+	0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10,
+	0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06,
+	0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20,
+	0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A,
+	0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00,
+	0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32,
+	0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00
+};
+
+/* TF101 section */
+static const u8 TF101_input_parameter[] = {
+	0xC0,
+	0xFC, 0xF3, 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0x23, 0x04, 0x23, 0x10,
+	0xFC, 0xF3, 0x3B, 0x23, 0x2F, 0x01, 0x10,
+	0xFC, 0xF3, 0x3B, 0x23, 0x39, 0x00, 0x06,
+	0xFC, 0xF3, 0x3B, 0x23, 0xCF, 0x01, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0xD0, 0x06, 0x20,
+	0xFC, 0xF3, 0x3B, 0x23, 0xD5, 0x3C, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x6E, 0x20, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x33, 0x02, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0xB3, 0x00, 0x0A,
+	0xFC, 0xF3, 0x3B, 0x23, 0xB4, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x70, 0x40, 0x00,
+	0xFC, 0xF3, 0x3B, 0x3F, 0xD2, 0x00, 0x32,
+	0xFC, 0xF3, 0x3B, 0x22, 0xFB, 0x00, 0x00
+};
+
+static const u8 TF101_enable_NS[] = {
+	0xC0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x01,
+	0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x23, 0x10
+};
+
+static const u8 TF101_disable_NS[] = {
+	0xC0,
+	0xFC, 0xF3, 0x3B, 0x23, 0x03, 0x00, 0x00,
+	0xFC, 0xF3, 0x3B, 0x23, 0x04, 0x00, 0x10
+};
+
+#endif