Skip to content

rfkill is not used correctly when setup bluetooth with ap6212 #1352

Open
@xiongyihui

Description

@xiongyihui

In ap6212-bluetooth, rfkill is not used correctly.

        rfkill unblock all
        echo "0" > /sys/class/rfkill/rfkill0/state
        echo "1" > /sys/class/rfkill/rfkill0/state

for Nanopi Neo Air and Orangepi Zero Plus2 H5, rfkill0 is Wi-Fi in the default settings of armbian

pi@nanopiair:~$ rfkill list
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

For Nanopi Neo Air, I tried to add bluetooth reset to rfkill using a dts file, but failed. The dts is:

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun8i-h3";

    fragment@0 {
        target = <&pio>;
        __overlay__ {
            bt_pwr_pin: bt_pwr_pin@0 {
                pins = "PG13";
                function = "gpio_out";
            };
        };
    };

    fragment@1 {
        target-path = "/";
        __overlay__ {
            rfkill_bt {
                compatible = "rfkill-gpio";
                pinctrl-names = "default";
                pinctrl-0 = <&bt_pwr_pin>;
                reset-gpios = <&pio 6 13 1>;
                clocks = <&osc32k>;
                clock-frequency = <32768>;
                rfkill-name = "sunxi-bt";
                rfkill-type = "bluetooth";
            };
        };
    };
};

The command rfkill list doesn't have "sunxi-bt". Something should be missing in the dts file.
Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Can be closed?Ping developers on stalled issue / PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions