AnsweredAssumed Answered

Generate audio with pwm (I.MX6UL)

Question asked by Ganesh Koda on Jul 19, 2018
Latest reply on Jul 20, 2018 by igorpadykov

I am working on pwm audio driver, i got some pwm driver from below link:

GitHub - Glowforge/kernel-module-imx-pwm-audio: i.MX6 PWM audio driver 

 

Please look at this driver once from above..............................

code from driver... "sdma-params" passing from device tree
  /* Read SDMA channel number and load address */
  if (of_property_read_u32_array(pdev->dev.of_node, "sdma-params",
    sdma_params, ARRAY_SIZE(sdma_params)) == 0) {
//  if (of_property_read_u32_array(pdev->dev.of_node, NULL,
//    NULL,0)) {
    self->sdma_ch_num = sdma_params[0];
    self->sdma_script_origin = sdma_params[1];
  } else {
  dev_err(&pdev->dev, "sdma-params property not specified");
  goto failed_sdma_init;
  }

 

while passing the parameters of sdma(channel No. and address of sdma script load address ) in devicetree the board is not booting(its booting till bootloader), is because of channel number and address?

Devicetree
&pwm3 {
        comaptible = "glowforge,imx-pwm-audio";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pwm3>;
        enable-gpio = <&gpio1 4 0>;
        timer = <0x10>;
        sdma-params = <0x19 0xdc0>;
        status = "okay";

Please suggest me how to pass these parameters through devicetree and also give some examples to understand it.

 

Thanks & Regards

Ganesh K

Outcomes