From mboxrd@z Thu Jan 1 00:00:00 1970 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 29D10CD11DF for ; Tue, 26 Mar 2024 20:56:12 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DIr9Ryah4kOxwPkuusWRDX0EAWqQVpJ44kz20jrpqbo=; b=CCk/4ZhyQuEuMm TMOhH4s/nPW0xTdSq8o0asNS7Ht/NYuGOYs15t4luxAwHeCUwmAX/OsAaP43nAUDeqyGP7e5I4VOU BJaaFZwfCswR1hZL4h8WIwCpAhRh+0NT9ez5EaaobpxhXcOuA/QSop0W9JMr8N1sMH+DDJJ8BppMK +cnsnfUxru+Lr+vRHjoEkRrqiD7D/+nSp03wGEjpMix7Huo5G+I6200+UealxEaJrcN+Dd6mnul+m Lb7NVXUX5g5Ca2XWMee53s67/eUYRfGteKjZWFia+sZkHBbrJaEFN7GIn6iY3L9nbQW5y3YVA14ww lv4WOrM6UgcmOfhjIy8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpDpw-00000006SO7-0AZw; Tue, 26 Mar 2024 20:56:00 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpDps-00000006SNB-2x23 for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 20:55:58 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42QKtmi5095003; Tue, 26 Mar 2024 15:55:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711486548; bh=Smy5k79vUe3OVEPHAMKYoMHVAX3ehZ3inkD06MeHs1A=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=NqotJdVzXO8kVtZYpNXo8LQ5S2mLSUdodqfgatERWVTgbXM4QtNTS14w85tV9iGii E7CUYDnpHHPw9ssUNpZugnQ6Q//+0NIDwSk0gm3kG236MuwNSdMLs6r6kvU95k7UKW WScI8+9pUtEs1Ny5G2COXPmLUEevF7cX7CdQRDa4= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42QKtmKK065361 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 26 Mar 2024 15:55:48 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 26 Mar 2024 15:55:48 -0500 Received: from fllvsmtp7.itg.ti.com (10.64.40.31) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 26 Mar 2024 15:55:47 -0500 Received: from [10.249.42.149] ([10.249.42.149]) by fllvsmtp7.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42QKtlLY084896; Tue, 26 Mar 2024 15:55:47 -0500 Message-ID: Date: Tue, 26 Mar 2024 15:55:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] arm64: dts: ti: k3-am65: Remove UART baud rate selection Content-Language: en-US To: Nishanth Menon CC: Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , References: <20240326185441.29656-1-afd@ti.com> <20240326202105.duim7cooxk4dwlz2@makeshift> From: Andrew Davis In-Reply-To: <20240326202105.duim7cooxk4dwlz2@makeshift> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_135556_974176_4018C8C7 X-CRM114-Status: GOOD ( 26.78 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/26/24 3:21 PM, Nishanth Menon wrote: > On 13:54-20240326, Andrew Davis wrote: >> As described in the binding document for the "current-speed" property: >> >> "This should only be present in case a driver has no chance to know the >> baud rate of the slave device." >> >> This is not the case for the UART used in K3 devices, the current >> baud-rate can be calculated from the registers. Having this property > > I do not understand the explanation above -> how does one do this? > If you are talking of the 8250 divider registers, someone has to program > those - how do you compute the baud rate from registers that aren't > programmed? Note: I am not commenting on the rationale of removing the > property, just trying to understand the assertion above. > This divider register, when "unprogrammed", has a default value. When one wants to use a TTY/serial device they pick the baud-rate(stty, termios, etc.), that then programs the register with the value they selected. As stated below, this property does not program that register, it only tells the driver what it should have already been set to. Some drivers need this as they do not have a way to know what the divider is actually set to. Setting this in our case is wrong for two reasons: 1) Our driver can and does just check the divider itself. 2) We do not setup most of these UARTs before the kernel starts, so if our driver *did* care about this property it would not reflect the actual divider value (which is unprogrammed at this point). Andrew >> has the effect of actually skipping the baud-rate setup in some drivers >> as it assumes it will already be set to this rate, which may not always >> be the case. >> >> It seems this property's purpose was mistaken as selecting the desired >> baud-rate, which it does not. It would have been wrong to select that >> here anyway as DT is not the place for configuration, especially when >> there are already more standard ways to set serial baud-rates. >> >> Signed-off-by: Andrew Davis >> --- >> arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - >> arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 1 - >> arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 1 - >> 3 files changed, 3 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >> index ff857117d7193..670557c89f756 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi >> @@ -89,7 +89,6 @@ main_uart0: serial@2800000 { >> reg = <0x00 0x02800000 0x00 0x100>; >> interrupts = ; >> clock-frequency = <48000000>; >> - current-speed = <115200>; >> power-domains = <&k3_pds 146 TI_SCI_PD_EXCLUSIVE>; >> status = "disabled"; >> }; >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi >> index 6ff3ccc39fb44..4f808e5089755 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi >> @@ -43,7 +43,6 @@ mcu_uart0: serial@40a00000 { >> reg = <0x00 0x40a00000 0x00 0x100>; >> interrupts = ; >> clock-frequency = <96000000>; >> - current-speed = <115200>; >> power-domains = <&k3_pds 149 TI_SCI_PD_EXCLUSIVE>; >> status = "disabled"; >> }; >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi >> index 37527890ddeaf..eee072e44a42f 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi >> @@ -59,7 +59,6 @@ wkup_uart0: serial@42300000 { >> reg = <0x42300000 0x100>; >> interrupts = ; >> clock-frequency = <48000000>; >> - current-speed = <115200>; >> power-domains = <&k3_pds 150 TI_SCI_PD_EXCLUSIVE>; >> status = "disabled"; >> }; >> -- >> 2.39.2 >> > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel