|
发表于 2023-8-29 18:08:03
只看该作者
6#
能帮忙解答一下吗?直接配置为clk_wifi也量不到信号输出。
我在static struct clk_hw *
of_clk_rk808_get(struct of_phandle_args *clkspec, void *data)
{
struct rk808_clkout *rk808_clkout = data;
unsigned int idx = clkspec->args[0];
pr_err("%s:avalid index %u\n", __func__, idx);
if (idx >= 2) {
pr_err("%s: invalid index %u\n", __func__, idx);
return ERR_PTR(-EINVAL);
}
return idx ? &rk808_clkout->clkout2_hw : &rk808_clkout->clkout1_hw;
}
static int rk817_clkout2_enable(struct clk_hw *hw, bool enable)
{
struct rk808_clkout *rk808_clkout = container_of(hw,
struct rk808_clkout,
clkout2_hw);
struct rk808 *rk808 = rk808_clkout->rk808;
pr_err("%s:\n", __func__);
return regmap_update_bits(rk808->regmap, RK817_SYS_CFG(1),
RK817_CLK32KOUT2_EN,
enable ? RK817_CLK32KOUT2_EN : 0);
}
这里加了打印,代码流程都有运行 但是没有32K输出。
[ 1.758304] [BT_RFKILL]: Enter rfkill_rk_init
[ 1.758312] [WLAN_RFKILL]: Enter rfkill_wlan_init
[ 1.758761] [WLAN_RFKILL]: Enter rfkill_wlan_probe
[ 1.758798] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi_chip_type = ap6256
[ 1.758809] [WLAN_RFKILL]: wlan_platdata_parse_dt: enable wifi power control.
[ 1.758818] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi power controled by gpio.
[ 1.758839] [WLAN_RFKILL]: wlan_platdata_parse_dt: WIFI,poweren_gpio = 137 flags = 1.
[ 1.758857] [WLAN_RFKILL]: wlan_platdata_parse_dt: WIFI,host_wake_irq = 124, flags = 0.
[ 1.758872] of_clk_rk808_get:avalid index 1
[ 1.758886] [WLAN_RFKILL]: wlan_platdata_parse_dt: ref-clock-frequency=32768!
[ 1.758896] rk817_clkout2_prepare:
[ 1.758903] rk817_clkout2_enable:
[ 1.758915] [WLAN_RFKILL]: wlan_platdata_parse_dt: clk_prepare_enable!
[ 1.758925] [WLAN_RFKILL]: rfkill_wlan_probe: init gpio
[ 1.758944] [WLAN_RFKILL]: rfkill_set_wifi_bt_power: 1 |
|