Enable Bluetooth and WiFi rfkill on K3 Pico ITX
Subsystems (3)
cover Enable Bluetooth and WiFi rfkill on K3 Pico ITX
This patchset enables Bluetooth through USB on the K3 Pico ITX board and adds the rfkill nodes for Bluetooth and WiFi so that the devices can be activated.
Note that the patch 4 is only useful with the following patch series:
- https://lore.kernel.org/spacemit/[email protected]/
- https://lore.kernel.org/spacemit/[email protected]/
- https://lore.kernel.org/spacemit/[email protected]/
- https://lore.kernel.org/spacemit/[email protected]/
Aurelien Jarno (4):
riscv: defconfig: enable RFKILL and RFKILL_GPIO
riscv: dts: spacemit: k3: add rfkill node for Bluetooth on Pico-ITX
board
riscv: dts: spacemit: k3: add USB3 B and C controllers for Pico-ITX
board
riscv: dts: spacemit: k3: add rfkill node for WLAN on Pico-ITX board
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 32 ++++++++++ arch/riscv/boot/dts/spacemit/k3.dtsi | 65 ++++++++++++++++++++ arch/riscv/configs/defconfig | 2 + 3 files changed, 99 insertions(+)
Signature · 1 line
2.53.0
PATCH 1/4 riscv: defconfig: enable RFKILL and RFKILL_GPIO
The SpacemiT K3 Pico-ITX requires RFKILL_GPIO to enable Bluetooth and WLAN.
--- arch/riscv/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/riscv/configs/defconfig +2 -0
@@ -100,6 +100,8 @@ CONFIG_NET_CLS_CGROUP=m CONFIG_NETLINK_DIAG=y CONFIG_CGROUP_NET_PRIO=y CONFIG_CAN=m +CONFIG_RFKILL=m +CONFIG_RFKILL_GPIO=m CONFIG_NET_9P=y CONFIG_NET_9P_VIRTIO=y CONFIG_PCI=y
Signature · 1 line
2.53.0
PATCH 2/4 riscv: dts: spacemit: k3: add rfkill node for Bluetooth on Pico-ITX board
In reply to Aurelien JarnoOn the K3 PICO-ITX board, by default the GPIO pin that connects to the RTL8852BE Bluetooth enable signal is driven low, resulting in impossibility to use Bluetooth. Add a DT node to expose it as an RFKILL device, which lets the Bluetooth driver or userspace toggle it as required.
--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 7 +++++++ 1 file changed, 7 insertions(+)
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +7 -0
@@ -43,6 +43,13 @@ reg_aux_vcc5v: regulator-aux-vcc5v { regulator-max-microvolt = <5000000>; regulator-always-on; }; + + rfkill-usb-bt { + compatible = "rfkill-gpio"; + label = "rfkill-usb-bt"; + radio-type = "bluetooth"; + shutdown-gpios = <&gpio 0 30 GPIO_ACTIVE_HIGH>; + }; }; &i2c2 {
Signature · 1 line
2.53.0
PATCH 3/4 riscv: dts: spacemit: k3: add USB3 B and C controllers for Pico-ITX board
In reply to Aurelien JarnoThe SpacemiT K3 has 4 USB3 controllers labelled A to D.
On the K3 Pico-ITX board, the controllers B and C are used in USB 2 mode only respectively for the M.2 B-Key slot and for the RTL8852BE Bluetooth controller.
Add the two controller nodes and the two corresponding USB2 PHY nodes (the PCIe/USB3 combo PHY driver is not yet merged) and enable them on the K3 Pico-ITX board.
--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 18 ++++++ arch/riscv/boot/dts/spacemit/k3.dtsi | 65 ++++++++++++++++++++ 2 files changed, 83 insertions(+)
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +18 -0
@@ -325,3 +325,21 @@ hub@1 { &usb2_phy { status = "okay"; }; + +&usb3b { + maximum-speed = "high-speed"; + status = "okay"; +}; + +&usb3b_u2phy { + status = "okay"; +}; + +&usb3c { + maximum-speed = "high-speed"; + status = "okay"; +}; + +&usb3c_u2phy { + status = "okay"; +};
arch/riscv/boot/dts/spacemit/k3.dtsi +65 -0
77 lines not on this page · raw message
Signature · 1 line
2.53.0
PATCH 4/4 riscv: dts: spacemit: k3: add rfkill node for WLAN on Pico-ITX board
In reply to Aurelien JarnoBy default the GPIO pin that connects to the RTL8852BE WLAN enable signal is driven low, resulting in impossibility to connect to any network. Add a DT node to expose it as an RFKILL device, which lets the WiFi driver or userspace toggle it as required.
--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 7 +++++++ 1 file changed, 7 insertions(+)
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +7 -0
@@ -44,6 +44,13 @@ reg_aux_vcc5v: regulator-aux-vcc5v { regulator-always-on; }; + rfkill-pcie-wlan { + compatible = "rfkill-gpio"; + label = "rfkill-pcie-wlan"; + radio-type = "wlan"; + shutdown-gpios = <&gpio 1 3 GPIO_ACTIVE_HIGH>; + }; + rfkill-usb-bt { compatible = "rfkill-gpio"; label = "rfkill-usb-bt";
Signature · 1 line
2.53.0
Quoted 18 lines · Aurelien Jarno
This patchset enables Bluetooth through USB on the K3 Pico ITX board and adds the rfkill nodes for Bluetooth and WiFi so that the devices can be activated.
Note that the patch 4 is only useful with the following patch series:
- https://lore.kernel.org/spacemit/[email protected]/
- https://lore.kernel.org/spacemit/[email protected]/
- https://lore.kernel.org/spacemit/[email protected]/
- https://lore.kernel.org/spacemit/[email protected]/Aurelien Jarno (4):
riscv: defconfig: enable RFKILL andRFKILL_GPIO
riscv: dts: spacemit: k3: add rfkill node for Bluetooth on Pico-ITX
board
riscv: dts: spacemit: k3: add USB3 B and C controllers for Pico-ITX
board
riscv: dts: spacemit: k3: add rfkill node for WLAN on Pico-ITX board
Quoted 4 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 32 ++++++++++ arch/riscv/boot/dts/spacemit/k3.dtsi | 65 ++++++++++++++++++++ arch/riscv/configs/defconfig | 2 + 3 files changed, 99 insertions(+)
Quoted 4 lines
--
2.53.0