All of lore.kernel.org
 help / color / mirror / Atom feed
* Post Audio codec sgtl5000 with ARM/Zynq under Linux
@ 2015-06-11  6:59 Wojciech Zebrowski
  2015-06-17  2:21 ` Nikolay Dimitrov
  0 siblings, 1 reply; 4+ messages in thread
From: Wojciech Zebrowski @ 2015-06-11  6:59 UTC (permalink / raw)
  To: alsa-devel; +Cc: Fabio Estevam, Michal Simek, Sören Brinkmann

Hi All

I try solve problem with support SGTL5000  under Linux , ARM / ZYNQ 
ARCHITECTURE. Please add this post to "alsa" forum.  If you need any 
others information i can send it .

My post:

  I try use freescale audio chip sgtl5000 on my custom board with Zynq 
chip. I need help with instance driver in device tree and debug first 
execution.

1.*I use I2C* controler to configure sgtl5000 :
/        axi_iic_sgtl: i2c@41610000 {//
//            #address-cells = <1>;//
//            #size-cells = <0>;//
//            compatible = "xlnx,xps-iic-2.00.a";//
//            interrupt-parent = <&gic>;//
//            interrupts = <0 31 4>;//
//            reg = <0x41610000 0x10000>;//
////
//            codec: sgtl5000@0a {//
//                #sound-dai-cells = <0>;//
//                compatible = "fsl,sgtl5000";//
//                reg = <0x0a>;//
//////                VDDA-supply = <&reg_3p3v>;//
//////                VDDIO-supply = <&reg_3p3v>;//
//                clocks = <&clkc 19>;//
//      }; /

  How can i set comment lines ?

2. sound :
/        sound {
           compatible = "fsl,imx51-babbage-sgtl5000",
"fsl,imx-audio-sgtl5000";
           model = "imx51-babbage-sgtl5000";
//          ssi-controller = <&ssi1>;
           audio-codec = <&codec>;
           audio-routing =
                   "MIC_IN", "Mic Jack",
                   "Mic Jack", "Mic Bias",
                   "Headphone Jack", "HP_OUT";
           mux-int-port = <1>;
           mux-ext-port = <3>;
         };/
I want use I2C configuration driver not SPI . How can i set comment line ?

3. I2S driver looks like ok  :
/        axi_i2s_adi_0: axi_i2s_adi@77600000 {
             compatible = "xlnx,axi-i2s-adi-1.0";
             reg = <0x77600000 0x10000>;
             xlnx,bclk-pol = <0x0>;
             xlnx,dma-type = <0x1>;
             xlnx,has-rx = <0x1>;
             xlnx,has-tx = <0x1>;
             xlnx,lrclk-pol = <0x0>;
             xlnx,num-ch = <0x1>;
             xlnx,s-axi-min-size = <0x000001FF>;
             xlnx,slot-width = <0x18>;
         };/


PS.
Right now i can compile device tree but audio is not detected.
What kind of log do you need to check Linux boot problem ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Post Audio codec sgtl5000 with ARM/Zynq under Linux
  2015-06-11  6:59 Post Audio codec sgtl5000 with ARM/Zynq under Linux Wojciech Zebrowski
@ 2015-06-17  2:21 ` Nikolay Dimitrov
  2015-06-17 14:28   ` Wojciech Zebrowski
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Dimitrov @ 2015-06-17  2:21 UTC (permalink / raw)
  To: Wojciech Zebrowski
  Cc: alsa-devel, Fabio Estevam, Michal Simek, Sören Brinkmann

Hi Wojciech,

On 06/11/2015 09:59 AM, Wojciech Zebrowski wrote:
> Hi All
>
> I try solve problem with support SGTL5000  under Linux , ARM / ZYNQ
> ARCHITECTURE. Please add this post to "alsa" forum.  If you need any
> others information i can send it .
>
> My post:
>
>   I try use freescale audio chip sgtl5000 on my custom board with Zynq
> chip. I need help with instance driver in device tree and debug first
> execution.
>
> 1.*I use I2C* controler to configure sgtl5000 :
> /        axi_iic_sgtl: i2c@41610000 {//
> //            #address-cells = <1>;//
> //            #size-cells = <0>;//
> //            compatible = "xlnx,xps-iic-2.00.a";//
> //            interrupt-parent = <&gic>;//
> //            interrupts = <0 31 4>;//
> //            reg = <0x41610000 0x10000>;//
> ////
> //            codec: sgtl5000@0a {//
> //                #sound-dai-cells = <0>;//
> //                compatible = "fsl,sgtl5000";//
> //                reg = <0x0a>;//
> //////                VDDA-supply = <&reg_3p3v>;//
> //////                VDDIO-supply = <&reg_3p3v>;//
> //                clocks = <&clkc 19>;//
> //      }; /
>
>   How can i set comment lines ?
>
> 2. sound :
> /        sound {
>            compatible = "fsl,imx51-babbage-sgtl5000",
> "fsl,imx-audio-sgtl5000";
>            model = "imx51-babbage-sgtl5000";
> //          ssi-controller = <&ssi1>;
>            audio-codec = <&codec>;
>            audio-routing =
>                    "MIC_IN", "Mic Jack",
>                    "Mic Jack", "Mic Bias",
>                    "Headphone Jack", "HP_OUT";
>            mux-int-port = <1>;
>            mux-ext-port = <3>;
>          };/
> I want use I2C configuration driver not SPI . How can i set comment line ?
>
> 3. I2S driver looks like ok  :
> /        axi_i2s_adi_0: axi_i2s_adi@77600000 {
>              compatible = "xlnx,axi-i2s-adi-1.0";
>              reg = <0x77600000 0x10000>;
>              xlnx,bclk-pol = <0x0>;
>              xlnx,dma-type = <0x1>;
>              xlnx,has-rx = <0x1>;
>              xlnx,has-tx = <0x1>;
>              xlnx,lrclk-pol = <0x0>;
>              xlnx,num-ch = <0x1>;
>              xlnx,s-axi-min-size = <0x000001FF>;
>              xlnx,slot-width = <0x18>;
>          };/
>
>
> PS.
> Right now i can compile device tree but audio is not detected.
> What kind of log do you need to check Linux boot problem ?

Comments in DTS files are done the old-school C way, /* */.

Regarding the SGTL5K configuration, please take a look here for
reference:

https://github.com/torvalds/linux/blob/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/arch/arm/boot/dts/imx6dl-riotboard.dts

If the audio codec device is detected during boot, you should see
something like this in you boot logs:


...
sgtl5000 0-000a: sgtl5000 revision 0x11
sgtl5000 0-000a: Using internal LDO instead of VDDD
imx-sgtl5000 sound: sgtl5000 <-> 2028000.ssi mapping ok
...
ALSA device list:
#0: imx6-riotboard-sgtl5000
...


Regards,
Nikolay

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Post Audio codec sgtl5000 with ARM/Zynq under Linux
  2015-06-17  2:21 ` Nikolay Dimitrov
