Requirements

The Sona TI351 requires proper configuration in the device tree. The following points must be observed:

  • The SDIO host controller node must contain a sub-node for the TI351 Wi-Fi function (function number 2)
  • The SDIO host controller node must enable run-time PM with the cap-power-off-card property
  • The SDIO host controller should limit operation to SD3.0 only (max 50MHz)
  • The SDIO host controller driver should control the W_DISABLE# pin using a device tree regulator referenced by the vmmc-supply property.
    • The regulator should not be configured with the regulator-always-on property because the driver will toggle it in some scenarios
  • The Bluetooth serdev driver, if used, must reference the same device tree regulator used by the Wi-Fi function.

The SDIO interrupt can either be in-band or out of band using the SDIO_WAKE# signal. If Wake On Wireless is desired, then the interrupt must be out of band using the SDIO_WAKE# signal.

Sample Device Tree

Here is a sample device tree section demonstrating the above requirements. In this example host GPIO2_6 is connected to the W_DISABLE# pin and host GPIO2_9 is used for SDIO interrupt via SDIO_WAKE.

/ {
	reg_usdhc1_vmmc: regulator-usdhc1 {
		compatible = "regulator-fixed";
		regulator-name = "WLAN_EN";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_usdhc1_vmmc>;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};
};

&usdhc1 {
	vmmc-supply = <&reg_usdhc1_vmmc>;
	max-frequency = <50000000>;
	cap-power-off-card;

	#address-cells = <1>;
	#size-cells = <0>;

	wlcore: wlcore@2 {
		compatible = "ti,cc33xx";
		reg = <2>;

		// OOB IRQ support if needed
		interrupt-parent = <&gpio2>;
		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
	};
};

A reference device tree snippet with essential elements to support Bluetooth serdev operation is shown below. Note following essention elements:

  • A ‘bluetooth’ subnode is created in the uart node used to communicate with the Sona TI351. This causes the UART to be managed as a bluetooth serdev client instead of a tty device.
  • The ‘compatible’ property is set to “ti,cc33xx-bt”
  • The cc33xx-supply property references the same regulator used by the SDIO host controller.
&uart1 {
	bluetooth {
		compatible = "ti,cc33xx-bt";
		cc33xx-supply = <&reg_usdhc1_vmmc>;
		max-speed = <115200>;
	};
};