mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: mediatek: mt8192-asurada-hayato: Enable Bluetooth
@ 2023-04-24 10:04 Chen-Yu Tsai
  2023-05-29 14:29 ` Matthias Brugger
  0 siblings, 1 reply; 2+ messages in thread
From: Chen-Yu Tsai @ 2023-04-24 10:04 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Chen-Yu Tsai, Nícolas F . R . A . Prado, devicetree,
	linux-kernel, linux-mediatek, linux-arm-kernel, Rob Herring,
	Krzysztof Kozlowski

Hayato's Realtek WiFi/BT module has it's Bluetooth function wired to
UART1.

Add and enable the relevant device nodes for it.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Changes since v1:
- Dropped unreferenced labels
- Dropped GPIO line name comments
- Fixed pinctrl node names
- Dropped "output-enable" property
- Added spacing between device nodes for consistency

 .../dts/mediatek/mt8192-asurada-hayato-r1.dts | 81 +++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts b/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts
index 43a823990a92..6e23428a3ed2 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts
@@ -40,9 +40,90 @@ CROS_STD_MAIN_KEYMAP
 	>;
 };
 
+&pio {
+	bt_pins: bt-pins {
+		pins-bt-kill {
+			pinmux = <PINMUX_GPIO144__FUNC_GPIO144>;
+			output-low;
+		};
+
+		pins-bt-wake {
+			pinmux = <PINMUX_GPIO22__FUNC_GPIO22>;
+			bias-pull-up;
+		};
+
+		pins-ap-wake-bt {
+			pinmux = <PINMUX_GPIO168__FUNC_GPIO168>;
+			output-low;
+		};
+	};
+
+	uart1_pins: uart1-pins {
+		pins-rx {
+			pinmux = <PINMUX_GPIO94__FUNC_URXD1>;
+			input-enable;
+			bias-pull-up;
+		};
+
+		pins-tx {
+			pinmux = <PINMUX_GPIO95__FUNC_UTXD1>;
+		};
+
+		pins-cts {
+			pinmux = <PINMUX_GPIO166__FUNC_UCTS1>;
+			input-enable;
+		};
+
+		pins-rts {
+			pinmux = <PINMUX_GPIO167__FUNC_URTS1>;
+		};
+	};
+
+	uart1_pins_sleep: uart1-sleep-pins {
+		pins-rx {
+			pinmux = <PINMUX_GPIO94__FUNC_GPIO94>;
+			input-enable;
+			bias-pull-up;
+		};
+
+		pins-tx {
+			pinmux = <PINMUX_GPIO95__FUNC_UTXD1>;
+		};
+
+		pins-cts {
+			pinmux = <PINMUX_GPIO166__FUNC_UCTS1>;
+			input-enable;
+		};
+
+		pins-rts {
+			pinmux = <PINMUX_GPIO167__FUNC_URTS1>;
+		};
+	};
+};
+
 &touchscreen {
 	compatible = "hid-over-i2c";
 	post-power-on-delay-ms = <10>;
 	hid-descr-addr = <0x0001>;
 	vdd-supply = <&pp3300_u>;
 };
+
+&uart1 {
+	status = "okay";
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&uart1_pins>;
+	pinctrl-1 = <&uart1_pins_sleep>;
+	/delete-property/ interrupts;
+	interrupts-extended = <&gic GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>,
+			      <&pio 94 IRQ_TYPE_EDGE_FALLING>;
+
+	bluetooth {
+		compatible = "realtek,rtl8822cs-bt";
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_pins>;
+
+		enable-gpios = <&pio 144 GPIO_ACTIVE_HIGH>;
+		device-wake-gpios = <&pio 168 GPIO_ACTIVE_HIGH>;
+		host-wake-gpios = <&pio 22 GPIO_ACTIVE_LOW>;
+	};
+};
-- 
2.40.0.634.g4ca3ef3211-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] arm64: dts: mediatek: mt8192-asurada-hayato: Enable Bluetooth
  2023-04-24 10:04 [PATCH v2] arm64: dts: mediatek: mt8192-asurada-hayato: Enable Bluetooth Chen-Yu Tsai
@ 2023-05-29 14:29 ` Matthias Brugger
  0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2023-05-29 14:29 UTC (permalink / raw)
  To: Chen-Yu Tsai, AngeloGioacchino Del Regno
  Cc: Nícolas F . R . A . Prado, devicetree, linux-kernel,
	linux-mediatek, linux-arm-kernel, Rob Herring,
	Krzysztof Kozlowski



On 24/04/2023 12:04, Chen-Yu Tsai wrote:
> Hayato's Realtek WiFi/BT module has it's Bluetooth function wired to
> UART1.
> 
> Add and enable the relevant device nodes for it.
> 
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Applied, thanks

> ---
> Changes since v1:
> - Dropped unreferenced labels
> - Dropped GPIO line name comments
> - Fixed pinctrl node names
> - Dropped "output-enable" property
> - Added spacing between device nodes for consistency
> 
>   .../dts/mediatek/mt8192-asurada-hayato-r1.dts | 81 +++++++++++++++++++
>   1 file changed, 81 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts b/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts
> index 43a823990a92..6e23428a3ed2 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts
> @@ -40,9 +40,90 @@ CROS_STD_MAIN_KEYMAP
>   	>;
>   };
>   
> +&pio {
> +	bt_pins: bt-pins {
> +		pins-bt-kill {
> +			pinmux = <PINMUX_GPIO144__FUNC_GPIO144>;
> +			output-low;
> +		};
> +
> +		pins-bt-wake {
> +			pinmux = <PINMUX_GPIO22__FUNC_GPIO22>;
> +			bias-pull-up;
> +		};
> +
> +		pins-ap-wake-bt {
> +			pinmux = <PINMUX_GPIO168__FUNC_GPIO168>;
> +			output-low;
> +		};
> +	};
> +
> +	uart1_pins: uart1-pins {
> +		pins-rx {
> +			pinmux = <PINMUX_GPIO94__FUNC_URXD1>;
> +			input-enable;
> +			bias-pull-up;
> +		};
> +
> +		pins-tx {
> +			pinmux = <PINMUX_GPIO95__FUNC_UTXD1>;
> +		};
> +
> +		pins-cts {
> +			pinmux = <PINMUX_GPIO166__FUNC_UCTS1>;
> +			input-enable;
> +		};
> +
> +		pins-rts {
> +			pinmux = <PINMUX_GPIO167__FUNC_URTS1>;
> +		};
> +	};
> +
> +	uart1_pins_sleep: uart1-sleep-pins {
> +		pins-rx {
> +			pinmux = <PINMUX_GPIO94__FUNC_GPIO94>;
> +			input-enable;
> +			bias-pull-up;
> +		};
> +
> +		pins-tx {
> +			pinmux = <PINMUX_GPIO95__FUNC_UTXD1>;
> +		};
> +
> +		pins-cts {
> +			pinmux = <PINMUX_GPIO166__FUNC_UCTS1>;
> +			input-enable;
> +		};
> +
> +		pins-rts {
> +			pinmux = <PINMUX_GPIO167__FUNC_URTS1>;
> +		};
> +	};
> +};
> +
>   &touchscreen {
>   	compatible = "hid-over-i2c";
>   	post-power-on-delay-ms = <10>;
>   	hid-descr-addr = <0x0001>;
>   	vdd-supply = <&pp3300_u>;
>   };
> +
> +&uart1 {
> +	status = "okay";
> +	pinctrl-names = "default", "sleep";
> +	pinctrl-0 = <&uart1_pins>;
> +	pinctrl-1 = <&uart1_pins_sleep>;
> +	/delete-property/ interrupts;
> +	interrupts-extended = <&gic GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>,
> +			      <&pio 94 IRQ_TYPE_EDGE_FALLING>;
> +
> +	bluetooth {
> +		compatible = "realtek,rtl8822cs-bt";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&bt_pins>;
> +
> +		enable-gpios = <&pio 144 GPIO_ACTIVE_HIGH>;
> +		device-wake-gpios = <&pio 168 GPIO_ACTIVE_HIGH>;
> +		host-wake-gpios = <&pio 22 GPIO_ACTIVE_LOW>;
> +	};
> +};

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-29 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-24 10:04 [PATCH v2] arm64: dts: mediatek: mt8192-asurada-hayato: Enable Bluetooth Chen-Yu Tsai
2023-05-29 14:29 ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®