Commit a7e6dbd6 authored by Tom Fitzhenry's avatar Tom Fitzhenry Committed by Heiko Stuebner
Browse files

arm64: dts: rockchip: add BT/wifi nodes to Pinephone Pro



Pinephone Pro includes a AzureWave AW-CM256SM wifi (sdio0) and
bt (uart0) combo module, which is based on Cypress
CYP43455 (BCM43455).

The CYP43455 datasheet ("Power-Up Sequence and Timing") documents:
* needing to wait 10ms between consecutive WL_REG_ON toggles
* needing to wait 110ms between power-on and SDIO access.

Signed-off-by: default avatarTom Fitzhenry <tom@tom-fitzhenry.me.uk>
Reviewed-by: default avatarOndřej Jirman <megi@xff.cz>
Link: https://lore.kernel.org/r/20221002092809.451501-1-tom@tom-fitzhenry.me.uk


Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 0522cd81
Loading
Loading
Loading
Loading
+76 −0
Original line number Diff line number Diff line
@@ -81,6 +81,27 @@ vcc1v8_codec: vcc1v8-codec-regulator {
		regulator-max-microvolt = <1800000>;
		vin-supply = <&vcc3v3_sys>;
	};

	wifi_pwrseq: sdio-wifi-pwrseq {
		compatible = "mmc-pwrseq-simple";
		clocks = <&rk818 1>;
		clock-names = "ext_clock";
		pinctrl-names = "default";
		pinctrl-0 = <&wifi_enable_h_pin>;
		/*
		 * Wait between power-on and SDIO access for CYP43455
		 * POR circuit.
		 */
		post-power-on-delay-ms = <110>;
		/*
		 * Wait between consecutive toggles for CYP43455 CBUCK
		 * regulator discharge.
		 */
		power-off-delay-us = <10000>;

		/* WL_REG_ON on module */
		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
	};
};

&cpu_l0 {
@@ -360,11 +381,45 @@ vsel2_pin: vsel2-pin {
		};
	};

	sdio-pwrseq {
		wifi_enable_h_pin: wifi-enable-h-pin {
			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	sound {
		vcc1v8_codec_en: vcc1v8-codec-en {
			rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
		};
	};

	wireless-bluetooth {
		bt_wake_pin: bt-wake-pin {
			rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		bt_host_wake_pin: bt-host-wake-pin {
			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		bt_reset_pin: bt-reset-pin {
			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};

&sdio0 {
	bus-width = <4>;
	cap-sd-highspeed;
	cap-sdio-irq;
	disable-wp;
	keep-power-in-suspend;
	mmc-pwrseq = <&wifi_pwrseq>;
	non-removable;
	pinctrl-names = "default";
	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
	sd-uhs-sdr104;
	status = "okay";
};

&sdmmc {
@@ -393,6 +448,27 @@ &tsadc {
	status = "okay";
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
	uart-has-rtscts;
	status = "okay";

	bluetooth {
		compatible = "brcm,bcm4345c5";
		clocks = <&rk818 1>;
		clock-names = "lpo";
		device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
		max-speed = <1500000>;
		pinctrl-names = "default";
		pinctrl-0 = <&bt_host_wake_pin &bt_wake_pin &bt_reset_pin>;
		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
		vbat-supply = <&vcc3v3_sys>;
		vddio-supply = <&vcc_1v8>;
	};
};

&uart2 {
	status = "okay";
};