Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4205981rwi; Mon, 17 Oct 2022 03:06:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6MTElnGBbwMK03OVVB98MedQxy+oQXhSpPer5iP81JkOSCM+hKOKTqDT28ZMWtAITn9soa X-Received: by 2002:a17:902:d4d1:b0:185:52c4:f4c6 with SMTP id o17-20020a170902d4d100b0018552c4f4c6mr3691712plg.154.1666001186409; Mon, 17 Oct 2022 03:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666001186; cv=none; d=google.com; s=arc-20160816; b=xOXDTRu0YaM00blJ6aY9oQoeiJbKnHdBXb6+rTLOHZDjYZgvVznGphMLMUtix1cutH GZxwMDrzU+0hivIIW1DWgSMktQbgIeeJJCooeajCPRSeGuJp2aDNZoGFPy8ebysdtCzx v8+7O5t1mlugOKiGXXzOz6s7a+yXLHJZ5GfnINuh0ygTcNGgM2uL9FBjOelRUvkGBDzs KinK88YMpCps3QZZv1CzyafX/dfYqJYc4EcTv+dJ94TuNLxSU7M7A4VwYdz1/4LIt8rQ kF8HKme2JslzVfgPR9AnlbSixttkb92QHDD+Skm2mLuqmwm0vzxdYoaIgMkOc20cPrsL mpHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=rMKReQwIIVROnhNRRcRSrMq5WTBa2N/odX1/c/GVkLg=; b=hv4gg2ruXGnWANu36lVPX3S3nZO0JFVC2KI3vQG3/LoEVS+gFI57ibGGPodQzkvskR OZguuRr27GkC1y4tDMxUQRbnRNjG+K78oN1ZGwoQ8fxc+LNGsckBFPbdBxnEsj0xzXDE Klo3Dv0WT9uXvjku+na2Z2NhR/f7j69zbhxJAFUtw12WXlCPkarMGXAfHCERwXjh5vAb HRCz9YvrBnlX0B1qQ3+hXlw2AukePM/xpbGDg/dbdf01nc7tzKn4gLnkfYV7qW+lm2K1 6zhpooL0gJF/wr6D0DAFTtfSRHfdx2PmAT/zt5z6BTwHCkJqvjrH5QvXS1LPyZdfQKgw XovA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=kJFze+j8; 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=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y206-20020a6264d7000000b0053e8d0c9909si10502302pfb.221.2022.10.17.03.06.14; Mon, 17 Oct 2022 03:06:26 -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=@crapouillou.net header.s=mail header.b=kJFze+j8; 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=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230519AbiJQJcJ (ORCPT + 99 others); Mon, 17 Oct 2022 05:32:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229796AbiJQJcH (ORCPT ); Mon, 17 Oct 2022 05:32:07 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 099E6DFB9; Mon, 17 Oct 2022 02:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1665999125; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rMKReQwIIVROnhNRRcRSrMq5WTBa2N/odX1/c/GVkLg=; b=kJFze+j8yHYKpty5/eK7EP4QDoNyFl8juKwNPQ0r/r00EkgR/UUHdSeWh248/eDbhy5vM9 lLtvhNSmJbbkSmtDk9RZnKf9+JDMNgNdtt4b0qpPqp3OiaGUj+dEecyo/3I5vcY+SX5Gi2 W/1Zf15YfFPYNw2yS+MHt/IZjc6Zn08= Date: Mon, 17 Oct 2022 10:31:53 +0100 From: Paul Cercueil Subject: Re: [PATCH 7/8] serial: 8250/ingenic: Add support for the JZ4750/JZ4755 SoCs To: Siarhei Volkau Cc: Arnd Bergmann , kernel test robot , kbuild-all@lists.01.org, Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Vinod Koul , Greg Kroah-Hartman , Thomas Bogendoerfer , Linus Walleij , Jiri Slaby , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-serial@vger.kernel.org, linux-mips@vger.kernel.org, GPIO SUBSYSTEM Message-Id: <555WJR.ESJD0KDHOG3S@crapouillou.net> In-Reply-To: References: <20221009181338.2896660-8-lis8215@gmail.com> <202210100607.YdxoR0tD-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 Hi Siarhei, Le dim., oct. 16 2022 at 21:39:48 +0300, Siarhei Volkau=20 a =C3=A9crit : > =D1=87=D1=82, 13 =D0=BE=D0=BA=D1=82. 2022 =D0=B3. =D0=B2 21:56, Siarhei V= olkau=20 > : >=20 >> > Just disable the divider in ingenic_fixup_fdt() in >=20 >> I'll check that. >=20 > I checked that approach: serial seems to be working as expected, > but not all the time: there's a time period when the CGU driver > started but serial console driver is still early one. > In my case UART produces garbage at that period since CGU > needs to enable clock divider back: ext is 24MHz but 12MHz > required for audio codec and USB to function properly. What I'd do, is just force-enable it to 12 MHz in ingenic_fixup_fdt(),=20 since the programming manual basically says that 24 MHz does not work=20 properly. Then in the earlycon setup code hardcode the /2 divider with a big fat=20 comment about why it's there. Cheers, -Paul > So I think Arnd's approach: >=20 >> the hardware should already be in a working state, >> with no need to touch it during early boot. >=20 > shall resolve the problem, although I can't check it on all supported > hardware. >=20 > BR, > Siarhei