};
};
- wireless-wlan {
- compatible = "wlan-platdata";
+ wireless-wlan {
+ compatible = "wlan-platdata";
- wifi_chip_type = "";
- sdio_vref = <1800>; //1800mv or 3300mv
+ wifi_chip_type = "";
+ sdio_vref = <0>; //1800mv or 3300mv
- //power_ctrl_by_pmu;
- //power_pmu_regulator = "act_ldo3";
- //power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
+ //power_ctrl_by_pmu;
+ //power_pmu_regulator = "act_ldo3";
+ //power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
- //vref_ctrl_enable;
- //vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
- //vref_pmu_regulator = "act_ldo3";
- //vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
+ //vref_ctrl_enable;
+ //vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
+ //vref_pmu_regulator = "act_ldo3";
+ //vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
- //WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>;
- //WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
- //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
+ WIFI,poweren_gpio = <&gpio2 GPIO_D6 GPIO_ACTIVE_HIGH>;
+ WIFI,host_wake_irq = <&gpio2 GPIO_C4 GPIO_ACTIVE_HIGH>;
+ //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
- status = "okay";
+ status = "okay";
};
usb_control {
#include <linux/rockchip/iomap.h>
#include <dt-bindings/gpio/gpio.h>
#include <linux/skbuff.h>
+#include <linux/rockchip/cpu.h>
#ifdef CONFIG_OF
#include <linux/of.h>
#include <linux/of_device.h>
int ret = -1;
char *ldostr;
int level = mrfkill->pdata->ioregulator.enable;
- int voltage = 1000 * mrfkill->pdata->sdio_vol;
+ int voltage = 1000 * mrfkill->pdata->sdio_vol;
ldostr = mrfkill->pdata->ioregulator.pmu_regulator;
if (ldostr == NULL) {
return -1;
} else {
if (on == level) {
- regulator_set_voltage(ldo, voltage, voltage);
- LOG("%s: %s enabled, level = %d\n", __func__, ldostr, voltage);
- ret = regulator_enable(ldo);
- LOG("wifi turn on io reference voltage.\n");
+ if(cpu_is_rk3036())
+ {
+ /*regulator_set_voltage(ldo, voltage, voltage);
+ LOG("%s: %s enabled, level = %d\n", __func__, ldostr, voltage);
+ ret = regulator_enable(ldo);
+ LOG("wifi turn on io reference voltage.\n");*/
+ }else{
+ regulator_set_voltage(ldo, voltage, voltage);
+ LOG("%s: %s enabled, level = %d\n", __func__, ldostr, voltage);
+ ret = regulator_enable(ldo);
+ LOG("wifi turn on io reference voltage.\n");
+ }
} else {
LOG("%s: %s disabled\n", __func__, ldostr);
while (regulator_is_enabled(ldo) > 0) {
memset(data, 0, sizeof(*data));
- ret = of_property_read_u32(node, "sdio_vref", &value);
- if (ret < 0) {
- LOG("%s: Can't get sdio vref.", __func__);
- return -1;
- }
- data->sdio_vol = value;
+ if(cpu_is_rk3036()){
+ /* ret = of_property_read_u32(node, "sdio_vref", &value);
+ if (ret < 0) {
+ LOG("%s: Can't get sdio vref.", __func__);
+ return -1;
+ }
+ data->sdio_vol = value;*/
+ }else{
+ ret = of_property_read_u32(node, "sdio_vref", &value);
+ if (ret < 0) {
+ LOG("%s: Can't get sdio vref.", __func__);
+ return -1;
+ }
+ data->sdio_vol = value;
+ }
if (of_find_property(node, "vref_ctrl_enable", NULL)) {
LOG("%s: enable wifi io reference voltage control.\n", __func__);