mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
wifi: kernel 6.6 support wifi [1/3]
PD#SWPL-149505 Problem: wifi not work Solution: fix it Verify: a5 Change-Id: I4a4d0fe4584a2fbaa4550b8a271fe3e44b78e957 Signed-off-by: jiabin.chen <jiabin.chen@amlogic.com>
This commit is contained in:
committed by
Wanwei Jiang
parent
ba45b5379c
commit
60fd8a39cc
@@ -1269,6 +1269,10 @@
|
||||
hostwake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pwm_gh {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart_A {
|
||||
status = "okay";
|
||||
uart-has-rtscts;
|
||||
|
||||
@@ -1250,6 +1250,10 @@
|
||||
hostwake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pwm_gh {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart_A {
|
||||
status = "okay";
|
||||
uart-has-rtscts;
|
||||
|
||||
@@ -1777,10 +1777,6 @@
|
||||
//pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm_g_ao_pins>;
|
||||
pinctrl-names = "default";
|
||||
pwm_config = <&wifi_pwm_conf>;
|
||||
};
|
||||
|
||||
wifi_pwm_conf:wifi_pwm_conf{
|
||||
pwm_channel1_conf {
|
||||
//pwms = <&pwm_ef 0 30541 0>;
|
||||
pwms = <&pwm_gh 0 30541 0>;
|
||||
|
||||
@@ -1585,10 +1585,6 @@
|
||||
//pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm_g_pins1>;
|
||||
pinctrl-names = "default";
|
||||
pwm_config = <&wifi_pwm_conf>;
|
||||
};
|
||||
|
||||
wifi_pwm_conf:wifi_pwm_conf{
|
||||
pwm_channel1_conf {
|
||||
//pwms = <&pwm_ef 0 30541 0>;
|
||||
pwms = <&pwm_gh 0 30541 0>;
|
||||
|
||||
@@ -1843,7 +1843,6 @@ static struct clk_regmap a5_sd_emmc_c_clk0_sel = {
|
||||
.ops = &clk_regmap_mux_ops,
|
||||
.parent_data = a5_sd_emmc_clk0_parent_data,
|
||||
.num_parents = ARRAY_SIZE(a5_sd_emmc_clk0_parent_data),
|
||||
.flags = CLK_GET_RATE_NOCACHE
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1860,7 +1859,6 @@ static struct clk_regmap a5_sd_emmc_c_clk0_div = {
|
||||
&a5_sd_emmc_c_clk0_sel.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1876,7 +1874,6 @@ static struct clk_regmap a5_sd_emmc_c_clk0 = {
|
||||
&a5_sd_emmc_c_clk0_div.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_GET_RATE_NOCACHE,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1910,7 +1907,6 @@ static struct clk_regmap a5_sd_emmc_a_clk0_div = {
|
||||
&a5_sd_emmc_a_clk0_sel.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1926,7 +1922,6 @@ static struct clk_regmap a5_sd_emmc_a_clk0 = {
|
||||
&a5_sd_emmc_a_clk0_div.hw
|
||||
},
|
||||
.num_parents = 1,
|
||||
.flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -673,45 +673,30 @@ int pwm_single_channel_conf(struct wifi_plat_info *plat)
|
||||
|
||||
int pwm_double_channel_conf_dt(struct wifi_plat_info *plat)
|
||||
{
|
||||
phandle pwm_phandle;
|
||||
int ret;
|
||||
struct device_node *wifinode = plat->dev->of_node;
|
||||
struct device_node *pnode = NULL;
|
||||
struct device_node *child;
|
||||
|
||||
ret = of_property_read_u32(wifinode, "pwm_config", &pwm_phandle);
|
||||
if (ret) {
|
||||
pr_err("not match wifi_pwm_config node\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pnode = of_find_node_by_phandle(pwm_phandle);
|
||||
if (!pnode) {
|
||||
pr_err("can't find wifi_pwm_config node\n");
|
||||
return -1;
|
||||
}
|
||||
struct fwnode_handle *fwnode;
|
||||
|
||||
/*request for pwm device */
|
||||
for_each_child_of_node(pnode, child) {
|
||||
device_for_each_child_node(plat->dev, fwnode) {
|
||||
struct pwm_double_data *pdata =
|
||||
&plat->ddata.pwms[plat->ddata.num_pwm];
|
||||
|
||||
//KV_TODO: modify
|
||||
pdata->pwm = devm_pwm_get(plat->dev, NULL);
|
||||
pdata->pwm = devm_fwnode_pwm_get(plat->dev, fwnode, NULL);
|
||||
if (IS_ERR(pdata->pwm)) {
|
||||
ret = PTR_ERR(pdata->pwm);
|
||||
dev_err(plat->dev, "unable to request PWM%d, ret = %d\n",
|
||||
plat->ddata.num_pwm, ret);
|
||||
return ret;
|
||||
}
|
||||
ret = of_property_read_u32(child, "duty-cycle",
|
||||
ret = fwnode_property_read_u32(fwnode, "duty-cycle",
|
||||
&pdata->duty_cycle);
|
||||
if (ret) {
|
||||
pr_err("not %d duty_cycle parameters\n",
|
||||
plat->ddata.num_pwm);
|
||||
return ret;
|
||||
}
|
||||
ret = of_property_read_u32(child, "times",
|
||||
ret = fwnode_property_read_u32(fwnode, "times",
|
||||
&pdata->pwm_times);
|
||||
if (ret) {
|
||||
pr_err("not %d pwm_times parameters\n",
|
||||
|
||||
Reference in New Issue
Block a user