From patchwork Tue Mar 7 22:26:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 660021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBBE8C74A44 for ; Tue, 7 Mar 2023 22:28:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbjCGW2H (ORCPT ); Tue, 7 Mar 2023 17:28:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbjCGW1q (ORCPT ); Tue, 7 Mar 2023 17:27:46 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54B4AAF77E; Tue, 7 Mar 2023 14:27:05 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id a25so58707954edb.0; Tue, 07 Mar 2023 14:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; t=1678228023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ReUzQTPrVvG5iby/h9m+/R0jY9DDZJr5kroiPbP9VlI=; b=cYU4TMzZdmqPqI5Bu/OyoS+YivWNYKc5Db6vGbYpDkZON/UKHT0kW8l5+M1gJGJSuy ovQ3G+LSB/FefY8jf2s3iqH772fBWzSwZ6lrgOWZmjC3mWXl2KTAUNztegaeSoX8MKV7 5bOqpDLr87hhzJ6CdpMGWIfw7OGMBDGLsD5acBrRf2qh5COyMabfMIj2aMLVVE6Bi/LT agzH6dXWnuNk9uYrCo0eOKQtFnGproh76TcOoCj58XGvog5v+nf5ndq668auPAMRfX/k tORQ+QamXruKaVFVg2xLW9k3luspGvEUEBZmH9M7r90658qO4r0YICMo0eK61Mmfyi3d fs+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678228023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ReUzQTPrVvG5iby/h9m+/R0jY9DDZJr5kroiPbP9VlI=; b=OH9nn9hfjRJGKrI88eh+TYLuYmSzyJCNEjUSq8J91kFG49wR9R2maJE/ShR4Bvih3g 5wc/EFxXRxAb3NDAlNB7xCR5hbueicGCwyl0xFn+YrGeh/w/aYWd63Md/gjN1HXsgxy0 CEowWgvxTeELr7zaaWDRL65arQSfMw4f0Pi4zcYARICt6nd1UBZTiI+bZ8k0KQ1Qwhen BGF+GU9nZBUQr3bswsD/hfpWe/56Hcz6KawJ1D1KdSUy290uyWbNqscgJU/Ux8BN4rlX gkVAqGFoAIiTyARjRjzB9LzIbelEhHG97CEax5ySbZr43McWnlK7NfcEW3aohvETJKEF IRIw== X-Gm-Message-State: AO0yUKUEXJzZ0Gfda77e+uzNjus0X5Zy1Hxqqtd6yf8HIxXBgQZ7a/kC O89+WCkAdhKvxCREMRLm8PQ= X-Google-Smtp-Source: AK7set90bv5W4k0vkQtEyMMJeUJVKAtudDQCtnPoIM/WgyMwR4FeOENO0NtjA/+I6emRet/kB7wS8Q== X-Received: by 2002:a17:906:4e15:b0:883:3299:91c8 with SMTP id z21-20020a1709064e1500b00883329991c8mr15786241eju.55.1678228022566; Tue, 07 Mar 2023 14:27:02 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c23-c485-ef00-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c485:ef00::e63]) by smtp.googlemail.com with ESMTPSA id t19-20020a170906065300b008be996c1630sm6669412ejb.39.2023.03.07.14.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 14:27:02 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jirislaby@kernel.org, neil.armstrong@linaro.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, gregkh@linuxfoundation.org, Christian Hewitt , Martin Blumenstingl Subject: [PATCH v3 1/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for G12A Date: Tue, 7 Mar 2023 23:26:49 +0100 Message-Id: <20230307222651.2106615-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307222651.2106615-1-martin.blumenstingl@googlemail.com> References: <20230307222651.2106615-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Amlogic G12A SoCs gained a new "divide XTAL by 2" bit. Everything else (we know about) is identical to the UART IP on GX (GXBB/GXL/GXM) SoCs. Add a new compatible string for this SoC so this new bit can be managed accordingly while keeping "amlogic,meson-gx-uart" as fallback compatible string. Signed-off-by: Martin Blumenstingl --- Changes from v1 -> v2: - make meson-gx-uart a valid compatible string for meson-g12a-uart Changes from v2 -> v3: - don't add extra oneOf as all of the entries are enclosed in oneOf already - don't allow amlogic,meson-g12a-uart as standalone compatible string (which slipped through in v2 due to all of the formatting changes that the extra oneOf required) .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml index 3cbdde85ed71..22656efe8ddc 100644 --- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml @@ -34,6 +34,11 @@ properties: - amlogic,meson-gx-uart - amlogic,meson-s4-uart - const: amlogic,meson-ao-uart + - description: Always-on power domain UART controller on G12A SoCs + items: + - const: amlogic,meson-g12a-uart + - const: amlogic,meson-gx-uart + - const: amlogic,meson-ao-uart - description: Everything-Else power domain UART controller enum: - amlogic,meson6-uart @@ -41,6 +46,10 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - description: Everything-Else power domain UART controller on G12A SoCs + items: + - const: amlogic,meson-g12a-uart + - const: amlogic,meson-gx-uart reg: maxItems: 1 From patchwork Tue Mar 7 22:26:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 660020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94F21C678D5 for ; Tue, 7 Mar 2023 22:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbjCGW2I (ORCPT ); Tue, 7 Mar 2023 17:28:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjCGW1q (ORCPT ); Tue, 7 Mar 2023 17:27:46 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52F21968C2; Tue, 7 Mar 2023 14:27:06 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id u9so58597337edd.2; Tue, 07 Mar 2023 14:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; t=1678228024; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ExpR60rlK67/XKPCeTgOHd008brYtjClGvCmbWSFbwI=; b=Zb/ggaaQyv+CkyxjYqpj/Dy3WUdP/IdFF0xtREUhsz/4gu2BR3xwDR29s1j2lq5Nr3 gMibyzTFlzcEArZliny/JoXY2WWrfPF3m74+XGzSLtzdixRjF0OTfvjpdSeL8pb5b7iy tfIKXizsoEbEjJImbsAkw7ejDSKfzuh2BlS7uxXsNNlUmSh45ITD8m2l3mTgbznGBSXV 1N/3mG9zXst+s2dhcQXG57D9G9NobHu15G5IcDiiDgS9tJwsbWcRU+O7BCzwmWJcAcqt uMZ+QqJ1VbozXtBKmC/I4AWnTRW3jXGxyVCZAqKOKrOhgIDrM6mO1ckkt5xNjBWLKER8 sQ0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678228024; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ExpR60rlK67/XKPCeTgOHd008brYtjClGvCmbWSFbwI=; b=skvoPiVoVrNYfs7uO1o+7ftVPzQ7WMDoziCQ8J/DuSg6ZdMplre9P1gaEG+yEUXhgt RTlTSwilVclWt6zo0C7R5OAjANYUZtR8H7NeBjtZT7yXMlKeNV4p1PSTe137eE+rvufJ 95cTGaNdP9VcGf/ddC12NyXjTsdrTCqTqK6x5LdMnZs2ZQ516trUa6noNaJXcE4mW7hB P2hylZkZ3mjcgkembKifI2ahWgg/8iYDQr/1JqWzvzzXxo7c5LC4Id3Gm35ez6Kc9eEj ZZ79CC610HZZT44aN+dw5J3y8F8Zt/KWlc93ZltWTEITZ2rkduoUUKZDW7FXRtOaY0gk PDsg== X-Gm-Message-State: AO0yUKXGekgdhkpLe5rIIuYlYRxMBQ+rT8Ok0JNEupSFaKpdA2sER3Wv IHWkrMGQzY62UVEKNqnVVzE= X-Google-Smtp-Source: AK7set/o0PL2VR+sAsODNx7yzEKziGZhE38Th2SLl9L8Pm3Fk4SOFX1CvOJbUItRhB8Vx6c43w6oPg== X-Received: by 2002:a17:906:c9c2:b0:8a0:7158:15dc with SMTP id hk2-20020a170906c9c200b008a0715815dcmr13158932ejb.74.1678228024215; Tue, 07 Mar 2023 14:27:04 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c23-c485-ef00-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c485:ef00::e63]) by smtp.googlemail.com with ESMTPSA id t19-20020a170906065300b008be996c1630sm6669412ejb.39.2023.03.07.14.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 14:27:03 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jirislaby@kernel.org, neil.armstrong@linaro.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, gregkh@linuxfoundation.org, Christian Hewitt , Martin Blumenstingl Subject: [PATCH v3 3/3] arm64: dts: meson-g12-common: Use the G12A UART compatible string Date: Tue, 7 Mar 2023 23:26:51 +0100 Message-Id: <20230307222651.2106615-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307222651.2106615-1-martin.blumenstingl@googlemail.com> References: <20230307222651.2106615-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Switch meson-12-common.dtsi to use the Meson G12A specific UART compatible string. This enables the "divide XTAL by 2" divider which improves support for UART attached Bluetooth modules (for example RTL8822CS) running at a baud rate of 1500000. Without dividing XTAL (24MHz) by 2 a baud rate of 1500000 cannot be generated cleanly and the resulting jitter breaks communication with the module. Tested-by: Christian Hewitt Signed-off-by: Martin Blumenstingl --- Greg, please don't take this through your tree. I included this patch to show the overall goal of this series. If Neil won't take this as part of another series then I'll send it separately. Changes from v1 -> v2: - keep meson-gx-uart as fallback compatible string Changes from v2 -> v3: - none arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi index 123a56f7f818..904bcd4d2acf 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -2046,7 +2046,8 @@ pwm_AO_cd: pwm@2000 { }; uart_AO: serial@3000 { - compatible = "amlogic,meson-gx-uart", + compatible = "amlogic,meson-g12a-uart", + "amlogic,meson-gx-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x3000 0x0 0x18>; interrupts = ; @@ -2056,7 +2057,8 @@ uart_AO: serial@3000 { }; uart_AO_B: serial@4000 { - compatible = "amlogic,meson-gx-uart", + compatible = "amlogic,meson-g12a-uart", + "amlogic,meson-gx-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x4000 0x0 0x18>; interrupts = ; @@ -2293,7 +2295,8 @@ clk_msr: clock-measure@18000 { }; uart_C: serial@22000 { - compatible = "amlogic,meson-gx-uart"; + compatible = "amlogic,meson-g12a-uart", + "amlogic,meson-gx-uart"; reg = <0x0 0x22000 0x0 0x18>; interrupts = ; clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>; @@ -2302,7 +2305,8 @@ uart_C: serial@22000 { }; uart_B: serial@23000 { - compatible = "amlogic,meson-gx-uart"; + compatible = "amlogic,meson-g12a-uart", + "amlogic,meson-gx-uart"; reg = <0x0 0x23000 0x0 0x18>; interrupts = ; clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>; @@ -2311,7 +2315,8 @@ uart_B: serial@23000 { }; uart_A: serial@24000 { - compatible = "amlogic,meson-gx-uart"; + compatible = "amlogic,meson-g12a-uart", + "amlogic,meson-gx-uart"; reg = <0x0 0x24000 0x0 0x18>; interrupts = ; clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;