From patchwork Fri Sep 15 07:25:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 140395 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1003532vqi; Fri, 15 Sep 2023 05:24:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/pcxu1JIdipIAkCMiDUNLNzE/N6qMFbuWXYDJ2snAHosfudzEtuGa5ePrMsvodBPllXTY X-Received: by 2002:a05:6a21:7988:b0:14d:5580:8ff0 with SMTP id bh8-20020a056a21798800b0014d55808ff0mr1389278pzc.25.1694780683169; Fri, 15 Sep 2023 05:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694780683; cv=none; d=google.com; s=arc-20160816; b=EDuwYQblBkyswi2buvI5mYIj8+iigu2RqNk4W9Lktiuqny8DCysOnzfWIJQoASG6G5 YYiLW+3A5BgVZGh32AlZxyLs2+GCrZ7bfVuhjfMDOhtFdWwXw5CCWp504K6DlblgWwZZ TlCX+nIM83m9e0G5m+GhGt39qLJC8xhoiaDs5TcVuG8uKSjMB7A29JOjPU09PAkA+kp2 RmyQRTIxxaw7DTG/u/t/p6Gs8UGoGaZAdE3gCPJhFE3JvxKty7/VSHQJMQue4EZjFOdJ OHFjYSZ19ubq2jFDcU1TZ4h4oVey09kt+z7+7ZJU+n7zPoh9MOCyyBhzsudYkl+KQbNR uvFQ== 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 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f20-20020a631014000000b00565f4fb0999si3076474pgl.610.2023.09.15.05.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 05:24:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; 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 23.128.96.33 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 0C66D81BB4DD; Fri, 15 Sep 2023 00:26:49 -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 S232125AbjIOH01 (ORCPT + 33 others); Fri, 15 Sep 2023 03:26:27 -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 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:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777093180903742809 X-GMAIL-MSGID: 1777106349289964284 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);