From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62BC3C4338F for ; Sat, 31 Jul 2021 07:12:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DA636101C for ; Sat, 31 Jul 2021 07:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230408AbhGaHM3 (ORCPT ); Sat, 31 Jul 2021 03:12:29 -0400 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]:40342 "EHLO smtp-relay-canonical-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230196AbhGaHM2 (ORCPT ); Sat, 31 Jul 2021 03:12:28 -0400 Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPS id E95143F234 for ; Sat, 31 Jul 2021 07:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627715539; bh=hN6QfGvmrSwTg4tA4I3radaavpm+Sqfgu2IG+IjJCBU=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=B0PAP61XUWJZhkjQiJoFJ6o2+qyJG6f+RbTMjUZ+8LptRgw/A340uWzzIkCh2ZIA6 clw14io+hbIdgN7k7OEGBZ3ntQq+43eecoMqzqMTkhEVJbJ0WzdP06UimgNTVINHQn Aui4gWYVpuRPy2v9LfjcG6G/05xOfpjDaP69dFKpdAtcIEEAHpxuODK2BlJfg09a1u pVoa70KGHRP3MmzBPPOApkiSE0XT8dYcVtNaLifH5YnbvgGjPF3aQro4XKTfOQpTmB yFFcDA1kHzCg4CKw8msRIYJ+ICR0I8MFXQ8q40MEbI+O5m3u9wrrLlZqA2LcTCpgTa BuUQQwE2YQPLw== Received: by mail-ej1-f70.google.com with SMTP id r21-20020a1709067055b02904be5f536463so3739691ejj.0 for ; Sat, 31 Jul 2021 00:12:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hN6QfGvmrSwTg4tA4I3radaavpm+Sqfgu2IG+IjJCBU=; b=OesHTKZX7BQ9jvL+hjSda4uZOZ+Qqd/eDAE6lY7ncn0gsQpwRJJXxnEEQpKi3UnIeR T2h16J5HdvE4ZYBLAxZWGWV39iFwsiIDhgTngoU6QynBAd7pODYZGNTYSRoXigH2SYsw woEDVGFaOlxCQKR04w065lNxSk1I1KxB1PE1WdjWKaXMY5+7K8XP6Lgl9SfTyiWXyX0X cyc78aakp09Peg5ZZbWIIcWGeK6s2c30DFG0Oj1H2BhWV79v4bY4THZf5WKpx+3gLAsu 84alRpIdyxtnQJEnZ9jRJf9/h+dfO1RoyB9OlpE2tJdoP2V0qlhh5hEVPgiUsCBFNPDl DaDQ== X-Gm-Message-State: AOAM530/M51mEwlYDSbr48k9SBfxSbze78DwurwqD/QshdTeuzDMMfth cp+k8Md1t0YFFxUpjj67hC5VnwXzJP0px9d5W9bz1ZNf4/jpkNa2BGxH14mSUy79OMFYE5RyqIV k9PLTD6IiWcMAaTbZuID4i0c3ykStSJLQXakij34= X-Received: by 2002:a50:da0e:: with SMTP id z14mr7925670edj.73.1627715537251; Sat, 31 Jul 2021 00:12:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM+J4ApxUWFlgbSwRrJJR8tujps6FaXF0fw5qP1Ypyvp7qxb82ntIhvndqLnHetlhetnI/Qw== X-Received: by 2002:a50:da0e:: with SMTP id z14mr7925659edj.73.1627715537087; Sat, 31 Jul 2021 00:12:17 -0700 (PDT) Received: from [192.168.8.102] ([86.32.47.9]) by smtp.gmail.com with ESMTPSA id l2sm1339054ejg.37.2021.07.31.00.12.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 31 Jul 2021 00:12:16 -0700 (PDT) Subject: Re: [PATCH 06/12] tty: serial: samsung: Add Exynos850 SoC data To: Sam Protsenko Cc: Sylwester Nawrocki , Chanwoo Choi , Linus Walleij , Tomasz Figa , Rob Herring , Stephen Boyd , Michael Turquette , Jiri Slaby , Greg Kroah-Hartman , Charles Keepax , Ryu Euiyoul , Tom Gall , Sumit Semwal , John Stultz , Amit Pundir , devicetree , linux-arm Mailing List , linux-clk , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Linux Samsung SOC , "open list:SERIAL DRIVERS" References: <20210730144922.29111-1-semen.protsenko@linaro.org> <20210730144922.29111-7-semen.protsenko@linaro.org> <5826bc3e-e9e8-a9bb-4541-21c1b944a60e@canonical.com> From: Krzysztof Kozlowski Message-ID: <3b607569-e97a-9f1b-92a2-a28de5d0e6b6@canonical.com> Date: Sat, 31 Jul 2021 09:12:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 31/07/2021 01:10, Sam Protsenko wrote: > On Fri, 30 Jul 2021 at 19:05, Krzysztof Kozlowski > wrote: >> >> On 30/07/2021 16:49, Sam Protsenko wrote: >>> Add serial driver data for Exynos850 SoC. This driver data is basically >>> reusing EXYNOS_COMMON_SERIAL_DRV_DATA, which is common for all Exynos >>> chips, but also enables USI init, which was added in previous commit: >>> "tty: serial: samsung: Init USI to keep clocks running". >>> >>> Signed-off-by: Sam Protsenko >>> --- >>> drivers/tty/serial/samsung_tty.c | 13 +++++++++++++ >>> 1 file changed, 13 insertions(+) >>> >>> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c >>> index 75ccbb08df4a..d059b516a0f4 100644 >>> --- a/drivers/tty/serial/samsung_tty.c >>> +++ b/drivers/tty/serial/samsung_tty.c >>> @@ -2814,11 +2814,19 @@ static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = { >>> .fifosize = { 64, 256, 16, 256 }, >>> }; >>> >>> +static struct s3c24xx_serial_drv_data exynos850_serial_drv_data = { >>> + EXYNOS_COMMON_SERIAL_DRV_DATA_USI(1), >>> + .fifosize = { 0, }, >> >> This does not look correct. You rely on samsung,uart-fifosize property >> but it is optional. >> > > Good point. I will replace fifosize elements (in patch series v2) with > this code (the reasoning is below): > > .fifosize = { 256, 64, 64, 64 } > > TRM mentions that USI block has configurable FIFO of 16/32/64/128/256 > byte. In vendor kernel they are setting default values in dtsi instead > of driver, that's where fifosize = { 0 } appeared from. And in vendor > dtsi they set 256 for serial_0 (USI UART instance), 64 for serial_1 > (CMGP0 UART instance) and 64 for serial_2 (CMGP1 UART instance). I > tested 256 and 64 for serial_0 (which is used for serial console) > > As for fifosize array elements count: though it's possible to > configure up to 7 UARTs in Exynos850 (it has 5 USI blocks and 2 CMGP > blocks, which can be configured as USIs), in a regular case it's only > 3 UARTs (1 in USI and 2 in CMGP). This is how it's done in vendor's > device tree, and I doubt someone is going to need more than 3 serials > anyway, looks like very specific case for a mobile SoC. But > CONFIG_SERIAL_SAMSUNG_UARTS_4=y is set by default when using arm64 > defconfig, and I'd like to keep minimal delta for this defconfig for > now. > > Hope you are ok with this? > Yes, sounds good. Best regards, Krzysztof From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CCE1C4338F for ; Sat, 31 Jul 2021 07:14:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C40960F35 for ; Sat, 31 Jul 2021 07:14:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5C40960F35 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BTSreJYs9GHGEfj2xJl51ceIZlRVyxC5EazQ2b2laYs=; b=DqlnjIUTd8Cd7aX+kVzQzmYHJS 8pVD4Otl6agR+lL8UX1SchKoSpWAS1Y8qcMReHdxN/KbsZSYiShaI6pliUbKFE1jtmIKwUBxZbnJf sL9inVvEZeSGMVibKzdrFJKj9bvSoz4I7O9xYQKnO/INyRunzwi2ojaELDAvxVyMrrqbpFhTnAVeH //OapVphaI1H+cGnUZlVIHsdMfXdUNwUY9f1pX70JxrYMIsb6qqfvAOKzbQFa4GumJbnXNSmNhKkw Ej1s6OZe/ZVEljVYnNh0ELH3Sa+mKuUV+Ot9KY/7s+sFLv+ut8wVlVvwtaDT/e8noQpmFK9hlbQ9v f36tF2Vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9jAb-00B8vo-3W; Sat, 31 Jul 2021 07:12:29 +0000 Received: from smtp-relay-canonical-1.canonical.com ([185.125.188.121]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9jAW-00B8v4-St for linux-arm-kernel@lists.infradead.org; Sat, 31 Jul 2021 07:12:26 +0000 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id BB8623F102 for ; Sat, 31 Jul 2021 07:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627715537; bh=hN6QfGvmrSwTg4tA4I3radaavpm+Sqfgu2IG+IjJCBU=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=Blszf7jNHtc5VEiNUz+oeptBTg7kztCTfL1HT8JIG8EQ9SL9TYPI+5BGnG96PnQ5h pklrMcHAsmzTKRe2NkJrW0Sc1MfHYI1/NDAyOVdgTp/hgnORcT/mFDMopG7FT0s533 6OU8g/1DMH541yEfnGlwZyUsh3YR3JZa6lRRsNWXRbHXnBw0rQjk+PsQaPF+ZsOZM1 3Q5kQLP43/H3WSnbMwbtKkVEBAeDRt3wbWjZlge4O6PmvQjXfSm3PRziI7UK4WWCqQ SyehFD3S44S1emMc1xa0rlvQ5kg3Q6+rhMKG2M8t/pD6TQIKo0HSqtick27ABdRXFh p/gGUGQHVIVIg== Received: by mail-ej1-f71.google.com with SMTP id e8-20020a1709060808b02904f7606bd58fso3730516ejd.11 for ; Sat, 31 Jul 2021 00:12:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hN6QfGvmrSwTg4tA4I3radaavpm+Sqfgu2IG+IjJCBU=; b=uE4SvSY2c8VHQSxngcY3gipBXFmy3UZ8r5UByo8eW9D3z6k89p3gDtNSQGId3qxWn7 gIVkHh96efmfAS7aqWH1e+FesPDIWobRSJtLBKiqnfdEGi9Uuzh3b7R6UwwD9vOWglze eGtoTbNZEYbvORGHYTK1Ih6NyFfMjRa79pRM9Qcq7nfPPbM16gdCeyGt6LDKWfc8pnZN XLtZyA+nk/CqN3CA1zA0osyFHwWft6l/RqKz3rOjqYzBqMGvMc8c5gHBlUSbFCK6DJ5l EyDQaFjqKdtgiagYKZJMP5fj87vGgyMhtSGtQPGTBz2AaWoIJeee/uEM2vq7aika/+1R 4unA== X-Gm-Message-State: AOAM530zpzbmYDLlhwtDY2/noEV5oCoi5tfBtUdco/LfzrpcDH59pMtP HMZqjSmSZyoc2tCJL5bMOKOaU29BcZfXmdLdx4QXwbraOKj93TcFqA055t29Mrkyp5/NfRJLVcf rvdXkZICIudF3xLIKOvBj0mjxoAlI8NEfFGnmGgsehtO+pBaSBO2l X-Received: by 2002:a50:da0e:: with SMTP id z14mr7925681edj.73.1627715537252; Sat, 31 Jul 2021 00:12:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM+J4ApxUWFlgbSwRrJJR8tujps6FaXF0fw5qP1Ypyvp7qxb82ntIhvndqLnHetlhetnI/Qw== X-Received: by 2002:a50:da0e:: with SMTP id z14mr7925659edj.73.1627715537087; Sat, 31 Jul 2021 00:12:17 -0700 (PDT) Received: from [192.168.8.102] ([86.32.47.9]) by smtp.gmail.com with ESMTPSA id l2sm1339054ejg.37.2021.07.31.00.12.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 31 Jul 2021 00:12:16 -0700 (PDT) Subject: Re: [PATCH 06/12] tty: serial: samsung: Add Exynos850 SoC data To: Sam Protsenko Cc: Sylwester Nawrocki , Chanwoo Choi , Linus Walleij , Tomasz Figa , Rob Herring , Stephen Boyd , Michael Turquette , Jiri Slaby , Greg Kroah-Hartman , Charles Keepax , Ryu Euiyoul , Tom Gall , Sumit Semwal , John Stultz , Amit Pundir , devicetree , linux-arm Mailing List , linux-clk , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Linux Samsung SOC , "open list:SERIAL DRIVERS" References: <20210730144922.29111-1-semen.protsenko@linaro.org> <20210730144922.29111-7-semen.protsenko@linaro.org> <5826bc3e-e9e8-a9bb-4541-21c1b944a60e@canonical.com> From: Krzysztof Kozlowski Message-ID: <3b607569-e97a-9f1b-92a2-a28de5d0e6b6@canonical.com> Date: Sat, 31 Jul 2021 09:12:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210731_001225_242516_8A1FAA20 X-CRM114-Status: GOOD ( 28.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 31/07/2021 01:10, Sam Protsenko wrote: > On Fri, 30 Jul 2021 at 19:05, Krzysztof Kozlowski > wrote: >> >> On 30/07/2021 16:49, Sam Protsenko wrote: >>> Add serial driver data for Exynos850 SoC. This driver data is basically >>> reusing EXYNOS_COMMON_SERIAL_DRV_DATA, which is common for all Exynos >>> chips, but also enables USI init, which was added in previous commit: >>> "tty: serial: samsung: Init USI to keep clocks running". >>> >>> Signed-off-by: Sam Protsenko >>> --- >>> drivers/tty/serial/samsung_tty.c | 13 +++++++++++++ >>> 1 file changed, 13 insertions(+) >>> >>> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c >>> index 75ccbb08df4a..d059b516a0f4 100644 >>> --- a/drivers/tty/serial/samsung_tty.c >>> +++ b/drivers/tty/serial/samsung_tty.c >>> @@ -2814,11 +2814,19 @@ static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = { >>> .fifosize = { 64, 256, 16, 256 }, >>> }; >>> >>> +static struct s3c24xx_serial_drv_data exynos850_serial_drv_data = { >>> + EXYNOS_COMMON_SERIAL_DRV_DATA_USI(1), >>> + .fifosize = { 0, }, >> >> This does not look correct. You rely on samsung,uart-fifosize property >> but it is optional. >> > > Good point. I will replace fifosize elements (in patch series v2) with > this code (the reasoning is below): > > .fifosize = { 256, 64, 64, 64 } > > TRM mentions that USI block has configurable FIFO of 16/32/64/128/256 > byte. In vendor kernel they are setting default values in dtsi instead > of driver, that's where fifosize = { 0 } appeared from. And in vendor > dtsi they set 256 for serial_0 (USI UART instance), 64 for serial_1 > (CMGP0 UART instance) and 64 for serial_2 (CMGP1 UART instance). I > tested 256 and 64 for serial_0 (which is used for serial console) > > As for fifosize array elements count: though it's possible to > configure up to 7 UARTs in Exynos850 (it has 5 USI blocks and 2 CMGP > blocks, which can be configured as USIs), in a regular case it's only > 3 UARTs (1 in USI and 2 in CMGP). This is how it's done in vendor's > device tree, and I doubt someone is going to need more than 3 serials > anyway, looks like very specific case for a mobile SoC. But > CONFIG_SERIAL_SAMSUNG_UARTS_4=y is set by default when using arm64 > defconfig, and I'd like to keep minimal delta for this defconfig for > now. > > Hope you are ok with this? > Yes, sounds good. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel