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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33103C433EF for ; Sun, 5 Dec 2021 16:24:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235903AbhLEQ1v (ORCPT ); Sun, 5 Dec 2021 11:27:51 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:56298 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235871AbhLEQ1u (ORCPT ); Sun, 5 Dec 2021 11:27:50 -0500 Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (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-internal-1.canonical.com (Postfix) with ESMTPS id F2DF63F1B8 for ; Sun, 5 Dec 2021 16:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638721461; bh=nbJ6HUZTiIpY2dLLhX4P5MU4lthn/nI4dze09TvpBwY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FrDbT8zY0mOFyOHsL8w0TZ5pRkPNLG8TTZ+bj4cDbsFgLWK7uno29d4JV3gnc6xyV NoJXELsJuWLGni5DBIYvs7eErG7jKoAoisZ3H2xXhgSoGpU7v5PN25amCNS6JwBHEd mxmF8JfRQAq1zYgTyUpWtrUzjgABTbUYIJUF8VUgFGxQOIZTNXtA30kIos0pc3Rsfe RqFfNfdYJWl5OhRn+D7RE5/t8H00nTDOnqPog1LuXqSmezUHpHiOG/eisFw1NTU6Sp WfQsvVfDywo4/wnnIzBgwJDO6OL9FHs57f3pA3Xn71/motLTuCp1kQA4RqaB+ouqeT v72jFX2JFYXvw== Received: by mail-lf1-f72.google.com with SMTP id j9-20020a05651231c900b004037efe9fddso2654827lfe.18 for ; Sun, 05 Dec 2021 08:24:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=nbJ6HUZTiIpY2dLLhX4P5MU4lthn/nI4dze09TvpBwY=; b=I63WmqKSu0ZEC2eBK5l9UlA9j4HbG21Cjj4cCMKfotR3HWNS+tvu+eTIBuops2K2PO nzpeQY6tUGU+WBcyCGkOXRNaqnAxLb8Xum70UJiEy8Ly2b00uefQlQINtoMc0+rp7h+3 dJMK7c/WdGm6Ep69jquITh7ZLWZaVN8pxRUu5e9k2z5Q4BtTvwgQjVo7NWk48m0juwju P3lbc/rt6vmK04T6Wf0L/06/TMrRhGp0yybCxCIisEgVHkxrIJbdGan+CK5vKwsFnJUz MO7Z7qWK29ZD/GjZUqPNlh8/MaSF8FDF93sav8Hk8Dq4ayG+t9YIWrtaAYS7Yue9x8mt uvcg== X-Gm-Message-State: AOAM533p/N+Teu++wN5aujv4qVbR02XRSyRqQmwbrA7lWj5TxPS0Sozk 3IomeR/mxYJ1UrHar86CAl52AExA6jFv5ytYK4f5F1g5JUWzN8KJLCmsb+ML+yAWxezE53GeS9o a+TL/Urejs1JhS1jWwhGgrTFjNPzSM1vjmGwXjfYAwg== X-Received: by 2002:a05:6512:1510:: with SMTP id bq16mr28585903lfb.628.1638721460304; Sun, 05 Dec 2021 08:24:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR/xCJPwKB2U8RdTOYNbXSPYhS9ES4jpT5RpBqrBntCiLjZSPJ+9rYbwp9ILjuquAir6a5Hw== X-Received: by 2002:a05:6512:1510:: with SMTP id bq16mr28585885lfb.628.1638721460121; Sun, 05 Dec 2021 08:24:20 -0800 (PST) Received: from [192.168.3.67] (89-77-68-124.dynamic.chello.pl. [89.77.68.124]) by smtp.gmail.com with ESMTPSA id l5sm1102009ljh.66.2021.12.05.08.24.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Dec 2021 08:24:19 -0800 (PST) Message-ID: Date: Sun, 5 Dec 2021 17:24:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH v3 0/5] soc: samsung: Add USI driver Content-Language: en-US To: Sam Protsenko , Rob Herring , Greg Kroah-Hartman Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org References: <20211204195757.8600-1-semen.protsenko@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <20211204195757.8600-1-semen.protsenko@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/2021 20:57, Sam Protsenko wrote: > USIv2 IP-core provides selectable serial protocol (UART, SPI or > High-Speed I2C); only one can be chosen at a time. This series > implements USIv2 driver, which allows one to select particular USI > function in device tree, and also performs USI block initialization. > > With that driver implemented, it's not needed to do USI initialization > in protocol drivers anymore, so that code is removed from the serial > driver. > > Because USI driver is tristate (can be built as a module), serial driver > was reworked so it's possible to use its console part as a module too. > This way we can load serial driver module from user space and still have > serial console functional. > > Design features: > - "reg" property contains USI registers start address (0xc0 offset); > it's used in the driver to access USI_CON and USI_OPTION registers. > This way all USI initialization (reset, HWACG, etc) can be done in > USIv2 driver separately, rather than duplicating that code over > UART/SPI/I2C drivers > - System Register (system controller node) and its SW_CONF register > offset are provided in "samsung,sysreg" property; it's used to > select USI function (protocol to be used) > - USI function is specified in "samsung,mode" property; integer value > is used to simplify parsing > - there is "samsung,clkreq-on" bool property, which makes driver > disable HWACG control (needed for UART to work properly) > - PCLK and IPCLK clocks are both provided to USI node; apparently both > need to be enabled to access USI registers > - protocol nodes are embedded (as a child nodes) in USI node; it > allows correct init order, and reflects HW properly > - USI driver is a tristate: can be also useful from Android GKI > requirements point of view > - driver functions are implemented with further development in mind: > - we might want to add some DebugFs interface later > - some functions might need to be revealed to serial drivers with > EXPORT_SYMBOL(), and provide somehow pointer to needed USI driver > instance > - another USI revisions could be added (like USIv1) > > Changes in v3: > - Renamed compatible from samsung,exynos-usi-v2 to samsung,exynos850-usi > - Used clk_bulk API instead of handling each clock separately > - Spell check fixes and coding style fixes > - Improved dt-bindings doc > > Changes in v2: > - Renamed all 'usi_v2' wording to just 'usi' everywhere > - Removed patches adding dependency on EXYNOS_USI for UART/I2C/SPI > drivers > - Added patch: "tty: serial: samsung: Fix console registration from > module" > - Combined dt-bindings doc and dt-bindings header patches > - Reworked USI driver to be ready for USIv1 addition > - Improved dt-bindings > - Added USI_V2_NONE mode value > > Sam Protsenko (5): > dt-bindings: soc: samsung: Add Exynos USI bindings > soc: samsung: Add USI driver > tty: serial: samsung: Remove USI initialization > tty: serial: samsung: Enable console as module > tty: serial: samsung: Fix console registration from module > All this looks good to me. The serial driver changes should come together with this one (usi driver is now a dependency for them). If I am correct, mention this please in future cover letter (if there is such). I will still need DTSI changes for Exynos Auto v9 and confirmation that is not being used downstream and breaking DTB ABI is okay. Because this will be a non-bisctable and also a DTB ABI break. 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A4D95C433F5 for ; Sun, 5 Dec 2021 16:26:34 +0000 (UTC) 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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Xbyb8EJQ85V1Seh+wSKkBF8YX7Cidgouim4KbdW1zrI=; b=Hdvun4BiB68Pkj Z6gKEroselCEIFsO/2tGnCq/jrBQc0qDOQQ2kT3jCYrBBQdWpCxZ9oUrd2+nURpWzBWhaTw3/Zb66 adUZIjRTINlspcooZDIzD3dQrpgVRWKsKJYRhYqBoBqK7PEwdcx71xRVvc+OLi8tQ0JTOkSdWlmtY uv0MVdrY+pQOHIvldO5JyGVgfXaKU7vJBMlDvcFAsgI7T8006B/V2x6ZFt0c0kZ5u/Uy9BKlFO5lC Y8UVGilp8fF8Rptg3ChFCpTfcvhCwnq5PVDLcMz97LDotfmwJ52p60GCinZRXFCfQrRbtbhcymDv9 IcB5BJ80zfO7o0ebWVag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtuJV-001hE5-L8; Sun, 05 Dec 2021 16:24:33 +0000 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtuJR-001hD9-Oo for linux-arm-kernel@lists.infradead.org; Sun, 05 Dec 2021 16:24:31 +0000 Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (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-internal-0.canonical.com (Postfix) with ESMTPS id F280E3F1F3 for ; Sun, 5 Dec 2021 16:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638721460; bh=nbJ6HUZTiIpY2dLLhX4P5MU4lthn/nI4dze09TvpBwY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ESL1PUKxHCStbP8IGj2nuUY3GVanXkvWcZf+SI/LgBOkRqBTIHn4ib7iAImu73/kF DeKkeRLksVzFqLJIysRcjTihcj0O2TBtGuimqf8pgw4zkzXlsYGTLt77Q6vPgsMCZh tPDI0f4OSaTAKeopDflgG9l9szbb6SYwIRYBRvwwC8RnYkJBai7emyQ+GRY0Cnez33 54c4Suvv21DOwdyEMK1g2AXDBoeOyfuUIpahq5Xlz1wFD2ZwmlAMIhAPJgSbBEQR7H LN+EG8GKGfD0NaoiHEPHhIpkP2bWAzQ8GvKSkj8md4WAHE9nJsxtQzJRc6rPy7pljf PUH1jbWhIZfGQ== Received: by mail-lf1-f69.google.com with SMTP id i6-20020a0565123e0600b00417d29eede4so2664957lfv.12 for ; Sun, 05 Dec 2021 08:24:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=nbJ6HUZTiIpY2dLLhX4P5MU4lthn/nI4dze09TvpBwY=; b=ZrrxBQXgGZCZ9C7GNId2x26J+HD5jTwrhQ3qkhixXp34hcwUdywl45UM2lxem29CH2 nAT2TPnv2FWDf6e7eUOcsIpoRrxx3HdtEgRV43q+NXYzbSEUODf80QoIM67qGl1y+KUh 9/L5HEMETuiucIjVYHocnMyUgK8i417pULn2qlhhTYc64q8mbo2pRYGiPFfLjHr+LGZE 0abFWlLk723ehNZUNGk+xO1bqIYgwa0YLIY+L0RwGqvOxdJ5vxU4kan3mMoBPXS0pVb0 97U/xrquSO8cpaD2a5ET5BWU4R42cWJlM2ywt4tZXWpEKnBz0wmV2yeMCIDEYqwjA/tl 4zAw== X-Gm-Message-State: AOAM533yMWr2ydD7KX3SWdmqnNtt7enyhkS7Yx6eQ30tw2nKPA5UvzvK Gj1jduN54jAxc0QnGHJkSS16rocjOgBfmdmXp9JL0YhCvbe6wUtdfaeQ46pnLWEAJZygZDSdKyv 9pniZ8WAhrQQXRr4ONYCaIZOterDzenwXIfMHJKIHnrn75UzTiZ8c X-Received: by 2002:a05:6512:1510:: with SMTP id bq16mr28585909lfb.628.1638721460346; Sun, 05 Dec 2021 08:24:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR/xCJPwKB2U8RdTOYNbXSPYhS9ES4jpT5RpBqrBntCiLjZSPJ+9rYbwp9ILjuquAir6a5Hw== X-Received: by 2002:a05:6512:1510:: with SMTP id bq16mr28585885lfb.628.1638721460121; Sun, 05 Dec 2021 08:24:20 -0800 (PST) Received: from [192.168.3.67] (89-77-68-124.dynamic.chello.pl. [89.77.68.124]) by smtp.gmail.com with ESMTPSA id l5sm1102009ljh.66.2021.12.05.08.24.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Dec 2021 08:24:19 -0800 (PST) Message-ID: Date: Sun, 5 Dec 2021 17:24:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH v3 0/5] soc: samsung: Add USI driver Content-Language: en-US To: Sam Protsenko , Rob Herring , Greg Kroah-Hartman Cc: Jaewon Kim , Chanho Park , David Virag , Youngmin Nam , devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org References: <20211204195757.8600-1-semen.protsenko@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <20211204195757.8600-1-semen.protsenko@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211205_082430_001485_2392A6ED X-CRM114-Status: GOOD ( 29.85 ) 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 04/12/2021 20:57, Sam Protsenko wrote: > USIv2 IP-core provides selectable serial protocol (UART, SPI or > High-Speed I2C); only one can be chosen at a time. This series > implements USIv2 driver, which allows one to select particular USI > function in device tree, and also performs USI block initialization. > > With that driver implemented, it's not needed to do USI initialization > in protocol drivers anymore, so that code is removed from the serial > driver. > > Because USI driver is tristate (can be built as a module), serial driver > was reworked so it's possible to use its console part as a module too. > This way we can load serial driver module from user space and still have > serial console functional. > > Design features: > - "reg" property contains USI registers start address (0xc0 offset); > it's used in the driver to access USI_CON and USI_OPTION registers. > This way all USI initialization (reset, HWACG, etc) can be done in > USIv2 driver separately, rather than duplicating that code over > UART/SPI/I2C drivers > - System Register (system controller node) and its SW_CONF register > offset are provided in "samsung,sysreg" property; it's used to > select USI function (protocol to be used) > - USI function is specified in "samsung,mode" property; integer value > is used to simplify parsing > - there is "samsung,clkreq-on" bool property, which makes driver > disable HWACG control (needed for UART to work properly) > - PCLK and IPCLK clocks are both provided to USI node; apparently both > need to be enabled to access USI registers > - protocol nodes are embedded (as a child nodes) in USI node; it > allows correct init order, and reflects HW properly > - USI driver is a tristate: can be also useful from Android GKI > requirements point of view > - driver functions are implemented with further development in mind: > - we might want to add some DebugFs interface later > - some functions might need to be revealed to serial drivers with > EXPORT_SYMBOL(), and provide somehow pointer to needed USI driver > instance > - another USI revisions could be added (like USIv1) > > Changes in v3: > - Renamed compatible from samsung,exynos-usi-v2 to samsung,exynos850-usi > - Used clk_bulk API instead of handling each clock separately > - Spell check fixes and coding style fixes > - Improved dt-bindings doc > > Changes in v2: > - Renamed all 'usi_v2' wording to just 'usi' everywhere > - Removed patches adding dependency on EXYNOS_USI for UART/I2C/SPI > drivers > - Added patch: "tty: serial: samsung: Fix console registration from > module" > - Combined dt-bindings doc and dt-bindings header patches > - Reworked USI driver to be ready for USIv1 addition > - Improved dt-bindings > - Added USI_V2_NONE mode value > > Sam Protsenko (5): > dt-bindings: soc: samsung: Add Exynos USI bindings > soc: samsung: Add USI driver > tty: serial: samsung: Remove USI initialization > tty: serial: samsung: Enable console as module > tty: serial: samsung: Fix console registration from module > All this looks good to me. The serial driver changes should come together with this one (usi driver is now a dependency for them). If I am correct, mention this please in future cover letter (if there is such). I will still need DTSI changes for Exynos Auto v9 and confirmation that is not being used downstream and breaking DTB ABI is okay. Because this will be a non-bisctable and also a DTB ABI break. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel