2

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

https://github.com/Glowforge/kernel-module-imx-pwm-audio

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

0 Answers0