[RFC PATCH] ARM: dts: rockchip: Add wifi support for firefly
Heiko Stübner
heiko at sntech.de
Sat Aug 8 14:05:53 PDT 2015
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.
> +
> + 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
> +
> + 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-dts-rockchip-add-rk3288-firefly-io-domains.patch
Type: text/x-patch
Size: 1572 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20150808/95c2a0ae/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ARM-dts-rockchip-add-address-and-size-cells-to-dw-ms.patch
Type: text/x-patch
Size: 2505 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20150808/95c2a0ae/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ARM-dts-rockchip-Add-wifi-support-for-firefly.patch
Type: text/x-patch
Size: 2214 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20150808/95c2a0ae/attachment-0002.bin>
More information about the Linux-rockchip
mailing list