Generate audio with pwm (I.MX6UL)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generate audio with pwm (I.MX6UL)

636 Views
ganesh_k
Contributor III

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

Labels (2)
0 Kudos
Reply
1 Reply

518 Views
igorpadykov
NXP Employee
NXP Employee

Hi Ganesh

official nxp bsps do not support sdma pwm as this requires new sdma script.

Above link is custom driver with custom sdma script, not supported by nxp, seems

it is working with releases described below (L3.14.28)

Glowforge · GitHub 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply