Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6166279rwl; Tue, 4 Apr 2023 08:42:14 -0700 (PDT) X-Google-Smtp-Source: AKy350Zqkbe9XXu9NqYRA0wBJ7AsncmB0fp4kdE3ZZkD0BLPtllIsO69K6jUrrrSsQb7/XTfnrry X-Received: by 2002:a17:903:32ca:b0:1a2:8871:b419 with SMTP id i10-20020a17090332ca00b001a28871b419mr4290153plr.23.1680622934528; Tue, 04 Apr 2023 08:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680622934; cv=none; d=google.com; s=arc-20160816; b=GB33waX3MxqQSBq9W/M6vONUFUbC7kzLvy3AaeFidh/WreqDG1TLGlIkSbBNBa4D5T z46OMHX9vfnsKDIpFg2lrmmEiOeXljRqcgK1xESk10Zj/ToWfOvo2dPPAeQxy4JV3lp/ DB0K+9XfyFAvlKxQrv8hWj/yFg5Xs302iczqOGaDLZSGjopK1R1V4RJ42KyeBh+bibaY O8rjK4gTX68pmDZTQEN8VmjY7RxL01Ar7kvMVtM8VRJoJT7u6dzwPLuVAXkcB6OSOjM9 Q8PNwnOcRqG9bqerncV+XMuh+mr4xROL3cLzMEJARmFKTFkzWQA6RGw5TYLj4hlXZPH8 MDOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=QwPn0u3bG38dEGgFlQUGwGtY+T4/aG5cbnIcsqe3N50=; b=cV2bZ3lW0QNEKoQdAM2uGVtI2jlEALXy0iFZqNyvQlq4mb/bh5a630TA0tZKzG/ZLR FBsSn59Q6Re4jXqU9ve3eTkxo/iaRT2UeyOkP/HZD2FvAW7iUlvi0iridJ50SNwzbXyh y3qULog2Z00deaHDA68v+QKP6Vk29rBWttVf/tQoMxsxZUq/J9LI3f2V35y0KZ0LsPaw eSbf0LHE2ZNXtxXcw1xVDPk3tc66f6JvUxeA0FRp2GFFPLxu5KY/1kdLZ/S2Vvr0vHWE hFeyfOCVM/RN5dTTu2cX1Mp0TWvvKnGmON6QdA9xdFF5yeRQ/cMUOqTI2BXUOSgmUYX1 04eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=INqbPpsh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h22-20020a17090aa89600b002344ef1a33esi10413911pjq.98.2023.04.04.08.41.53; Tue, 04 Apr 2023 08:42:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=INqbPpsh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235899AbjDDPku (ORCPT + 99 others); Tue, 4 Apr 2023 11:40:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235788AbjDDPkf (ORCPT ); Tue, 4 Apr 2023 11:40:35 -0400 Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6464F5259; Tue, 4 Apr 2023 08:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1680622817; bh=gUC07j0BF6Ats3pO8KtZR2khuJGxBN6yLNKDq0ZvG30=; h=Date:From:To:Cc:Subject:X-My-GPG-KeyId:References:From; b=INqbPpsh/s/pyXwwSr3hAKvrhnRGaA9cMvlZ93RrKGcfJFPGWN20zK6g1VSjZpqex 4FXM4fWK4Amlp3oeQBN9XLKYT+xwH4j7d7+TvRFW8l2TCfytSWp6vpnm3J8ypwmRIX kwF8qWypcZFyJJkX9LdNAihL+BOQnlcQoZDNZaBI= Date: Tue, 4 Apr 2023 17:40:17 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Javier Martinez Canillas Cc: Heiko =?utf-8?Q?St=C3=BCbner?= , linux-kernel@vger.kernel.org, Peter Robinson , Caleb Connolly , Jarrah Gosbell , Krzysztof Kozlowski , Martijn Braam , Rob Herring , Tom Fitzhenry , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH] arm64: dts: rockchip: Change serial baud rate for Pinephone Pro to 1.5 MB Message-ID: <20230404154017.7n6rcgqyv3edfahd@core> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Javier Martinez Canillas , Heiko =?utf-8?Q?St=C3=BCbner?= , linux-kernel@vger.kernel.org, Peter Robinson , Caleb Connolly , Jarrah Gosbell , Krzysztof Kozlowski , Martijn Braam , Rob Herring , Tom Fitzhenry , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED References: <20230403175937.2842085-1-javierm@redhat.com> <3738011.44csPzL39Z@diego> <20230404123646.5iiznbhnyoama5pp@core> <87r0szd9q2.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87r0szd9q2.fsf@minerva.mail-host-address-is-not-set> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 04, 2023 at 04:04:53PM +0200, Javier Martinez Canillas wrote: > Ondřej Jirman writes: > > > On Tue, Apr 04, 2023 at 09:51:11AM +0200, Heiko Stübner wrote: > >> Hi, > >> > >> Am Montag, 3. April 2023, 19:59:37 CEST schrieb Javier Martinez Canillas: > >> > This baud rate is set for the device by mainline u-boot and is also what > >> > is set in the Pinebook Pro Device Tree, which is a device similar to the > >> > PinePhone Pro but with a different form factor. > >> > > >> > Otherwise, the baud rate of the firmware and Linux don't match by default > >> > and a 'console=ttyS2,1500000n8' kernel command line parameter is required > >> > to have proper output for both. > >> > >> The interesting question is always if this will break someone else's setup. > >> I've never really understood the strange setting of 1.5MBps, but on the > >> other hand it _is_ a reality on most boards. > > > > Normal users of the phone probably run with UART console disabled, because > > UART is muxed with audio jack output and to enable it they have to add > > console=ttyS2 to the kernel command line and flip a physical switch inside > > the phone. > > > > Fortunately, not sepcifying stdout-path baud rate in the options part > > of the string, will make the serial driver probe for the baud rate from > > the previous boot stage and make the user happy by keeping whatever was > > already set in the bootloader. > > > > As mentioned in the first email of this thread, I tried that but it didn't > work for me. Either using stdout-path = "serial2"; or stdout-path = &uart2; > gives me no serial output with console=ttyS2, I needed to specify the baud > rate explicitly (i.e: console=ttyS2,1500000n8). > > > https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/8250/8250_port.c#L3496 > > > > Is that helper really used by the serial driver in the PinePhone Pro? > (drivers/tty/serial/8250/8250_dw.c), I was meaning to dig why just ttyS2 > was not working but decided that could be a follow-up patch. It's called by univ8250_console_setup in 8250_core.c But looking at it again, this may only be used to match console=uart. https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/8250/8250_core.c#L638 Bummer. > Since chaging to 1.5 MBps seemed to have merits on its own, decided to > post this patch anyways in the meantime. > > > So we can make the kernel just keep the baudrate setup from the previous > > boot stage by: > > > > stdout-path = "serial2"; > > > > Did it work for you? Maybe I'm doing something silly but as mentioned it > didn't work for me with upstream u-boot. I was just eyeballing the code. I didn't test it. kind regards, o. > > regards, > > o. > > > > -- > Best regards, > > Javier Martinez Canillas > Core Platforms > Red Hat >