Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4598048rdb; Fri, 15 Sep 2023 07:05:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0SUNb+HtJyNLbt7rkZE8fJdjZd30bAqFhkEHcwKVR4CAX9cjv9eUyRkzNIWgIeBoNIp/w X-Received: by 2002:a05:6a20:5652:b0:155:2359:e28c with SMTP id is18-20020a056a20565200b001552359e28cmr1716519pzc.9.1694786755116; Fri, 15 Sep 2023 07:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694786755; cv=none; d=google.com; s=arc-20160816; b=UQKBW6HRwQYWNx1FB/i/W5rzRtxccErH3C0CWUqWcW+YwkN+haYeq2QcH7DpvJLhMR H/uD9ze32mzG6KxIsKxO+ItAKoh7kQJwwpBRGmG3pij0b4Cec4WpmM5HgrdfpzKCtzFS yEWMfUSZ1j+6Yk8QHSXLCh58GOjcs1y+WII6472WyIjrXMx/ymLbKhddWfQWzkONIFjO ijB6TSnBlvN4Ea+ZzXWTCGGbu1D7Y4qDiX2ZFSsirKnImk0X8pTX7Y0nKqR46aizs+J6 a7Ld6qpW8BTQBGprc3NNY9DvxOhtieGXmmamu45pyC6A4TJ24+JcdFYfqBP7QNef4+kN j0Uw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=L2LlgryffFXqAnsB0AaplLotGa39fDQAXZM7QJ4rjkg=; fh=qcStU/cXmyi6QQmh2OH0Y187/PpiTFL4etZ28pI2hrA=; b=sesw9VTSDsp5j1hrhM2ZFwIh9ET4LAeLF3kwd8b2J/vF67//NxpJ+eaQzsA+MibA6K 17mCntjceHArVR+yvNIbSM3EtxMITyLmM1UVeLdKpTPl69ySuVqau88Pg1Di37s3BD85 vdsuoB6avjAmFur0dgVZm5R5nyKuRUm1DyzDGigIeZdZnAprcgwvgvc1P8fTEGVlq5kj tHJ/+FyM+NTaEihSZkZUr7r3mZRkdRshxtCPIF7mrzcQTPvBbEYLR15hwnl512fybZpm JspXMhLWKYXKf0JIvWpDtU4RK4e0GyWsPlxuDGMjWVMJ0zHIvXRCgI7lUFUH/nFcq2cR bkbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Snl9Y5XH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b005638355e990si3325149pgb.410.2023.09.15.07.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 07:05:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Snl9Y5XH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A3BD981A9EEF; Fri, 15 Sep 2023 00:26:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbjIOH00 (ORCPT + 99 others); Fri, 15 Sep 2023 03:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232830AbjIOH0X (ORCPT ); Fri, 15 Sep 2023 03:26:23 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C1319A5; Fri, 15 Sep 2023 00:26:14 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1bf55a81eeaso14698665ad.0; Fri, 15 Sep 2023 00:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694762774; x=1695367574; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=L2LlgryffFXqAnsB0AaplLotGa39fDQAXZM7QJ4rjkg=; b=Snl9Y5XHaZKMjP5OADSAZuSBJ5RqTWFsYoPiVOdg7FvjIMo/mBJ3IsMWEyrfU7OE0i xDrzBxwRF2+iO7kh8MzGFkb/nzlh4Yyp3oqweDxiH8iMyByup/5pjXrmUjcKNpNco2N+ Jjej64Kqdrhe5beAa28R0pYgMBvd9Ujqo1ItGG4JGqMMIba14cIJaojHKwNNvN/XKW9J FXHWjwrrx3wbX5HRXxhS+6Tug18rmgXxYEh8xNfSOEnbIFUf8I7xDhRPR1afz7ZgyVQi V8D+Bvgj6D4Ooax9YhYABvAYoJH6kiA/wCUIAW3qXy8KToFM9wi3hItOvfqp76Zzkyfm +9pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694762774; x=1695367574; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=L2LlgryffFXqAnsB0AaplLotGa39fDQAXZM7QJ4rjkg=; b=cwrS2KtgMe6vjY8iquiolgKk3d+rId7hg8qnEGA+01gZwIgsByFC7Gjnp5nR6nDe4B kmEy8FbLvzUJCJSylraSafg5bBL0vmdOr4Y5mqyMg/72jfEKL3QN63D5z00pVrcUmf95 I1vEhRhkDoZrdqatplRvXaRFVkl4B4ykaRaoRSZczV45gkL6bskZFU21M4LSHCViMiEd XEZ03oeuL7jjQz38FwsE3RBGX+zYGS34nJxFYrLyXk/dbjchv9aG2fE6EBXmLTEpRbyz QcmW6huQwxIVdfmR5taNZKjAg/fZbjmyRO9X2khRjMCLQcMiPjhs/Ygj6018Qe1TgYhD ORZw== X-Gm-Message-State: AOJu0YxjYeUODBHfsU2ZzN/6uJJugpOhKNffnL928uH8K0fCzDyTZZiK 2wgX6TPH2UOV4FMuL9aObnI= X-Received: by 2002:a17:902:6903:b0:1bb:b855:db3c with SMTP id j3-20020a170902690300b001bbb855db3cmr667277plk.41.1694762773826; Fri, 15 Sep 2023 00:26:13 -0700 (PDT) Received: from localhost.localdomain ([222.95.63.58]) by smtp.gmail.com with ESMTPSA id m2-20020a170902768200b001acae9734c0sm2752110pll.266.2023.09.15.00.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 00:26:13 -0700 (PDT) From: Wang Chen X-Google-Original-From: Wang Chen To: linux-riscv@lists.infradead.org, conor@kernel.org, aou@eecs.berkeley.edu, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jszhang@kernel.org, guoren@kernel.org, chao.wei@sophgo.com, xiaoguang.xing@sophgo.com, Emil Renner Berthing Subject: [PATCH 10/12] serial: 8250_dw: Add Sophgo SG2042 support Date: Fri, 15 Sep 2023 15:25:58 +0800 Message-Id: <20230915072558.118325-1-wangchen20@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 15 Sep 2023 00:26:31 -0700 (PDT) From: Emil Renner Berthing Add quirk to skip setting the input clock rate for the uarts on the Sophgo SG2042 SoC similar to the StarFive JH7100. Signed-off-by: Emil Renner Berthing --- drivers/tty/serial/8250/8250_dw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index f4cafca1a7da..6c344877a07f 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -770,7 +770,7 @@ static const struct dw8250_platform_data dw8250_renesas_rzn1_data = { .quirks = DW_UART_QUIRK_IS_DMA_FC, }; -static const struct dw8250_platform_data dw8250_starfive_jh7100_data = { +static const struct dw8250_platform_data dw8250_skip_set_rate_data = { .usr_reg = DW_UART_USR, .quirks = DW_UART_QUIRK_SKIP_SET_RATE, }; @@ -780,7 +780,8 @@ static const struct of_device_id dw8250_of_match[] = { { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data }, { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data }, { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data }, - { .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data }, + { .compatible = "sophgo,sg2042-uart", .data = &dw8250_skip_set_rate_data }, + { .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, dw8250_of_match); -- 2.25.1