Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2089142ybl; Thu, 30 Jan 2020 11:10:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxHxKKVC4ZKus28XFHrOpYnDytrLV+boWS2Fh2SCVut1uApYEJCuF4fH47kSKYemWSP0QqH X-Received: by 2002:aca:be09:: with SMTP id o9mr429305oif.177.1580411408127; Thu, 30 Jan 2020 11:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411408; cv=none; d=google.com; s=arc-20160816; b=hS4hRqkZehYxxMc4Y43tkjwxvSWegIvZe3WrwXsbRRuQuq/sWVI0A1EKJ4RDkKgwy+ AP7d8b2gBbQ86hQA45Xgpv+NlXp+Rxfj4lsldbTcrtR9BTUIW1p4McXBUkB+EAx8HpDc HL9tjTkS0uLa8I/sUJg3OppqzHewZddKPLrFvJTwG2FwdqBXgWLsLZgJSndj4VBGAxwK nWol3xaI+SpbmRv/FWZXnDH/BNt1XJw8qKhoJr03d4dAHrYtJvrJ2P8hidY7TZudgbGJ pJrSkvgpJj91DPjHkzKRfqYxPQria4M1HEWPPrg1UaswevrYVhezUnZlNT7h4RJTMZ2Q xd7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:to:from:subject:cc:date :in-reply-to:content-transfer-encoding; bh=lsBKHyyoQGwGeFAYmnU7vh9iIaUZ6QeGKkAL47AXnMw=; b=oF30k6529ON/lz3IJVMx1zTAD3hHldX1xsFyuHbg78Ca9k/mPsJHbCh85w29CvB0Bk cEzLZ1xeY473brGBAU5/HkScex/3hk0xyDmhQS1LPhzhUUiDqk4oLNFX78cROMJYa+kU x2HnRxpwkYcrFKO1C30SoY1afV3Y586Epos8w0fMyhbTIy2eraw5o3Zm+IUd+1FzekFB RR/sx1iBVouxlNIhS2WNwtGU/p5Gv3F1DZFsHN139W8h3Ug2or5m9RaSsOhwqBeHbhlH 22vcsPbSJOe4PoHwxdLOgp3K2XjjbIoiE5A2Rib7rhv4j6jitDgIGN7XSx9zRy/ivDUY KkLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si3322698otq.31.2020.01.30.11.09.55; Thu, 30 Jan 2020 11:10:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729530AbgA3SZF (ORCPT + 99 others); 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