From patchwork Tue Jan 2 16:18:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezra Buehler X-Patchwork-Id: 13509160 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F1DAC46CD2 for ; Tue, 2 Jan 2024 16:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FYiCzaI0cx9ZgQVX3dQbejt1QGqcC0f6gdskWJf2cTw=; b=cLS/ttRmXHHjNM haEva0GV23bEceoELUwhptpcPRI4KzjHbO3SjsEpEn/XfUhVKr7MaT/0kCoKniKBXsCNuiiLBDp+z WCFrqi0tmhjfQ4Xwy8gkF0ZqKmrXAP7hAJcwkm8fZPk8ksHQH1lAjDnjuM68p4183aC0SZfEx85lq R3ADGu88rPWN+oyIV9d+KDWNCu4usRZzmuzqdh9OScVhW6OH3vV1MNjpuvzahhqrJJ09v6lQO8wya YEoJ+1Xjd6zXKh5FzpOHvJ3XCxdQykigmaoMwuCMvKFt2h/pp/euOQYwUhx10sV5TTSAoWEbPG1b1 UAhwceT3qS026HP9xbcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKhTf-008TY3-2Q; Tue, 02 Jan 2024 16:18:51 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rKhTc-008TWY-0z for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2024 16:18:49 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-554fb402e90so2104518a12.0 for ; Tue, 02 Jan 2024 08:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=easyb-ch.20230601.gappssmtp.com; s=20230601; t=1704212323; x=1704817123; darn=lists.infradead.org; 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=vMFcXrpERZXaCP9uPS19JP2ScOwkrDDZS5qe/Ujb6s8=; b=c54bljZI0KRgt13jJglmVoIHG/ZfHI1z3ObXmFLLwyJdFZr4QzACW9emPUK1dU4h8p 3CkJ+Rv6J46CFJYRWjlxZs5/EhBu1aSsjW7twNm4c9QSQ/pGMuqy1b2w4PLoo8ra6wih vdfuJe7FJPOws1yQvqxNmtU247RtnCJLlTJsxjwxw8syD7jc+iBGWmLDlqGZDf3Jk/a/ lpi06D8/HaytmKx8tEF4Hg8MR7y8MDpI5BPBzjlUfs7wfLXiCJ+/ytga93reMy1K3Zi0 E/hP7H+U2KFUWewSO/ubagAfSh/p+uR8snVeVnUPiixIQsFihON5gsZe7xl5ei8+SCtX tlHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704212323; x=1704817123; 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=vMFcXrpERZXaCP9uPS19JP2ScOwkrDDZS5qe/Ujb6s8=; b=f6x0TnaU99kMv28qv3ZYNQukwqmqcWXEWLqfJWDAqLZfEgahu3UweEPlH2TbOb4aA/ VsBkVoBkE+Bt703F2XfaWNFtaAnV1PJba6Jg0piXA8TC36NiCtGIJoSaE8IcWF9zzNM6 eyEh3xOxs/g20eJAngwlXqwNBOOhnQN9TnVuk3QWOY9Hq9Pm2K2wV6W/2o/KDFDAAXs6 UK38N596m5/qpUZ28DBcPvzWmkejuCvxqdiyu1tp3w6CdbfJP5BFjVvOU2+qxauU7/mJ 1rdOIgVD9UqRJ+gpDgxK06u68azCeC2thj6gtjFzcW1ClZ1mzkY2OK5D+aOQXELu0lWe IrSw== X-Gm-Message-State: AOJu0Yw4bOptISHrXqwHXcciZ3WWdjo4EHmw0Myl5g8+Gv/Ewfb2gbg1 qJotIdYfAgIdMdDZSy+1srKKawc+2Z2PAw== X-Google-Smtp-Source: AGHT+IEET9neX9obFk5esYJTEcqRBHb85r0N5bqkFTeCpk3CM0h8awtabQKDJw/NeN28gjT54pViVQ== X-Received: by 2002:a50:8d03:0:b0:552:29d9:92c9 with SMTP id s3-20020a508d03000000b0055229d992c9mr22101109eds.3.1704212322891; Tue, 02 Jan 2024 08:18:42 -0800 (PST) Received: from fraxinus.easyland ([77.109.191.117]) by smtp.gmail.com with ESMTPSA id h12-20020a0564020e0c00b005561a8c2badsm3969191edh.83.2024.01.02.08.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 08:18:42 -0800 (PST) From: ezra@easyb.ch X-Google-Original-From: ezra.buehler@husqvarna.com To: Alexandre Belloni , Claudiu Beznea , Conor Dooley , Krzysztof Kozlowski , Nicolas Ferre , Rob Herring , linux-arm-kernel@lists.infradead.org Cc: Reto Schneider , Michael Zimmermann , devicetree@vger.kernel.org, Ezra Buehler Subject: [PATCH v1 1/2] ARM: dts: at91: at91sam9x5ek: Use DMA for DBGU serial port Date: Tue, 2 Jan 2024 17:18:38 +0100 Message-Id: <20240102161839.702625-2-ezra.buehler@husqvarna.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240102161839.702625-1-ezra.buehler@husqvarna.com> References: <20240102161839.702625-1-ezra.buehler@husqvarna.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240102_081848_343687_43A82A74 X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ezra Buehler The UART controller does not seem to be fast enough to receive data (at 115200 baud) without dropping bytes when DMA is disabled. This has often been noticed when pasting SSH keys into the serial console (ttyS0). Only after multiple tries, the long strings would be successfully transferred without missing characters. Co-Developed-by: Michael Zimmermann Signed-off-by: Michael Zimmermann Signed-off-by: Ezra Buehler Acked-by: Nicolas Ferre --- arch/arm/boot/dts/microchip/at91sam9x5ek.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91sam9x5ek.dtsi b/arch/arm/boot/dts/microchip/at91sam9x5ek.dtsi index 5f4eaa618ab4..9618b8d965b0 100644 --- a/arch/arm/boot/dts/microchip/at91sam9x5ek.dtsi +++ b/arch/arm/boot/dts/microchip/at91sam9x5ek.dtsi @@ -39,6 +39,8 @@ &adc0 { }; &dbgu { + atmel,use-dma-rx; + atmel,use-dma-tx; status = "okay"; }; From patchwork Tue Jan 2 16:18:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezra Buehler X-Patchwork-Id: 13509162 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D45D2C46CD2 for ; Tue, 2 Jan 2024 16:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AyEZUFNx3ChOtsOBrehpx6txjehsEWVr9QuHakNbkkI=; b=orcN0BmdDKMjvM AK+ZwPhAgi9dSUtOmRO24CrfaS5nqE+RmPpis/+9jBZWBAP6egeqgUJAWv916VWlcSUXR4JM0JyuN aiUrwDYGsOsLKz4XXoczsbYpH0QtEqgXJbHv5/LpEY/Zf2Vut0z9nb3ZwDXvt0n6fsu3CHvDP63oY APImsXIL0ZaQesAV4xtWZBwUYzCI+j8JRNokg3Sg17SAd9gxJivXJbatJOjejmeNDwIycoAYvd10Y TFQgyvpKdLK1wY1xY4plbNx816YH8LIaUq8EKWpRL62k7X9oFBQZHfmDLJolu9pyZMjlIyZHReHSL 0nAwRfYW0GbUwqJOAs+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKhTg-008TYO-1U; Tue, 02 Jan 2024 16:18:52 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rKhTd-008TWZ-10 for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2024 16:18:50 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-555daab65b0so1038720a12.0 for ; Tue, 02 Jan 2024 08:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=easyb-ch.20230601.gappssmtp.com; s=20230601; t=1704212324; x=1704817124; darn=lists.infradead.org; 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=IebUmbVG/k5f+E1VZrJFf2G8VcKT4fPdAVa0LMaN04Y=; b=Rsgpt+McNRZoiydxmo00ZkS5drTI8pPWH2rtDGKac5PyYc92GPWaA8K9fBTTpL2rA1 IodqiXmScTZzFXF2fx2cOJ+V+yjyEx4iRqFPOlvNVwoaMiSkY97weff0Rev1lsTGCIpl oKYthfAOH99BcZcBfJjKONuWaxvGDwFW58UXvrD0VWH+D8Xm51bRfI04knNlhiXvezyq CaAO1DYDen+mKqjmeU5X+HRWvdn26sHv/eSe4gGFbRyOcrE+SJhv4zGtgqPyHRMtKLe2 vNQQa47bFqcqBXNnd5sGm7HOXmLbYs7DCcKmJJs69ghd0FiVgwNCSM6/DToDFs+NT2Bo wTrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704212324; x=1704817124; 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=IebUmbVG/k5f+E1VZrJFf2G8VcKT4fPdAVa0LMaN04Y=; b=qsu/q4hxu2a4gq/8VBq/yoWd46CWOxLkuO0L1PCqwC0dYj6L8LnPKm0WFfA86qsHWR NjMpxIlXdsWSxuDpzmHmFg8y71YDIyiB/nQLQG5bAva5zDkV0ckecM2XrP2++LtlCWTS jstq2WB1XlI02ZIbVqWjc0koD1Od1qXh35NI87ZOHTHUeBlQDEkeI6A8jZCQP+8LVr+d XMjw4D6ny1o0Yf0zeh8x7AQeUc3u/cpq9FMisr1XKzthjZPRf2SfcFxPy/eMpIW6O+QA vGwOz+kmpxYZ5iGq6y0MEKPfm7Gm2GGMvkcynNp49sI1cbPoBmptZRDPQ/D9suIlm1vA ln3g== X-Gm-Message-State: AOJu0YyqS/U9gTsAcMwmr6Ud0STcV2mQbZJ41Y8cujHRQ+1MQ5CelxLY Ad8TZLyjBfhmJJu2ddaN7or8X4o8HyGEwA== X-Google-Smtp-Source: AGHT+IGuz+pvMnmNqi5iphXcTF7cDrb5NUR/Xn0jpNBfwhlN16DczT5kLZptWqVyrvcyO8VyJEVHpA== X-Received: by 2002:a50:d74f:0:b0:54c:6fc0:483a with SMTP id i15-20020a50d74f000000b0054c6fc0483amr20387335edj.2.1704212324140; Tue, 02 Jan 2024 08:18:44 -0800 (PST) Received: from fraxinus.easyland ([77.109.191.117]) by smtp.gmail.com with ESMTPSA id h12-20020a0564020e0c00b005561a8c2badsm3969191edh.83.2024.01.02.08.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 08:18:43 -0800 (PST) From: ezra@easyb.ch X-Google-Original-From: ezra.buehler@husqvarna.com To: Alexandre Belloni , Claudiu Beznea , Conor Dooley , Krzysztof Kozlowski , Nicolas Ferre , Rob Herring , linux-arm-kernel@lists.infradead.org Cc: Reto Schneider , Michael Zimmermann , devicetree@vger.kernel.org, Ezra Buehler Subject: [PATCH v1 2/2] ARM: dts: at91: gardena-smart-gateway: Use DMA for USART3 Date: Tue, 2 Jan 2024 17:18:39 +0100 Message-Id: <20240102161839.702625-3-ezra.buehler@husqvarna.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240102161839.702625-1-ezra.buehler@husqvarna.com> References: <20240102161839.702625-1-ezra.buehler@husqvarna.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240102_081849_377710_E0C704D0 X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ezra Buehler The AT91SAM9G25-based GARDENA smart Gateway uses USART3 (ttyS1) to communicate (over PPP, at 115200 baud) with the radio module. We have been experiencing packet loss and seeing errors on the ppp0 interface. Enabling DMA for the serial interface resolves the issues. Co-Developed-by: Michael Zimmermann Signed-off-by: Michael Zimmermann Signed-off-by: Ezra Buehler Acked-by: Nicolas Ferre --- .../boot/dts/microchip/at91sam9g25-gardena-smart-gateway.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/microchip/at91sam9g25-gardena-smart-gateway.dts b/arch/arm/boot/dts/microchip/at91sam9g25-gardena-smart-gateway.dts index 92f2c05c873f..af70eb8a3a02 100644 --- a/arch/arm/boot/dts/microchip/at91sam9g25-gardena-smart-gateway.dts +++ b/arch/arm/boot/dts/microchip/at91sam9g25-gardena-smart-gateway.dts @@ -121,6 +121,8 @@ &usart2 { }; &usart3 { + atmel,use-dma-rx; + atmel,use-dma-tx; status = "okay"; pinctrl-0 = <&pinctrl_usart3