@ 2015-06-17 14:28   ` Wojciech Zebrowski
  2015-06-22  7:30     ` Wojciech Zebrowski
  0 siblings, 1 reply; 4+ messages in thread
From: Wojciech Zebrowski @ 2015-06-17 14:28 UTC (permalink / raw)
  To: Nikolay Dimitrov
  Cc: alsa-devel, Fabio Estevam, Michal Simek, Sören Brinkmann

Hi Nikolay

Thx for your advice , i try use it in feature dts files.
My problem is as below , i can send you boot log or , dmesg log if you 
have any other proposition i can debug it too.

1.*I use I2C* controler to configure sgtl5000 :
         axi_iic_sgtl: i2c@41610000 {
             #address-cells = <1>;
             #size-cells = <0>;
             compatible = "xlnx,xps-iic-2.00.a";
             interrupt-parent = <&gic>;
             interrupts = <0 31 4>;
             reg = <0x41610000 0x10000>;

             codec: sgtl5000@0a {
                 #sound-dai-cells = <0>;
                 compatible = "fsl,sgtl5000";
                 reg = <0x0a>;
/*                VDDA-supply = <&reg_3p3v>; */
/*                VDDIO-supply = <&reg_3p3v>;*/
                 clocks = <&clkc 19>;
       };
*
**  How can i set comment lines ? *

2. sound :
         sound {
            compatible = "fsl,imx51-babbage-sgtl5000",
"fsl,imx-audio-sgtl5000";
            model = "imx51-babbage-sgtl5000";
/*          ssi-controller = <&ssi1>; */
            audio-codec = <&codec>;
            audio-routing =
                    "MIC_IN", "Mic Jack",
                    "Mic Jack", "Mic Bias",
                    "Headphone Jack", "HP_OUT";
            mux-int-port = <1>;
            mux-ext-port = <3>;
          };/
*I want use I2C configuration driver not SPI . How can i set comment 
line ? **
***
3. I2S driver looks like ok  :
         axi_i2s_adi_0: axi_i2s_adi@77600000 {
              compatible = "xlnx,axi-i2s-adi-1.0";
              reg = <0x77600000 0x10000>;
              xlnx,bclk-pol = <0x0>;
              xlnx,dma-type = <0x1>;
              xlnx,has-rx = <0x1>;
              xlnx,has-tx = <0x1>;
              xlnx,lrclk-pol = <0x0>;
              xlnx,num-ch = <0x1>;
              xlnx,s-axi-min-size = <0x000001FF>;
              xlnx,slot-width = <0x18>;
          };



W dniu 2015-06-17 o 04:21, Nikolay Dimitrov pisze:
> Hi Wojciech,
>
> On 06/11/2015 09:59 AM, Wojciech Zebrowski wrote:
>> Hi All
>>
>> I try solve problem with support SGTL5000  under Linux , ARM / ZYNQ
>> ARCHITECTURE. Please add this post to "alsa" forum.  If you need any
>> others information i can send it .
>>
>> My post:
>>
>>   I try use freescale audio chip sgtl5000 on my custom board with Zynq
>> chip. I need help with instance driver in device tree and debug first
>> execution.
>>
>> 1.*I use I2C* controler to configure sgtl5000 :
>> /        axi_iic_sgtl: i2c@41610000 {//
>> //            #address-cells = <1>;//
>> //            #size-cells = <0>;//
>> //            compatible = "xlnx,xps-iic-2.00.a";//
>> //            interrupt-parent = <&gic>;//
>> //            interrupts = <0 31 4>;//
>> //            reg = <0x41610000 0x10000>;//
>> ////
>> //            codec: sgtl5000@0a {//
>> //                #sound-dai-cells = <0>;//
>> //                compatible = "fsl,sgtl5000";//
>> //                reg = <0x0a>;//
>> //////                VDDA-supply = <&reg_3p3v>;//
>> //////                VDDIO-supply = <&reg_3p3v>;//
>> //                clocks = <&clkc 19>;//
>> //      }; /
>>
>>   How can i set comment lines ?
>>
>> 2. sound :
>> /        sound {
>>            compatible = "fsl,imx51-babbage-sgtl5000",
>> "fsl,imx-audio-sgtl5000";
>>            model = "imx51-babbage-sgtl5000";
>> //          ssi-controller = <&ssi1>;
>>            audio-codec = <&codec>;
>>            audio-routing =
>>                    "MIC_IN", "Mic Jack",
>>                    "Mic Jack", "Mic Bias",
>>                    "Headphone Jack", "HP_OUT";
>>            mux-int-port = <1>;
>>            mux-ext-port = <3>;
>>          };/
>> I want use I2C configuration driver not SPI . How can i set comment 
>> line ?
>>
>> 3. I2S driver looks like ok  :
>> /        axi_i2s_adi_0: axi_i2s_adi@77600000 {
>>              compatible = "xlnx,axi-i2s-adi-1.0";
>>              reg = <0x77600000 0x10000>;
>>              xlnx,bclk-pol = <0x0>;
>>              xlnx,dma-type = <0x1>;
>>              xlnx,has-rx = <0x1>;
>>              xlnx,has-tx = <0x1>;
>>              xlnx,lrclk-pol = <0x0>;
>>              xlnx,num-ch = <0x1>;
>>              xlnx,s-axi-min-size = <0x000001FF>;
>>              xlnx,slot-width = <0x18>;
>>          };/
>>
>>
>> PS.
>> Right now i can compile device tree but audio is not detected.
>> What kind of log do you need to check Linux boot problem ?
>
> Comments in DTS files are done the old-school C way, /* */.
Changed
>
> Regarding the SGTL5K configuration, please take a look here for
> reference:
>
> https://github.com/torvalds/linux/blob/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/arch/arm/boot/dts/imx6dl-riotboard.dts 
>
>
I thing it is the same as my .
> If the audio codec device is detected during boot, you should see
> something like this in you boot logs:
>
>
> ...
> sgtl5000 0-000a: sgtl5000 revision 0x11
> sgtl5000 0-000a: Using internal LDO instead of VDDD
> imx-sgtl5000 sound: sgtl5000 <-> 2028000.ssi mapping ok
> ...
Nothing
> ALSA device list:
> #0: imx6-riotboard-sgtl5000
> ...
Nothing
>
>
> Regards,
> Nikolay
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Post Audio codec sgtl5000 with ARM/Zynq under Linux
  2015-06-17 14:28   ` Wojciech Zebrowski
@ 2015-06-22  7:30     ` Wojciech Zebrowski
  0 siblings, 0 replies; 4+ messages in thread
From: Wojciech Zebrowski @ 2015-06-22  7:30 UTC (permalink / raw)
  To: Nikolay Dimitrov
  Cc: alsa-devel, Fabio Estevam, Michal Simek, Sören Brinkmann

[-- Attachment #1: Type: text/plain, Size: 5769 bytes --]

Hi All

I use device tree add to attachments . Now linux boot but no detect 
sgtl5000 device.
The Linux kernael 3-17 configure from .config file.

Please check my configuration files (kernel , devicetree).
(I set all required device to detect sgtl5000 )

Wojciech Żebrowski
W dniu 2015-06-17 o 16:28, Wojciech Zebrowski pisze:
> Hi Nikolay
>
> Thx for your advice , i try use it in feature dts files.
> My problem is as below , i can send you boot log or , dmesg log if you 
> have any other proposition i can debug it too.
>
> 1.*I use I2C* controler to configure sgtl5000 :
>         axi_iic_sgtl: i2c@41610000 {
>             #address-cells = <1>;
>             #size-cells = <0>;
>             compatible = "xlnx,xps-iic-2.00.a";
>             interrupt-parent = <&gic>;
>             interrupts = <0 31 4>;
>             reg = <0x41610000 0x10000>;
>
>             codec: sgtl5000@0a {
>                 #sound-dai-cells = <0>;
>                 compatible = "fsl,sgtl5000";
>                 reg = <0x0a>;
> /*                VDDA-supply = <&reg_3p3v>; */
> /*                VDDIO-supply = <&reg_3p3v>;*/
>                 clocks = <&clkc 19>;
>       };
> *
> **  How can i set comment lines ? *
>
> 2. sound :
>         sound {
>            compatible = "fsl,imx51-babbage-sgtl5000",
> "fsl,imx-audio-sgtl5000";
>            model = "imx51-babbage-sgtl5000";
> /*          ssi-controller = <&ssi1>;  */
>            audio-codec = <&codec>;
>            audio-routing =
>                    "MIC_IN", "Mic Jack",
>                    "Mic Jack", "Mic Bias",
>                    "Headphone Jack", "HP_OUT";
>            mux-int-port = <1>;
>            mux-ext-port = <3>;
>          };/
> *I want use I2C configuration driver not SPI . How can i set comment 
> line ? **
> ***
> 3. I2S driver looks like ok  :
>         axi_i2s_adi_0: axi_i2s_adi@77600000 {
>              compatible = "xlnx,axi-i2s-adi-1.0";
>              reg = <0x77600000 0x10000>;
>              xlnx,bclk-pol = <0x0>;
>              xlnx,dma-type = <0x1>;
>              xlnx,has-rx = <0x1>;
>              xlnx,has-tx = <0x1>;
>              xlnx,lrclk-pol = <0x0>;
>              xlnx,num-ch = <0x1>;
>              xlnx,s-axi-min-size = <0x000001FF>;
>              xlnx,slot-width = <0x18>;
>          };
>
>
>
> W dniu 2015-06-17 o 04:21, Nikolay Dimitrov pisze:
>> Hi Wojciech,
>>
>> On 06/11/2015 09:59 AM, Wojciech Zebrowski wrote:
>>> Hi All
>>>
>>> I try solve problem with support SGTL5000  under Linux , ARM / ZYNQ
>>> ARCHITECTURE. Please add this post to "alsa" forum.  If you need any
>>> others information i can send it .
>>>
>>> My post:
>>>
>>>   I try use freescale audio chip sgtl5000 on my custom board with Zynq
>>> chip. I need help with instance driver in device tree and debug first
>>> execution.
>>>
>>> 1.*I use I2C* controler to configure sgtl5000 :
>>> /        axi_iic_sgtl: i2c@41610000 {//
>>> //            #address-cells = <1>;//
>>> //            #size-cells = <0>;//
>>> //            compatible = "xlnx,xps-iic-2.00.a";//
>>> //            interrupt-parent = <&gic>;//
>>> //            interrupts = <0 31 4>;//
>>> //            reg = <0x41610000 0x10000>;//
>>> ////
>>> //            codec: sgtl5000@0a {//
>>> //                #sound-dai-cells = <0>;//
>>> //                compatible = "fsl,sgtl5000";//
>>> //                reg = <0x0a>;//
>>> //////                VDDA-supply = <&reg_3p3v>;//
>>> //////                VDDIO-supply = <&reg_3p3v>;//
>>> //                clocks = <&clkc 19>;//
>>> //      }; /
>>>
>>>   How can i set comment lines ?
>>>
>>> 2. sound :
>>> /        sound {
>>>            compatible = "fsl,imx51-babbage-sgtl5000",
>>> "fsl,imx-audio-sgtl5000";
>>>            model = "imx51-babbage-sgtl5000";
>>> //          ssi-controller = <&ssi1>;
>>>            audio-codec = <&codec>;
>>>            audio-routing =
>>>                    "MIC_IN", "Mic Jack",
>>>                    "Mic Jack", "Mic Bias",
>>>                    "Headphone Jack", "HP_OUT";
>>>            mux-int-port = <1>;
>>>            mux-ext-port = <3>;
>>>          };/
>>> I want use I2C configuration driver not SPI . How can i set comment 
>>> line ?
>>>
>>> 3. I2S driver looks like ok  :
>>> /        axi_i2s_adi_0: axi_i2s_adi@77600000 {
>>>              compatible = "xlnx,axi-i2s-adi-1.0";
>>>              reg = <0x77600000 0x10000>;
>>>              xlnx,bclk-pol = <0x0>;
>>>              xlnx,dma-type = <0x1>;
>>>              xlnx,has-rx = <0x1>;
>>>              xlnx,has-tx = <0x1>;
>>>              xlnx,lrclk-pol = <0x0>;
>>>              xlnx,num-ch = <0x1>;
>>>              xlnx,s-axi-min-size = <0x000001FF>;
>>>              xlnx,slot-width = <0x18>;
>>>          };/
>>>
>>>
>>> PS.
>>> Right now i can compile device tree but audio is not detected.
>>> What kind of log do you need to check Linux boot problem ?
>>
>> Comments in DTS files are done the old-school C way, /* */.
> Changed
>>
>> Regarding the SGTL5K configuration, please take a look here for
>> reference:
>>
>> https://github.com/torvalds/linux/blob/0f57d86787d8b1076ea8f9cbdddda2a46d534a27/arch/arm/boot/dts/imx6dl-riotboard.dts 
>>
>>
> I thing it is the same as my .
>> If the audio codec device is detected during boot, you should see
>> something like this in you boot logs:
>>
>>
>> ...
>> sgtl5000 0-000a: sgtl5000 revision 0x11
>> sgtl5000 0-000a: Using internal LDO instead of VDDD
>> imx-sgtl5000 sound: sgtl5000 <-> 2028000.ssi mapping ok
>> ...
> Nothing
>> ALSA device list:
>> #0: imx6-riotboard-sgtl5000
>> ...
> Nothing
>>
>>
>> Regards,
>> Nikolay
>>
>


[-- Attachment #2: zynq.dtsi --]
[-- Type: text/plain, Size: 9710 bytes --]

/ {
	compatible = "xlnx,zynq-7000";
	#address-cells = <1>;
	#size-cells = <1>;
	interrupt-parent = <&gic>;

	aliases {
		ethernet0 = &eth;
		serial0 = &uart1;
		i2c0 = &i2c0_eeprom;
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		ps7_cortexa9_0: cpu@0 {
			bus-handle = <&axi>;
			clock-latency = <1000>;
			clocks = <&clkc 3>;
			compatible = "arm,cortex-a9";
			device_type = "cpu";
			interrupt-handle = <&gic>;
			operating-points = <666667 1000000 333334 1000000 222223 1000000>;
			reg = <0x0>;
		};

		ps7_cortexa9_1: cpu@1 {
			bus-handle = <&axi>;
			clocks = <&clkc 3>;
			compatible = "arm,cortex-a9";
			device_type = "cpu";
			interrupt-handle = <&gic>;
			reg = <0x1>;
		};
	};

	pmu {
		compatible = "arm,cortex-a9-pmu";
		interrupts = <0 5 4>, <0 6 4>;
		interrupt-parent = <&gic>;
		reg = <0xf8891000 0x1000>, <0xf8893000 0x1000>;
		reg-names = "cpu0", "cpu1";
	};

	axi: amba@0 {
		compatible = "simple-bus";
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges;

/*		
		gic: intc@f8f01000 {
			interrupt-controller;
			compatible = "arm,cortex-a9-gic";
			#interrupt-cells = <3>;
			reg = <0xf8f01000 0x1000>,
			      <0xf8f00100 0x0100>;
		};
*/

		gic: ps7-scugic@f8f01000 {
			#address-cells = <2>;
			#interrupt-cells = <3>;
			#size-cells = <1>;
			compatible = "arm,cortex-a9-gic", "arm,gic";
			interrupt-controller ;
			num_cpus = <2>;
			num_interrupts = <96>;
			reg = <0xF8F01000 0x1000 0xF8F00100 0x100>;
			xlnx,irq-f2p-mode = "DIRECT";
		} ;
		
		pl310@f8f02000 {
			compatible = "arm,pl310-cache";
			cache-unified;
			cache-level = <2>;
			reg = <0xf8f02000 0x1000>;
			arm,data-latency = <3 2 2>;
			arm,tag-latency = <2 2 2>;
		};

		uart0: uart@e0000000 {
			interrupt-parent = <&gic>;
			compatible = "xlnx,xuartps", "cdns,uart-r1p8";
			status = "disabled";
			clocks = <&clkc 23>, <&clkc 40>;
			clock-names = "uart_clk", "pclk";
			reg = <0xE0000000 0x1000>;
			interrupts = <0 27 4>;
			port-number = <0>;
			current-speed = <115200>;
			device_type = "serial";
		};

		uart1: uart@e0001000 {
			interrupt-parent = <&gic>;
			compatible = "xlnx,xuartps", "cdns,uart-r1p8";
			clocks = <&clkc 24>, <&clkc 41>;
			clock-names = "uart_clk", "pclk";
			reg = <0xE0001000 0x1000>;
			interrupts = <0 50 4>;
			port-number = <0>;
			current-speed = <115200>;
			device_type = "serial";
		};

		ps7_dma: ps7-dma@f8003000 {
			#dma-cells = <1>;
			#dma-channels = <8>;
			#dma-requests = <4>;
			compatible = "arm,primecell", "arm,pl330";
			interrupt-parent = <&gic>;
			interrupts = <0 13 4 0 14 4 0 15 4 0 16 4 0 17 4 0 40 4 0 41 4 0 42 4 0 43 4>;
			reg = <0xf8003000 0x1000>;
			clocks = <&clkc 27>;
			clock-names = "apb_pclk";
		};

		slcr: slcr@f8000000 {
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "xlnx,zynq-slcr", "syscon";
			reg = <0xf8000000 0x1000>;
			ranges ;
			clkc: clkc {
				#clock-cells = <1>;
				clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", "cpu_3or2x",
					"cpu_2x", "cpu_1x", "ddr2x", "ddr3x", "dci",
					"lqspi", "smc", "pcap", "gem0", "gem1",
					"fclk0", "fclk1", "fclk2", "fclk3", "can0",
					"can1", "sdio0", "sdio1", "uart0", "uart1",
					"spi0", "spi1", "dma", "usb0_aper", "usb1_aper",
					"gem0_aper", "gem1_aper", "sdio0_aper", "sdio1_aper", "spi0_aper",
					"spi1_aper", "can0_aper", "can1_aper", "i2c0_aper", "i2c1_aper",
					"uart0_aper", "uart1_aper", "gpio_aper", "lqspi_aper", "smc_aper",
					"swdt", "dbg_trc", "dbg_apb";
				compatible = "xlnx,ps7-clkc";
				ps-clk-frequency = <50000000>;
				fclk-enable = <0xf>;
				reg = <0x100 0x100>;
			};
		};

		timer@0xf8001000 {
			compatible = "cdns,ttc";
			reg = <0xf8001000 0x1000>;
			interrupts = < 0 10 4 0 11 4 0 12 4 >;
			interrupt-parent = <&gic>;
			clocks = <&clkc 6>;
		};

		timer@f8f00600 {
			compatible = "arm,cortex-a9-twd-timer";
			reg = <0xf8f00600 0x20>;
			interrupts = <1 13 0x301>;
			clocks = <&clkc 4>;
			interrupt-parent = <&gic>;
		};

		swdt@f8005000 {
			device_type = "watchdog";
			compatible = "xlnx,ps7-wdt-1.00.a", "xlnx,zynq-wdt-1.00.a";
			reg = <0xf8005000 0x100>;
			interrupts = <0 9 4>;
			interrupt-parent = <&gic>;
			clocks = <&clkc 45>;
			reset = <0>;
			timeout = <10>;
		};

		scuwdt@f8f00620 {
			device_type = "watchdog";
			compatible = "arm,mpcore_wdt";
			reg = <0xf8f00620 0x20>;
			clocks = <&clkc 4>;
			reset = <1>;
		};
/*
		eth: eth@e000b000 {
			compatible = "xlnx,ps7-ethernet-1.00.a";
			reg = <0xe000b000 0x1000>;
			interrupts = <0 22 4>;
			interrupt-parent = <&gic>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;

			clock-names = "ref_clk", "aper_clk";
			clocks = <&clkc 13>, <&clkc 30>;

			xlnx,enet-clk-freq-hz = <0x17d7840>;
			xlnx,ptp-enet-clock = <0x6750918>;
			xlnx,enet-reset = "MIO 51";
			xlnx,enet-slcr-1000mbps-div0 = <0x8>;
			xlnx,enet-slcr-1000mbps-div1 = <0x1>;
			xlnx,enet-slcr-100mbps-div0 = <0x8>;
			xlnx,enet-slcr-100mbps-div1 = <0x5>;
			xlnx,enet-slcr-10mbps-div0 = <0x8>;
			xlnx,enet-slcr-10mbps-div1 = <0x32>;
			xlnx,eth-mode = <0x1>;
			xlnx,has-mdio = <0x1>;
//			xlnx,ptp-enet-clock = <111111115>;
		};
*/		
		eth: eth@e000b000 {
			compatible = "xlnx,ps7-ethernet-1.00.a";
			reg = <0xe000b000 0x1000>;
			status = "disabled";
			interrupts = <0 22 4>;
			clocks = <&clkc 13>, <&clkc 30>;
			clock-names = "ref_clk", "aper_clk";
			local-mac-address = [00 0a 35 00 00 00];
			xlnx,has-mdio = <0x1>;
			#address-cells = <1>;
			#size-cells = <0>;
		};

		i2c0_eeprom: ps7-i2c@e0004000 {
			bus-id = <0>;
			clock-frequency = <100000>;
			clocks = <&clkc 38>;
			compatible = "cdns,i2c-r1p10";
			interrupt-parent = <&gic>;
			interrupts = <0 25 4>;
			reg = <0xe0004000 0x1000>;
			xlnx,has-interrupt = <0x0>;
/*			xlnx,i2c-reset = "";	*/
			xlnx,i2c-reset = <0xffffffff>;
			#address-cells = <1>;
			#size-cells = <0>;
			
			24aa64@50 {
			//compatible = "at,24c08";
			compatible = "mircochip,24aa64";
			reg = <0x50>;
			};
		} ;
/*
		i2c0: i2c@e0004000 {
			compatible = "cdns,i2c-r1p10";
			status = "enable";
			clocks = <&clkc 38>;
			interrupt-parent = <&gic>;
			interrupts = <0 25 4>;
			reg = <0xe0004000 0x1000>;
			clock-frequency = <400000>;
			
			#address-cells = <1>;
			#size-cells = <0>;
			
			24aa64@50 {
			//compatible = "at,24c08";
			compatible = "mircochip,24aa64";
			reg = <0x50>;
			};
		};

*/
		i2c1: i2c@e0005000 {
			compatible = "cdns,i2c-r1p10";
			status = "disabled";
			clocks = <&clkc 39>;
			interrupt-parent = <&gic>;
			interrupts = <0 48 4>;
			reg = <0xe0005000 0x1000>;
			#address-cells = <1>;
			#size-cells = <0>;
		};

		gpio: gpio@e000a000 {
			compatible = "xlnx,ps7-gpio-1.00.a", "xlnx,zynq-gpio-1.00.a", "xlnx,zynq-gpio-1.0";
			reg = <0xe000a000 0x1000>;
			interrupts = <0 20 4>;
			interrupt-parent = <&gic>;
			clocks = <&clkc 42>;
			gpio-controller;
			#gpio-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <2>;
		};

		sdhci0: sdhci@e0100000 {
			compatible = "xlnx,ps7-sdio-1.00.a", "arasan,sdhci-8.9a";
			reg = <0xe0100000 0x1000>;
			interrupts = <0 24 4>;
			interrupt-parent = <&gic>;
			clock-names = "clk_xin", "clk_ahb";
			clocks = <&clkc 21>, <&clkc 32>;
			xlnx,has-cd = <0x1>;
			clock-frequency = <50000000>;
		};
/*
		usb: usb@e0002000 {
			compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
			reg = <0xe0002000 0x1000>;
			interrupts = <0 21 4>;
			interrupt-parent = <&gic>;
			clocks = <&clkc 28>;
			phy_type = "ulpi";
		};
*/		
		usb: usb@e0002000 {
			clocks = <&clkc 28>;
/*			compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2"; */
			compatible = "xlnx,ps7-usb-1.00.a", "xlnx,zynq-usb-1.00.a";
			status = "disabled";
			interrupt-parent = <&gic>;
			interrupts = <0 21 4>;
			reg = <0xe0002000 0x1000>;
		};

		

		spi0: spi@e0006000 {
			compatible = "cdns,spi-r1p6", "xlnx,zynq-spi-1.00.a", "xlnx,ps7-spi-1.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 26 4>;
			clock-names = "ref_clk", "aper_clk", "pclk";
			clocks = <&clkc 25>, <&clkc 34>, <&clkc 34>;
			num-chip-select = <4>;
			reg = <0xe0006000 0x1000>;
			speed-hz = <100000000>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
		};

		spi1: spi@e0007000 {
			compatible = "cdns,spi-r1p6", "xlnx,zynq-spi-1.00.a", "xlnx,ps7-spi-1.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 49 4>;
			clock-names = "ref_clk", "aper_clk", "pclk";
			clocks = <&clkc 26>, <&clkc 35>, <&clkc 35>;
			num-chip-select = <4>;
			reg = <0xe0007000 0x1000>;
			speed-hz = <100000000>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
		};

		qspi0: qspi@e000d000 {
			#address-cells = <1>;
			#size-cells = <0>;
			clock-names = "ref_clk", "pclk";
			clocks = <&clkc 10>, <&clkc 43>;
			compatible = "xlnx,zynq-qspi-1.0";
			status = "disabled";
			interrupt-parent = <&gic>;
			interrupts = <0 19 4>;
			reg = <0xe000d000 0x1000>;
		};

		devcfg@f8007000 {
			compatible = "xlnx,zynq-devcfg-1.0";
			reg = <0xf8007000 0x100>;
			interrupts = <0 8 4>;
			interrupt-parent = <&gic>;
			clocks = <&clkc 12>, <&clkc 15>, <&clkc 16>, <&clkc 17>, <&clkc 18>;
			clock-names = "ref_clk", "fclk0", "fclk1", "fclk2", "fclk3";
		};

		xadc@f8007100 {
			compatible = "xlnx,zynq-xadc-1.00.a", "xlnx,ps7-xadc-1.00.a";
			reg = <0xf8007100 0x20>;
			interrupts = <0 7 4>;
			interrupt-parent = <&gic>;
			clocks = <&clkc 12>;
		};

		ps7_ddrc_0: ps7-ddrc@f8006000 {
			compatible = "xlnx,zynq-ddrc-a05", "xlnx,ps7-ddrc-1.00.a", "xlnx,ps7-ddrc", "xlnx,zynq-ddrc-1.0";
			reg = <0xf8006000 0x1000>;
			xlnx,has-ecc = <0x0>;
		} ;

		ps7_ocm_0: ps7-ocm@f800c000 {
			compatible = "xlnx,ps7-ocmc-1.00.a", "xlnx,zynq-ocmc-1.0";
			interrupt-parent = <&gic>;
			interrupts = <0 3 4>;
			reg = <0xf800c000 0x1000>;
		};
	};
};

[-- Attachment #3: zynq-zc702.dtsi --]
[-- Type: text/plain, Size: 604 bytes --]

/include/ "zynq.dtsi"

/ {
	model = "Xilinx Zynq ZC702";

	memory {
		device_type = "memory";
		reg = <0x000000000 0x20000000>;
	};

	chosen {
		bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait";
		linux,stdout-path = "/amba@0/uart@E0001000";
	};


};


	&eth {
	local-mac-address = [00 0a 35 00 00 00];
	phy-mode = "rgmii-id";
	status = "okay";
	xlnx,ptp-enet-clock = <0x6750918>;
	ps7_ethernet_0_mdio: mdio {
		#address-cells = <1>;
		#size-cells = <0>;
	};
};


&usb {
	dr_mode = "host";
	phy_type = "ulpi";
	status = "okay";
	usb-reset = <&gpio 9 0>;
};


[-- Attachment #4: zynq-zc702-adv7511.dts --]
[-- Type: text/plain, Size: 75 bytes --]

/dts-v1/;

/include/ "zynq-zc702.dtsi"
/include/ "zynq-zc702-adv7511.dtsi"

[-- Attachment #5: zynq-zc702-adv7511.dtsi --]
[-- Type: text/plain, Size: 5506 bytes --]

/ {
	fpga_axi: fpga-axi@0 {
		compatible = "simple-bus";
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges;
		
		regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		reg_2p5v: regulator@0 {
			compatible = "regulator-fixed";
			reg = <0>;
			regulator-name = "2P5V";
			regulator-min-microvolt = <2500000>;
			regulator-max-microvolt = <2500000>;
		};

		reg_3p3v: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "3P3V";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
		};
	};

		sound {
          compatible = "fsl,imx51-babbage-sgtl5000",
                       "fsl,imx-audio-sgtl5000";
          model = "imx51-babbage-sgtl5000";
          ssi-controller = <&axi_i2s_adi_0>; 

		  audio-codec = <&codec>;
          audio-routing =
                  "MIC_IN", "Mic Jack",
                  "Mic Jack", "Mic Bias",
                  "Headphone Jack", "HP_OUT";
          mux-int-port = <1>;
          mux-ext-port = <3>;
		};
		
		xilinx_pcm_audio: xilinx_pcm_audio {
               compatible = "xilinx-pcm-audio";
               #size-cells = <0>;
               #address-cells = <1>;

               stream@0 {
                    reg = <0>;
/*                    dma-request = <&ps7_dma 0>; */
               };
          };

	
		axi_iic_0: i2c@41600000 {
			compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 58 0x4>;
			reg = <0x41600000 0x10000>;

			#size-cells = <0>;
			#address-cells = <1>;

			adv7511: adv7511@39 {
				compatible = "adi,adv7511";
				reg = <0x39>;

				adi,input-style = <0x02>;
				adi,input-id = <0x01>;
				adi,input-color-depth = <0x3>;
				adi,sync-pulse = <0x03>;
				adi,bit-justification = <0x01>;
				adi,up-conversion = <0x00>;
				adi,timing-generation-sequence = <0x00>;
				adi,vsync-polarity = <0x02>;
				adi,hsync-polarity = <0x02>;
				adi,tdms-clock-inversion;
				adi,clock-delay = <0x03>;
			};
		};
		

		axi_iic_sgtl: i2c_1@41610000 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "xlnx,xps-iic-2.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 57 4>;
			reg = <0x41610000 0x10000>;
			
			codec: sgtl5000@03a {
				#sound-dai-cells = <0>;
				compatible = "fsl,sgtl5000";
				reg = <0x0a>;
				VDDA-supply = <&reg_3p3v>; 
				VDDIO-supply = <&reg_3p3v>; 
				clocks = <&clkc 19>;
      };			
			
		};
/*
		i2c_sgtl@41610000 {
			compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
			interrupt-parent = <&gic>;
			interrupts = <0 57 0x4>;
			reg = <0x41610000 0x10000>;

			#size-cells = <0>;
			#address-cells = <1>;

//			codec: sgtl5000@03a {
//				#sound-dai-cells = <0>;
//				compatible = "fsl,sgtl5000";
//				reg = <0x0a>;
////				VDDA-supply = <&reg_3p3v>;
////				VDDIO-supply = <&reg_3p3v>;
//				clocks = <&clkc 19>;
//      };

			};
*/
		
		axi_vdma_0: axivdma@43000000 {
			#address-cells = <1>;
			#size-cells = <1>;
			#dma-cells = <1>;
			compatible = "xlnx,axi-vdma";
			reg = <0x43000000 0x1000>;
			xlnx,include-sg = <0x0>;
			xlnx,num-fstores = <0x3>;
			dma-channel@43000000 {
				compatible = "xlnx,axi-vdma-mm2s-channel";
				interrupts = <0 59 0x4>;
				xlnx,datawidth = <0x40>;
				xlnx,genlock-mode = <0x0>;
				xlnx,include-dre = <0x0>;
			};
		};

		hdmi_clock: axi-clkgen@79000000 {
			compatible = "adi,axi-clkgen-2.00.a";
			reg = <0x79000000 0x10000>;
			#clock-cells = <0>;
			clocks = <&clkc 16>;
		};

		axi_hdmi@70e00000 {
			compatible = "adi,axi-hdmi-tx-1.00.a";
			reg = <0x70e00000 0x10000>;
			encoder-slave = <&adv7511>;
			dmas = <&axi_vdma_0 0>;
			dma-names = "video";
			clocks = <&hdmi_clock>;
		};

		audio_clock: audio_clock {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <12288000>;
		};
		
		axi_pcie_0: axi-pcie@50000000 {
			#address-cells = <3>;
			#size-cells = <2>;
			compatible = "xlnx,axi-pcie-1.05.a";
			interrupt-parent = <&gic>;
			interrupts = <0 56 4>;
			ranges = <0x02000000 0x00000000 0x60000000 0x60000000 0x00000000 0x10000000>;
			reg = <0x50000000 0x10000000>;
			xlnx,include-rc = <0x1>;
			xlnx,pciebar-num = <0x1>;
			xlnx,pciebar2axibar-0 = <0x00000000>;
			xlnx,pciebar2axibar-1 = <0xFFFFFFFF>;
		} ;

		axi_spdif_tx_0: axi-spdif-tx@0x75c00000 {
			compatible = "adi,axi-spdif-tx-1.00.a";
			reg = <0x75c00000 0x1000>;
			dmas = <&ps7_dma 0>;
			dma-names = "tx";
			clocks = <&clkc 15>, <&audio_clock>, <&audio_clock>;
			clock-names = "axi", "ref", "spdif";
		};

		adv7511_hdmi_snd: adv7511_hdmi_snd {
			compatible = "adv7511-hdmi-snd";
			audio-codec = <&adv7511>;
			//audio-codec-adapter = <&axi_iic_0>;
			cpu-dai = <&axi_spdif_tx_0>;
			pcm = <&xilinx_pcm_audio>;  
		};
		

		axi_i2s_adi_0: axi_i2s_adi@77600000 {
			compatible = "xlnx,axi-i2s-adi-1.0";
			reg = <0x77600000 0x10000>;
			xlnx,bclk-pol = <0x0>;
			xlnx,dma-type = <0x1>;
			xlnx,has-rx = <0x1>;
			xlnx,has-tx = <0x1>;
			xlnx,lrclk-pol = <0x0>;
			xlnx,num-ch = <0x1>;
			xlnx,s-axi-min-size = <0x000001FF>;
			xlnx,slot-width = <0x18>;
		};
		
			
/*		
		axi_i2s_0: axi-i2s@0x77600000 {
			compatible = "adi,axi-i2s-1.00.a";
			reg = <0x77600000 0x1000>;
			dmas = <&ps7_dma 1 &ps7_dma 2>;
			dma-names = "tx", "rx";
			clocks = <&clkc 19>, <&audio_clock>, <&audio_clock>;
			clock-names = "axi", "ref", "i2s";
		};

		aldec_sound: aldec_sound {
			//compatible = "digilent,zed-sound";
			audio-codec = <&codec>;
			cpu-dai = <&axi_i2s_adi_0>;
		};
*/		
	};
};


[-- Attachment #6: .config --]
[-- Type: application/xml, Size: 94006 bytes --]

[-- Attachment #7: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-22  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11  6:59 Post Audio codec sgtl5000 with ARM/Zynq under Linux Wojciech Zebrowski
2015-06-17  2:21 ` Nikolay Dimitrov
2015-06-17 14:28   ` Wojciech Zebrowski
2015-06-22  7:30     ` Wojciech Zebrowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.