From nobody Thu Sep 11 00:25:19 2025 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 E654EC61DA4 for ; Wed, 22 Feb 2023 21:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232614AbjBVVFk (ORCPT ); Wed, 22 Feb 2023 16:05:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232357AbjBVVFZ (ORCPT ); Wed, 22 Feb 2023 16:05:25 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C8E7457F3; Wed, 22 Feb 2023 13:04:52 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id ee7so20683408edb.2; Wed, 22 Feb 2023 13:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; 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=bbt3aJeEOkgWRPa3MfKpp7LuHfzCeFjCJvJNJi9PM8Q=; b=QpTl01PM3tuyIi8wIIDCzQPYzGp1nAZs0O0EnPXT/GiPYtbwLditEfKYj9I0HsqJcl edm5/RfJugSH+PjhnpHHCVpx1idH/Bw9ekKGG07QLwYpzGzEFjNPGxgBhwW2Cpl/+/wo fkPu6sUamnyY1HZsgcs0aE4AILYO1e7Vr6KIbNbPqdL9hNkAGMUu5JhuWrYR69prldVx UPfvGbyx/Dh3Ha6IngzXd/wIm5ABBhV9snWFshC3WKSE7f9gqBPAUIIjcL9avrSLyBvC H5ghH1xAtaONTJCsGIurtakAjTg7oP/fNQBYV5bI9aIFSGOVUlqu4hcIU63OPhtZdEhu dHGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=bbt3aJeEOkgWRPa3MfKpp7LuHfzCeFjCJvJNJi9PM8Q=; b=RDW1j9HU8CsKyWvKWA+8z2cUhgwmFtJxQUHHtUXyoXPkQduA2Z/uU9s6ARUPnP6Y46 LL+nlQXIW7D6cuhkRMdjXZJ28fMK1yrz/HckWf/6wp5xlzH0DPdWq7sPj1RftFcuu+ux 5xp4VTmmEQqMcDkaiNf4vT9WOvlUhnr4FcaKE0g3FciHX8FDDPPyfu2IK7HyJhzFG2Il ylJ1kTBpWF9WmsG8hk9qBROSPm6f9iJctwUJuSvcPeVaoS8pAyfbIkHgdzIlncg8rNYs jndMrBbX1sbWjairEOTkDFuxkir1TW9jQ5qvzh8oGFe+1WUW4g9znx0epua0RRLN0NHk GqiA== X-Gm-Message-State: AO0yUKVaisZO8Zka7VGxbVjSThuDYKSE/K38LXicODwHF/FPm+73YrKB C8Pe46fxsVyAHQdkWiDbVeOf0769BR0mBA== X-Google-Smtp-Source: AK7set9KkALgBRDZV1vi9ZyBe4G0fUEyBTMSKdxvwQ0WW8i5WiG/vA6Zu7t5NqcQWHOSyhAAg54Ozg== X-Received: by 2002:aa7:c552:0:b0:4a0:e305:a0de with SMTP id s18-20020aa7c552000000b004a0e305a0demr10644977edr.19.1677099880648; Wed, 22 Feb 2023 13:04:40 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c22-76c9-eb00-0000-0000-0000-0e63.c22.pool.telefonica.de. [2a01:c22:76c9:eb00::e63]) by smtp.googlemail.com with ESMTPSA id m17-20020a50c191000000b004af6a840f21sm209208edf.15.2023.02.22.13.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 13:04:40 -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 v1 RFC 1/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for G12A Date: Wed, 22 Feb 2023 22:04:23 +0100 Message-Id: <20230222210425.626474-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230222210425.626474-1-martin.blumenstingl@googlemail.com> References: <20230222210425.626474-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Martin Blumenstingl --- Why am I sending this as RFC? The last change in this series means that the resulting .dtbs are not compatible with old kernels anymore. My understanding is that this is fine and only the opposite case (using old .dtbs on new kernels) has to be supported (which is still the case with this series). I'd like to get some confirmation for this. .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.ya= ml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml index 7822705ad16c..3d9d51389171 100644 --- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml @@ -29,6 +29,7 @@ properties: - amlogic,meson8-uart - amlogic,meson8b-uart - amlogic,meson-gx-uart + - amlogic,meson-g12a-uart - amlogic,meson-s4-uart - const: amlogic,meson-ao-uart - description: Everything-Else power domain UART controller @@ -37,6 +38,7 @@ properties: - amlogic,meson8-uart - amlogic,meson8b-uart - amlogic,meson-gx-uart + - amlogic,meson-g12a-uart - amlogic,meson-s4-uart =20 reg: --=20 2.39.2 From nobody Thu Sep 11 00:25:19 2025 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 7B6A6C61DA4 for ; Wed, 22 Feb 2023 21:05:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232820AbjBVVFn (ORCPT ); Wed, 22 Feb 2023 16:05:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232650AbjBVVF1 (ORCPT ); Wed, 22 Feb 2023 16:05:27 -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 BF96F460BD; Wed, 22 Feb 2023 13:04:55 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id o12so36194464edb.9; Wed, 22 Feb 2023 13:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; 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=3Nq3dzuM0wiV9YMJ/Hk2mSZsANQ6TIPxxTMSVQHPo70=; b=TWPmsWEFjsNN4j2Yh8ZCvcl2OCl492GceDA3d6FDXQee/glFHFSD9sb4nRDXS2TPag PCbIfhmEWMb2xI9iBATS+tAzWWPeimyQNj/IKESD4/M4TqXUgcMc/bmuT2KIKAkL75Fb WRdewXvOKPHgRuZVVaI/d/fIZ1iHEhLbVCv6hvsbz+n3G5B6dhGqLMsEOrjjkDc319pr cVDiwNcZm654jVMpmV8wjv3QrDcJFNg/CMUlifLiPxJdWMMg2fbCoSLNlHaSFDSzbHCR 7RDWM0Yu+z7Kai3U6jH/a/3POr9XIKw/VnlOStAdN5sBc741+e0tp05iejYWAS03q9Nq AcIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=3Nq3dzuM0wiV9YMJ/Hk2mSZsANQ6TIPxxTMSVQHPo70=; b=kgyFX8iV424pZ4FJq4R1sRrYkBkoq58zRfkat6e1NfJT/TFNfB67L5kHZPw9x4NosP V5HUGc9cRluYHh1nZ0wcbtDlh2oJhN4b0oarWHh3NlWPhZ4yBrPzmCCSh3niMxhUploS BSNaAx+6imAttfHbwFydkoDTLzol8rgMfESmJQVz5QOq/0zp0cl8rEbkHIlbhZ8IPIlq CtLAU0TWPklc38eEcwZe666drcOVA3Xr7tf0mjX46Ro9MNUHOq8VxJn1Ifm22W/TvyHe BZv6djXCKUFzm5jH81t7lKTbqJvjswNEnc7e8eFSzCWQ9KM/BVCaXhgFr6LhoHPGfUDQ RJ/A== X-Gm-Message-State: AO0yUKVfG+A7J/jXyAz5siV1OHp4cHDoJk4eRz65JqR84nLHQQS33n0T bz9fika29DS2fB3o2+tDc/6YiItych9Tkw== X-Google-Smtp-Source: AK7set/Pb9SC42yyGyM/okGUSygtWrCURlJ590lWGkYU/8O1YPoP2Jil0ZxAhQvIGGGCwK8dXhMGOQ== X-Received: by 2002:a05:6402:4007:b0:4ae:eab6:a07b with SMTP id d7-20020a056402400700b004aeeab6a07bmr11290888eda.16.1677099881755; Wed, 22 Feb 2023 13:04:41 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c22-76c9-eb00-0000-0000-0000-0e63.c22.pool.telefonica.de. [2a01:c22:76c9:eb00::e63]) by smtp.googlemail.com with ESMTPSA id m17-20020a50c191000000b004af6a840f21sm209208edf.15.2023.02.22.13.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 13:04:41 -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 v1 RFC 2/3] tty: serial: meson: Add a new compatible string for the G12A SoC Date: Wed, 22 Feb 2023 22:04:24 +0100 Message-Id: <20230222210425.626474-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230222210425.626474-1-martin.blumenstingl@googlemail.com> References: <20230222210425.626474-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Amlogic Meson G12A (and later) SoCs also have the "divide XTAL by 2" bit as the S4 UART controllers. Add a new compatible string for these SoCs and enable the has_xtal_div2 flag for them. Tested-by: Christian Hewitt Signed-off-by: Martin Blumenstingl --- drivers/tty/serial/meson_uart.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uar= t.c index 74110017988a..2501db5a7aaf 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -779,7 +779,7 @@ static int meson_uart_remove(struct platform_device *pd= ev) return 0; } =20 -static struct meson_uart_data s4_uart_data =3D { +static struct meson_uart_data meson_g12a_uart_data =3D { .has_xtal_div2 =3D true, }; =20 @@ -788,9 +788,13 @@ static const struct of_device_id meson_uart_dt_match[]= =3D { { .compatible =3D "amlogic,meson8-uart" }, { .compatible =3D "amlogic,meson8b-uart" }, { .compatible =3D "amlogic,meson-gx-uart" }, + { + .compatible =3D "amlogic,meson-g12a-uart", + .data =3D (void *)&meson_g12a_uart_data, + }, { .compatible =3D "amlogic,meson-s4-uart", - .data =3D (void *)&s4_uart_data, + .data =3D (void *)&meson_g12a_uart_data, }, { /* sentinel */ }, }; --=20 2.39.2 From nobody Thu Sep 11 00:25:19 2025 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 5AFEAC61DA4 for ; Wed, 22 Feb 2023 21:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232766AbjBVVFq (ORCPT ); Wed, 22 Feb 2023 16:05:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232664AbjBVVF1 (ORCPT ); Wed, 22 Feb 2023 16:05:27 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C86C746098; Wed, 22 Feb 2023 13:04:55 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id i34so10460797eda.7; Wed, 22 Feb 2023 13:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; 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=D4sT1wUlCbHRDpbMzMMTT4BWgWGszScqpQQPPR7Avx8=; b=fV1pXve6qVGgUZzvzS3Cvik+RMpTsqvE0467NRn8Yb6V7KweUNBEWo4/q30yGcFc9w D+rYJdf2EukzBDNH1v7G086P4Dv9oonD3XT2xLE1mdfg9C347zfJ0wMXCy5hhBVc14pH SBV+mro6+fG+QnaFP472RGso/v2hRpfnF2P7WuV8kfWU8Mqe0zirTpHBCeHrXRTAHwWJ RQO/Z478Q5BdO51H3sh6xqDR5tX03sOJMgzlLDVjzSY+1gQ3jogJjmrdqQLm9kBjMb+q SFu0bUnQ2TzX+kKa6RHt1qzdrPhfdrIk/LHxw6OAiSEcMmw0Xg9bjFXjEbqvTChMmY4Y utgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=D4sT1wUlCbHRDpbMzMMTT4BWgWGszScqpQQPPR7Avx8=; b=fv5Uf75FMukdHEBbzAiMOhtkcrxr/kmifSpZTek3eFnC8gBEsBTPOvlddgDoZwdTKj gn5jK15xyWKx4eYLlYKiDnQZj0TSHJB5FUfBEeJLomJk0sgUlLYSdklX4VX+bzur25XM 4Yt482iZ/ZPxdjkvN/VqSsZ+QmQtExdshsVCMlvMugAs25Upe2/7s0jLNZXmz+WsGNBp XHLeiC99s3s5/Gvda7g/NpTqfVH8XrjGA4OiXgXtq79wbXGFHJdGyiu8SFQ4G0DsnYwZ ZsrCNAnoyGDU9/KtgehQGVkgepEDdS1mQ+JXdzh8aH2yS3+kIE+Z49OErbMeFQR/emyO Illw== X-Gm-Message-State: AO0yUKUhbmAQDV1f6WWmLyzkEVL9gQS4y9TU0fICvAoDZ0XwiL+9vOgg zI5Ca2mZ5ZAxxk/S0J3DRZc= X-Google-Smtp-Source: AK7set9UsywGgwcaKfpjQbvcN4DriltaAx6XT6S28Ki/RySsfHBlPZPWUAWYQaHmEPazeYrWLX5orw== X-Received: by 2002:aa7:db44:0:b0:4ac:b309:3d76 with SMTP id n4-20020aa7db44000000b004acb3093d76mr9530208edt.31.1677099882731; Wed, 22 Feb 2023 13:04:42 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c22-76c9-eb00-0000-0000-0000-0e63.c22.pool.telefonica.de. [2a01:c22:76c9:eb00::e63]) by smtp.googlemail.com with ESMTPSA id m17-20020a50c191000000b004af6a840f21sm209208edf.15.2023.02.22.13.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 13:04:42 -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 v1 RFC 3/3] arm64: dts: meson-g12-common: Use the G12A UART compatible string Date: Wed, 22 Feb 2023 22:04:25 +0100 Message-Id: <20230222210425.626474-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230222210425.626474-1-martin.blumenstingl@googlemail.com> References: <20230222210425.626474-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 10 +++++----- 1 file changed, 5 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..3dc06848f3c4 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -2046,7 +2046,7 @@ pwm_AO_cd: pwm@2000 { }; =20 uart_AO: serial@3000 { - compatible =3D "amlogic,meson-gx-uart", + compatible =3D "amlogic,meson-g12a-uart", "amlogic,meson-ao-uart"; reg =3D <0x0 0x3000 0x0 0x18>; interrupts =3D ; @@ -2056,7 +2056,7 @@ uart_AO: serial@3000 { }; =20 uart_AO_B: serial@4000 { - compatible =3D "amlogic,meson-gx-uart", + compatible =3D "amlogic,meson-g12a-uart", "amlogic,meson-ao-uart"; reg =3D <0x0 0x4000 0x0 0x18>; interrupts =3D ; @@ -2293,7 +2293,7 @@ clk_msr: clock-measure@18000 { }; =20 uart_C: serial@22000 { - compatible =3D "amlogic,meson-gx-uart"; + compatible =3D "amlogic,meson-g12a-uart"; reg =3D <0x0 0x22000 0x0 0x18>; interrupts =3D ; clocks =3D <&xtal>, <&clkc CLKID_UART2>, <&xtal>; @@ -2302,7 +2302,7 @@ uart_C: serial@22000 { }; =20 uart_B: serial@23000 { - compatible =3D "amlogic,meson-gx-uart"; + compatible =3D "amlogic,meson-g12a-uart"; reg =3D <0x0 0x23000 0x0 0x18>; interrupts =3D ; clocks =3D <&xtal>, <&clkc CLKID_UART1>, <&xtal>; @@ -2311,7 +2311,7 @@ uart_B: serial@23000 { }; =20 uart_A: serial@24000 { - compatible =3D "amlogic,meson-gx-uart"; + compatible =3D "amlogic,meson-g12a-uart"; reg =3D <0x0 0x24000 0x0 0x18>; interrupts =3D ; clocks =3D <&xtal>, <&clkc CLKID_UART0>, <&xtal>; --=20 2.39.2