Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Power management issues with Yocto on Firefly-RK3288 Reload

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410

Power management issues with Yocto on Firefly-RK3288 Reload

Posted at 7/20/2017 20:57:56      View:5386 | Replies:5        Print     [Copy Link] 1#
Last edited by kiwor In 7/20/2017 21:00 Editor

Hi !

I have built a tiny linux with Yocto (kernel rockhip_linux v4.4) and added a node for the codec es8388 and another for the rockhip_hdmi_analog driver in rk3288-firefly.dtsi. But during the boot, communications with the codec on the I2C2 end with a timeout 'rk3x-i2c ff660000.i2c: timeout, ipd: 0x00, state: 1'.  
Then I measured the voltage on the codec's pins and it appeared that it is not powered.
I didn't change anything in the dtsi concerning the PMU...

Here are the changes I made in the dtsi file :

.
.
.
sound0: sound@0 {
                compatible = "simple-audio-card";
                simple-audio-card,name = "SPDIF";
                simple-audio-card,dai-link@1 {
                        cpu { sound-dai = <&spdif>; };
                        codec { sound-dai = <&spdif_out>; };
                };
        };

sound1: sound@1 {
                compatible = "rockchip,rk3288-hdmi-analog";
                rockchip,model = "Analog audio output";
                rockchip,i2s-controller = <&i2s>;
                rockchip,audio-codec = <&codec>;
                rockchip,routing = "Analog", "LOUT2",
                                   "Analog", "ROUT2";
                rockchip,hp-det-gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
                rockchip,hp-en-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
                pinctrl-0 = <&phone_ctl>, <&hp_det>;
        };

spdif_out: spdif-out {
                compatible = "linux,spdif-dit";
                #sound-dai-cells = <0>;
        };
.
.
.

&i2c2 {
    status = "okay";

    codec: es8328@10 {
        compatible = "everest,es8328";
        DVDD-supply = <&vcca_33>;
        AVDD-supply = <&vcca_33>;
        PVDD-supply = <&vcca_33>;
        HPVDD-supply = <&vcca_33>;
        clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
        clock-names = "i2s_hclk", "i2s_clk";
        reg = <0x10>;
    };
/*
    codec: es8323@10 {
        compatible = "everest,es8323";
        reg = <0x10>;
        spk-con-gpio = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
        hp-det-gpio = <&gpio7 RK_PB7 GPIO_ACTIVE_HIGH>;
        hp-mic-only = <1>;
        clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
        clock-names = "i2s_hclk", "i2s_clk";
        pinctrl-names = "default";
    };
*/

};
What did I do wrong ? Did someone manage to have audio working with yocto on this board ?

Any help would be appreciated !
Reply

Use props Report

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410
Posted at 7/21/2017 20:35:13      2#
Yes, I thought it was an es8323 but there is "ES8388" written on the chip.
Reply

Use props Report

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410
Posted at 7/21/2017 23:06:01      3#
I found that the node for the ACT8846 in the DTSI did not match the datasheet of the reload core board. So I changed it to :

     act8846: act8846@5a {
                compatible = "active-semi,act8846";
                reg = <0x5a>;
                pinctrl-names = "default";
                pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
                system-power-controller;

                vp1-supply = <&vcc_sys>;
                vp2-supply = <&vcc_sys>;
                vp3-supply = <&vcc_sys>;
                vp4-supply = <&vcc_sys>;
                inl1-supply = <&vcc_sys>;
                inl2-supply = <&vcc_sys>;
                inl3-supply = <&vcc_20>;

                regulators {
                        vcc_ddr: REG1 {
                                regulator-name = "vcc_ddr";
                                regulator-min-microvolt = <1200000>;
                                regulator-max-microvolt = <1200000>;
                                regulator-always-on;
                        };

                        vcc_io: REG2 {
                                regulator-name = "vcc_io";
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-always-on;
                        };

                        vdd_log: REG3 {
                                regulator-name = "vdd_log";
                                regulator-min-microvolt = <1100000>;
                                regulator-max-microvolt = <1100000>;
                                regulator-always-on;
                        };

                        vcc_20: REG4 {
                                regulator-name = "vcc_20";
                                regulator-min-microvolt = <2000000>;
                                regulator-max-microvolt = <2000000>;
                                regulator-always-on;
                        };

                        vccio_sd: REG5 {
                                regulator-name = "vccio_sd";
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-always-on;
                        };

                        vdd10_lcd: REG6 {
                                regulator-name = "vdd10_lcd";
                                regulator-min-microvolt = <1000000>;
                                regulator-max-microvolt = <1000000>;
                                regulator-always-on;
                        };

                        vcca_33: REG7 {
                                regulator-name = "vcca_33";
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-always-on;
                        };

                        vcc_lan: REG8 {
                                regulator-name = "vcc_lan";
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-always-on;
                        };

                        vccio_pmu: REG9 {
                                regulator-name = "vcca_18";
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <1800000>;
                        };


                        vdd_10: REG10 {
                                regulator-name = "vdd_10";
                                regulator-min-microvolt = <1000000>;
                                regulator-max-microvolt = <1000000>;
                                regulator-always-on;
                        };

                        vccio_wl: vcc_18: REG11 {
                                regulator-name = "vcc_18";
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <1800000>;
                                regulator-always-on;
                        };

                        vcc18_lcd: REG12 {
                                regulator-name = "vcc18_lcd";
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <1800000>;
                                regulator-always-on;
                        };
                };
        };

Now, I have the correct voltage on the codec's pins... but still no audio
Reply

Use props Report

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410
Posted at 7/24/2017 14:50:58      4#
I do have audio with the android image.
Does it means that I have to use original drivers : compatible es8323 for the codec, and compatible rk3368-hdmi-analog for the hdmi/audio codec driver  ?
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list