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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47CDDC35240 for ; Thu, 30 Jan 2020 18:25:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21FC22083E for ; Thu, 30 Jan 2020 18:25:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729536AbgA3SZF (ORCPT ); Thu, 30 Jan 2020 13:25:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:51550 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729518AbgA3SZE (ORCPT ); Thu, 30 Jan 2020 13:25:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 96B7BAF21; Thu, 30 Jan 2020 18:25:02 +0000 (UTC) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 In-Reply-To: <20200128141958.vwbxoqglt5gw4xj5@wunner.de> Date: Thu, 30 Jan 2020 17:11:55 +0100 Cc: "Matthias Brugger" , , , "Matthias Brugger" , "Scott Branden" , , , "Ray Jui" , "Stephen Boyd" , "Florian Fainelli" , , , , Subject: Re: [PATCH] serial: 8250_early: Add earlycon for BCM2835 aux uart From: "Nicolas Saenz Julienne" To: "Lukas Wunner" Message-Id: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue Jan 28, 2020 at 3:19 PM, Lukas Wunner wrote: > On Tue, Jan 28, 2020 at 01:42:21PM +0100, Nicolas Saenz Julienne wrote: > > I'm testing this by booting directly from RPi4's bootloader. And it > > works as long as I add this to config.txt: > >=20 > > enable_uart=3D1 > > gpu_freq=3D500 > >=20 > > Which AFAIK blocks frequency scalin on the GPU and fixes the clock to a > > point where the serial is set at 115200 bauds. > >=20 > > Ideally it'd be nice to be able to query the clock frequency, and > > recalculate the divisors based on that. But I don't know if it's > > feasible at that point in the boot process. > > Well, we don't even support adjusting the baudrate *after* the kernel > has booted. Don't 8250 uarts have a clk divisor? I've seen other 8250 earlycon drivers do this (see 8250_ingenic.c), that said I think it's a lost cause for us. BTW did you had the oportunity to have a go at the patch? > The problem is that in mainline, bcm2835_defconfig contains: > CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=3Dy > > Likewise in the Foundation's downstream tree, bcmrpi_defconfig as well > as bcm2711_defconfig and bcm2709_defconfig contain: > CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=3Dy > > In contrast to this, we set the following on Revolution Pi devices: > CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=3Dy > > Downclocking influences not only the uart1 baud rate but also the > spi0 clock. We attach Ethernet chips to spi0, throughput was > significantly worse with the ondemand governor (which is what we > used previously). We felt that maximum Ethernet performance > outweighs the relatively small powersaving gains. In that regard I suggest you use the upstream cpufreq driver which behaves properly in that regard. It disables GPU freq scaling, so as to change CPU frequencies without SPI/I2C/UART issues. Regards, Nicolas 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 X-Spam-Level: * X-Spam-Status: No, score=1.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_DBL_ABUSE_MALW autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D36BC2D0DB for ; Thu, 30 Jan 2020 18:25:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4F9F82083E for ; Thu, 30 Jan 2020 18:25:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bI5HC6rP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F9F82083E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:To:From: Subject:Date:In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=4wvNcrsyLLbYZu1mVNQpciqNwORTcrB3S+llNwLDFss=; b=bI5HC6rPMjG4RM 9Dby5o+mGQfQWa6cJ8BloiWOsF3DcvxJ93MQTusDtQcHkYA3qUgNlxcieOiJJyDN5W1lOXLiwK1Ns N5fZ7P0ZLleo6FbSDEZw1xGaA9qJvQEqU6j3gJNaH1Ml3Bi05Abpm+sUX0m4aj1ZnPZdchlphnPvf enGVocvFCGtZtIvMoQLYa3thkvWBvRV835PGgAVrUlyxJt6YFNdwXyMtABywYEghSbVT75AFbeHNF 41lq50Pdzb+c7i9iSGS3TO3w0NkPDHAFUcXYCYha1YsgtoZjTQwUvzN1X46ro+nu9yUDo1IUFk6B/ /VMptGl0Rl5ksLTBtFDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixEV4-0003VJ-84; Thu, 30 Jan 2020 18:25:10 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixEV0-0002cE-AM; Thu, 30 Jan 2020 18:25:07 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 96B7BAF21; Thu, 30 Jan 2020 18:25:02 +0000 (UTC) In-Reply-To: <20200128141958.vwbxoqglt5gw4xj5@wunner.de> Date: Thu, 30 Jan 2020 17:11:55 +0100 Subject: Re: [PATCH] serial: 8250_early: Add earlycon for BCM2835 aux uart From: "Nicolas Saenz Julienne" To: "Lukas Wunner" Message-Id: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200130_102506_515507_C2662639 X-CRM114-Status: GOOD ( 16.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthias Brugger , Scott Branden , gregkh@linuxfoundation.org, jslaby@suse.com, linux-kernel@vger.kernel.org, Ray Jui , Stephen Boyd , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-serial@vger.kernel.org, matthias.bgg@kernel.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue Jan 28, 2020 at 3:19 PM, Lukas Wunner wrote: > On Tue, Jan 28, 2020 at 01:42:21PM +0100, Nicolas Saenz Julienne wrote: > > I'm testing this by booting directly from RPi4's bootloader. And it > > works as long as I add this to config.txt: > > > > enable_uart=1 > > gpu_freq=500 > > > > Which AFAIK blocks frequency scalin on the GPU and fixes the clock to a > > point where the serial is set at 115200 bauds. > > > > Ideally it'd be nice to be able to query the clock frequency, and > > recalculate the divisors based on that. But I don't know if it's > > feasible at that point in the boot process. > > Well, we don't even support adjusting the baudrate *after* the kernel > has booted. Don't 8250 uarts have a clk divisor? I've seen other 8250 earlycon drivers do this (see 8250_ingenic.c), that said I think it's a lost cause for us. BTW did you had the oportunity to have a go at the patch? > The problem is that in mainline, bcm2835_defconfig contains: > CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y > > Likewise in the Foundation's downstream tree, bcmrpi_defconfig as well > as bcm2711_defconfig and bcm2709_defconfig contain: > CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y > > In contrast to this, we set the following on Revolution Pi devices: > CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y > > Downclocking influences not only the uart1 baud rate but also the > spi0 clock. We attach Ethernet chips to spi0, throughput was > significantly worse with the ondemand governor (which is what we > used previously). We felt that maximum Ethernet performance > outweighs the relatively small powersaving gains. In that regard I suggest you use the upstream cpufreq driver which behaves properly in that regard. It disables GPU freq scaling, so as to change CPU frequencies without SPI/I2C/UART issues. Regards, Nicolas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel