Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5330002rwr; Mon, 24 Apr 2023 02:23:46 -0700 (PDT) X-Google-Smtp-Source: AKy350Z5DYJ0yVT6WMeMAVhfNbV6UHiEFMwqXBwvbPzSZs6Nd+LX+nFOfilXri870rM44hB1vCmH X-Received: by 2002:a05:6a20:8e28:b0:e8:d218:739f with SMTP id y40-20020a056a208e2800b000e8d218739fmr16301821pzj.21.1682328226252; Mon, 24 Apr 2023 02:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682328226; cv=none; d=google.com; s=arc-20160816; b=oXy5Rs9jVwG3J729db03K+6XkZvtmSZQt8zTdemO2GWmXew+5Rihw1152/mtBZSbAx vf1fkyT0ONypPhsiZ/aF+StZJJfHR3MoyZPns++AqUbGwKmBesX/oiouDdlqFFZ7yYMm pFuZSoZ0U9Lpo9ak1MJ9jchpIKX4FzKdsM+jZDU8+OJqWWy/w3EyGHppGVVOs+48GUD/ fFeMPfuYyGaaXACjRO9Z6++cL1A3iLlsdl13rELuua+4dhblDwTWbqr0etpAVWdF7v71 Qxj/5s2cc9UfW8qGpHSJwbyjTbuHR7iDMlk7wfj8/vyvripQrC9FP6Pt3lsK5wTkCJiN 2ZOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=cx7887igrG1FHuRUhWl71owqx8AZ7P/HQi+L6Ao/Eq0=; b=0xdLLuIJJB4nmdllaZASJ02zZCNI6rhnXxB0VRjbJVTiCNYOa0mmQ/4Nt41PJI7tet 7BXITajrxqqzTYSGhYF75yGDIlz3bKyrqEY1bhdl606zjjYJAVAafFWq3EuvXe0/eNOz AtuT3ntGhaDv+DN5wSPTXLBvTUiyToAqmmq515b60w7kymgGjnl7EQc5YyWbYnr5NVp7 Usyc49nwUsSceRoQuSDND1BB6ZstFBsAXf+Wz0qyZykoY2Bn6JBvx4Hx0pqYYcoObUsF /63zbe8Y7z89PcvewecINOs501BPkt3/6r7rJapYbTr74+DfoQtBYYpKujRK6pf9m3Wy +S2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GKGcMayB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020a654b86000000b00514314780easi11062787pgq.34.2023.04.24.02.23.34; Mon, 24 Apr 2023 02:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GKGcMayB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbjDXJPi (ORCPT + 99 others); Mon, 24 Apr 2023 05:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbjDXJPg (ORCPT ); Mon, 24 Apr 2023 05:15:36 -0400 Received: from mail-ua1-x931.google.com (mail-ua1-x931.google.com [IPv6:2607:f8b0:4864:20::931]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 352BEB6 for ; Mon, 24 Apr 2023 02:15:35 -0700 (PDT) Received: by mail-ua1-x931.google.com with SMTP id a1e0cc1a2514c-771d9ec5aa5so17963733241.0 for ; Mon, 24 Apr 2023 02:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682327734; x=1684919734; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cx7887igrG1FHuRUhWl71owqx8AZ7P/HQi+L6Ao/Eq0=; b=GKGcMayBMsRsIIULpLnyaH8cw7op/k+gp79J7FQeM5m8HgIn5SCkAO8oF7WTfmXtxG hVO7d47c3dnOYfF+O906h6NY6fsWYMF5qhJtDw8wJxaBeKD41cLs3xtVn5OSM/S+i9B7 t7D0AKpyaQ/OWntA/F9BWu9GNsKLD4fuItkeg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682327734; x=1684919734; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cx7887igrG1FHuRUhWl71owqx8AZ7P/HQi+L6Ao/Eq0=; b=gSjK7OKyYysWpqItt+7uGf5EJSJ25SegJSBT8U/7TcNS2dv53eUSJPb85tV66o3Qrc t3T4ykFw9tWPX+Bu7Y7OrcNPKK7XdHgRFwq1AmruOrKv5lfv2l0oHxClz1yEoh+ou6jG eaqSIBYDVRGLWs7XktEerKHkRjFqf3OnALOatvJRa61bmXRG9THYQCFWmB41Y9fXG+DO 48d8GqSa5L5BJTqZr5Rs9FnaTTVtxAElFxQ+hoC9y64XorAvsEsKI3cpG5nyy5NEPMen sC4RMfkxRkprNH9m5ixxbwfFQ6ps6/D/8stXKTcN/6iCHwWUS97kLaCi6yLgYTOhyZ+R L3Qw== X-Gm-Message-State: AAQBX9e0nSnf/ho7qmGCYczDjyxsmxhXs+aveHf15qlpt8Mok5z/B2AU Po9yq995FijOUEX4qejC4N2DN9prLPvkp1tucx53jQ== X-Received: by 2002:a1f:4582:0:b0:446:ef36:2fa4 with SMTP id s124-20020a1f4582000000b00446ef362fa4mr4030463vka.6.1682327734321; Mon, 24 Apr 2023 02:15:34 -0700 (PDT) MIME-Version: 1.0 References: <20230421110327.2395804-1-wenst@chromium.org> <872e8b77-c1ea-410a-b978-dd8f49f9904b@notapiano> In-Reply-To: <872e8b77-c1ea-410a-b978-dd8f49f9904b@notapiano> From: Chen-Yu Tsai Date: Mon, 24 Apr 2023 17:15:23 +0800 Message-ID: Subject: Re: [PATCH] arm64: dts: mediatek: mt8192-asurada-hayato: Enable Bluetooth To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Cc: Matthias Brugger , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 21, 2023 at 10:01=E2=80=AFPM N=C3=ADcolas F. R. A. Prado wrote: > > On Fri, Apr 21, 2023 at 07:03:27PM +0800, 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 > > --- > > .../dts/mediatek/mt8192-asurada-hayato-r1.dts | 80 +++++++++++++++++++ > > 1 file changed, 80 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..6a7d7870525b 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,89 @@ CROS_STD_MAIN_KEYMAP > > >; > > }; > > > > +&pio { > > + bt_pins: bt-pins { > > + bt_kill: pins-bt-kill { > > Drop this label and for the other pinconfigs below as they'll never be > referenced. Ack. > > + pinmux =3D ; /* BT_= KILL_L */ > > I'd also drop this and the other comments, as they're already documented = in the > gpio-line-names property. Ack. > > + output-low; > > + }; > > + > > + bt_wake: pins-bt-wake { > > + pinmux =3D ; /* bt t= o wake ap */ > > + bias-pull-up; > > + }; > > + > > + ap_wake_bt: pins-ap-wake-bt { > > + pinmux =3D ; /* AP_= WAKE_BT_H */ > > + output-low; > > + }; > > + }; > > + > > + uart1_pins: uart1-pins { > > + pins-rx { > > + pinmux =3D ; > > + input-enable; > > + bias-pull-up; > > + }; > > + > > + pins-tx { > > + pinmux =3D ; > > + }; > > + > > + pins-cts { > > + pinmux =3D ; > > + input-enable; > > + }; > > + > > + pins-rts { > > + pinmux =3D ; > > + output-enable; > > Looks like the dt-binding doesn't currently support output-enable, but th= e > driver does, so please just add a patch with > > output-enable: true > > on mediatek,mt8192-pinctrl.yaml Looking at the driver and the datasheet, there is no actual output-enable hardware. The driver simply sets an pin direction register, which is the same thing done when setting the GPIO direction. On the other hand, there is actually an input enable function, but the driver also sets the pin direction. All pins have "input enable" set by default in hardware doesn't help. I'll drop this for now and look into fixing the pinctrl driver. > > + }; > > + }; > > + > > + uart1_pins_sleep: uart1-pins-sleep { > > "-pins" needs to come last in the name otherwise the dt-binding will comp= lain. Ack. > > + pins-rx { > > + pinmux =3D ; > > + input-enable; > > + bias-pull-up; > > + }; > > + pins-tx { > > + pinmux =3D ; > > + }; > > + pins-cts { > > + pinmux =3D ; > > + input-enable; > > + }; > > + pins-rts { > > + pinmux =3D ; > > + output-enable; > > + }; > > + }; > > +}; > > + > > &touchscreen { > > compatible =3D "hid-over-i2c"; > > post-power-on-delay-ms =3D <10>; > > hid-descr-addr =3D <0x0001>; > > vdd-supply =3D <&pp3300_u>; > > }; > > + > > +&uart1 { > > + status =3D "okay"; > > + pinctrl-names =3D "default", "sleep"; > > + pinctrl-0 =3D <&uart1_pins>; > > + pinctrl-1 =3D <&uart1_pins_sleep>; > > + /delete-property/ interrupts; > > + interrupts-extended =3D <&gic GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>, > > + <&pio 94 IRQ_TYPE_EDGE_FALLING>; > > + > > + bluetooth: bluetooth { > > I'd also drop this label and only introduce it if/when needed. Ack. > Reviewed-by: N=C3=ADcolas F. R. A. Prado > > Thanks, > N=C3=ADcolas > > > + compatible =3D "realtek,rtl8822cs-bt"; > > + pinctrl-names =3D "default"; > > + pinctrl-0 =3D <&bt_pins>; > > + > > + enable-gpios =3D <&pio 144 GPIO_ACTIVE_HIGH>; > > + device-wake-gpios =3D <&pio 168 GPIO_ACTIVE_HIGH>; > > + host-wake-gpios =3D <&pio 22 GPIO_ACTIVE_LOW>; > > + }; > > +}; > > -- > > 2.40.0.634.g4ca3ef3211-goog > >