[RFC PATCH] ARM: dts: rockchip: Add wifi support for firefly

Michael Trimarchi michael at amarulasolutions.com
Thu Dec 31 04:29:53 PST 2015


Hi Heiko

On Sat, Aug 8, 2015 at 11:05 PM, Heiko Stübner <heiko at sntech.de> wrote:
> Hi Michael,
>
> Am Freitag, 7. August 2015, 16:12:05 schrieb Michael Trimarchi:
>> This patch enable wifi support for the firefly board.
>> Card answer to me that support from 2.0V but regulator is connected
>> to 1.8V, so voltage capability is wrong. In order to avoid this
>> we just defined a fixed regulator trigger by the wifi enable gpio
>> that report 2.0V.
>>
>> Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
>> ---
>>  arch/arm/boot/dts/rk3288-firefly.dtsi | 43
>> +++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2
>> deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi
>> b/arch/arm/boot/dts/rk3288-firefly.dtsi index 0b42372..fcf234e 100644
>> --- a/arch/arm/boot/dts/rk3288-firefly.dtsi
>> +++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
>> @@ -116,6 +116,28 @@
>>               vin-supply = <&vcc_io>;
>>       };
>>
>> +     io_domains: io-domains {
>> +             compatible = "rockchip,rk3288-io-voltage-domain";
>> +             rockchip,grf = <&grf>;
>> +
>> +             wifi-supply = <&vcc_18>;
>> +             audio-supply = <&vcca_33>;
>> +     };
>
> should be a separate patch and include the other interesting io-domains as
> well.
>

This is alredy in mainline

>> +
>> +     vcc_wifi: wifi-regulator {
>> +             compatible = "regulator-fixed";
>> +             enable-active-high;
>> +             gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
>> +             pinctrl-names = "default";
>> +             pinctrl-0 = <&sdio0_pwr>;
>> +             regulator-name = "vcc_wifi";
>> +             regulator-min-microvolt = <2000000>;
>> +             regulator-max-microvolt = <2000000>;
>> +             startup-delay-us = <100000>;
>> +             regulator-always-on;
>> +             vin-supply = <&vcc_io>;
>> +     };
>> +
>>       vcc_flash: flash-regulator {
>>               compatible = "regulator-fixed";
>>               regulator-name = "vcc_flash";
>> @@ -437,13 +459,30 @@
>>  &sdio0 {
>>       broken-cd;
>>       bus-width = <4>;
>> +     clock-freq-min-max = <400000 50000000>;
>>       disable-wp;
>>       non-removable;
>> +     cap-sd-highspeed;
>>       num-slots = <1>;
>>       pinctrl-names = "default";
>> -     pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
>> -     vmmc-supply = <&vcc_18>;
>> +     pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
>> +
>> +     sd-uhs-sdr50;
>> +     sd-uhs-sdr104;
>> +     sd-uhs-ddr50;
>
> we don't have mmc tuning capabilities yet, so please no sd-uhs-* stuff. That
> way you should also be able to leave out the clock-freq-min-max above, as
> regular "highspeed" does not venture above the 50MHz limit.
>
>> +     cap-sdio-irq;
>> +
>> +     vmmc-supply = <&vcc_wifi>;
>
> the original supply is actually wrong in the dts. vcc_18 is the io voltage
> used on the
> pins _to_ the card, not to supply the card itself. So vcc_18 is actually the
> so called vqmmc-supply.
> vmmc-supply is done regularly from vcc_io. So your voltage hack above can go
> away too.
>
> Bringup should also use a mmc-power-sequency so you can make sure the
> rtc_clock is running, which is also needed by the wifi module.
>
>
>>       status = "okay";
>
> missing #address-cells and #size-cells values for the subnodes
>

I can confirm that patch 2 fix the issue of subnodes.
I will try to complete here the support

Michael

>> +
>> +     brcmf: bcrmf at 0 {
>> +             compatible = "brcm,bcm4329-fmac";
>> +             interrupt-parent = <&gpio4>;
>> +             reg = <0>;
>> +             interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
>> +             interrupt-names = "host-wake";
>> +             status = "okay";
>> +     };
>>  };
>>
>>  &sdmmc {
>
> I took the liberty to move stuff around how it should look like, but did not
> find the time to actually test this. So maybe you can take a look at the
> attached patches.
>
>
> Heiko



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |



More information about the Linux-rockchip mailing list